mirror of https://github.com/rancher/dashboard.git
Multiple issues in Fleet (Dashboard and gitRepo Graph views) (#6008)
* add check for missing props so that ui doesnt break + add missing state definition * Fix extra space. * Fix spacing. Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local> Co-authored-by: Shavindra <Shavindra@users.noreply.github.com>
This commit is contained in:
parent
40c9fa322f
commit
83edadda2b
|
|
@ -91,7 +91,7 @@ export default class FleetBundle extends SteveModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
get stateObj() {
|
get stateObj() {
|
||||||
const errorState = this.status.conditions.find((item) => {
|
const errorState = this.status?.conditions?.find((item) => {
|
||||||
const { error, message } = item;
|
const { error, message } = item;
|
||||||
const errState = !!error;
|
const errState = !!error;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ export const gitRepoGraphConfig = {
|
||||||
|
|
||||||
bds.forEach((bd) => {
|
bds.forEach((bd) => {
|
||||||
const bdLowercaseState = bd.state ? bd.state.toLowerCase() : 'unknown';
|
const bdLowercaseState = bd.state ? bd.state.toLowerCase() : 'unknown';
|
||||||
const bdStateColor = STATES[bdLowercaseState].color;
|
const bdStateColor = STATES[bdLowercaseState]?.color;
|
||||||
|
|
||||||
const cluster = data.clustersList.find((cluster) => {
|
const cluster = data.clustersList.find((cluster) => {
|
||||||
const clusterString = `${ cluster.namespace }-${ cluster.name }`;
|
const clusterString = `${ cluster.namespace }-${ cluster.name }`;
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,7 @@ export const STATES_ENUM = {
|
||||||
DEGRADED: 'degraded',
|
DEGRADED: 'degraded',
|
||||||
DENIED: 'denied',
|
DENIED: 'denied',
|
||||||
DEPLOYED: 'deployed',
|
DEPLOYED: 'deployed',
|
||||||
|
DEPLOYING: 'deploying',
|
||||||
DISABLED: 'disabled',
|
DISABLED: 'disabled',
|
||||||
DISCONNECTED: 'disconnected',
|
DISCONNECTED: 'disconnected',
|
||||||
DRAINED: 'drained',
|
DRAINED: 'drained',
|
||||||
|
|
@ -428,6 +429,9 @@ export const STATES = {
|
||||||
[STATES_ENUM.WARNING]: {
|
[STATES_ENUM.WARNING]: {
|
||||||
color: 'warning', icon: 'error', label: 'Warning', compoundIcon: 'warning'
|
color: 'warning', icon: 'error', label: 'Warning', compoundIcon: 'warning'
|
||||||
},
|
},
|
||||||
|
[STATES_ENUM.DEPLOYING]: {
|
||||||
|
color: 'info', icon: 'info', label: 'Deploying', compoundIcon: 'info'
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export function getStatesByType(type = 'info') {
|
export function getStatesByType(type = 'info') {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue