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

Side by Side Diff: appengine/sheriff_o_matic/ui/ct-health.html

Issue 1315693002: SoM: upgrade Polymer from 0.5 to 1.0 Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: get bower_components from polymer_1.0.4 Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 <!-- 1 <!--
2 Copyright 2015 The Chromium Authors. All rights reserved. 2 Copyright 2015 The Chromium Authors. All rights reserved.
3 Use of this source code is governed by a BSD-style license that can be 3 Use of this source code is governed by a BSD-style license that can be
4 found in the LICENSE file. 4 found in the LICENSE file.
5 --> 5 --><html><head><link rel="import" href="ct-trooper-card.html">
6 6 <dom-module id="ct-health">
7 <link rel="import" href="ct-trooper-card.html"> 7 <template>
8 <polymer-element name="ct-health" attributes="failures" noscript>
9 <template>
10 <h2>System Health</h2> 8 <h2>System Health</h2>
11 <template repeat="{{ group in failures.failures['health'] }}"> 9 <template is="dom-repeat" items="{{failures.failures['health']}}" as="group">
12 <template if="{{ group.data.category == 'trooper' }}"> 10 <template is="dom-if" if="{{computeIf2(group)}}">
13 <ct-trooper-card class='{{ { snoozed: group.isSnoozed } | tokenList }}' gr oup="{{ group.data }}"></ct-trooper-card> 11 <ct-trooper-card group="{{ group.data }}" class$="{{computeClass(group)}}" ></ct-trooper-card>
14 </template> 12 </template>
15 </template> 13 </template>
16 <template if="{{ !failures.failures['health'] || failures.failures['health'].l ength == 0 }}"> 14 <template is="dom-if" if="{{computeIf(failures)}}">
17 <ct-party-time></ct-party-time> 15 <ct-party-time></ct-party-time>
18 </template> 16 </template>
19 </template> 17 </template>
20 </polymer-element> 18 <script>
19 Polymer({
20 is: 'ct-health',
21 properties: { failures: { notify: true } },
22 computeIf: function (failures) {
23 return !failures.failures['health'] || failures.failures['health'].lengt h == 0;
24 },
25 computeIf2: function (group) {
26 return group.data.category == 'trooper';
27 },
28 computeClass: function (group) {
29 return this.tokenList({ snoozed: group.isSnoozed });
30 },
31 tokenList: function (obj) {
32 var pieces = [];
33 for (key in obj) {
34 if (obj[key]) {
35 pieces.push(key);
36 }
37 }
38 return pieces.join(' ');
39 }
40 });
41 </script>
42 </dom-module>
OLDNEW
« no previous file with comments | « appengine/sheriff_o_matic/ui/ct-failure-card-buttons.html ('k') | appengine/sheriff_o_matic/ui/ct-last-updated.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698