Chromium Code Reviews| Index: appengine/config_service/ui/src/config-ui/config-set.html |
| diff --git a/appengine/config_service/ui/src/config-ui/config-set.html b/appengine/config_service/ui/src/config-ui/config-set.html |
| index 7ae346fc4eca63c93b068e577a238fb597da0d12..7320757b38568a2d9bbc073f021f6394585a13b4 100644 |
| --- a/appengine/config_service/ui/src/config-ui/config-set.html |
| +++ b/appengine/config_service/ui/src/config-ui/config-set.html |
| @@ -152,7 +152,7 @@ |
| <template is="dom-repeat" items="[[files]]" as="file"> |
| <div class="center config-card"> |
| <config-file-card |
| - name="[[file.path]]" link="[[location]]/[[file.path]]"> |
| + name="[[file.path]]" link="[[url]]/[[file.path]]"> |
| </config-file-card> |
| </div> |
| </template> |
| @@ -198,7 +198,7 @@ |
| type: Object |
| }, |
| - location: { |
| + url: { |
| type: String |
| }, |
| @@ -256,10 +256,16 @@ |
| }, |
| _onGotConfigFiles: function(event) { |
| - this.files = event.detail.response.config_sets[0].files || []; |
| - this.location = event.detail.response.config_sets[0].location; |
| - this.lastImportAttempt = |
| - event.detail.response.config_sets[0].last_import_attempt || null; |
| + var config_set = event.detail.response.config_sets[0]; |
| + this.files = config_set.files || []; |
| + this.lastImportAttempt = config_set.last_import_attempt || null; |
| + if (this.lastImportAttempt && this.lastImportAttempt.success) { |
| + this.url = config_set.last_import_attempt.revision.url; |
| + } else if (config_set.revision && config_set.revision.url) { |
|
Sergey Berezin
2017/07/27 21:14:14
Is config_set.revision_url always the same as last
cwpayton
2017/07/27 22:56:04
Done.
|
| + this.url = config_set.revision.url; |
| + } else { |
| + this.url = config_set.location; |
| + } |
| this.isLoading = false; |
| this.errorMessage = null; |
| this.fire('processedConfigFiles'); |