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

Unified Diff: appengine/swarming/templates/bot_view.html

Issue 2523433002: Add link to old ui back in (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/swarming/handlers_frontend.py ('k') | appengine/swarming/templates/restricted_bot.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/swarming/templates/bot_view.html
diff --git a/appengine/swarming/templates/bot_view.html b/appengine/swarming/templates/bot_view.html
new file mode 100644
index 0000000000000000000000000000000000000000..2f2739d1b0d2b5f68243f5b750606759d5119ccf
--- /dev/null
+++ b/appengine/swarming/templates/bot_view.html
@@ -0,0 +1,60 @@
+{% macro bot_dimensions(bot) %}
+ {% if bot %}{{ render_dict(bot.dimensions) }}{% endif %}
+{% endmacro %}
+
+{% macro render_dict(data) %}
+ {% if data %}
+ {% for k, v in data.iteritems()|sort %}
+ <strong>{{k}}</strong>:
+ {% if v is string %}
+ {{v}}
+ <br>
+ {% elif v is mapping %}
+ <br>{{render_dict_idented(v, '&nbsp;&nbsp;')}}
+ {% elif v is sequence %}
+ {{v|sort|join(' | ')}}
+ <br>
+ {% else %}
+ {{v}}
+ <br>
+ {% endif %}
+ {% endfor %}
+ {% endif %}
+{% endmacro %}
+
+{% macro render_dict_idented(data, indent) %}
+ {% if data %}
+ {% for k, v in data.iteritems()|sort %}
+ {{indent|safe}}<strong>{{k}}</strong>:
+ {% if v is string %}
+ {{v}}<br>
+ {% elif v is mapping %}
+ <br>{{render_dict_idented(v, indent + '&nbsp;&nbsp;')}}
+ {% elif v is sequence %}
+ {{v|join(' | ')}}<br>
+ {% else %}
+ {{v}}<br>
+ {% endif %}
+ {% endfor %}
+ {% endif %}
+{% endmacro %}
+
+{% macro bot_link(bot_id, is_privileged_user) %}
+ {% if bot_id %}
+ {% if is_privileged_user %}
+ <a href="/oldui/restricted/bot/{{bot_id}}">{{bot_id}}</a>
+ {% else %}
+ {{bot_id}}
+ {% endif %}
+ {% else %}
+ &#8209;&#8209;
+ {% endif %}
+{% endmacro %}
+
+{% macro pending_star(task) %}
+ {% if task.is_pending %}*{% endif %}
+{% endmacro %}
+
+{% macro running_star(task) %}
+ {% if task.is_running %}*{% endif %}
+{% endmacro %}
« no previous file with comments | « appengine/swarming/handlers_frontend.py ('k') | appengine/swarming/templates/restricted_bot.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698