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

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

Issue 2962703003: config_service: Add authentication to the UI. (Closed)
Patch Set: Added TODO to handlers.py and confirmed versions in bower.json 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/polymer/polymer.html"> 7 <link rel="import" href="../../bower_components/polymer/polymer.html">
8 <link rel="import" href="../../bower_components/app-layout/app-layout.html"> 8 <link rel="import" href="../../bower_components/app-layout/app-layout.html">
9 <link rel="import" href="../../bower_components/paper-search/paper-search-bar.ht ml"> 9 <link rel="import" href="../../bower_components/paper-search/paper-search-bar.ht ml">
10 <link rel="import" href="../../bower_components/app-route/app-location.html"> 10 <link rel="import" href="../../bower_components/app-route/app-location.html">
11 <link rel="import" href="../../bower_components/app-route/app-route.html"> 11 <link rel="import" href="../../bower_components/app-route/app-route.html">
12 12
13 <link rel="import" href="../../common/auth-signin.html">
13 <link rel="import" href="config-set.html"> 14 <link rel="import" href="config-set.html">
14 <link rel="import" href="front-page.html"> 15 <link rel="import" href="front-page.html">
15 16
16 <dom-module id="config-ui"> 17 <dom-module id="config-ui">
17 <template> 18 <template>
18 <style> 19 <style>
20 * {
21 font-family: sans-serif;
22 }
23
19 app-toolbar { 24 app-toolbar {
20 background-color: #efefef; 25 background-color: #efefef;
21 color: #232323; 26 color: #232323;
22 } 27 }
23 28
24 app-header { 29 app-header {
25 @apply --layout-fixed-top; 30 @apply --layout-fixed-top;
26 } 31 }
27 32
28 .logo { 33 .logo {
29 height: 100%; 34 height: 100%;
30 } 35 }
31 36
37 .right {
38 margin-left:15px;
39 }
40
32 .title { 41 .title {
33 padding-left: 1%; 42 padding-left: 1%;
34 padding-bottom: 0.5%; 43 padding-bottom: 0.5%;
35 font-size: 150%; 44 font-size: 150%;
36 font-family: sans-serif;
37 } 45 }
38 </style> 46 </style>
39 47
40 <app-header reveals> 48 <app-header reveals>
41 <app-toolbar> 49 <app-toolbar>
42 <image class="logo" src="/static/images/chromium.png"/> 50 <image class="logo" src="/static/images/chromium.png"/>
43 <div class="title" main-title> 51 <div class="title" main-title>
44 Configuration Service (not fully implemented) 52 Configuration Service (not fully implemented)
45 </div> 53 </div>
54
55 <template is="dom-if" if="[[client_id]]">
56 <auth-signin
57 class="right"
58 client_id="[[client_id]]"
59 auth_headers="{{auth_headers}}"
60 profile="{{profile}}"
61 signed_in="{{signed_in}}">
62 </auth-signin>
63 </template>
64 <template is="dom-if" if="[[!client_id]]">
65 <div class="right">No OAauth client id found.</div>
66 </template>
46 </app-toolbar> 67 </app-toolbar>
47 </app-header> 68 </app-header>
48 69
49 70
50 <app-location route="{{route}}" use-hash-as-path></app-location> 71 <app-location route="{{route}}" use-hash-as-path></app-location>
51 <app-route route="{{route}}" 72 <app-route route="{{route}}"
52 pattern="/services/:serviceName" 73 pattern="/services/:serviceName"
53 data="{{serviceData}}" 74 data="{{serviceData}}"
54 tail="{{serviceTail}}" 75 tail="{{serviceTail}}"
55 active="{{serviceActive}}"></app-route> 76 active="{{serviceActive}}"></app-route>
56 77
57 <app-route route="{{route}}" 78 <app-route route="{{route}}"
58 pattern="/projects/:projectName" 79 pattern="/projects/:projectName"
59 data="{{projectData}}" 80 data="{{projectData}}"
60 tail="{{projectTail}}" 81 tail="{{projectTail}}"
61 active="{{projectActive}}"></app-route>--> 82 active="{{projectActive}}"></app-route>
62 83
63 <app-route route="{{route}}" 84 <app-route route="{{route}}"
64 pattern="/" 85 pattern="/"
65 active="{{frontPageActive}}"></app-route> 86 active="{{frontPageActive}}"></app-route>
66 87
67 <div hidden$="[[!frontPageActive]]"> 88 <template is="dom-if" if="[[frontPageActive]]">
68 <front-page></front-page> 89 <front-page auth_headers="{{auth_headers}}"></front-page>
69 </div> 90 </template>
70 91
71 <div hidden$="[[!serviceActive]]"> 92 <template is="dom-if" if="[[serviceActive]]">
72 <config-set category="services" 93 <config-set category="services"
73 name="{{serviceData.serviceName}}" 94 name="{{serviceData.serviceName}}"
74 route="{{serviceTail}}"></config-set> 95 route="{{serviceTail}}"
75 </div> 96 auth_headers="{{auth_headers}}"></config-set>
97 </template>
76 98
77 <div hidden$="[[!projectActive]]"> 99 <template is="dom-if" if="[[projectActive]]">
78 <config-set category="projects" 100 <config-set category="projects"
79 name="{{projectData.projectName}}" 101 name="{{projectData.projectName}}"
80 route="{{projectTail}}"></config-set> 102 route="{{projectTail}}"
81 </div> 103 auth_headers="{{auth_headers}}"></config-set>
104 </template>
82 105
83 </template> 106 </template>
84 107
85 <script> 108 <script>
86 Polymer({ 109 Polymer({
87 is: 'config-ui', 110 is: 'config-ui',
111
112 properties: {
113 client_id: {
114 type: String,
115 value: null
116 }
117 },
88 118
89 ready: function() { 119 ready: function() {
90 this.async(function() { 120 this.async(function() {
91 // If the path is blank, redirect to / 121 // If the path is blank, redirect to /
92 if (!this.route.path) { 122 if (!this.route.path) {
93 this.set('route.path', '/'); 123 this.set('route.path', '/');
94 } 124 }
95 }); 125 });
96 }, 126 },
97 127
98 }); 128 });
99 </script> 129 </script>
100 </dom-module> 130 </dom-module>
OLDNEW
« no previous file with comments | « appengine/config_service/ui/src/config-ui/config-set.html ('k') | appengine/config_service/ui/src/config-ui/front-page.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698