diff --git a/frontend/public/components/cluster-settings/cluster-operator.tsx b/frontend/public/components/cluster-settings/cluster-operator.tsx index 634081e4f15..3f5e1e11d5f 100644 --- a/frontend/public/components/cluster-settings/cluster-operator.tsx +++ b/frontend/public/components/cluster-settings/cluster-operator.tsx @@ -10,6 +10,7 @@ import { ListHeader, ListPage, } from '../factory'; +import { Conditions } from '../conditions'; import { getClusterOperatorStatus, getClusterOperatorVersion, @@ -34,7 +35,7 @@ const getIconClass = (status: OperatorStatus) => { return { [OperatorStatus.Available]: 'pficon pficon-ok text-success', [OperatorStatus.Updating]: 'fa fa-refresh', - [OperatorStatus.Failing]: 'pficon pficon-error-circle-o text-danger', + [OperatorStatus.Degraded]: 'pficon pficon-warning-triangle-o text-warning', }[status]; }; @@ -48,8 +49,8 @@ const OperatorStatusIconAndLabel: React.SFC = ( const ClusterOperatorHeader = props => Name Status - Message Version + Message ; const ClusterOperatorRow: React.SFC = ({obj}) => { @@ -62,12 +63,12 @@ const ClusterOperatorRow: React.SFC = ({obj}) => {
-
- {message ? _.truncate(message, { length: 256, separator: ' ' }) : '-'} -
{operatorVersion || '-'}
+
+ {message ? _.truncate(message, { length: 256, separator: ' ' }) : '-'} +
; }; @@ -76,7 +77,7 @@ export const ClusterOperatorList: React.SFC = props => = ({versions}) => { const ClusterOperatorDetails: React.SFC = ({obj}) => { const { status, message } = getStatusAndMessage(obj); const versions: OperandVersion[] = _.get(obj, 'status.versions', []); + const conditions = _.get(obj, 'status.conditions', []); return (
@@ -142,6 +144,10 @@ const ClusterOperatorDetails: React.SFC = ({obj}) =
+
+ + +
); }; diff --git a/frontend/public/components/conditions.tsx b/frontend/public/components/conditions.tsx index 4108709fae9..0cdf17aafd1 100644 --- a/frontend/public/components/conditions.tsx +++ b/frontend/public/components/conditions.tsx @@ -55,8 +55,8 @@ export type conditionProps = { }; export type ConditionsProps = { - conditions: conditionProps[], - title?: string, - subTitle?: string + conditions: conditionProps[]; + title?: string; + subTitle?: string; }; /* eslint-enable no-undef */ diff --git a/frontend/public/module/k8s/cluster-operator.ts b/frontend/public/module/k8s/cluster-operator.ts index b08f024af26..c1e29615207 100644 --- a/frontend/public/module/k8s/cluster-operator.ts +++ b/frontend/public/module/k8s/cluster-operator.ts @@ -5,15 +5,15 @@ import { ClusterOperator, OperandVersion } from '.'; export enum OperatorStatus { Available = 'Available', Updating = 'Updating', - Failing = 'Failing', + Degraded = 'Degraded', Unknown = 'Unknown', } export const getStatusAndMessage = (operator: ClusterOperator) => { const conditions = _.get(operator, 'status.conditions'); - const failing: any = _.find(conditions, { type: 'Failing', status: 'True' }); - if (failing) { - return { status: OperatorStatus.Failing, message: failing.message }; + const degraded: any = _.find(conditions, { type: 'Degraded', status: 'True' }); + if (degraded) { + return { status: OperatorStatus.Degraded, message: degraded.message }; } const progressing: any = _.find(conditions, { type: 'Progressing', status: 'True' });