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

Unified Diff: Tools/GardeningServer/ui/ct-unexpected-failures.html

Issue 443243002: Move treestatus.js to a model class. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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-tree-status-tests.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/GardeningServer/ui/ct-unexpected-failures.html
diff --git a/Tools/GardeningServer/ui/ct-unexpected-failures.html b/Tools/GardeningServer/ui/ct-unexpected-failures.html
index a65ef667a00c84a370b70355f8668d689e31cfc1..c41b58e0bfd6e614f23ecba0b9853d9cdbf7e349 100644
--- a/Tools/GardeningServer/ui/ct-unexpected-failures.html
+++ b/Tools/GardeningServer/ui/ct-unexpected-failures.html
@@ -6,6 +6,7 @@ found in the LICENSE file.
<link rel="import" href="../bower_components/paper-button/paper-button.html">
<link rel="import" href="../model/ct-commit-log.html">
+<link rel="import" href="../model/tree-status.html">
<link rel="import" href="ct-failure-analyzer.html">
<link rel="import" href="ct-failure-stream.html">
<link rel="import" href="ct-party-time.html">
@@ -23,14 +24,14 @@ found in the LICENSE file.
padding: 3px;
}
- ct-tree-status[status=open] {
+ ct-tree-status[state=open] {
margin: 0;
padding: 0;
}
</style>
<ct-failure-analyzer id="analyzer" failures="{{ failures }}" builderLatestRevisions="{{ builderLatestRevisions }}"></ct-failure-analyzer>
- <ct-tree-status project="chromium"></ct-tree-status>
- <ct-tree-status project="blink"></ct-tree-status>
+ <ct-tree-status status="{{ treeStatuses['chromium'] }}" state="{{ treeStatuses['chromium'].status }}"></ct-tree-status>
+ <ct-tree-status status="{{ treeStatuses['blink'] }}" state="{{ treeStatuses['blink'].status }}"></ct-tree-status>
<ct-revision-details id="revisionDetails" builderLatestRevisions="{{ builderLatestRevisions }}" revisionLog="{{ revisionLog }}" tree="{{ tree }}"></ct-revision-details>
<ct-party-time failures="{{ failures }}" tree="{{ tree }}"></ct-party-time>
<ct-failure-stream groups="{{ failures[tree] }}" commits="{{ revisionLog }}" tree="{{ tree }}"></ct-failure-stream>
@@ -44,6 +45,15 @@ found in the LICENSE file.
revisionLog: new CTCommitLog(),
tree: '',
+ created: function() {
+ this.treeStatuses = {};
+
+ var projects = ['chromium', 'blink'];
+ for (var i = 0; i < projects.length; i++) {
+ this.treeStatuses[projects[i]] = new TreeStatus(projects[i]);
+ }
+ },
+
attached: function() {
this.update();
setInterval(this.update.bind(this), kUpdateFrequency);
@@ -53,9 +63,9 @@ found in the LICENSE file.
// FIXME: These shouldn't update if there's already an update in progress.
this.revisionLog.update();
this.$.analyzer.update();
- var treeStatuses = this.shadowRoot.querySelectorAll("ct-tree-status");
- for (var i = 0; i < treeStatuses.length; i++)
- treeStatuses[i].update();
+ Object.keys(this.treeStatuses, function(tree, status) {
+ status.update();
+ });
},
});
})();
« no previous file with comments | « Tools/GardeningServer/ui/ct-tree-status-tests.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698