Commit Graph

23 Commits

Author SHA1 Message Date
Michal Nasiadka cb0babfbd9 Fix # in dashboard url
Dashboard links should not contain /#/ - it get's redirected
and filters don't seem to work (unless page is reloaded).

See https://gerrit-review.googlesource.com/c/gerrit/+/321535

Change-Id: I27796395917a091ad3bd077e8e3e494f23373eee
2021-10-28 08:33:23 +02:00
Sean McGinnis a4e67c0702
Update Cinder review dashboard
The newer version of gerrit has a few changes in how queries work. There
is now a limit of 10 queries, and topic regex needs to use intopic
instead of topic for filtering.

Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Change-Id: I653f56db979ffba83ef5f9d573189cb2f288d71b
2021-05-04 16:06:16 -05:00
Steve Baker d11d1b0ae7 Add argument --open to open the link in a browser
This uses the python package webbrowser[1] to open the generated
link, saving crucial seconds.

[1] https://docs.python.org/3/library/webbrowser.html

Change-Id: I2e8e43df297b3d609af365917fdca620a5cd6c2a
2020-07-15 14:13:48 +12:00
Andreas Jaeger 098dbcbae4 Remove six
The repo does not support python2 anymore, remove usage of python2/3
compatability library.

Change-Id: Ifa95482b219bcf143762e9328c4200f1ffc772be
2020-01-11 17:29:56 +01:00
Doug Hellmann ba72dbe9f6 change default base url to use opendev.org
Change-Id: I1b4d0d46f20b2f076a5e0d6e049517aa3214a0d1
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2019-04-20 17:16:44 -04:00
Lee Yarwood ee70347b02 Replace deprecated parser.readfp call with parser.read_file
As recommended by the current warning ``DeprecationWarning: This method
will be removed in future versions.  Use 'parser.read_file()' instead.``

Change-Id: Ic4cbc4577519a60ba7fd60df05ff50bd8fccb149
2019-04-15 12:11:21 +01:00
Jenkins 05f900aefc Merge "Fix version reporting" 2016-04-19 22:43:04 +00:00
Andreas Jaeger 47b5d06b81 Fix version reporting
The project name is "gerrit-dash-creator" not reviewstats, fix version
reporting.

Change-Id: I09b9e79bf3fbb01d70731245d463421a619f0731
2016-04-19 15:47:21 +02:00
rossella 966789d2aa Fix template folder for Debian based distros
Debian based distros install files in /usr/local not in
sys.prefix. See [1] for more info.

[1] https://wiki.debian.org/Python#Deviations_from_upstream

Change-Id: I8bd9098f3f529a5ded2b6d2ec8b5081c34590ea8
2016-04-18 22:23:59 +00:00
Andreas Jaeger 14f7705d0c Find templates if package is installed
Find templates if the package is installed on the system.

Change-Id: Iefe71e9ea3e43cf2fce55307d698600bed0ef9f3
2016-04-14 21:24:25 +02:00
Swapnil Kulkarni (coolsvap) 15d0466e4c Keep py3.X compatibility for urllib
Change-Id: Ica557c50409e3a2972eb5e7821cfd693811c5a2e
Partial-Bug:#1280105
2015-12-30 13:13:27 +05:30
Sean Dague 2070f37de4 flip escape order
We were double escaping commas and dashes because we escaped them
first, then escaped the % with urlencode. If we do this in the other
order we get shorter and less fragile urls.

Change-Id: I0f5f2d486c66a62469eae02d884fb31de78df803
2015-10-02 08:38:06 -04:00
Jenkins ea59ef2f1a Merge "Automatically generate a dash based on "In Progress" bugs" 2015-07-07 16:16:51 +00:00
Doug Hellmann ca33694ecb fix default template directory
Using pkg_resources assumes that the template files will be installed
inside the python package, which they aren't. Update the default to be
simply "templates", which allows someone to use the dashboard creator
with: tox -e venv -- gerrit-dash-creator dashboards/cross-project.dash

Change-Id: I95adbbfcc4477eac1be07f4a5beec6a8e3ae093a
2015-06-29 19:49:22 +00:00
Angus Salkeld 3bd7dcc189 Automatically generate a dash based on "In Progress" bugs
This adds a script to get the "In Progress" bugs for a
particular project and builds prints a URL for the user.

 $ ./gerrit-bug-dash --milestone kilo-rc1 --tag kilo-rc-potential heat

Some notes:
 - it uses launchpadlib to talk to launchpad
 - The presentation of the dashboard could be improved but
   this is just a starting point.
 - The caching could be better.

What I wanted was to know was "what do I need to review for rc1"
(i.e. what are the bugs that are targeted for kilo-rc1 that are in
progress and have reviews up).

This scratches my itch, but will happily do some work on it if others
want it.

Change-Id: I4a97d59631ac9cd344206c6cc48164d6a0d7e57c
2015-05-13 16:03:26 +10:00
Sean Dague e24e1e7c99 further fixes for firefox
It turns out that unescaped '-' ends up making firefox sad. This fixes
it so the dashboards work again correctly in firefox.

This... also... was apparently what was killing Chrome. zomg.

Change-Id: I42dbc9354f2978f18fd8fa8ff4cc07f52f6557e1
2014-12-12 10:14:18 -05:00
Christian Berendt b7f0471b3e Make syntax checks of dashboard files possible
Change-Id: I587a06271c85a4f57f42041142d2aa20aea1a319
2014-09-01 09:17:36 +00:00
Christian Berendt b7cc43aaf4 Add support for templates
To create the URLs for all dashboard files inside dashboards use:

python gerrit_dash_creator/cmd/creator.py dashboards/*

Change-Id: I922c4e0606ae168c5c9b353d550629b4f52a8aff
2014-09-01 09:15:16 +00:00
Christian Berendt 73b781922c Add support for multiple files
This patch makes it possible to specify multiple dashboard files
at once.

Change-Id: I03aac98808f005768d0c3d7b4b197a79c7aa8048
2014-08-14 13:38:45 +02:00
Christian Berendt 60a0a5fe8a Handle configparser exceptions
Change-Id: I31949a3a1d23e2f254cb53260f9c42f8005d978f
2014-08-14 13:38:45 +02:00
Christian Berendt 63cee294ab Improve gerrit_dash_creator.cmd.creator
* use configparser instead of self written parsing
  (add new method read_dashboard_file)

* remove methods get_title and get_sections

* add requirement six (ConfigParser in Python2,
  configparser in Python3)

* remove import re and fileinput

* check if dashboard file exist and is readable before
  trying to parse it (new imports os and os.path)

* slighly change the output to be more informative

* add new parameter in section dashboard to make the
  base URL configurable

* check if necessary options in the used dashboard
  file are available

* improve exception handling and error output

* rename generate_url to generate_dashboard_url

* use correct exit codes (correct return values in the
  main method)

* rename internal argument name dash to dashboard_file

* add missing doc strings

Change-Id: Ifcaf20f7495b5619db30ac0046909b334672f756
2014-08-08 06:01:20 +00:00
Christian Berendt b2b77d6cd1 Add support for Tox
Change-Id: I6974c78e15e34cbe1ce28b2f43525dd267b814e4
2014-08-08 06:01:13 +00:00
Christian Berendt 9cfb18f1e6 Transform into a Python module
Change-Id: Idcd460c9ed8c5fe2ef52d3fbefbf9705eadc2710
2014-08-08 08:00:07 +02:00