Hello,
we develop a plugin for a customer that needs a dashboard that behaves like an own webapp. It has a search on it and some widgets.
To implement this as a macro and include it on a defined space seems not like the right choice.
I would prefer to implement an separate action that integrates into confluence.
What I need is the same layout/container like the initial dashboard has. Header, Controls, Footer. And I would use the body-content section to render our application.
One way to possibly do this may be to add a new action that overrides
com.atlassian.confluence.dashboard.actions.DashboardAction
and supply a custom velocity template copied from confluence/webapp/dashboard/dashboard.vm
My action is bound to host/confluence/plugins/pluginname/actionname.action
But this way I get a page that has a similar content as the Dashboard but without any javascript or css loaded.
Is there a proper way to get this done?
Is there a way to onherit the default confluence layout?
This is the default dashboard:
This is what I need:
Community moderators have prevented the ability to post new answers.
our solution:
Create an action class, inherit from ConfluenceActionSupport.
Use this as template in your atlassian-plugin.xml:
<xwork key="xwork-actions" name="XWork Actions"> <description>XWork actions</description> <!-- dashboard action --> <package name="myPackage" extends="default" namespace="/myaction"> <default-interceptor-ref name="defaultStack"/> <global-results> <result name="loginrequired" type="redirect">/login.action</result> <result name="notpermitted" type="dispatcher">/notpermitted.action</result> <result name="notfound" type="dispatcher">/fourohfour.action</result> </global-results> <action name="sonr-dashboard" class="com.company.MyAction" method="method"> <result name="success" type="velocity">/templates/dashboard-action.vm</result> </action> </package> </xwork>
Create your dashboard-action.vm template.
I think it has to include html>head>title and html>body elements.
I cannot say this is the minimal example. I just copied it from a working plugin.
Hope this helps!
Will give it a shot, thanks for the fast response!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, I'm having the same problem. Can you please explain what you did to override the main dashboard? Thank you very much.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Phillip, Sadly that solution didnt work for me.... Im probably doind something wrong, could you please give me a more detailed explanation on the different parts of the solution? Or a reference where this solution was taken? Any other parts to this code that I am missing? Thanks!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry not enough time for a detailed explanation. It may be not complete. See the docs on how exactly xwork actions work. See the docs how the templates in confluence are used. Get the confluence code and check the templates that are included. Also there should be a DashboardAction class. Or find a plugin that uses a separate dashboard, download it, and inspect their atlassian-plugin.xml. I know it is a pain to find out how this works. We went through this too. But i cannot take the time to explain it in detail. Sorry, and good luck ;) (there is a way to ask atlassian developers: https://developer.atlassian.com/help#contact-us )
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I will give it a shot! Thank for everything!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yes, see answer below
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Im having the same issue, were you able to solve it?
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.