commit | 2cc6ffc61bb2d33190d836d2b95bf51b901f079c | [log] [tgz] |
---|---|---|
author | Jonas Bergler <jonas@bergler.name> | Thu Jan 21 11:47:55 2021 -0800 |
committer | Jonas Bergler <jonas@bergler.name> | Thu Jan 21 12:26:24 2021 -0800 |
tree | bdfb3081855ef379f52d4a7eb37d0b1658c1b236 | |
parent | 1373d88927ca6708e1fd37e0b5bbf10cbca91765 [diff] |
Fix calculation of durations in UI The logic in this method was using round resulting in some durations rendering incorrectly - specifically > 30 secs, >30 mins, >12 hours, etc The behavior I saw prior to this change is as follows: > start = new Date("2021-01-21 18:14:25.000000000") : Date Thu Jan 21 2021 18:14:25 GMT+1300 (New Zealand Daylight Time) > end = new Date("2021-01-21 18:44:35.000000000") : Date Thu Jan 21 2021 18:44:35 GMT+1300 (New Zealand Daylight Time) > generateDurationString(start, end) : "1 hour 30 min" After the change it is as follows: > start = new Date("2021-01-21 18:14:25.000000000") : Date Thu Jan 21 2021 18:14:25 GMT+1300 (New Zealand Daylight Time) > end = new Date("2021-01-21 18:44:35.000000000") : Date Thu Jan 21 2021 18:44:35 GMT+1300 (New Zealand Daylight Time) > generateDurationString(start, end) : "30 min 10 sec" Change also adds additional test coverage for these cases. Change-Id: Ie6d1d5b66a67b478000db49dc19525592f156120
This plugin provides a unified experience for checkers (CI systems, static analyzers, etc.) to integrate with Gerrit Code Review.
When upgrading the plugin, please use init:
java -jar gerrit.war init -d site_path
More details about “init” in https://gerrit-review.googlesource.com/Documentation/pgm-init.html
To run UI tests here will need install dependencies from both npm and bower.
npm run wct-test
should take care both for you, read more in package.json
.
You will need polymer-bridges
which is a submodule you can clone from: https://gerrit-review.googlesource.com/admin/repos/polymer-bridges
bazel build gr-checks:gr-checks
gerrit/plugins/checks/
folder and it will automatically served at http://localhost:8081/plugins_/checks/
(no need to pass it to --plugins flag)If your plugin is already enabled, then you can block it and then inject the compiled local verison.
See more about how to use dev helper extension to help you test here: https://gerrit.googlesource.com/gerrit-fe-dev-helper/+/master