I think I've looked everywhere and still can't find an answer, where can I get a list of decorators to use in my Stash Servlet plugin? I want to define the decorator in my velocity file, like this: <meta name="decorator" content="something.here">
Can anyone tell me where I can find a list of decorators that can be used?
Hi Annie,
As Charles mentioned above, we have the following pages available to decorate in Stash 2.3:
However, I would like to note that they are all public APIs. The stash.form decorator is going to be deprecated in Stash 2.4.
As you've noticed, there's currently no published documentation for the decorators so I have made written some that will be published with Stash 2.4 next week. I've also implemented a project level decorator which will be available in Stash 2.4 as well.
I've created an example plugin which demonstrates decorating various pages in Stash 2.4 - you can find the sources here: https://bitbucket.org/atlassian/stash-example-plugin
Hi Annie,
I'm afraid the the only list we currently have of our public decorators are the four cross-product ones listed here:
https://developer.atlassian.com/display/DOCS/Web+Resource+Plugin+Module
In addition we have the following Stash specific decorators, which aren't technically public (and might conceivably change between releases):
And that's it actually. I will follow-up with my colleagues tomorrow and see which of these would be appropriate to document and make sure that happens.
Cheers,
Charles
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmm, in that case, what would you suggest is the best way for me to add another tab to the Project view page: (my local URL:http://localhost:7990/stash/projects/PROJECT_1) ? I want to add it after the Settings 'tab'. So far I have something like this defined:
1
2
3
4
5
6
7
8
|
< web-item name = "Plugin Project Admin" key = "plugin-project-admin" section = "atl.project.nav" weight = "10000" > < condition class = "com.atlassian.stash.web.conditions.HasProjectPermissionCondition" > < param name = "permission" >PROJECT_ADMIN</ param > </ condition > < description key = "plugin-admin.description" >Configure plugin for project</ description > < label key = "plugin-admin.label" >Plugin Config</ label > < link absolute = "true" linkId = "project-config-tab" >#plugin-project-config</ link > </ web-item > |
This adds a link to the same level as the other tabs, but I don't know how to make it so that when I click the tab/link it takes me to a page that is decorated in the same way as the other 'tabs' on that page. Any ideas?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmm, in that case, what would you suggest is the best way for me to add another tab to the Project view page: (my local URL: http://localhost:7990/stash/projects/PROJECT_1) ? I want to add it after the Settings 'tab'. So far I have something like this defined:
<web-item name="Plugin Project Admin" key="plugin-project-admin" section="atl.project.nav" weight="10000"> <condition class="com.atlassian.stash.web.conditions.HasProjectPermissionCondition"> <param name="permission">PROJECT_ADMIN</param> </condition> <description key="plugin-admin.description">Configure plugin for project</description> <label key="plugin-admin.label">Plugin Config</label> <link absolute="true" linkId="project-config-tab">#plugin-project-config</link> </web-item>
This adds a link to the same level as the other tabs, but I don't know how to make it so that when I click the tab/link it takes me to a page that is decorated in the same way as the other 'tabs' on that page. Any ideas?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Annie,
I'm afraid this isn't a (supported) way of doing that at the moment. :(
I've raised an issue for adding the decorator, which should really be there.
https://jira.atlassian.com/browse/STASH-3351
Cheers,
Charles
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmm, that's a shame, can you suggest any other way of adding a section for administering my plugin specific settings at a project level instead of repo level?
Basically what I want to do is allow a project admin to set some config up for my plugin and have it apply to all repositories within a project (instead of them having to go into every repo and set the config there).
Thanks for your replies!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.