A Gadget module allows Fisheye/Crucible to serve your file. See Gadget Development for more details on developing gadgets.
This page tells you how to add your gadget to an Atlassian application (JIRA, Confluence, etc) as a plugin. In short: Add a module type to your file.
You can choose to write a standalone gadget or a gadget embedded in a plugin.
Limitations if you do not embed your gadget in a plugin:
That said, there are two main reasons why you may be interested in writing standalone gadgets:
The rest of this page describes the gadget module type that you will use to embed your gadget within an Atlassian plugin.
Gadget plugin modules enable you to add your gadget to an Atlassian application (JIRA, Confluence, etc) as a plugin. Your gadget can then make use of the application's remote API to fetch data and interact with the application.
The element for the Gadget plugin module is . It allows the following attributes for configuration:
enabled-conditions - As of 3.5: Contains a list of condition or conditions that must be satisfied to make the gadget available for use within the system. Conditions defined under are always evaluated by the gadget system without any context.
local-conditions - As of 3.5: Contains a list of condition or conditions that must be satisfied for the gadget to be displayed in various pages within products. For example, dashboard in JIRA. Conditions defined under are evaluated by the individual products with product specific context. If a product does not evaluate these conditions, then these conditions will not have any effect in the system.
The syntax of the module type is:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
<atlassian-plugin name="Hello World" key="example.plugin.helloworld" plugins-version="2"> <plugin-info> <description>A basic gadget module</description> <vendor name="Atlassian Software Systems" url="http://www.atlassian.com"/> <version>1.0</version> </plugin-info> <gadget key="unique-gadget-key" location="path/to/gadget.xml" publish-location="my-custom-context/custom/location/gadget.xml"> <enabled-conditions> <condition class="com.atlassian.plugin.awesome.MyEnabledCondition"/> </enabled-conditions> <local-conditions> <conditions type="OR"> <condition class="com.atlassian.plugin.awesome.MyLocalCondition" /> <condition class="com.atlassian.plugin.awesome.MyInvertedLocalCondition" inverted="true" /> </conditions> </local-conditions> </gadget> </atlassian-plugin>
Gadgets published by an Atlassian container (such as JIRA or Confluence) are provided by the REST plugin module built into the Atlassian Gadgets framework. The URL of published gadgets has the following format:
As of 3.4, gadgets may be published under a customised path if the default path is undesirable using the publish-location attribute.
Using the default path:
Using the customised path. A gadget module such as the following:
<gadget key="activitystream-gadget" location="gadgets/activitystream-gadget.xml" publish-location="activitystream/gadgets/gadget.xml" />
Will be published under the URL below: