Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2626)

Unified Diff: Tools/GardeningServer/ui/ct-commit-list.html

Issue 413073004: Show non-Blink ranges in sheriff-o-matic. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address review comments Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Tools/GardeningServer/ui/ct-commit.html ('k') | Tools/GardeningServer/ui/ct-commit-list-tests.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/GardeningServer/ui/ct-commit-list.html
diff --git a/Tools/GardeningServer/ui/ct-commit-list.html b/Tools/GardeningServer/ui/ct-commit-list.html
index 3fc9727bdc8fad5edd13c42c2efaf44b4752cc49..6ff19411001d97a75351606affa88d8304cde383 100644
--- a/Tools/GardeningServer/ui/ct-commit-list.html
+++ b/Tools/GardeningServer/ui/ct-commit-list.html
@@ -13,28 +13,40 @@ found in the LICENSE file.
display: block;
}
</style>
- <template repeat="{{revision in _revisions}}">
- <template if="{{commits[revision]}}">
- <ct-commit data="{{commits[revision]}}"></ct-commit>
+ <template repeat="{{ repository in commits.commits | _repositories }}">
+ <template repeat="{{ commit in repository | _commits }}">
+ <ct-commit data="{{ commit }}"></ct-commit>
</template>
</template>
</template>
<script>
Polymer({
- commits: {},
- first: 0,
- last: 0,
- _revisions: [],
+ commits: null,
+ first: null,
+ last: null,
- observe: {
- first: '_update',
- last: '_update',
+ _repositories: function(commits) {
+ if (!commits)
+ return [];
+ return Object.keys(commits).sort();
},
- _update: function() {
+ _commits: function(repository) {
+ var commits = [];
if (!this.first || !this.last)
- return;
- this._revisions = Number.range(this.first, this.last).every();
+ return commits;
+
+ var first = Number(this.first[repository]);
+ var last = Number(this.last[repository]);
+ if (first == last)
+ return commits;
+
+ if (first > last) {
+ console.warn('Revision range is backwards, which is invalid:', first, last);
+ return commits;
+ }
+
+ return this.commits.range(repository, first + 1, last);
},
});
</script>
« no previous file with comments | « Tools/GardeningServer/ui/ct-commit.html ('k') | Tools/GardeningServer/ui/ct-commit-list-tests.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698