Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2801)

Unified Diff: appengine/config_service/ui/src/config-ui/config-set.html

Issue 2985223002: config_service: Changed file links to point to latest revision instead of master (Closed)
Patch Set: Updated tests to reflect changes Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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');

Powered by Google App Engine
This is Rietveld 408576698