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

Side by Side Diff: appengine/swarming/templates/restricted_bot.html

Issue 2500503002: Redirecting old ui to new ui (Closed)
Patch Set: Remove post handlers 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
(Empty)
1 {% extends "swarming/base.html" %}
2
3
4 {% block headers %}
5 <style>
6 h1 {
7 margin-top: 10px;
8 margin-bottom: 10px;
9 }
10
11 h3 {
12 margin-bottom: 5px;
13 }
14
15 table.property_table {
16 font-family: monospace;
17 border-spacing: 0;
18 }
19
20 table.property_table tbody tr:nth-child(even) {
21 background-color: #eeeeee;
22 }
23
24 table.property_table td {
25 padding-left: 1em;
26 padding-right: 1em;
27 }
28
29 table.property_table tbody tr:hover {
30 background-color: #eeffee;
31 }
32
33 .bad_version {
34 background-color: #ffffee;
35 }
36
37 .dead_bot,.quarantined_bot {
38 background-color: #ffdddd;
39 }
40
41 </style>
42 {% endblock %}
43
44
45 {% block body %}
46 {% import 'swarming/bot_view.html' as bot_view %}
47 <h1>Bot details</h1>
48 <a href="/restricted/bots">Back to bots list</a>
49 <br/>
50 <a href="{{try_link}}">Try out the new bot page UI</a>
51 <p>
52
53 {% if bot %}
54 <table class="property_table">
55 <tbody>
56 <tr title="The bot id is what uniquely identify the bot.">
57 <td>ID</td>
58 <td>{{bot.id}}</td>
59 </tr>
60 <tr title="How the bot is authenticated by the server.">
61 <td>Authenticated as</td>
62 <td>{{bot.authenticated_as}}
63 </tr>
64 <tr title="IP address that the server saw the connection from.">
65 <td>External IP</td>
66 <td>{{bot.external_ip}}</td>
67 </tr>
68 <tr title="First time ever the bot contacted the server.">
69 <td>First seen</td>
70 <td>{{bot.first_seen_ts|datetimeformat}}</td>
71 </tr>
72 <tr title="Last time the bot contacted the server.">
73 <td>Last contact</td>
74 <td nowrap {% if bot.is_dead(now) %}class="dead_bot"{% endif %}>
75 {{(now-bot.last_seen_ts)|timedeltaformat}} ago
76 {% if is_admin and bot.is_dead(now) and bot.first_seen_ts %}
77 &nbsp;&nbsp;
78 <form id="form_delete" method="post"
79 action="/restricted/bot/{{bot.id}}/delete">
80 <input type="hidden" name="xsrf_token" value="{{xsrf_token}}" />
81 <input type="submit" value="Delete" />
82 </form>
83 {% endif %}
84 </td>
85 </tr>
86 <tr title="Bot's dimension is the list of properties that the requests dim ensions are matched against. If all the requests dimensions are in the bot dimen sions, the bot is allowed to execute the task.">
87 <td>Dimensions</td>
88 <td>{{bot_view.bot_dimensions(bot)}}</td>
89 </tr>
90 <tr title="Bot's state is informative only.">
91 <td>State</td>
92 <td {% if bot.quarantined %}class="quarantined_bot"{% endif %}>{{bot_vie w.render_dict(bot.state)}}</td>
93 </tr>
94 <tr title="Version is based on the content of swarming_bot.zip which is th e swarming bot code.">
95 <td>Version</td>
96 <td>{{bot.version[:8]}}</td>
97 </tr>
98 <tr title="The version the server expects the bot to be using.">
99 <td>Expected version</td>
100 <td>{{current_version[:8]}}</td>
101 </tr>
102 <tr title="Current task handled by the bot, if any.">
103 <td>Current task</td>
104 <td>
105 {% if bot.task %}
106 <a href="/user/task/{{bot.task_id}}">{{bot.task_name}}</a>
107 {% else %}
108 &#8209;&#8209;
109 {% endif %}
110 </td>
111 </tr>
112 <tr title="Sum of duration of all the tasks listed below.">
113 <td>Total running time<br>for past {{ run_results|length }} tasks</td>
114 <td>{{run_time|timedeltaformat}}</td>
115 </tr>
116 <tr title="Gaps between all the tasks listed below where the bot didn't ex ecute a task. The bot could be rebooting during this time." >
117 <td>Total idle time</td>
118 <td>{{idle_time|timedeltaformat}}</td>
119 </tr>
120 </tbody>
121 </table>
122 <p>
123
124 {% if events %}
125 {# TODO(maruel): Merge events and tasks together. #}
126 <h3>Recent events</h3>
127 <table class="property_table">
128 <thead>
129 <tr>
130 <th>Timestamp</th>
131 <th>Type</th>
132 <th>Quarantined</th>
133 <th>Task</th>
134 <th>Msg</th>
135 <th>Version</th>
136 </tr>
137 </thead>
138 <tbody>
139 {% for event in events %}
140 {# TODO(maruel): Create hover text that includes all the data (including
141 dimensions and state about the event #}
142 <tr>
143 <td>{{event.ts|succinctdatetimeformat}}</td>
144 <td>{{event.event_type}}</td>
145 <td>
146 {% if event.quarantined %}{{event.quarantined}}{% endif %}
147 </td>
148 <td>
149 {% if event.task_id %}
150 <a href="/user/task/{{event.task_id}}">{{event.task_id}}</a>
151 {% else %}
152 &#8209;&#8209;
153 {% endif %}
154 </td>
155 <td>
156 {% if event.message %}
157 <pre>{{event.message}}</pre>
158 {% else %}
159 &#8209;&#8209;
160 {% endif %}
161 </td>
162 <td {%if event.version != current_version%}class="bad_version"{%endif% }>
163 {{event.version[:8]}}
164 </td>
165 </tr>
166 {% endfor %}
167 </tbody>
168 </table>
169 {% endif %}
170
171 {% if run_results %}
172 <h3>Previous tasks</h3>
173 <table class="property_table">
174 <thead>
175 <tr>
176 <th>Task</th>
177 <th>Started</th>
178 <th>Duration</th>
179 <th>Idle time after</th>
180 <th>Result</th>
181 </tr>
182 </thead>
183 <tbody>
184 {% set previous = false %}
185 {% for run_result in run_results %}
186 <tr class="request {% if run_result.failure %}failed_test{% endif%}">
187 <td>
188 <a href="/user/task/{{run_result.task_id}}">
189 {{run_result.name}}</a>
190 </td>
191 <td nowrap>{{run_result.started_ts|succinctdatetimeformat}}</td>
192 <td nowrap align=right>{{run_result.duration_now(now)|timedeltaforma t}}</td>
193 <td nowrap align=right>
194 {% if previous and previous.started_ts and run_result.ended_ts %}
195 {# Note that tasks are listed in reverse order #}
196 {{(previous.started_ts - run_result.ended_ts)|timedeltaformat}}
197 {% elif run_result.ended_ts %}
198 {% if not cursor %}
199 {{(now - run_result.ended_ts)|timedeltaformat}}
200 {% else %}
201 &#8209;&#8209;
202 {% endif %}
203 {% else %}
204 (Still running)
205 {% endif %}
206 </td>
207 <td>{{run_result.to_string()}}</td>
208 </tr>
209 {% set previous = run_result %}
210 {% endfor %}
211 </tbody>
212 </table>
213 {% endif %}
214
215 {% if cursor %}
216 <br>
217 <a href="/restricted/bot/{{bot.id}}?limit={{limit}}&cursor={{cursor}}"}>
218 Next page</a>
219 {% endif %}
220
221 {% else %}
222
223 Bot {{bot_id}} not found.
224
225 {% endif %}
226
227 {% endblock %}
OLDNEW
« no previous file with comments | « appengine/swarming/templates/bot_view.html ('k') | appengine/swarming/templates/restricted_botslist.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698