Chromium Code Reviews| Index: appengine/config_service/ui/src/config-ui/front-page.html |
| diff --git a/appengine/config_service/ui/src/config-ui/front-page.html b/appengine/config_service/ui/src/config-ui/front-page.html |
| index ff087b1ab8198f53d9d99bc5f0d4e4634fbaaf25..836623921a935891ed5d279ffff95248241cd614 100644 |
| --- a/appengine/config_service/ui/src/config-ui/front-page.html |
| +++ b/appengine/config_service/ui/src/config-ui/front-page.html |
| @@ -5,40 +5,22 @@ |
| --> |
| <link rel="import" href="../../bower_components/app-layout/app-layout.html"> |
| -<link rel="import" href="config-card.html"> |
| <link rel="import" href="../../bower_components/iron-ajax/iron-ajax.html"> |
| <link rel="import" href="../../bower_components/paper-button/paper-button.html"> |
| <link rel="import" href="../../bower_components/paper-search/paper-search-bar.html"> |
| <link rel="import" href="../../bower_components/polymer/polymer.html"> |
| +<link rel="import" href="config-set-card.html"> |
| + |
| <dom-module id="front-page"> |
| <template> |
| <style> |
| - app-toolbar { |
| - background-color: #efefef; |
| - color: #232323; |
| - } |
| - |
| - app-header { |
| - @apply --layout-fixed-top; |
| - } |
| - |
| .center { |
| width: 50%; |
| margin: auto; |
| text-align: center; |
| } |
| - .logo { |
| - height: 100%; |
| - } |
| - |
| - .title { |
| - padding-left: 1%; |
| - font-size: 150%; |
| - font-family: sans-serif; |
| - } |
| - |
| .search-bar { |
| padding-top: 7%; |
| padding-bottom: 2%; |
| @@ -53,21 +35,14 @@ |
| } |
| </style> |
| - <app-header reveals> |
| - <app-toolbar> |
| - <image class="logo" src="/static/images/chromium.png"/> |
| - <div class="title" main-title>Configuration Service (not fully implemented)</div> |
| - </app-toolbar> |
| - </app-header> |
| - |
| <iron-ajax |
| auto |
| id="requestConfigs" |
| - url="/_ah/api/config/v1/config-sets" |
| + url="https://luci-config.appspot.com/_ah/api/config/v1/config-sets" |
|
Sergey Berezin
2017/06/16 20:25:23
IMHO, we should keep URLs relative from the start.
ayanaadylova
2017/06/16 21:34:46
Done.
|
| handle-as="json" |
| on-response="_onGotConfigSets"> |
| </iron-ajax> |
| - |
| + |
| <div class="search-bar"> |
| <paper-search-bar query="{{query}}"></paper-search-bar> |
| </div> |
| @@ -82,7 +57,7 @@ |
| </template> |
| <template is="dom-if" if="[[_not(_isEmpty(searchResults))]]"> |
| <template is="dom-repeat" items="[[searchResults]]" as="config"> |
| - <config-card name="[[config.config_set]]"></config-card> |
| + <config-set-card name="[[config.config_set]]" on-tap="_handleClick"></config-set-card> |
| </template> |
| </template> |
| </template> |
| @@ -131,7 +106,12 @@ |
| _updateSearchResults: function() { |
| this.searchResults = this.configSetList.filter(e => e.config_set.includes(this.query)); |
| - } |
| + }, |
| + |
| + _handleClick: function(event) { |
| + window.location = window.location.href + event.model.config.config_set; |
| + }, |
| + |
| }); |
| </script> |
| </dom-module> |