18881: Fixes the Failing state's color, from red to orange. 18881-failing-state-color-fix
authorLucas Di Pentima <lucas.dipentima@curii.com>
Thu, 14 Apr 2022 19:28:26 +0000 (16:28 -0300)
committerLucas Di Pentima <lucas.dipentima@curii.com>
Thu, 14 Apr 2022 19:28:26 +0000 (16:28 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima@curii.com>

src/common/custom-theme.ts
src/store/processes/process.ts
src/views-components/data-explorer/renderers.test.tsx

index b0703237af97f4c603dffdf42548302cb67a7eac..fc89a4ae216b2790385570f293b74c9ebd3145ba 100644 (file)
@@ -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: {
index b72a0c2b10b9a280ad4a59c6167cd45d152ff520..19f30dd2b333d005096e7916faccb8f19e32f837 100644 (file)
@@ -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;
index 229d99094ed36ed7fd5500fc0607cbfc4092a102..5bc123df60016f041aef06a78a597557ea100757 100644 (file)
@@ -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],