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

Side by Side Diff: appengine/swarming/elements/res/imp/common/swarming-app.html

Issue 2404883002: Add links to MP and resolve minor fixes (Closed)
Patch Set: Address Polymer comments Created 4 years, 2 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 2016 The LUCI Authors. All rights reserved. 2 Copyright 2016 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 This in an HTML Import-able file that contains the definition 6 This in an HTML Import-able file that contains the definition
7 of the following elements: 7 of the following elements:
8 8
9 <swarming-app> 9 <swarming-app>
10 10
11 <swarming-app> is meant to be used in top level elements to provide the header 11 <swarming-app> is meant to be used in top level elements to provide the header
12 toolbar and authentication. 12 toolbar and authentication.
13 13
14 It contains the definition of the following style modules: 14 It contains the definition of the following style modules:
15 15
16 swarming-app-style 16 swarming-app-style
17 17
18 <style include="shared-style"> contains styles to be shared among all 18 <style include="shared-style"> contains styles to be shared among all
19 apps, such as colors. 19 apps, such as colors.
20 20
21 Properties: 21 Properties:
22 busy: Boolean, If the busy spinner should be active. 22 busy: Boolean, If the busy spinner should be active.
23 client_id: String, Oauth 2.0 client id. It will be set by server-side 23 client_id: String, Oauth 2.0 client id. It will be set by server-side
24 template evaluation. 24 template evaluation.
25 name: String, the name of the app to be displayed. 25 name: String, the name of the app to be displayed.
26 26
27 auth_headers: Object, Use this as an argument to sk.request to set oauth2 he aders. 27 auth_headers: Object, Use this as an argument to sk.request to set oauth2 he aders.
28 permissions: Object, {String:Boolean} of permissions to perform various 28 permissions: Object, {String:Boolean} of permissions to perform various
29 behaviors, such as terminate_bot. 29 behaviors, such as terminate_bot.
30 server_version: Object, containing String server_version. server_version 30 server_details: Object, containing mutliple Strings including:
31 represents what git revision the server is using. 31 server_version: what git revision the server is using.
32 bot_version: A hash of the bot code being distributed. Isn't associated
33 with any git revisions
32 signed_in: Boolean, if the user is signed in. 34 signed_in: Boolean, if the user is signed in.
33 Methods: 35 Methods:
34 None. 36 None.
35 37
36 Events: 38 Events:
37 None. 39 None.
38 --> 40 -->
39 41
40 <link rel="import" href="/res/imp/bower_components/app-layout/app-layout.html"> 42 <link rel="import" href="/res/imp/bower_components/app-layout/app-layout.html">
41 <link rel="import" href="/res/imp/bower_components/iron-flex-layout/iron-flex-la yout-classes.html"> 43 <link rel="import" href="/res/imp/bower_components/iron-flex-layout/iron-flex-la yout-classes.html">
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 <app-toolbar> 102 <app-toolbar>
101 <div class="title left">[[name]]</div> 103 <div class="title left">[[name]]</div>
102 <paper-spinner-lite class="left" active="[[_or(busy,_busy1,_busy2)]]"> </paper-spinner-lite> 104 <paper-spinner-lite class="left" active="[[_or(busy,_busy1,_busy2)]]"> </paper-spinner-lite>
103 105
104 <a class="left" href="/newui/">Home</a> 106 <a class="left" href="/newui/">Home</a>
105 <a class="left" href="/newui/botlist">Bot List</a> 107 <a class="left" href="/newui/botlist">Bot List</a>
106 <a class="left" href="/newui/tasklist">Task List</a> 108 <a class="left" href="/newui/tasklist">Task List</a>
107 <div class="flex"></div> 109 <div class="flex"></div>
108 <div class="small right"> 110 <div class="small right">
109 Server: 111 Server:
110 <a href$="[[_versionLink(server_version)]]"> 112 <a href$="[[_versionLink(server_details)]]">
111 [[server_version.server_version]] 113 [[server_details.server_version]]
112 </a> 114 </a>
113 </div> 115 </div>
114 <auth-signin 116 <auth-signin
115 class="right" 117 class="right"
116 client_id="[[client_id]]" 118 client_id="[[client_id]]"
117 auth_headers="{{auth_headers}}" 119 auth_headers="{{auth_headers}}"
118 profile="{{profile}}" 120 profile="{{profile}}"
119 signed_in="{{signed_in}}"> 121 signed_in="{{signed_in}}">
120 </auth-signin> 122 </auth-signin>
121 </app-toolbar> 123 </app-toolbar>
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // If we aren't logged in, default to no permissions. 163 // If we aren't logged in, default to no permissions.
162 return {}; 164 return {};
163 }, 165 },
164 notify: true, 166 notify: true,
165 }, 167 },
166 profile: { 168 profile: {
167 type: Object, 169 type: Object,
168 notify: true, 170 notify: true,
169 }, 171 },
170 172
171 server_version: { 173 server_details: {
172 type: Object, 174 type: Object,
173 notify: true, 175 notify: true,
174 }, 176 },
175 177
176 signed_in: { 178 signed_in: {
177 type: Boolean, 179 type: Boolean,
178 value: false, 180 value: false,
179 notify: true, 181 notify: true,
180 }, 182 },
181 183
182 // private 184 // private
183 _busy1: { 185 _busy1: {
184 type: Boolean, 186 type: Boolean,
185 value: false, 187 value: false,
186 }, 188 },
187 _busy2: { 189 _busy2: {
188 type: Boolean, 190 type: Boolean,
189 value: false, 191 value: false,
190 } 192 }
191 193
192 }, 194 },
193 195
194 _load: function() { 196 _load: function() {
195 this._getJsonAsync("permissions", "/_ah/api/swarming/v1/server/permissio ns", 197 this._getJsonAsync("permissions", "/_ah/api/swarming/v1/server/permissio ns",
196 "_busy1", this.auth_headers); 198 "_busy1", this.auth_headers);
197 this._getJsonAsync("server_version", "/_ah/api/swarming/v1/server/detail s", 199 this._getJsonAsync("server_details", "/_ah/api/swarming/v1/server/detail s",
198 "_busy2", this.auth_headers) 200 "_busy2", this.auth_headers)
199 }, 201 },
200 202
201 _versionLink: function(version) { 203 _versionLink: function(version) {
202 if (!version || !version.server_version) { 204 if (!version || !version.server_version) {
203 return undefined; 205 return undefined;
204 } 206 }
205 var split = version.server_version.split("-"); 207 var split = version.server_version.split("-");
206 if (split.length !== 2) { 208 if (split.length !== 2) {
207 return undefined; 209 return undefined;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 border: none; 300 border: none;
299 line-height: 20px; 301 line-height: 20px;
300 vertical-align: middle; 302 vertical-align: middle;
301 } 303 }
302 304
303 select { 305 select {
304 overflow-y: auto; 306 overflow-y: auto;
305 } 307 }
306 </style> 308 </style>
307 </dom-module> 309 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698