Getting Started with External Widgets #25789906/HEAD / v50 |
Getting Started with External WidgetsThis page demonstrates the set up and development of a minimal external widget to bootstrap development. PrerequisitesSet up a directory where all the external widget files will reside. This directory is independent of codebeamer.Descriptor JSONAn external widget application can define multiple external widgets to be consumed by codebeamer. These widgets and their properties are defined in a JSON file which will be served by an HTTP server. This way, new widgets can be defined or existing ones can be reconfigured without touching codebeamer. For the full documentation, see External Widget API reference.
Technically it is also possible to run the external widget as additional web application in the Tomcat used to run codebeamer, but this approach is discouraged as bypass the isolation of the external widget from codebeamer.
Additional examples for Document View and Item Details View external widgets{ "documentViewWidgets": [ { "enabled": "${id == 1337 and name == 'Test' and type == 'Task'}", "externalWidgetConfig": { "id": "test-widget-1", "name": "Test Widget", "viewUrl": "http://localhost:4200/", "iconUrl": "http://localhost:4200/assets/cog.png" } }, { "enabled": "true", "externalWidgetConfig": { "id": "test-widget-2", "name": "Test Widget", "viewUrl": "http://localhost:4200/", "iconUrl": "http://localhost:4200/assets/cog.png" } } ] } { "itemDetailsWidgets": [ { "enabled": "true", "externalWidgetConfig": { "id": "test-widget-3", "name": "Test Widget", "viewUrl": "/", "iconUrl": "/assets/cog.png" } } ] } You can set up all three types of external widgets in one descriptor file. Find a complex example here: External Widget Development codebeamer Configuration
IFrame Integration Client LibraryIntland provides a javascript/typescript frontend library to allow the application running inside the IFrame to interact with the codebeamer UI. The library uses the postMessage API internally.
Simple ExampleThe below example showcases a minimal setup which is necessary to interact with codebeamer via the widget API and through the Swagger API. It shows the list of projects the user has access to.
Example project: https://github.com/intland/external-widget-simple-example
Typescript SupportThe library itself is also written in typescript, therefore, typing information is bundled in the npm package. For the sake of simplicity, the previous widget will be created in this example using Parcel, but any popular bundler (e.g., Webpack as used by Angular or Create React App) should be compatible.
Example project: https://github.com/intland/external-widget-typescript-example
|
Fast Links
codebeamer Overview codebeamer Knowledge Base Services by Intland Software |
This website stores cookies on your computer. These cookies are used to improve your browsing experience, constantly optimize the functionality and content of our website, furthermore helps us to understand your interests and provide more personalized services to you, both on this website and through other media. With your permission we and our partners may use precise geolocation data and identification through device scanning. You may click accept to consent to our and our partners’ processing as described above. Please be aware that some processing of your personal data may not require your consent, but you have a right to object to such processing. By using our website, you acknowledge this notice of our cookie practices. By accepting and continuing to browse this site, you agree to this use. For more information about the cookies we use, please visit our Privacy Policy.Your preferences will apply to this website only.