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

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

Issue 2983493002: config_service: make UI responsive and change colors. (Closed)
Patch Set: Move styles to the <style> section. 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="config-file-card.html"> 7 <link rel="import" href="config-file-card.html">
8 <link rel="import" href="../../bower_components/iron-ajax/iron-ajax.html"> 8 <link rel="import" href="../../bower_components/iron-ajax/iron-ajax.html">
9 <link rel="import" href="../../bower_components/iron-icons/iron-icons.html"> 9 <link rel="import" href="../../bower_components/iron-icons/iron-icons.html">
10 <link rel="import" href="../../bower_components/paper-item/paper-item.html"> 10 <link rel="import" href="../../bower_components/paper-item/paper-item.html">
11 <link rel="import" href="../../bower_components/paper-spinner/paper-spinner.html "> 11 <link rel="import" href="../../bower_components/paper-spinner/paper-spinner.html ">
12 <link rel="import" href="../../bower_components/polymer/polymer.html"> 12 <link rel="import" href="../../bower_components/polymer/polymer.html">
13 <link rel="import" href="../../bower_components/iron-icons/maps-icons.html"> 13 <link rel="import" href="../../bower_components/iron-icons/maps-icons.html">
14 14
15 <dom-module id="config-set"> 15 <dom-module id="config-set">
16 <template> 16 <template>
17 <style> 17 <style>
18 .spinner {
19 text-align: center;
20 }
21
18 .category { 22 .category {
19 font-size: 100%; 23 font-size: 100%;
20 font-family: sans-serif; 24 font-family: sans-serif;
21 } 25 }
22 26
23 .center { 27 .center {
24 width: 27%; 28 width: 20%;
25 margin: auto; 29 margin: auto;
26 text-align: left; 30 text-align: left;
27 } 31 }
28 32
29 .config-card { 33 .config-card {
30 padding-bottom: 1%; 34 padding-bottom: 1%;
31 animation: fadein 1.5s; 35 animation: fadein 1.5s;
32 } 36 }
33 37
34 @keyframes fadein { 38 @keyframes fadein {
35 from {opacity: 0} 39 from {opacity: 0}
36 to {opacity: 1} 40 to {opacity: 1}
37 } 41 }
38 42
39 .name { 43 .name {
40 font-size: 200%; 44 font-size: 200%;
41 font-family: sans-serif; 45 font-family: sans-serif;
46 word-wrap: break-word;
42 } 47 }
43 48
44 #refreshStatus { font-size: 35%; } 49 #refreshStatus { font-size: 80%; }
45 50
46 .title { 51 .title {
47 padding-bottom: 1%; 52 padding-bottom: 1%;
48 padding-top: 5%; 53 padding-top: 5%;
49 } 54 }
55
56 .paper-green { color: var(--paper-green-600); }
57
58 .paper-red { color: var(--paper-red-600); }
59
60 .paper-grey { color: var(--paper-grey-600); }
61
50 </style> 62 </style>
51 63
52 <iron-ajax 64 <iron-ajax
53 auto 65 auto
54 id="requestConfigs" 66 id="requestConfigs"
55 url="/_ah/api/config/v1/config-sets?config_set=[[category]]/[[name]][[ro ute.path]]&include_files=true&include_last_import_attempt=true" 67 url="/_ah/api/config/v1/config-sets?config_set=[[category]]/[[name]][[ro ute.path]]&include_files=true&include_last_import_attempt=true"
56 handle-as="json" 68 handle-as="json"
57 on-response="_onGotConfigFiles" 69 on-response="_onGotConfigFiles"
58 headers="[[auth_headers]]"> 70 headers="[[auth_headers]]">
59 </iron-ajax> 71 </iron-ajax>
60 72
61 <iron-ajax 73 <iron-ajax
62 id="refreshConfigs" 74 id="refreshConfigs"
63 url="/_ah/api/config/v1/reimport?config_set=[[category]]/[[name]][[route .path]]" 75 url="/_ah/api/config/v1/reimport?config_set=[[category]]/[[name]][[route .path]]"
64 method="POST" 76 method="POST"
65 handle-as="json" 77 handle-as="json"
66 on-error="_onRefreshError" 78 on-error="_onRefreshError"
67 on-response="_onCompleteRefresh" 79 on-response="_onCompleteRefresh"
68 headers="[[auth_headers]]"> 80 headers="[[auth_headers]]">
69 </iron-ajax> 81 </iron-ajax>
70 82
71 <div class="center title"> 83 <div class="center title">
72 <div class="name"> 84 <div class="name">
73 [[name]][[route.path]] 85 [[name]][[route.path]]
74 <template is="dom-if" if="[[_not(isLoading)]]"> 86 <template is="dom-if" if="[[_not(isLoading)]]">
75 <template is="dom-if" if="[[lastImportAttempt]]"> 87 <template is="dom-if" if="[[lastImportAttempt]]">
76 <template is="dom-if" if="[[lastImportAttempt.success]]"> 88 <template is="dom-if" if="[[lastImportAttempt.success]]">
77 <iron-icon id="valid" icon="icons:check-circle"></iron-icon> 89 <iron-icon id="valid" icon="icons:check-circle" class="paper-green "></iron-icon>
78 </template> 90 </template>
79 <template is="dom-if" if="[[_not(lastImportAttempt.success)]]"> 91 <template is="dom-if" if="[[_not(lastImportAttempt.success)]]">
80 <iron-icon id="invalid" icon="icons:warning"></iron-icon> 92 <iron-icon id="invalid" icon="icons:warning" class="paper-red"></i ron-icon>
81 </template> 93 </template>
82 </template> 94 </template>
83 <template is="dom-if" if="[[_not(lastImportAttempt)]]"> 95 <template is="dom-if" if="[[_not(lastImportAttempt)]]">
84 <iron-icon icon="icons:help"></iron-icon> 96 <iron-icon icon="icons:help" class="paper-grey"></iron-icon>
85 </template> 97 </template>
86 </template> 98 </template>
87 <template is="dom-if" if="[[auth_headers]]"> 99 <template is="dom-if" if="[[auth_headers]]">
88 <iron-icon icon="icons:refresh" on-tap="_forceRefresh"></iron-icon> 100 <iron-icon icon="icons:refresh" on-tap="_forceRefresh"></iron-icon>
89 <span id="refreshStatus">[[refreshMessage]]</span>
90 </template> 101 </template>
91 </div> 102 </div>
92 <div class="category"> 103 <div class="category">
93 [[_formatCategory(category)]] <br> 104 <p>[[_formatCategory(category)]]</p>
94 <template is="dom-if" if="[[_not(isLoading)]]"> 105 <template is="dom-if" if="[[_not(isLoading)]]">
95 <template is="dom-if" if="[[lastImportAttempt]]"> 106 <template is="dom-if" if="[[lastImportAttempt]]">
96 <template is="dom-if" if="[[_not(lastImportAttempt.success)]]"> 107 <template is="dom-if" if="[[_not(lastImportAttempt.success)]]">
97 Last import attempt failed: [[lastImportAttempt.message]] 108 Last import attempt failed: [[lastImportAttempt.message]]
98 </template> 109 </template>
99 </template> 110 </template>
100 <template is="dom-if" if="[[_not(lastImportAttempt)]]"> 111 <template is="dom-if" if="[[_not(lastImportAttempt)]]">
101 Last import attempt info not available. 112 Last import attempt info not available.
102 </template> 113 </template>
103 </template> 114 </template>
115 <p id="refreshStatus">[[refreshMessage]]</p>
104 </div> 116 </div>
105 </div> 117 </div>
106 <template is="dom-if" if="[[isRefreshing]]"> 118 <template is="dom-if" if="[[isRefreshing]]">
107 <div class="center"> 119 <div class="spinner">
108 <paper-spinner active></paper-spinner> 120 <paper-spinner active></paper-spinner>
109 </div> 121 </div>
110 </template> 122 </template>
111 <template is="dom-if" if="[[_not(isRefreshing)]]"> 123 <template is="dom-if" if="[[_not(isRefreshing)]]">
112 <template is="dom-if" if="[[isLoading]]"> 124 <template is="dom-if" if="[[isLoading]]">
113 <div class="center"> 125 <div class="spinner">
114 <paper-spinner active></paper-spinner> 126 <paper-spinner active></paper-spinner>
115 </div> 127 </div>
116 </template> 128 </template>
117 <template is="dom-if" if="[[_not(isLoading)]]"> 129 <template is="dom-if" if="[[_not(isLoading)]]">
118 <template is="dom-if" if="[[_isEmpty(files)]]"> 130 <template is="dom-if" if="[[_isEmpty(files)]]">
119 <div class="center" style="font-family: sans-serif;"> 131 <div class="center" style="font-family: sans-serif;">
120 No config files found. 132 No config files found.
121 </div> 133 </div>
122 </template> 134 </template>
123 <template is="dom-if" if="[[_not(_isEmpty(files))]]"> 135 <template is="dom-if" if="[[_not(_isEmpty(files))]]">
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 this.isLoading = false; 234 this.isLoading = false;
223 }, 235 },
224 236
225 _onRefreshError: function() { 237 _onRefreshError: function() {
226 this.isRefreshing = false; 238 this.isRefreshing = false;
227 this.refreshMessage = "Error: Files could not be refreshed."; 239 this.refreshMessage = "Error: Files could not be refreshed.";
228 } 240 }
229 }); 241 });
230 </script> 242 </script>
231 </dom-module> 243 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698