| 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="config-file-card.html"> | 7 <link rel="import" href="config-file-card.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/iron-icons/iron-icons.html"> | 9 <link rel="import" href="../../bower_components/iron-icons/iron-icons.html"> |
| 10 <link rel="import" href="../../bower_components/paper-item/paper-item.html"> | 10 <link rel="import" href="../../bower_components/paper-item/paper-item.html"> |
| 11 <link rel="import" href="../../bower_components/paper-spinner/paper-spinner.html
"> | 11 <link rel="import" href="../../bower_components/paper-spinner/paper-spinner.html
"> |
| 12 <link rel="import" href="../../bower_components/polymer/polymer.html"> | 12 <link rel="import" href="../../bower_components/polymer/polymer.html"> |
| 13 <link rel="import" href="../../bower_components/iron-icons/maps-icons.html"> | 13 <link rel="import" href="../../bower_components/iron-icons/maps-icons.html"> |
| 14 <link rel="import" href="../../bower_components/paper-tooltip/paper-tooltip.html
"> |
| 14 | 15 |
| 15 <dom-module id="config-set"> | 16 <dom-module id="config-set"> |
| 16 <template> | 17 <template> |
| 17 <style> | 18 <style> |
| 18 .spinner { | 19 .spinner { |
| 19 text-align: center; | 20 text-align: center; |
| 20 } | 21 } |
| 21 | 22 |
| 22 .category { | 23 .category { |
| 23 font-size: 100%; | 24 font-size: 100%; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 </template> | 91 </template> |
| 91 <template is="dom-if" if="[[_not(lastImportAttempt.success)]]"> | 92 <template is="dom-if" if="[[_not(lastImportAttempt.success)]]"> |
| 92 <iron-icon id="invalid" icon="icons:warning" class="paper-red"></i
ron-icon> | 93 <iron-icon id="invalid" icon="icons:warning" class="paper-red"></i
ron-icon> |
| 93 </template> | 94 </template> |
| 94 </template> | 95 </template> |
| 95 <template is="dom-if" if="[[_not(lastImportAttempt)]]"> | 96 <template is="dom-if" if="[[_not(lastImportAttempt)]]"> |
| 96 <iron-icon icon="icons:help" class="paper-grey"></iron-icon> | 97 <iron-icon icon="icons:help" class="paper-grey"></iron-icon> |
| 97 </template> | 98 </template> |
| 98 </template> | 99 </template> |
| 99 <template is="dom-if" if="[[auth_headers]]"> | 100 <template is="dom-if" if="[[auth_headers]]"> |
| 100 <iron-icon icon="icons:refresh" on-tap="_forceRefresh"></iron-icon> | 101 <paper-icon-button id="force-refresh" |
| 102 icon="icons:refresh" |
| 103 on-tap="_forceRefresh"> |
| 104 </paper-icon-button> |
| 105 <paper-tooltip for="force-refresh" offset="0"> |
| 106 Force the config refresh. |
| 107 </paper-tooltip> |
| 101 </template> | 108 </template> |
| 102 </div> | 109 </div> |
| 103 <div class="category"> | 110 <div class="category"> |
| 104 <p>[[_formatCategory(category)]]</p> | 111 <p>[[_formatCategory(category)]]</p> |
| 105 <template is="dom-if" if="[[_not(isLoading)]]"> | 112 <template is="dom-if" if="[[_not(isLoading)]]"> |
| 106 <template is="dom-if" if="[[lastImportAttempt]]"> | 113 <template is="dom-if" if="[[lastImportAttempt]]"> |
| 107 <template is="dom-if" if="[[_not(lastImportAttempt.success)]]"> | 114 <template is="dom-if" if="[[_not(lastImportAttempt.success)]]"> |
| 108 Last import attempt failed: [[lastImportAttempt.message]] | 115 Last import attempt failed: [[lastImportAttempt.message]] |
| 109 </template> | 116 </template> |
| 117 <template is="dom-if" if="[[lastImportAttempt.success]]"> |
| 118 Last import succeeded. |
| 119 </template> |
| 110 </template> | 120 </template> |
| 111 <template is="dom-if" if="[[_not(lastImportAttempt)]]"> | 121 <template is="dom-if" if="[[_not(lastImportAttempt)]]"> |
| 112 Last import attempt info not available. | 122 Last import attempt info not available. |
| 113 </template> | 123 </template> |
| 114 </template> | 124 </template> |
| 115 <p id="refreshStatus">[[refreshMessage]]</p> | 125 <p id="refreshStatus">[[refreshMessage]]</p> |
| 116 </div> | 126 </div> |
| 117 </div> | 127 </div> |
| 118 <template is="dom-if" if="[[isRefreshing]]"> | 128 <template is="dom-if" if="[[isRefreshing]]"> |
| 119 <div class="spinner"> | 129 <div class="spinner"> |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 this.isLoading = false; | 244 this.isLoading = false; |
| 235 }, | 245 }, |
| 236 | 246 |
| 237 _onRefreshError: function() { | 247 _onRefreshError: function() { |
| 238 this.isRefreshing = false; | 248 this.isRefreshing = false; |
| 239 this.refreshMessage = "Error: Files could not be refreshed."; | 249 this.refreshMessage = "Error: Files could not be refreshed."; |
| 240 } | 250 } |
| 241 }); | 251 }); |
| 242 </script> | 252 </script> |
| 243 </dom-module> | 253 </dom-module> |
| OLD | NEW |