| OLD | NEW |
| 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/polymer/polymer.html"> | 7 <link rel="import" href="../../bower_components/polymer/polymer.html"> |
| 8 <link rel="import" href="../../bower_components/paper-search/paper-search-bar.ht
ml"> | 8 <link rel="import" href="../../bower_components/paper-search/paper-search-bar.ht
ml"> |
| 9 <link rel="import" href="../../bower_components/app-route/app-location.html"> | 9 <link rel="import" href="../../bower_components/app-route/app-location.html"> |
| 10 <link rel="import" href="../../bower_components/app-route/app-route.html"> | 10 <link rel="import" href="../../bower_components/app-route/app-route.html"> |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 <a href="https://luci-config.appspot.com/_ah/api/explorer" | 63 <a href="https://luci-config.appspot.com/_ah/api/explorer" |
| 64 class="link" | 64 class="link" |
| 65 target="_blank"> APIs explorer | 65 target="_blank"> APIs explorer |
| 66 </a> | 66 </a> |
| 67 | 67 |
| 68 <template is="dom-if" if="[[client_id]]"> | 68 <template is="dom-if" if="[[client_id]]"> |
| 69 <auth-signin | 69 <auth-signin |
| 70 class="right" | 70 class="right" |
| 71 client_id="[[client_id]]" | 71 client_id="[[client_id]]" |
| 72 auth_headers="{{auth_headers}}" | 72 auth_headers="{{auth_headers}}" |
| 73 initialized="{{initialized}}" |
| 73 profile="{{profile}}" | 74 profile="{{profile}}" |
| 74 signed_in="{{signed_in}}"> | 75 signed_in="{{signed_in}}"> |
| 75 </auth-signin> | 76 </auth-signin> |
| 76 </template> | 77 </template> |
| 77 <template is="dom-if" if="[[!client_id]]"> | 78 <template is="dom-if" if="[[!client_id]]"> |
| 78 <div class="right">No OAauth client id found.</div> | 79 <div class="right">No OAauth client id found.</div> |
| 79 </template> | 80 </template> |
| 80 </app-toolbar> | 81 </app-toolbar> |
| 81 </app-header> | 82 </app-header> |
| 82 | 83 |
| 83 <app-location route="{{route}}" use-hash-as-path></app-location> | 84 <app-location route="{{route}}" use-hash-as-path></app-location> |
| 84 <app-route route="{{route}}" | 85 <app-route route="{{route}}" |
| 85 pattern="/services/:serviceName" | 86 pattern="/services/:serviceName" |
| 86 data="{{serviceData}}" | 87 data="{{serviceData}}" |
| 87 tail="{{serviceTail}}" | 88 tail="{{serviceTail}}" |
| 88 active="{{serviceActive}}"></app-route> | 89 active="{{serviceActive}}"></app-route> |
| 89 | 90 |
| 90 <app-route route="{{route}}" | 91 <app-route route="{{route}}" |
| 91 pattern="/projects/:projectName" | 92 pattern="/projects/:projectName" |
| 92 data="{{projectData}}" | 93 data="{{projectData}}" |
| 93 tail="{{projectTail}}" | 94 tail="{{projectTail}}" |
| 94 active="{{projectActive}}"></app-route> | 95 active="{{projectActive}}"></app-route> |
| 95 | 96 |
| 96 <app-route route="{{route}}" | 97 <app-route route="{{route}}" |
| 97 pattern="/" | 98 pattern="/" |
| 98 active="{{frontPageActive}}"></app-route> | 99 active="{{frontPageActive}}"></app-route> |
| 99 | 100 |
| 100 <template is="dom-if" if="[[frontPageActive]]"> | 101 <template is="dom-if" if="[[frontPageActive]]"> |
| 101 <front-page auth_headers="[[auth_headers]]"></front-page> | 102 <front-page auth_headers="[[auth_headers]]" |
| 103 initialized="[[initialized]]" |
| 104 signed_in="[[signed_in]]"></front-page> |
| 102 </template> | 105 </template> |
| 103 | 106 |
| 104 <template is="dom-if" if="[[serviceActive]]" restamp="true"> | 107 <template is="dom-if" if="[[serviceActive]]" restamp="true"> |
| 105 <config-set category="services" | 108 <config-set category="services" |
| 106 name="[[serviceData.serviceName]]" | 109 name="[[serviceData.serviceName]]" |
| 107 route="[[serviceTail]]" | 110 route="[[serviceTail]]" |
| 108 auth_headers="[[auth_headers]]" | 111 auth_headers="[[auth_headers]]" |
| 109 front-page-is-active="[[frontPageActive]]"></config-set> | 112 initialized="[[initialized]]" |
| 113 front-page-is-active="[[frontPageActive]]" |
| 114 profile="[[profile]]"></config-set> |
| 110 </template> | 115 </template> |
| 111 | 116 |
| 112 <template is="dom-if" if="[[projectActive]]" restamp="true"> | 117 <template is="dom-if" if="[[projectActive]]" restamp="true"> |
| 113 <config-set category="projects" | 118 <config-set category="projects" |
| 114 name="[[projectData.projectName]]" | 119 name="[[projectData.projectName]]" |
| 115 route="[[projectTail]]" | 120 route="[[projectTail]]" |
| 116 auth_headers="[[auth_headers]]" | 121 auth_headers="[[auth_headers]]" |
| 117 front-page-is-active="[[frontPageActive]]"></config-set> | 122 initialized="[[initialized]]" |
| 123 front-page-is-active="[[frontPageActive]]" |
| 124 profile="[[profile]]"></config-set> |
| 118 </template> | 125 </template> |
| 119 </app-header-layout> | 126 </app-header-layout> |
| 120 </app-drawer-layout> | 127 </app-drawer-layout> |
| 121 </template> | 128 </template> |
| 122 | 129 |
| 123 <script> | 130 <script> |
| 124 Polymer({ | 131 Polymer({ |
| 125 is: 'config-ui', | 132 is: 'config-ui', |
| 126 | 133 |
| 127 properties: { | 134 properties: { |
| 128 client_id: { | 135 client_id: { |
| 129 type: String, | 136 type: String, |
| 130 value: null | 137 value: null |
| 131 } | 138 } |
| 132 }, | 139 }, |
| 133 | 140 |
| 134 ready: function() { | 141 ready: function() { |
| 135 this.async(function() { | 142 this.async(function() { |
| 136 // If the path is blank, redirect to / | 143 // If the path is blank, redirect to / |
| 137 if (!this.route.path) { | 144 if (!this.route.path) { |
| 138 this.set('route.path', '/'); | 145 this.set('route.path', '/'); |
| 139 } | 146 } |
| 140 }); | 147 }); |
| 141 }, | 148 }, |
| 142 | 149 |
| 143 }); | 150 }); |
| 144 </script> | 151 </script> |
| 145 </dom-module> | 152 </dom-module> |
| OLD | NEW |