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

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

Issue 2991013002: config_service: Added revision and timestamp to config-set-cards and config-set pages (Closed)
Patch Set: Nit: forgot to add launch icon to config set page 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/front-page.html
diff --git a/appengine/config_service/ui/src/config-ui/front-page.html b/appengine/config_service/ui/src/config-ui/front-page.html
index 409170e640947213c2710c35774abf9bb3fac128..89d2b39c2876ff2d96390c8e042ef46ff9febb6c 100644
--- a/appengine/config_service/ui/src/config-ui/front-page.html
+++ b/appengine/config_service/ui/src/config-ui/front-page.html
@@ -11,6 +11,7 @@
<link rel="import" href="../../bower_components/paper-spinner/paper-spinner.html">
<link rel="import" href="../../bower_components/paper-styles/shadow.html">
<link rel="import" href="../../bower_components/polymer/polymer.html">
+<link rel="import" href="../../common/common-behaviors.html">
<link rel="import" href="config-set-card.html">
@@ -93,7 +94,10 @@
<div class="center config-card">
<config-set-card
name="[[config.config_set]]"
- last-import-attempt="[[_getLastImportAttempt(config.last_import_attempt)]]">
+ last-import-attempt="[[_getLastImportAttempt(config.last_import_attempt)]]"
+ revision="[[_getRevision(config.revision)]]"
+ link="[[_getURL(config)]]"
+ timestamp="[[_getTimestamp(config.last_import_attempt, config.revision)]]">
</config-set-card>
</div>
</template>
@@ -109,6 +113,8 @@
Polymer({
is: 'front-page',
+ behaviors: [ConfigUIBehaviors.CommonBehavior],
+
properties: {
configSetList: {
type: Array,
@@ -165,19 +171,17 @@
},
_getLastImportAttempt: function(lastImportAttempt) {
- if (lastImportAttempt) {
- return lastImportAttempt;
- } else {
- return null;
- }
+ return lastImportAttempt || null;
},
- _isEmpty: function(array) {
- return array.length === 0;
- },
-
- _not: function(b) {
- return !b;
+ _getURL: function(config) {
+ if (config.last_import_attempt && config.last_import_attempt.success) {
+ return config.last_import_attempt.revision.url;
+ } else if (config.revision && config.revision.url) {
+ return config.revision.url;
+ } else {
+ return config.location;
+ }
},
_onGotConfigSets: function(event) {

Powered by Google App Engine
This is Rietveld 408576698