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

Side by Side Diff: appengine/config_service/ui/src/config-ui/config-set-card.html

Issue 2991013002: config_service: Added revision and timestamp to config-set-cards and config-set pages (Closed)
Patch Set: Nit: forgot to add launch icon to config set page Created 3 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 unified diff | Download patch
OLDNEW
1 <!-- 1 <!--
2 Copyright 2017 The LUCI Authors. All rights reserved. 2 Copyright 2017 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 6
7 <link rel="import" href="../../bower_components/iron-icons/iron-icons.html"> 7 <link rel="import" href="../../bower_components/iron-icons/iron-icons.html">
8 <link rel="import" href="../../bower_components/paper-button/paper-button.html"> 8 <link rel="import" href="../../bower_components/paper-button/paper-button.html">
9 <link rel="import" href="../../bower_components/paper-card/paper-card.html"> 9 <link rel="import" href="../../bower_components/paper-card/paper-card.html">
10 <link rel="import" href="../../bower_components/polymer/polymer.html"> 10 <link rel="import" href="../../bower_components/polymer/polymer.html">
11 <link rel="import" href="../../bower_components/iron-icons/maps-icons.html"> 11 <link rel="import" href="../../bower_components/iron-icons/maps-icons.html">
12 <link rel="import" href="../../bower_components/iron-flex-layout/iron-flex-layou t.html"> 12 <link rel="import" href="../../bower_components/iron-flex-layout/iron-flex-layou t.html">
13 <link rel="import" href="../../bower_components/paper-tooltip/paper-tooltip.html "> 13 <link rel="import" href="../../bower_components/paper-tooltip/paper-tooltip.html ">
14 <link rel="import" href="../../common/common-behaviors.html">
14 15
15 <dom-module id="config-set-card"> 16 <dom-module id="config-set-card">
16 <template> 17 <template>
17 <style> 18 <style>
18 a { 19 a {
19 text-decoration: none; 20 text-decoration: none;
20 color: inherit; 21 color: inherit;
21 } 22 }
22 23
23 paper-card { 24 paper-card {
(...skipping 22 matching lines...) Expand all
46 47
47 .paper-red { color: var(--paper-red-600); } 48 .paper-red { color: var(--paper-red-600); }
48 49
49 .paper-grey { color: var(--paper-grey-600); } 50 .paper-grey { color: var(--paper-grey-600); }
50 51
51 </style> 52 </style>
52 53
53 <a href="#/[[name]]"> 54 <a href="#/[[name]]">
54 <paper-card elevation="2"> 55 <paper-card elevation="2">
55 <div class="card-content"> 56 <div class="card-content">
56 <div class="config-title">[[name]] 57 <div class="config-title">
58 [[name]]
57 <div class="validation"> 59 <div class="validation">
60 <iron-icon id="launch"
61 icon="icons:launch"
62 class="paper-grey"
63 on-tap="_openConfig">
Sergey Berezin 2017/07/31 20:21:18 This correctly opens a new window, but also opens
cwpayton 2017/07/31 23:40:53 Done.
64 </iron-icon>
65 <paper-tooltip for="launch" offset="0">
66 [[link]]
67 </paper-tooltip>
58 <template is="dom-if" if="[[lastImportAttempt]]" restamp="true"> 68 <template is="dom-if" if="[[lastImportAttempt]]" restamp="true">
59 <template is="dom-if" if="[[lastImportAttempt.success]]" restamp ="true"> 69 <template is="dom-if" if="[[lastImportAttempt.success]]" restamp ="true">
60 <iron-icon id="successful-import" 70 <iron-icon id="successful-import"
61 icon="icons:check-circle" 71 icon="icons:check-circle"
62 class="paper-green"> 72 class="paper-green">
63 </iron-icon> 73 </iron-icon>
64 <paper-tooltip for="successful-import" offset="0"> 74 <paper-tooltip for="successful-import" offset="0">
65 Last import succeeded. 75 Last import succeeded.
66 </paper-tooltip> 76 </paper-tooltip>
67 </template> 77 </template>
(...skipping 10 matching lines...) Expand all
78 <template is="dom-if" if="[[_not(lastImportAttempt)]]" restamp="tr ue"> 88 <template is="dom-if" if="[[_not(lastImportAttempt)]]" restamp="tr ue">
79 <iron-icon id="no-import" 89 <iron-icon id="no-import"
80 icon="icons:help" 90 icon="icons:help"
81 class="paper-grey"> 91 class="paper-grey">
82 </iron-icon> 92 </iron-icon>
83 <paper-tooltip for="no-import" offset="0"> 93 <paper-tooltip for="no-import" offset="0">
84 Last import attempt info not available. 94 Last import attempt info not available.
85 </paper-tooltip> 95 </paper-tooltip>
86 </template> 96 </template>
87 </div> 97 </div>
98 <p>Revision: [[revision]]</p>
99 <p>Timestamp: [[timestamp]]</p>
Sergey Berezin 2017/07/31 20:21:18 I'd make this more compact: - Print only the fist
cwpayton 2017/07/31 23:40:53 Done.
88 </div> 100 </div>
89 </div> 101 </div>
90 </paper-card> 102 </paper-card>
91 </a> 103 </a>
92 104
93 </template> 105 </template>
94 <script> 106 <script>
95 Polymer({ 107 Polymer({
96 is: "config-set-card", 108 is: "config-set-card",
97 109
98 properties: { 110 behaviors: [ConfigUIBehaviors.CommonBehavior],
99 name: {
100 type: String
101 },
102 111
103 lastImportAttempt: { 112 _openConfig: function() {
104 type: Object 113 window.open(this.link);
105 }, 114 }
106 },
107
108 _not: function(b) {
109 return !b;
110 },
111
112 }); 115 });
113 </script> 116 </script>
114 </dom-module> 117 </dom-module>
115 118
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698