mirror of https://github.com/rancher/ui.git
Update upgrade status when externalId changes
This commit is contained in:
parent
e33426f9d4
commit
045d89cb15
|
|
@ -6,6 +6,7 @@ export default Ember.Component.extend({
|
|||
access: Ember.inject.service(),
|
||||
projects: Ember.inject.service(),
|
||||
project: Ember.computed.alias('projects.current'),
|
||||
cookies: Ember.inject.service(),
|
||||
|
||||
currentPath: null,
|
||||
authController: null,
|
||||
|
|
@ -44,6 +45,10 @@ export default Ember.Component.extend({
|
|||
return this.get('isAdmin') && this.get('store').hasRecordFor('schema','setting');
|
||||
}.property(),
|
||||
|
||||
showCatalog: function() {
|
||||
return this.get('cookies').get('showcatalog') === 'true';
|
||||
}.property(),
|
||||
|
||||
actions: {
|
||||
showAbout() {
|
||||
this.sendAction('showAbout');
|
||||
|
|
|
|||
|
|
@ -123,7 +123,9 @@
|
|||
{{/if}}
|
||||
{{#if isApplicationsTab}}
|
||||
{{#link-to "environments"}}<i class="icon icon-globe"></i> Stacks{{/link-to}}
|
||||
{{#link-to "applications-tab.catalog" "all"}}<i class="fa fa-database"></i> Catalog{{/link-to}}
|
||||
{{#if showCatalog}}
|
||||
{{#link-to "applications-tab.catalog" "all"}}<i class="fa fa-database"></i> Catalog{{/link-to}}
|
||||
{{/if}}
|
||||
|
||||
<div class="btn-group pull-right">
|
||||
<a class="dropdown-toggle hand" data-toggle="dropdown" aria-expanded="false">
|
||||
|
|
|
|||
|
|
@ -41,16 +41,7 @@ export default Ember.Component.extend({
|
|||
upgradeInfo: null,
|
||||
|
||||
didInitAttrs() {
|
||||
var uuid = this.get('environmentResource.externalId');
|
||||
if ( uuid )
|
||||
{
|
||||
this.set('upgradeStatus', LOADING);
|
||||
queue.push({uuid: uuid, obj: this});
|
||||
}
|
||||
else
|
||||
{
|
||||
this.set('upgradeStatus', NONE);
|
||||
}
|
||||
this.updateStatus();
|
||||
},
|
||||
|
||||
click: function() {
|
||||
|
|
@ -94,4 +85,21 @@ export default Ember.Component.extend({
|
|||
return 'Error checking upgrades';
|
||||
}
|
||||
}.property('upgradeStatus'),
|
||||
|
||||
updateStatus() {
|
||||
var uuid = this.get('environmentResource.externalId');
|
||||
if ( uuid )
|
||||
{
|
||||
this.set('upgradeStatus', LOADING);
|
||||
queue.push({uuid: uuid, obj: this});
|
||||
}
|
||||
else
|
||||
{
|
||||
this.set('upgradeStatus', NONE);
|
||||
}
|
||||
},
|
||||
|
||||
externalIdChanged: function() {
|
||||
this.updateStatus();
|
||||
}.property('environmentResource.externalId'),
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue