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

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

Issue 2959833002: config_service: add last import validation and tests (Closed)
Patch Set: Add test files. 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 20 matching lines...) Expand all
31 border-width: 2px; 31 border-width: 2px;
32 width: 40%; 32 width: 40%;
33 height: 100%; 33 height: 100%;
34 margin: auto; 34 margin: auto;
35 } 35 }
36 </style> 36 </style>
37 37
38 <iron-ajax 38 <iron-ajax
39 auto 39 auto
40 id="requestConfigs" 40 id="requestConfigs"
41 url="/_ah/api/config/v1/config-sets" 41 url="/_ah/api/config/v1/config-sets?include_last_import_attempt=true"
42 handle-as="json" 42 handle-as="json"
43 on-response="_onGotConfigSets"> 43 on-response="_onGotConfigSets">
44 </iron-ajax> 44 </iron-ajax>
45 45
46 <div class="search-bar"> 46 <div class="search-bar">
47 <paper-search-bar query="{{query}}"></paper-search-bar> 47 <paper-search-bar query="{{query}}"></paper-search-bar>
48 </div> 48 </div>
49 49
50 <div class="config-list"> 50 <div class="config-list">
51 <template is="dom-if" if="[[isLoading]]"> 51 <template is="dom-if" if="[[isLoading]]">
52 <div class="center">Fetching config sets...</div> 52 <div class="center">Fetching config sets...</div>
53 </template> 53 </template>
54 <template is="dom-if" if="[[_not(isLoading)]]"> 54 <template is="dom-if" if="[[_not(isLoading)]]">
55 <template is="dom-if" if="[[_isEmpty(searchResults)]]"> 55 <template is="dom-if" if="[[_isEmpty(searchResults)]]">
56 <div class="center">No config sets found.</div> 56 <div class="center">No config sets found.</div>
57 </template> 57 </template>
58 <template is="dom-if" if="[[_not(_isEmpty(searchResults))]]"> 58 <template is="dom-if" if="[[_not(_isEmpty(searchResults))]]">
59 <template is="dom-repeat" items="[[searchResults]]" as="config"> 59 <template is="dom-repeat" items="[[searchResults]]" as="config">
60 <config-set-card name="[[config.config_set]]" on-tap="_handleClick"> </config-set-card> 60 <config-set-card
61 name="[[config.config_set]]"
62 last-import-attempt="[[config.last_import_attempt.success]]"
63 on-tap="_handleClick">
64 </config-set-card>
61 </template> 65 </template>
62 </template> 66 </template>
63 </template> 67 </template>
64 </div> 68 </div>
65 </template> 69 </template>
66 70
67 <script> 71 <script>
68 Polymer({ 72 Polymer({
69 is: 'front-page', 73 is: 'front-page',
70 74
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 this.searchResults = this.configSetList.filter(e => e.config_set.include s(this.query)); 112 this.searchResults = this.configSetList.filter(e => e.config_set.include s(this.query));
109 }, 113 },
110 114
111 _handleClick: function(event) { 115 _handleClick: function(event) {
112 window.location = window.location.href + event.model.config.config_set; 116 window.location = window.location.href + event.model.config.config_set;
113 }, 117 },
114 118
115 }); 119 });
116 </script> 120 </script>
117 </dom-module> 121 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698