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

Unified Diff: appengine/sheriff_o_matic/ui/ct-master-failure-card.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, 4 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 | « appengine/sheriff_o_matic/ui/ct-last-updated.html ('k') | appengine/sheriff_o_matic/ui/ct-party-time.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/sheriff_o_matic/ui/ct-master-failure-card.html
diff --git a/appengine/sheriff_o_matic/ui/ct-master-failure-card.html b/appengine/sheriff_o_matic/ui/ct-master-failure-card.html
index 16951d8d3d2c8a0b9ee1a20a62bafafe535c7117..3556549eaf9f5e63c749a7532d588c859cdc8d3c 100644
--- a/appengine/sheriff_o_matic/ui/ct-master-failure-card.html
+++ b/appengine/sheriff_o_matic/ui/ct-master-failure-card.html
@@ -2,17 +2,14 @@
Copyright 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
--->
-
-<link rel="import" href="ct-button.html">
-<link href="../bower_components/core-tooltip/core-tooltip.html" rel="import">
-<link href="../bower_components/core-icon-button/core-icon-button.html" rel="import">
+--><html><head><link rel="import" href="ct-button.html">
+<link href="../bower_components/paper-tooltip/paper-tooltip.html" rel="import">
+<link href="../bower_components/paper-icon-button/paper-icon-button.html" rel="import">
<link href="../bower_components/paper-dialog/paper-action-dialog.html" rel="import">
<link href="../bower_components/paper-dialog/paper-dialog-transition.html" rel="import">
-<polymer-element name="ct-master-failure-card" attributes="group currentTrooper">
- <template>
- <style>
+<dom-module id="ct-master-failure-card">
+ <style>
:host {
display: block;
}
@@ -30,48 +27,60 @@ found in the LICENSE file.
color: red;
}
</style>
+ <template>
<div class="message">
- <a href="{{ group.failure.masterUrl }}">{{ group.failure.masterUrl }}</a>
- <span id="masterAlert">master data {{ group.failure.hoursSinceLastUpdate }} hours stale.</span>
- <core-icon-button icon="info" on-tap="{{ toggleHelp }}"></core-icon-button>
+ <a href$="{{ group.failure.masterUrl }}">{{ group.failure.masterUrl }}</a>
+ <span id="masterAlert">master data <span>{{ group.failure.hoursSinceLastUpdate }}</span> hours stale.</span>
+ <paper-icon-button icon="info" on-tap=" toggleHelp "></paper-icon-button>
</div>
<paper-action-dialog heading="About stale master data" id="helpDialog" transition="paper-transition-center">
<div>
- We weren't able to get up to date information from the master.<br/>
+ We weren't able to get up to date information from the master.<br>
This can mean the master is down, or (more often) that it's overloaded and having trouble
- serving up the JSON about it's current state.<br/>
+ serving up the JSON about it's current state.<br>
Something is wrong with the master and needs to be fixed ASAP, since it means that sheriff-o-matic
- has no idea about the state of the tree on this master.<br/>
+ has no idea about the state of the tree on this master.<br>
Things to check:
<ul>
<li><a href="https://uberchromegw.corp.google.com/i/chromium.infra.cron/builders/builder-alerts">Latest builder_alerts run</a></li>
- <li>Check the <a href="{{ group.failure.masterUrl }}">master itself</a> - it may be down.</li>
+ <li>Check the <a href$="{{ group.failure.masterUrl }}">master itself</a> - it may be down.</li>
<li>Check the Appengine logs for <a href="//chrome-build-extract.appspot.com"> chrome-build-extract.appspot.com</a> - it may be having problems caching this data from the master.</li>
<li>Instructions for <a href="https://x20web.corp.google.com/teams/chrome-infra/doc/html/playbook.html#restarting-a-buildbot-master-process">restarting masters</a> if all else fails.</li>
</ul>
- <template if="{{ currentTrooper }}">
+ <template is="dom-if" if="{{ currentTrooper }}">
<p>
- Latest trooper according to the rotation calendar is: <a target='_blank' href='mailto:{{currentTrooper}}@google.com'>{{ currentTrooper }}@google.com</a>
+ Latest trooper according to the rotation calendar is: <a target="_blank" href$="{{computeHref(currentTrooper)}}"><span>{{ currentTrooper }}</span>@google.com</a>
</p>
</template>
See <a href="https://sites.google.com/a/chromium.org/dev/developers/testing/contacting-a-trooper">Contact a Trooper</a> for further help.
</div>
- <ct-button label="OK" affirmative id="dialogOk"></ct-button>
+ <ct-button label="OK" affirmative="" id="dialogOk"></ct-button>
</paper-action-dialog>
</template>
-<script>
- Polymer({
- curretTrooper : 'unknown',
- toggleHelp: function() {
- this.$.helpDialog.toggle();
- },
- created: function() {
- var rot = CTRotations.getInstance();
- var today = new Date().toISOString().substr(0, 10);
- this.currentTrooper = rot.getOncaller(today, 'troopers');
- }
- });
-</script>
-</polymer-element>
+ <script>
+ Polymer({
+ is: 'ct-master-failure-card',
+ properties: {
+ currentTrooper: { notify: true },
+ curretTrooper: {
+ type: String,
+ value: 'unknown'
+ },
+ group: { notify: true }
+ },
+ toggleHelp: function () {
+ this.$.helpDialog.toggle();
+ },
+ created: function () {
+ var rot = CTRotations.getInstance();
+ var today = new Date().toISOString().substr(0, 10);
+ this.currentTrooper = rot.getOncaller(today, 'troopers');
+ },
+ computeHref: function (currentTrooper) {
+ return 'mailto:' + currentTrooper + '@google.com';
+ }
+ });
+ </script>
+</dom-module>
« no previous file with comments | « appengine/sheriff_o_matic/ui/ct-last-updated.html ('k') | appengine/sheriff_o_matic/ui/ct-party-time.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698