This page last changed on Aug 05, 2009 by edawson.

Web UI plugin modules allow you to add links, tabs and sections of links to the Fisheye user interface. By adding a link to a servlet plugin, you can add your own pages to the UI. Your pages will need to ask FishEye to decorate them.
There are also Crucible Web Items.

On this page:

Web Section Definition

You may choose to create your own web sections or add to FishEye's predefined ones.

Here is a sample atlassian-plugin.xml fragment for a web section:

<web-section key="testsection" name="example.section" location="system.fisheye.file">
      <label key="System Fisheye File Section"/>
</web-section>

<web-item key="eg7" section="system.fisheye.file/example.section">
      <label key="System Fisheye File/Example Section"/>
</web-item>

The above example will creates a new section in system.fisheye.file. You can then add a web item in the section. The location of the web item in the second code block is the same as the first, but it uses the web item example.section which is defined in the first code block.

Web Items Listing and Reference

system.admin Links on the admin menu. Sections: repositories, global, system. application, user
system.fisheye.changeset This item relates to actions performed on a changeset, displayed next to the review creation link in the FishEye UI application, user, changeset, repository
system.fisheye.directory Per directory links. Displayed in the directory tree in the left-hand navigation bar, under the Fisheye Source tab. application, user, directory, repository
system.fisheye.file Per file links. Displayed in the 'Files' table on the Fisheye Browse tab. The plugin must supply a section which is used as the column header in the table. application, user, file, repository
system.fisheye.repo Actions which can be performed on a repository. Displayed on the main page next to browse/search/changelog/chart application, user, repository
system.fisheye.revision Actions performed for a revision. Displayed next to the 'Changeset: xxx' text on a Fisheye file view page, and next to the status of each revision (deleted, new, diffs, etc) on the Changelog, Browse and Changeset pages. application, user, changeset, revision, repository
system.main Links on the Fisheye or Crucible main page. These appear at the bottom of the FishEye or Crucible boxes on the main page. Sections: fisheye, crucible application, user

Web Item Conditions

Conditions control whether a given web item will be displayed.

com.atlassian.fisheye.plugin.web.conditions.HasCrucible
This condition measures whether the product runs with a Crucible license.

com.atlassian.fisheye.plugin.web.conditions.HasFishEye
This condition measures whether the product runs with a FishEye license. This is useful to prevent a Crucible plugin from rendering in an instance that only has a FishEye license.

com.atlassian.fisheye.plugin.web.conditions.HasProjectPermission
This condition measures whether the user has project permission. Takes parameters.

com.atlassian.fisheye.plugin.web.conditions.HasReviewPermission
This condition measures whether the user has review permission (i.e. is able to take part in the review). Takes parameters.

com.atlassian.fisheye.plugin.web.conditions.IsFile
This condition passes if there is a context repository and path, and that path references a repository file.

com.atlassian.fisheye.plugin.web.conditions.IsReviewInState
This condition measures whether the review is in a given state. Takes parameters.

com.atlassian.fisheye.plugin.web.conditions.IsRootOrDirectory
This condition passes if there is either: a context repository and no repository context path; or a repository path is present, and that path references a directory.

com.atlassian.fisheye.plugin.web.conditions.IsSystemAdministrator
This condition measures whether the user has system administrator permissions.

com.atlassian.fisheye.plugin.web.conditions.UserCanAccessCrucible
This condition measures whether the user can access Crucible.

com.atlassian.fisheye.plugin.web.conditions.UserLoggedInCondition
This condition measures whether the user is logged in.

Condition Parameters

The following conditions take parameters:

  • HasProjectPermission
  • HasReviewPermission
  • IsReviewInState

The usage and conditions that these parameters apply to are tabled below.

Parameter Value Parameter Name Description Applies to
action:abandonReview actionName Causes the current review to be abandoned. HasProjectPermission, HasReviewPermission
action:approveReview actionName Causes the current review to be approved. HasProjectPermission, HasReviewPermission
action:closeReview actionName Causes the current review to be closed. HasProjectPermission, HasReviewPermission
action:recoverReview actionName Causes the current review to be recovered. HasProjectPermission, HasReviewPermission
action:reopenReview actionName Causes the current review to be re-opened. HasProjectPermission, HasReviewPermission
action:rejectReview actionName Causes the current review to be rejected. HasProjectPermission, HasReviewPermission
action:submitReview actionName Causes the current review to be submitted. HasProjectPermission, HasReviewPermission
action:summarizeReview actionName Causes the current review to be summarised. HasProjectPermission, HasReviewPermission
Approval stateName Measures whether the current review is in the approval state. IsReviewInState
Closed stateName Measures whether the current review is in the closed state. IsReviewInState
Dead stateName Measures whether the current review is in the dead state. IsReviewInState
Draft stateName Measures whether the current review is in the draft state. IsReviewInState
Review stateName Measures whether the current review is in the review state. IsReviewInState
Rejected stateName Measures whether the current review is in the rejected state. IsReviewInState
Summarize stateName Measures whether the current review is in the summarize state. IsReviewInState
Unknown stateName Measures whether the current review is in the unknown state. IsReviewInState

Applying these values will cause the action to be enacted on the currently logged-in user.

Example of Condition Parameters in Use

       <condition class="com.atlassian.fisheye.plugin.web.conditions.HasReviewPermission">
           <param name="actionName" value="action:approveReview"/>
       </condition>

Example of a Web Item Condition in Use

<web-item key="hello-file2" section="system.crucible.review.fileitem">
       <link>#set($x = 'test')/plugins/servlet/${x}-servlet?name=${helper.global.user.displayName}</link>
       <label key="Id: {0}">
           <param name="param0">${helper.review.permaId.id}</param>
       </label>
       <condition class="com.atlassian.fisheye.plugin.web.conditions.IsReviewInState">
           <param name="stateName" value="Draft"/>
       </condition>
</web-item>

Visual Locations of FishEye Web Items

system.admin

This item relates to links in the left navigation bar, in the FishEye admin menu.

Screenshot: FishEye's system.admin/repositories Web Item

Cannot resolve external resource into attachment.

Screenshot: FishEye's system.admin/global Web Item

Cannot resolve external resource into attachment.

Screenshot: FishEye's system.admin/system Web Item

Cannot resolve external resource into attachment.


system.fisheye.changeset

This item relates to actions performed on a changeset, displayed next to the review creation link in the FishEye UI.

Screenshot: FishEye's system.fisheye.changeset Web Item




system.fisheye.directory

This item relates to links in the directory tree shown in the left hand navigation bar, under the FishEye Source Tab.

Screenshot: FishEye's system.fisheye.directory Web Item




system.fisheye.file

This item relates to per-file links on the FishEye Browse Tab.

Screenshot: FishEye's system.fisheye.file Web Item




system.fisheye.repo

This item relates to actions which can be performed on a repository on the FishEye main page.

Screenshot: FishEye's system.fisheye.repo Web Item




system.fisheye.revision

This item relates to actions performed for a revision in the FishEye UI.

Screenshot: FishEye's system.fisheye.revision Web Item


Screenshot: FishEye's system.fisheye.revision Web Item, additional location




system.main/fisheye

This item relates to links at the bottom of the FishEye main page.

Screenshot: FishEye's system.main/fisheye Web Item



Looking for the Crucible web items? Click here.


Document generated by Confluence on Nov 11, 2009 21:21