Support null healthState (rancherio/rancher#1134)

This commit is contained in:
Vincent Fiduccia 2015-06-10 12:57:47 -07:00
parent f2fa9c5b48
commit c3d1cb8342
3 changed files with 8 additions and 7 deletions

View File

@ -134,11 +134,12 @@ var ContainerController = Cattle.TransitioningResourceController.extend({
ContainerController.reopenClass({
stateMap: {
'running': {icon: 'ss-record', color: 'text-success'},
'stopped': {icon: 'fa fa-circle',color: 'text-danger'},
'removed': {icon: 'ss-trash', color: 'text-danger'},
'purged': {icon: 'ss-tornado', color: 'text-danger'},
'unhealthy': {icon: 'ss-notifications', color: 'text-danger'},
'running': {icon: 'ss-record', color: 'text-success'},
'stopped': {icon: 'fa fa-circle', color: 'text-danger'},
'removed': {icon: 'ss-trash', color: 'text-danger'},
'purged': {icon: 'ss-tornado', color: 'text-danger'},
'unhealthy': {icon: 'ss-notifications', color: 'text-danger'},
'initializing': {icon: 'ss-notifications', color: 'text-warning'},
},
});

View File

@ -31,7 +31,7 @@ var Container = Cattle.TransitioningResource.extend({
if ( ['running','active','updating-active'].indexOf(resource) >= 0 )
{
if ( health === 'healthy' )
if ( health === null || health === 'healthy' )
{
return resource;
}

View File

@ -19,7 +19,7 @@ var Service = Cattle.TransitioningResource.extend({
var resource = instance.get('state');
var health = instance.get('healthState');
if ( ['running','active','updating-active'].indexOf(resource) >= 0 && health === 'healthy' )
if ( ['running','active','updating-active'].indexOf(resource) >= 0 && (health === 'healthy' || health === null) )
{
healthy++;
}