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

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

Issue 2978003002: config_service: add a popup for icons and make cards more compact. (Closed)
Patch Set: Created 3 years, 5 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 14
14 <dom-module id="config-set-card"> 15 <dom-module id="config-set-card">
15 <template> 16 <template>
16 <style> 17 <style>
17 a { text-decoration: none; } 18 a {
19 text-decoration: none;
20 color: inherit;
21 }
18 22
19 paper-card { 23 paper-card {
20 width: 100%; 24 width: 100%;
21 } 25 }
22 26
23 p { 27 p {
24 color: var(--paper-grey-600); 28 color: var(--paper-grey-600);
25 word-wrap: break-word; 29 word-wrap: break-word;
26 } 30 }
27 31
28 .config-title { 32 .config-title {
29 @apply --paper-font-headline; 33 @apply --paper-font-headline;
30 word-wrap: break-word; 34 word-wrap: break-word;
31 } 35 }
32 36
33 .validation { 37 .validation {
34 float: right; 38 float: right;
35 font-size: 15px; 39 font-size: 15px;
36 vertical-align: middle; 40 vertical-align: middle;
37 } 41 }
38 42
39 .config-open { color: var(--google-blue-500); }
40
41 .paper-green { color: var(--paper-green-600); } 43 .paper-green { color: var(--paper-green-600); }
42 44
43 .paper-red { color: var(--paper-red-600); } 45 .paper-red { color: var(--paper-red-600); }
44 46
45 .paper-grey { color: var(--paper-grey-600); } 47 .paper-grey { color: var(--paper-grey-600); }
46 48
47 </style> 49 </style>
48 50
49 <paper-card elevation="2"> 51 <a href="#/[[name]]">
50 <div class="card-content"> 52 <paper-card elevation="2">
51 <div class="config-title">[[_formatName(name)]] 53 <div class="card-content">
52 <div class="validation"> 54 <div class="config-title">[[_formatName(name)]]
53 <template is="dom-if" if="[[lastImportAttempt]]" restamp="true"> 55 <div class="validation">
54 <template is="dom-if" if="[[lastImportAttempt.success]]" restamp=" true"> 56 <template is="dom-if" if="[[lastImportAttempt]]" restamp="true">
55 <iron-icon icon="icons:check-circle" class="paper-green"></iron- icon> 57 <template is="dom-if" if="[[lastImportAttempt.success]]" restamp ="true">
58 <iron-icon id="successful-import"
59 icon="icons:check-circle"
60 class="paper-green">
61 </iron-icon>
62 <paper-tooltip for="successful-import" offset="0">
63 Last import succeeded.
64 </paper-tooltip>
65 </template>
66 <template is="dom-if" if="[[_not(lastImportAttempt.success)]]" r estamp="true">
67 <iron-icon id="failed-import"
68 icon="icons:warning"
69 class="paper-red">
70 </iron-icon>
71 <paper-tooltip for="failed-import" offset="0">
72 Last import failed.
73 </paper-tooltip>
74 </template>
56 </template> 75 </template>
57 <template is="dom-if" if="[[_not(lastImportAttempt.success)]]" res tamp="true"> 76 <template is="dom-if" if="[[_not(lastImportAttempt)]]" restamp="tr ue">
58 <iron-icon icon="icons:warning" class="paper-red"></iron-icon> 77 <iron-icon id="no-import"
78 icon="icons:help"
79 class="paper-grey">
80 </iron-icon>
81 <paper-tooltip for="no-import" offset="0">
82 Last import attempt info not available.
83 </paper-tooltip>
59 </template> 84 </template>
60 </template> 85 </div>
61 <template is="dom-if" if="[[_not(lastImportAttempt)]]" restamp="true ">
62 <iron-icon icon="icons:help" class="paper-grey"></iron-icon>
63 </template>
64 </div> 86 </div>
87 <p>Path: [[name]]</p>
65 </div> 88 </div>
66 <p>Path: [[name]]</p> 89 </paper-card>
67 </div> 90 </a>
68 <div class="card-actions"> 91
69 <div class="horizontal justified">
70 <a href="#/[[name]]">
71 <paper-button class="config-open">Open</paper-button>
72 </a>
73 </div>
74 </div>
75 </paper-card>
76 </template> 92 </template>
77 <script> 93 <script>
78 Polymer({ 94 Polymer({
79 is: "config-set-card", 95 is: "config-set-card",
80 96
81 properties: { 97 properties: {
82 name: { 98 name: {
83 type: String 99 type: String
84 }, 100 },
85 101
86 lastImportAttempt: { 102 lastImportAttempt: {
87 type: Object 103 type: Object
88 }, 104 },
89 }, 105 },
90 106
91 _not: function(b) { 107 _not: function(b) {
92 return !b; 108 return !b;
93 }, 109 },
94 110
95 _formatName: function(name) { 111 _formatName: function(name) {
96 var tempName = name.substring(name.indexOf("/") + 1); 112 var tempName = name.substring(name.indexOf("/") + 1);
97 return tempName.includes("/") ? 113 return tempName.includes("/") ?
98 tempName.substring(0, tempName.indexOf("/")) : tempName; 114 tempName.substring(0, tempName.indexOf("/")) : tempName;
99 }, 115 }
100 116
101 }); 117 });
102 </script> 118 </script>
103 </dom-module> 119 </dom-module>
104 120
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698