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

Side by Side Diff: appengine/swarming/ui/res/imp/common/task-behavior.html

Issue 2497663003: Make silent task retries more obvious (Closed)
Patch Set: rebase Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 <!-- 1 <!--
2 Copyright 2016 The LUCI Authors. All rights reserved. 2 Copyright 2016 The LUCI Authors. All rights reserved.
3 Use of this source code is governed under the Apache License, Version 2.0 3 Use of this source code is governed under the Apache License, Version 2.0
4 that can be found in the LICENSE file. 4 that can be found in the LICENSE file.
5 5
6 It contains the definition of the following Behaviors: 6 It contains the definition of the following Behaviors:
7 7
8 SwarmingBehaviors.TaskBehavior 8 SwarmingBehaviors.TaskBehavior
9 9
10 This behavior contains many constants and some functions that are useful 10 This behavior contains many constants and some functions that are useful
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 if (state === this.BOT_DIED) { 68 if (state === this.BOT_DIED) {
69 return "bot_died"; 69 return "bot_died";
70 } 70 }
71 if (state === this.COMPLETED_FAILURE) { 71 if (state === this.COMPLETED_FAILURE) {
72 return "failed_task"; 72 return "failed_task";
73 } 73 }
74 if (state === this.RUNNING || state === this.PENDING) { 74 if (state === this.RUNNING || state === this.PENDING) {
75 return "pending_task"; 75 return "pending_task";
76 } 76 }
77 return ""; 77 return "";
78 } 78 },
79
80 state: function(result) {
81 if (!result) {
82 return "";
83 }
84 if (result.state === this.COMPLETED) {
85 if (result.failure) {
86 return this.COMPLETED_FAILURE;
87 }
88 if (result.try_number === "0") {
89 return this.COMPLETED_DEDUPED;
90 }
91 return this.COMPLETED_SUCCESS;
92 }
93 return result.state;
94 },
95
96 _stateClass: function(result) {
97 return this.stateClass(this.state(result));
98 },
79 }; 99 };
80 })(); 100 })();
81 </script> 101 </script>
82 102
83 <dom-module id="task-style"> 103 <dom-module id="task-style">
84 <template> 104 <template>
85 <style> 105 <style>
86 /* These colors are from buildbot */ 106 /* These colors are from buildbot */
87 .failed_task { 107 .failed_task {
88 background-color: #ffdddd; 108 background-color: #ffdddd;
89 } 109 }
90 .bot_died { 110 .bot_died {
91 background-color: #cccccc; 111 background-color: #cccccc;
92 } 112 }
93 .exception { 113 .exception {
94 background-color: #edd2ff; 114 background-color: #edd2ff;
95 } 115 }
96 .pending_task { 116 .pending_task {
97 background-color: #fffc6c; 117 background-color: #fffc6c;
98 } 118 }
99 </style> 119 </style>
100 </template> 120 </template>
101 </dom-module> 121 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698