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

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

Issue 2980973002: config_service: Fixed multiple ajax requests in the front page while the page determines whether a … (Closed)
Patch Set: Nit: formatting of if statement 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/paper-search/paper-search-bar.ht ml"> 8 <link rel="import" href="../../bower_components/paper-search/paper-search-bar.ht ml">
9 <link rel="import" href="../../bower_components/app-route/app-location.html"> 9 <link rel="import" href="../../bower_components/app-route/app-location.html">
10 <link rel="import" href="../../bower_components/app-route/app-route.html"> 10 <link rel="import" href="../../bower_components/app-route/app-route.html">
(...skipping 24 matching lines...) Expand all
35 35
36 .right { margin-left:15px; } 36 .right { margin-left:15px; }
37 37
38 .title { 38 .title {
39 font-size: 125%; 39 font-size: 125%;
40 color: white; 40 color: white;
41 } 41 }
42 </style> 42 </style>
43 43
44 <app-drawer-layout fullbleed force-narrow> 44 <app-drawer-layout fullbleed force-narrow>
45
46 <app-header-layout> 45 <app-header-layout>
47
48 <app-header reveals slot="header" effects="resize-title"> 46 <app-header reveals slot="header" effects="resize-title">
49 <app-toolbar> 47 <app-toolbar>
50 <!--<image class="logo" src="/static/images/chromium.png"/>--> 48 <!--<image class="logo" src="/static/images/chromium.png"/>-->
51 <div class="title" main-title> 49 <div class="title" main-title>
52 Configuration Service 50 Configuration Service
53 </div> 51 </div>
54 52
55 <template is="dom-if" if="[[client_id]]"> 53 <template is="dom-if" if="[[client_id]]">
56 <auth-signin 54 <auth-signin
57 class="right" 55 class="right"
58 client_id="[[client_id]]" 56 client_id="[[client_id]]"
59 auth_headers="{{auth_headers}}" 57 auth_headers="{{auth_headers}}"
58 initialized="{{initialized}}"
60 profile="{{profile}}" 59 profile="{{profile}}"
60 user="{{user}}"
61 signed_in="{{signed_in}}"> 61 signed_in="{{signed_in}}">
62 </auth-signin> 62 </auth-signin>
63 </template> 63 </template>
64 <template is="dom-if" if="[[!client_id]]"> 64 <template is="dom-if" if="[[!client_id]]">
65 <div class="right">No OAauth client id found.</div> 65 <div class="right">No OAauth client id found.</div>
66 </template> 66 </template>
67 </app-toolbar> 67 </app-toolbar>
68 </app-header> 68 </app-header>
69 69
70 <app-location route="{{route}}" use-hash-as-path></app-location> 70 <app-location route="{{route}}" use-hash-as-path></app-location>
71 <app-route route="{{route}}" 71 <app-route route="{{route}}"
72 pattern="/services/:serviceName" 72 pattern="/services/:serviceName"
73 data="{{serviceData}}" 73 data="{{serviceData}}"
74 tail="{{serviceTail}}" 74 tail="{{serviceTail}}"
75 active="{{serviceActive}}"></app-route> 75 active="{{serviceActive}}"></app-route>
76 76
77 <app-route route="{{route}}" 77 <app-route route="{{route}}"
78 pattern="/projects/:projectName" 78 pattern="/projects/:projectName"
79 data="{{projectData}}" 79 data="{{projectData}}"
80 tail="{{projectTail}}" 80 tail="{{projectTail}}"
81 active="{{projectActive}}"></app-route> 81 active="{{projectActive}}"></app-route>
82 82
83 <app-route route="{{route}}" 83 <app-route route="{{route}}"
84 pattern="/" 84 pattern="/"
85 active="{{frontPageActive}}"></app-route> 85 active="{{frontPageActive}}"></app-route>
86 86
87 <template is="dom-if" if="[[frontPageActive]]"> 87 <template is="dom-if" if="[[frontPageActive]]">
88 <front-page auth_headers="{{auth_headers}}"></front-page> 88 <front-page auth_headers="[[auth_headers]]"
89 initialized="[[initialized]]"
90 user="[[user]]"></front-page>
89 </template> 91 </template>
90 92
91 <template is="dom-if" if="[[serviceActive]]" restamp="true"> 93 <template is="dom-if" if="[[serviceActive]]" restamp="true">
92 <config-set category="services" 94 <config-set category="services"
93 name="{{serviceData.serviceName}}" 95 name="[[serviceData.serviceName]]"
94 route="{{serviceTail}}" 96 route="[[serviceTail]]"
95 auth_headers="{{auth_headers}}" 97 auth_headers="[[auth_headers]]"
98 initialized="[[initialized]]"
99 user="[[user]]"
96 front-page-is-active="[[frontPageActive]]"></config-set> 100 front-page-is-active="[[frontPageActive]]"></config-set>
97 </template> 101 </template>
98 102
99 <template is="dom-if" if="[[projectActive]]" restamp="true"> 103 <template is="dom-if" if="[[projectActive]]" restamp="true">
100 <config-set category="projects" 104 <config-set category="projects"
101 name="{{projectData.projectName}}" 105 name="[[projectData.projectName]]"
102 route="{{projectTail}}" 106 route="[[projectTail]]"
103 auth_headers="{{auth_headers}}" 107 auth_headers="[[auth_headers]]"
108 initialized="[[initialized]]"
109 user="[[user]]"
104 front-page-is-active="[[frontPageActive]]"></config-set> 110 front-page-is-active="[[frontPageActive]]"></config-set>
105 </template> 111 </template>
106
107 </app-header-layout> 112 </app-header-layout>
108
109 </app-drawer-layout> 113 </app-drawer-layout>
110
111 </template> 114 </template>
112 115
113 <script> 116 <script>
114 Polymer({ 117 Polymer({
115 is: 'config-ui', 118 is: 'config-ui',
116 119
117 properties: { 120 properties: {
118 client_id: { 121 client_id: {
119 type: String, 122 type: String,
120 value: null 123 value: null
121 } 124 }
122 }, 125 },
123 126
124 ready: function() { 127 ready: function() {
125 this.async(function() { 128 this.async(function() {
126 // If the path is blank, redirect to / 129 // If the path is blank, redirect to /
127 if (!this.route.path) { 130 if (!this.route.path) {
128 this.set('route.path', '/'); 131 this.set('route.path', '/');
129 } 132 }
130 }); 133 });
131 }, 134 },
132 135
133 }); 136 });
134 </script> 137 </script>
135 </dom-module> 138 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698