mirror of https://github.com/rancher/ui.git
Support null healthState (rancherio/rancher#1134)
This commit is contained in:
parent
f2fa9c5b48
commit
c3d1cb8342
|
|
@ -134,11 +134,12 @@ var ContainerController = Cattle.TransitioningResourceController.extend({
|
||||||
|
|
||||||
ContainerController.reopenClass({
|
ContainerController.reopenClass({
|
||||||
stateMap: {
|
stateMap: {
|
||||||
'running': {icon: 'ss-record', color: 'text-success'},
|
'running': {icon: 'ss-record', color: 'text-success'},
|
||||||
'stopped': {icon: 'fa fa-circle',color: 'text-danger'},
|
'stopped': {icon: 'fa fa-circle', color: 'text-danger'},
|
||||||
'removed': {icon: 'ss-trash', color: 'text-danger'},
|
'removed': {icon: 'ss-trash', color: 'text-danger'},
|
||||||
'purged': {icon: 'ss-tornado', color: 'text-danger'},
|
'purged': {icon: 'ss-tornado', color: 'text-danger'},
|
||||||
'unhealthy': {icon: 'ss-notifications', color: 'text-danger'},
|
'unhealthy': {icon: 'ss-notifications', color: 'text-danger'},
|
||||||
|
'initializing': {icon: 'ss-notifications', color: 'text-warning'},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ var Container = Cattle.TransitioningResource.extend({
|
||||||
|
|
||||||
if ( ['running','active','updating-active'].indexOf(resource) >= 0 )
|
if ( ['running','active','updating-active'].indexOf(resource) >= 0 )
|
||||||
{
|
{
|
||||||
if ( health === 'healthy' )
|
if ( health === null || health === 'healthy' )
|
||||||
{
|
{
|
||||||
return resource;
|
return resource;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ var Service = Cattle.TransitioningResource.extend({
|
||||||
var resource = instance.get('state');
|
var resource = instance.get('state');
|
||||||
var health = instance.get('healthState');
|
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++;
|
healthy++;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue