| 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 a2f4597c8311ec005c582867a48fe9e2b65b54da..e63755ea8a723890893a281d4f03810d5ab4588b 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">
|
|
|
| @@ -94,7 +95,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>
|
| @@ -110,6 +114,8 @@
|
| Polymer({
|
| is: 'front-page',
|
|
|
| + behaviors: [ConfigUIBehaviors.CommonBehavior],
|
| +
|
| properties: {
|
| configSetList: {
|
| type: Array,
|
| @@ -169,19 +175,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) {
|
|
|