From fe2fcf6bb2af8938ea5d90d49d11b5b35971976d Mon Sep 17 00:00:00 2001 From: Lucas Di Pentima Date: Thu, 14 Apr 2022 16:28:26 -0300 Subject: [PATCH] 18881: Fixes the Failing state's color, from red to orange. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- src/common/custom-theme.ts | 4 +++- src/store/processes/process.ts | 1 + src/views-components/data-explorer/renderers.test.tsx | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/common/custom-theme.ts b/src/common/custom-theme.ts index b0703237..fc89a4ae 100644 --- a/src/common/custom-theme.ts +++ b/src/common/custom-theme.ts @@ -31,6 +31,7 @@ interface Colors { blue500: string; grey500: string; purple: string; + orange: string; } const arvadosPurple = '#361336'; @@ -53,7 +54,8 @@ export const themeOptions: ArvadosThemeOptions = { red900: red['900'], blue500: blue['500'], grey500: grey500, - purple: arvadosPurple + purple: arvadosPurple, + orange: '#f0ad4e', } }, overrides: { diff --git a/src/store/processes/process.ts b/src/store/processes/process.ts index b72a0c2b..19f30dd2 100644 --- a/src/store/processes/process.ts +++ b/src/store/processes/process.ts @@ -82,6 +82,7 @@ export const getProcessStatusColor = (status: string, { customs }: ArvadosTheme) case ProcessStatus.WARNING: return customs.colors.yellow700; case ProcessStatus.FAILING: + return customs.colors.orange; case ProcessStatus.CANCELLED: case ProcessStatus.FAILED: return customs.colors.red900; diff --git a/src/views-components/data-explorer/renderers.test.tsx b/src/views-components/data-explorer/renderers.test.tsx index 229d9909..5bc123df 100644 --- a/src/views-components/data-explorer/renderers.test.tsx +++ b/src/views-components/data-explorer/renderers.test.tsx @@ -33,6 +33,7 @@ describe('renderers', () => { green700: 'rgb(0, 255, 0)', yellow700: 'rgb(255, 255, 0)', red900: 'rgb(255, 0, 0)', + orange: 'rgb(240, 173, 78)', grey500: 'rgb(128, 128, 128)', } }, @@ -50,7 +51,7 @@ describe('renderers', () => { [ // CR Status ; Priority ; C Status ; Exit Code ; C RuntimeStatus ; Expected label ; Expected Color [CR.COMMITTED, 1, C.RUNNING, null, {}, PS.RUNNING, props.theme.customs.colors.blue500], - [CR.COMMITTED, 1, C.RUNNING, null, {error: 'whoops'}, PS.FAILING, props.theme.customs.colors.red900], + [CR.COMMITTED, 1, C.RUNNING, null, {error: 'whoops'}, PS.FAILING, props.theme.customs.colors.orange], [CR.COMMITTED, 1, C.RUNNING, null, {warning: 'watch out!'}, PS.WARNING, props.theme.customs.colors.yellow700], [CR.FINAL, 1, C.CANCELLED, null, {}, PS.CANCELLED, props.theme.customs.colors.red900], [CR.FINAL, 1, C.COMPLETE, 137, {}, PS.FAILED, props.theme.customs.colors.red900], -- 2.30.2