Embedding Dashboard Problem
Hi,
We want to embedding custom Dashboard in our application and develop some viewlets to show some chart. We follow the document : https://jazz.net/wiki/bin/view/Main/EmbeddingDashboards Our enviorment: A server run Jazz Foundation Server 3.0.0. Our application Run on a Jetty Server as eclipse plug-in. Our Target Platform base on Foundation SDK 3.0.1&Eclipse(We update to the latest one : 20110215-2034 dev-offering We try to write a service which call JTS dashboard service like this: @Override "/4" is the URL when we access the JFS Server Dashboard by "/jts/web/dashboard/4" We run this service, it returns a html page with Loading in it. <DOCTYPE> How can I embed it in our application? And I try the way in the bottom of the above document: I added a dijit widget: var myDashboard = new Dashboard({ I found that it call our application web service as below: /service/com.ibm.team.dashboard.common.internal.service.IDashboardRestService/initData But we didn't register the restService, I thought maybe the service is run on our JFS Server, how could I config it? Is there any other information can help me to solve it? Thanks. :D |
9 answers
This topic applies to 3.0.1 only (it is subtly mentioned at the top). It is also brand new so you'd need a foundation build and JTS from >=2011/02/15.
As for the initData call, you're right, it's supposed to call the JTS. I missed a section in the wiki topic - you need to add two elements to your rootservices document: <jd:viewletServiceRoot rdf:resource="https://example.com/jts"/> <jd:viewletWebUIRoot rdf:resource="https://example.com/yourapp"/> The service root should be the JTS and the Web UI root your app. I will add it to the wiki topic shortly. This is a temporary measure that I hope to remove in the future. As for the service returning HTML, it will return HTML if the Accept header requests it. If you want to get the RDF of the resource, you should add an Accept header with application/rdf+xml. |
Thanks for your instructions. Our target platform is update to 2011/02/15. But our JFS is still 3.0.0. Will it take any problem?
We add the two elements in our application's rootservices, but the dijit widget still try to GET the application's service as /service/com.ibm.team.dashboard.common.internal.service.IDashboardRestService/initData and return 403 code. And for dashboard Service, when I add Accept Header with application/rdf+xml, it still return a loading page, how could I combine the service and the dashboard widget in our application? |
Unfortunately the Dashboard widget won't work as described in the wiki topics in foundation 3.0, as I had to add code in 3.0.1 to support this.
As for the problem with returning a loading page, I should clarify, if HTML is acceptable as per any of the Accept headers, it will return HTML (the loading page you're seeing), otherwise if application/rdf+xml is acceptable, it will return that. |
Unfortunately the Dashboard widget won't work as described in the wiki topics in foundation 3.0, as I had to add code in 3.0.1 to support this. Hi, I see you added url parameter in the dashboard.js.^_^ So is there any solution that I can only use the Dashboard Service API, and generate My Dashboard Page? I don't know how to deal the response. Or I had better wait for another build? :lol: |
It is probably more feasible to wait for another build, rather than trying to hack the 3.0 Dashboard javascript code. 3.0.1 M13 is scheduled to be declared on Feb 25th, and should be published to jazz.net shortly after that.
|
It is probably more feasible to wait for another build, rather than trying to hack the 3.0 Dashboard javascript code. 3.0.1 M13 is scheduled to be declared on Feb 25th, and should be published to jazz.net shortly after that. Hi, curtispd, Is that widget work now ? Our team want to develop with viewlet in our Application before March,15th, is that possible? Where can I get the latest JFS SDK? Thanks |
Yes, it should be possible with M13 once it's declared and published to jazz.net. There are still some approvals pending, and the self-hosting deployment is on monday evening, so it should be available for download soon.
|
Yes, it should be possible with M13 once it's declared and published to jazz.net. There are still some approvals pending, and the self-hosting deployment is on monday evening, so it should be available for download soon. Hi, curtispd, Sorry to bother you again. The dashboard is still not work.LOL I use the build 20110224-0215 as our target-platform, it still not work. I debug the code found such things: Dashboard.js ==> com.ibm.team.dashboard.web.ui.internal.DashboardInitializationData ==> DashboardClient.getInitData(srh); ==>DashboardClient.js ==> /* the parameter repositoryRoot is always null? becasue of this, the net.jazz.ajax._dataServerRoot is null and when it post request ,it calls
so it call the service as our application contextroot in the front of url. I guess it should be our config problem, but I don't know how to solve it. Is that related the step: <jd:viewletServiceRoot rdf:resource="https://example.com/jts"/> <jd:viewletWebUIRoot rdf:resource="https://example.com/yourapp"/> I added it in our application rootService feed back. And the first is remote Server, the second is the local one. Just for test, I add a line in my code: net.jazz.ajax._dataServerRoot= "https://remote-jfs-server :9443/jts" before we add the widget. The dashboard is unnormally showed. It can show the layout of dashboard. Everything is ok but the viewlet is only has its winodw, the inner info is still loading. FYI, I add com.ibm.team.dashboard.viewlets.web bundle in our lanuch file. But the category of viewlets is empty. Thanks a lot :P |
Hi,
The viewletServiceRoot is currently used to populate the net.jazz.ajax._dataServerRoot. This is to support legacy repository-type services on fronting applications that don't have repository installed - it sends the requests to the JTS instead. So the dashboard service requests should be going to whatever you set the viewletServiceRoot to in your fronting app's rootservices URL. A restart may be needed to make this happen as I think the values can be cached in some cases. Also, just to clarify, you mentioned a remote JTS - this is for your application's JTS, not the JTS of some remote viewlet, for example. If you're running a server in standalone mode, i.e. the fronting app and JTS in one launch, then you would point the viewletServiceRoot to your local server. I noticed in your example "https://remote-jfs-server :9443/jts" is that there's an invalid space before the ":9443" part. This would result in an invalid URL which would probably cause bad things to happen. Let me know if this helps. |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.