[2.6.1] How to create a dashboard?

702 views
Skip to first unread message

Grégory Bougeard

unread,
Jul 3, 2013, 10:39:49 AM7/3/13
to repo-d...@googlegroups.com
Hi,

I'm experimenting dashboards and I really like it. Actualy I just tried the on-the-fly dashboard display depending on URL and I'd like now to create my own dashboards.

I'm a little bit confused about the "refs/meta/dashboards/* branch of the project" thing in the doc.
I don't get how to do it. I mean remotely of course.

I'd like to create an "Open & Merged changes" for a branch dashboard. 

I tried to add a file my_dashboard and then push it to the All-projects repository like this git push origin HEAD:refs/meta/dashboards/my_branch but it does not what I was waiting for and now I have a 500 error when I go to the All-projects dashboards.

Do you have a step by step how to? I'm not a git noob but I don't get it right now.

Another question : There is a ${project} token documented, are there other ones? like ${branch} maybe?

Björn Pedersen

unread,
Jul 3, 2013, 11:56:05 AM7/3/13
to repo-d...@googlegroups.com

The error is probably coming from a bug in gerrit(fixed in the master branch:https://gerrit-review.googlesource.com/#/c/47423/ ) if no title is specified in dashboard config.

Grégory Bougeard

unread,
Jul 3, 2013, 12:09:04 PM7/3/13
to repo-d...@googlegroups.com
In gerrit logs I have the following :

[2013-07-03 18:04:24,301] WARN  com.google.gerrit.server.project.DashboardsCollection : Cannot parse dashboard All-Projects:refs/meta/dashboards/RIT-9840:groups: Invalid line in config file
[2013-07-03 18:04:24,301] ERROR com.google.gerrit.httpd.restapi.RestApiServlet : Error in GET /projects/common/dashboards?inherited
java.lang.NullPointerException
	at com.google.gerrit.server.project.DashboardsCollection.replace(DashboardsCollection.java:190)
	at com.google.gerrit.server.project.DashboardsCollection.parse(DashboardsCollection.java:163)
	at com.google.gerrit.server.project.ListDashboards.scanDashboards(ListDashboards.java:121)
	at com.google.gerrit.server.project.ListDashboards.scan(ListDashboards.java:97)
	at com.google.gerrit.server.project.ListDashboards.apply(ListDashboards.java:69)
	at com.google.gerrit.server.project.ListDashboards.apply(ListDashboards.java:42)
	at com.google.gerrit.httpd.restapi.RestApiServlet.service(RestApiServlet.java:290)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

It would be great if in the WARN there was the config line which cannot be parsed.

Here is my config file :

[dashboard]
  description = Suivi  Open and Merged changes
  title = Suivi RIT 9840
  foreach = branch:RIT-9840
[section "Open Changes"]
  query = status:open
[section "Merged Changes"]
  query = status:merged
Reply all
Reply to author
Forward
0 new messages