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

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

Issue 2990713002: config_service: change error message for error 403. (Closed)
Patch Set: Nit: forgot to revert URLs for local deployment Created 3 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 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/app-layout/app-layout.html"> 7 <link rel="import" href="../../bower_components/app-layout/app-layout.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/paper-button/paper-button.html"> 9 <link rel="import" href="../../bower_components/paper-button/paper-button.html">
10 <link rel="import" href="../../bower_components/paper-search/paper-search-bar.ht ml"> 10 <link rel="import" href="../../bower_components/paper-search/paper-search-bar.ht ml">
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 }, 115 },
116 116
117 query: { 117 query: {
118 type: String, 118 type: String,
119 observer: '_updateSearchResults' 119 observer: '_updateSearchResults'
120 }, 120 },
121 121
122 searchResults: { 122 searchResults: {
123 type: Array, 123 type: Array,
124 value: () => [] 124 value: () => []
125 },
126
127 signed_in: {
128 type: Boolean,
129 observer: '_onSignIn'
125 } 130 }
126 }, 131 },
127 132
128 ready: function() { 133 ready: function() {
129 document.addEventListener('fetch-configs', function() { 134 if (!this.initialized) {
135 document.addEventListener('fetch-configs', function() {
136 this.$.requestConfigs.generateRequest();
137 }.bind(this));
138 } else {
139 this.$.requestConfigs.generateRequest();
140 }
141 },
142
143 _onSignIn: function() {
144 if (this.signed_in) {
130 this.isLoading = true; 145 this.isLoading = true;
131 this.$.requestConfigs.generateRequest(); 146 this.$.requestConfigs.generateRequest();
132 }.bind(this)); 147 }
133 }, 148 },
134 149
135 _formatName: function(name) { 150 _formatName: function(name) {
136 var tempName = name.substring(name.indexOf("/") + 1); 151 var tempName = name.substring(name.indexOf("/") + 1);
137 return tempName.includes("/") ? 152 return tempName.includes("/") ?
138 tempName.substring(0, tempName.indexOf("/")) : tempName; 153 tempName.substring(0, tempName.indexOf("/")) : tempName;
139 }, 154 },
140 155
141 _getLastImportAttempt: function(lastImportAttempt) { 156 _getLastImportAttempt: function(lastImportAttempt) {
142 if (lastImportAttempt) { 157 if (lastImportAttempt) {
(...skipping 25 matching lines...) Expand all
168 var tempResults = this.configSetList.filter(e => e.config_set.includes(t his.query)); 183 var tempResults = this.configSetList.filter(e => e.config_set.includes(t his.query));
169 tempResults.sort(function(a, b) { 184 tempResults.sort(function(a, b) {
170 return this._formatName(a.config_set).localeCompare(this._formatName(b .config_set)); 185 return this._formatName(a.config_set).localeCompare(this._formatName(b .config_set));
171 }.bind(this)); 186 }.bind(this));
172 this.searchResults = tempResults; 187 this.searchResults = tempResults;
173 }, 188 },
174 189
175 }); 190 });
176 </script> 191 </script>
177 </dom-module> 192 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698