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

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

Issue 2987453002: config_service: fix testing (Closed)
Patch Set: 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/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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 }, 138 },
139 139
140 _isEmpty: function(array) { 140 _isEmpty: function(array) {
141 return array.length === 0; 141 return array.length === 0;
142 }, 142 },
143 143
144 _onGotConfigSets: function(event) { 144 _onGotConfigSets: function(event) {
145 this.configSetList = event.detail.response.config_sets; 145 this.configSetList = event.detail.response.config_sets;
146 this._updateSearchResults(); 146 this._updateSearchResults();
147 this.isLoading = false; 147 this.isLoading = false;
148 this.fire('processedConfigSets');
148 }, 149 },
149 150
150 _not: function(b) { 151 _not: function(b) {
151 return !b; 152 return !b;
152 }, 153 },
153 154
154 _updateSearchResults: function() { 155 _updateSearchResults: function() {
155 // This method sorts search results by the name of the config set, that way 156 // This method sorts search results by the name of the config set, that way
156 // the list doesn't consist of all projects followed by all services due to 157 // the list doesn't consist of all projects followed by all services due to
157 // the path beginning with "projects/" or "services/" 158 // the path beginning with "projects/" or "services/"
158 var tempResults = this.configSetList.filter(e => e.config_set.includes(t his.query)); 159 var tempResults = this.configSetList.filter(e => e.config_set.includes(t his.query));
159 tempResults.sort(function(a, b) { 160 tempResults.sort(function(a, b) {
160 return this._formatName(a.config_set).localeCompare(this._formatName(b .config_set)); 161 return this._formatName(a.config_set).localeCompare(this._formatName(b .config_set));
161 }.bind(this)); 162 }.bind(this));
162 this.searchResults = tempResults; 163 this.searchResults = tempResults;
163 }, 164 },
164 165
165 }); 166 });
166 </script> 167 </script>
167 </dom-module> 168 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698