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

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

Issue 2242543002: Make OAuth client id accessible to new ui w/o hardcoding (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-py@master
Patch Set: Address nits Created 4 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 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-index> 9 <swarming-index>
10 10
11 Swarming Index is the landing page for the Swarming UI. 11 Swarming Index is the landing page for the Swarming UI.
12 It will have links to all other pages and a high-level overview of the fleet . 12 It will have links to all other pages and a high-level overview of the fleet .
13 13
14 Usage: 14 Usage:
15 15
16 <swarming-index></swarming-index> 16 <swarming-index></swarming-index>
17 17
18 This is a top-level element.
19
18 Properties: 20 Properties:
19 None. This is a top-level element. 21 client_id: String, will be set by server-side template evaluation.
20 22
21 Methods: 23 Methods:
22 None. 24 None.
23 25
24 Events: 26 Events:
25 None. 27 None.
26 --> 28 -->
27 29
28 <link rel="import" href="/res/imp/bower_components/iron-ajax/iron-ajax.html"> 30 <link rel="import" href="/res/imp/bower_components/iron-ajax/iron-ajax.html">
29 31
30 <link rel="import" href="/res/imp/common/swarming-app.html"> 32 <link rel="import" href="/res/imp/common/swarming-app.html">
31 33
32 <dom-module id="swarming-index"> 34 <dom-module id="swarming-index">
33 <template> 35 <template>
34 <style include="swarming-app-style"> 36 <style include="swarming-app-style">
35 37
36 </style> 38 </style>
37 39
38 <swarming-app 40 <swarming-app
41 client_id="[[client_id]]"
39 auth_headers="{{auth_headers}}" 42 auth_headers="{{auth_headers}}"
40 name="Swarming" 43 name="Swarming"
41 busy="[[busy]]"> 44 busy="[[busy]]">
42 45
43 <iron-ajax id="request" 46 <iron-ajax id="request"
44 url="/_ah/api/swarming/v1/server/details" 47 url="/_ah/api/swarming/v1/server/details"
45 headers="[[auth_headers]]" 48 headers="[[auth_headers]]"
46 handle-as="json" 49 handle-as="json"
47 last-response="{{serverDetails}}" 50 last-response="{{serverDetails}}"
48 loading="{{busy}}"> 51 loading="{{busy}}">
49 </iron-ajax> 52 </iron-ajax>
50 53
51 <h1>HELLO WORLD</h1> 54 <h1>HELLO WORLD</h1>
52 55
53 <div>Server Version: [[serverDetails.server_version]]</div> 56 <div>Server Version: [[serverDetails.server_version]]</div>
54 57
55 </swarming-app> 58 </swarming-app>
56 59
57 </template> 60 </template>
58 <script> 61 <script>
59 Polymer({ 62 Polymer({
60 is: 'swarming-index', 63 is: 'swarming-index',
61 64
62 properties: { 65 properties: {
66 client_id: {
67 type: String,
68 },
69
63 auth_headers: { 70 auth_headers: {
64 type: Object, 71 type: Object,
65 observer: "signIn", 72 observer: "signIn",
66 }, 73 },
67 74
68 serverDetails: { 75 serverDetails: {
69 type: String, 76 type: String,
70 } 77 }
71 }, 78 },
72 79
73 signIn: function(){ 80 signIn: function(){
74 this.$.request.generateRequest(); 81 this.$.request.generateRequest();
75 }, 82 },
76 83
77 }); 84 });
78 </script> 85 </script>
79 </dom-module> 86 </dom-module>
OLDNEW
« no previous file with comments | « appengine/swarming/elements/res/imp/common/swarming-app.html ('k') | appengine/swarming/handlers_frontend.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698