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

Unified Diff: Tools/GardeningServer/ui/ct-tree-status.html

Issue 403723005: Only show tree status if the tree isn't open. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | « no previous file | Tools/GardeningServer/ui/ct-tree-status-tests.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/GardeningServer/ui/ct-tree-status.html
diff --git a/Tools/GardeningServer/ui/ct-tree-status.html b/Tools/GardeningServer/ui/ct-tree-status.html
index 0ee4d32e8514e2da067cadbf746501d7e8c67054..7cc4b516fc9ecef22cec42747e8f0a3cdee0d58a 100644
--- a/Tools/GardeningServer/ui/ct-tree-status.html
+++ b/Tools/GardeningServer/ui/ct-tree-status.html
@@ -4,7 +4,7 @@ Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
-<polymer-element name="ct-tree-status" attributes="project status">
+<polymer-element name="ct-tree-status">
<template>
<style>
:host {
@@ -23,13 +23,17 @@ found in the LICENSE file.
background-color: tomato;
}
</style>
- {{project}}: {{message}}
+ <template if="{{ message }}">
abarth-chromium 2014/07/19 04:18:20 Move if to outer template?
ojan 2014/07/19 05:21:43 Good idea. I tried it, but it didn't work. I think
+ {{project}}: {{message}}
+ </template>
</template>
<script>
Polymer({
publish: {
+ project: '',
+ message: '',
status: {
- value: 'unknown',
+ value: 'open',
reflect: true,
},
},
@@ -43,18 +47,19 @@ found in the LICENSE file.
updateStatus: function(status) {
if (status.can_commit_freely) {
- this.message = 'Tree is open';
+ this.message = '';
abarth-chromium 2014/07/19 04:18:20 null?
ojan 2014/07/19 05:21:43 How does that work with V8 hidden classes? Will st
this.status = 'open';
+ return;
+ }
+
+ this.message = status.message + ' by ' + status.username;
+ var responseLowerCase = status.message.toLowerCase();
+ if (responseLowerCase.indexOf('throttled') != -1) {
+ this.status = 'throttled';
+ } else if (responseLowerCase.indexOf("closed") != -1) {
+ this.status = 'closed';
} else {
- this.message = status.message + ' by ' + status.username;
- var responseLowerCase = status.message.toLowerCase();
- if (responseLowerCase.indexOf('throttled') != -1) {
- this.status = 'throttled';
- } else if (responseLowerCase.indexOf("closed") != -1) {
- this.status = 'closed';
- } else {
- this.status = 'unknown';
- }
+ this.status = 'unknown';
}
},
});
« no previous file with comments | « no previous file | Tools/GardeningServer/ui/ct-tree-status-tests.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698