Chromium Code Reviews| Index: appengine/config_service/ui/src/config-ui/config-ui.html |
| diff --git a/appengine/config_service/ui/src/config-ui/config-ui.html b/appengine/config_service/ui/src/config-ui/config-ui.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d8f1591aaeb4cb18f9ab40e78d372f3e8fc3354f |
| --- /dev/null |
| +++ b/appengine/config_service/ui/src/config-ui/config-ui.html |
| @@ -0,0 +1,92 @@ |
| +<!-- |
| + Copyright 2017 The LUCI Authors. All rights reserved. |
| + Use of this source code is governed under the Apache License, Version 2.0 |
| + that can be found in the LICENSE file. |
| +--> |
| + |
| +<link rel="import" href="../../bower_components/polymer/polymer.html"> |
| +<link rel="import" href="../../bower_components/app-layout/app-layout.html"> |
| +<link rel="import" href="../../bower_components/paper-search/paper-search-bar.html"> |
| +<link rel="import" href="../../bower_components/app-route/app-location.html"> |
| +<link rel="import" href="../../bower_components/app-route/app-route.html"> |
| + |
| +<link rel="import" href="config-set.html"> |
| +<link rel="import" href="front-page.html"> |
| + |
| +<dom-module id="config-ui"> |
| + <template> |
| + <style> |
| + app-toolbar { |
| + background-color: #efefef; |
| + color: #232323; |
| + } |
| + |
| + app-header { |
| + @apply --layout-fixed-top; |
| + } |
| + |
| + .logo { |
| + height: 100%; |
| + } |
| + |
| + .title { |
| + padding-left: 1%; |
| + padding-bottom: 0.5%; |
| + font-size: 150%; |
| + font-family: sans-serif; |
| + } |
| + </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> |
|
seanmccullough1
2017/06/15 19:50:00
80char
ayanaadylova
2017/06/15 21:26:00
Done.
|
| + </app-toolbar> |
| + </app-header> |
| + |
| + |
| + <app-location route="{{route}}" use-hash-as-path></app-location> |
|
seanmccullough1
2017/06/15 19:50:00
Every browser we care about supports html5 navigat
Ryan Tseng
2017/06/15 20:01:54
We're doing it this way because for example "/" is
ayanaadylova
2017/06/15 21:26:00
Done.
ayanaadylova
2017/06/15 21:26:00
Done.
|
| + <app-route route="{{route}}" |
| + pattern="/services/:serviceName" |
| + data="{{serviceData}}" |
| + tail="{{serviceTail}}" |
| + active="{{serviceActive}}"></app-route> |
| + |
| + <app-route route="{{route}}" |
| + pattern="/projects/:projectName" |
| + data="{{projectData}}" |
| + tail="{{projectTail}}" |
| + active="{{projectActive}}"></app-route> |
| + |
| + <app-route route="{{route}}" |
| + pattern="/" |
| + active="{{frontPageActive}}"></app-route> |
| + |
| + <div hidden$="{{!frontPageActive}}"> |
|
seanmccullough1
2017/06/15 19:50:01
[[ ]] instead of {{ }}. You don't need two-way bin
ayanaadylova
2017/06/15 21:26:00
Done.
|
| + <front-page></front-page> |
| + </div> |
| + <div hidden$="{{!serviceActive}}"> |
| + <config-set category="Service" config-set-name="{{serviceData.serviceName}}" route="{{serviceTail}}" ></config-set> |
|
Ryan Tseng
2017/06/15 18:55:56
nit: 80 char. The indentation style you used in L
ayanaadylova
2017/06/15 21:26:00
Done.
|
| + </div> |
| + <div hidden$="{{!projectActive}}"> |
| + <config-set category="Project" config-set-name="{{projectData.projectName}}" route="{{projectTail}}"></config-set> |
|
Ryan Tseng
2017/06/15 18:55:56
nit: same here, 80 char
ayanaadylova
2017/06/15 21:26:00
Done.
|
| + </div> |
| + |
| + </template> |
| + |
| + <script> |
| + Polymer({ |
|
seanmccullough1
2017/06/15 19:50:01
IIUC you can use native ES6 classes instead of the
ayanaadylova
2017/06/15 21:26:00
Acknowledged.
|
| + is: 'config-ui', |
| + |
| + ready: function() { |
| + this.async(function() { |
| + // If the path is blank, redirect to / |
| + if (!this.route.path) { |
| + this.set('route.path', '/'); |
| + } |
| + }); |
| + }, |
| + |
| + }); |
| + </script> |
| +</dom-module> |