diff --git a/litmus-portal/frontend/public/locales/en/translation.yaml b/litmus-portal/frontend/public/locales/en/translation.yaml index 3da057f9d..a8d7aeed1 100644 --- a/litmus-portal/frontend/public/locales/en/translation.yaml +++ b/litmus-portal/frontend/public/locales/en/translation.yaml @@ -278,6 +278,7 @@ error: workflowDetails: detailedLog: Click on Info to see details of your workflow fetchError: An error has occurred while fetching the data + overallRR: 'Overall RR: ' ###################################### ############ Views ############# diff --git a/litmus-portal/frontend/src/components/AdjustedWeights/index.tsx b/litmus-portal/frontend/src/components/AdjustedWeights/index.tsx index 8a3a311ff..842d3c83e 100644 --- a/litmus-portal/frontend/src/components/AdjustedWeights/index.tsx +++ b/litmus-portal/frontend/src/components/AdjustedWeights/index.tsx @@ -65,8 +65,8 @@ const AdjustedWeights: React.FC = ({ )} -
- +
+
); diff --git a/litmus-portal/frontend/src/components/AdjustedWeights/styles.ts b/litmus-portal/frontend/src/components/AdjustedWeights/styles.ts index ec88e16aa..06f534e4b 100644 --- a/litmus-portal/frontend/src/components/AdjustedWeights/styles.ts +++ b/litmus-portal/frontend/src/components/AdjustedWeights/styles.ts @@ -24,6 +24,9 @@ const useStyles = makeStyles((theme: Theme) => ({ display: 'flex', justifyContent: 'space-between', }, + progressbarDiv: { + marginRight: theme.spacing(1.25), + }, })); export default useStyles; diff --git a/litmus-portal/frontend/src/components/ProgressBar/AnalyticsLinearProgressBar/index.tsx b/litmus-portal/frontend/src/components/ProgressBar/AnalyticsLinearProgressBar/index.tsx index 7d4ef71a5..0d762819c 100644 --- a/litmus-portal/frontend/src/components/ProgressBar/AnalyticsLinearProgressBar/index.tsx +++ b/litmus-portal/frontend/src/components/ProgressBar/AnalyticsLinearProgressBar/index.tsx @@ -21,24 +21,25 @@ const AnalyticsLinearProgressBar: React.FC = ({ 60 - ? { - root: classes.root, - barColorPrimary: classes.greenColorPrimary, - } + ? classes.greenColorSecondary : resultValue > 30 - ? { - root: classes.root, - barColorPrimary: classes.yellowColorPrimary, - } - : { - root: classes.root, - barColorPrimary: classes.redColorPrimary, - } - : {} - } + ? classes.yellowColorSecondary + : classes.redColorSecondary + : classes.greenColorSecondary, + barColorPrimary: isInTable + ? resultValue > 60 + ? classes.greenColorPrimary + : resultValue > 30 + ? classes.yellowColorPrimary + : classes.redColorPrimary + : classes.greenColorSecondary, + }} /> ); }; diff --git a/litmus-portal/frontend/src/components/ProgressBar/AnalyticsLinearProgressBar/styles.ts b/litmus-portal/frontend/src/components/ProgressBar/AnalyticsLinearProgressBar/styles.ts index 856b55ef4..11078400c 100644 --- a/litmus-portal/frontend/src/components/ProgressBar/AnalyticsLinearProgressBar/styles.ts +++ b/litmus-portal/frontend/src/components/ProgressBar/AnalyticsLinearProgressBar/styles.ts @@ -3,17 +3,25 @@ import { makeStyles, Theme } from '@material-ui/core/styles'; const useStyle = makeStyles((theme: Theme) => ({ root: { borderRadius: '5rem', - height: '1rem', }, redColorPrimary: { backgroundColor: theme.palette.error.main, }, + redColorSecondary: { + backgroundColor: theme.palette.error.light, + }, greenColorPrimary: { backgroundColor: theme.palette.success.main, }, + greenColorSecondary: { + backgroundColor: theme.palette.success.light, + }, yellowColorPrimary: { backgroundColor: theme.palette.warning.main, }, + yellowColorSecondary: { + backgroundColor: theme.palette.warning.light, + }, })); export default useStyle; diff --git a/litmus-portal/frontend/src/components/ProgressBar/LinearProgressBar/index.tsx b/litmus-portal/frontend/src/components/ProgressBar/LinearProgressBar/index.tsx index ca1998403..f8ae240a6 100644 --- a/litmus-portal/frontend/src/components/ProgressBar/LinearProgressBar/index.tsx +++ b/litmus-portal/frontend/src/components/ProgressBar/LinearProgressBar/index.tsx @@ -21,25 +21,26 @@ const LinearProgressBar: React.FC = ({ 60 - ? { - root: classes.root, - barColorPrimary: classes.greenColorPrimary, - } - : resultValue > 30 - ? { - root: classes.root, - barColorPrimary: classes.yellowColorPrimary, - } - : { - root: classes.root, - barColorPrimary: classes.redColorPrimary, - } - : {} - } - style={{ height: `${width}rem`, borderRadius: '5rem' }} + style={{ + height: `${width}rem`, + borderRadius: '5rem', + }} + classes={{ + colorPrimary: isDefault + ? classes.greenColorSecondary + : resultValue > 60 + ? classes.greenColorSecondary + : resultValue > 30 + ? classes.yellowColorSecondary + : classes.redColorSecondary, + barColorPrimary: isDefault + ? classes.greenColorPrimary + : resultValue > 60 + ? classes.greenColorPrimary + : resultValue > 30 + ? classes.yellowColorPrimary + : classes.redColorPrimary, + }} /> ); }; diff --git a/litmus-portal/frontend/src/components/ProgressBar/LinearProgressBar/styles.ts b/litmus-portal/frontend/src/components/ProgressBar/LinearProgressBar/styles.ts index 856b55ef4..11078400c 100644 --- a/litmus-portal/frontend/src/components/ProgressBar/LinearProgressBar/styles.ts +++ b/litmus-portal/frontend/src/components/ProgressBar/LinearProgressBar/styles.ts @@ -3,17 +3,25 @@ import { makeStyles, Theme } from '@material-ui/core/styles'; const useStyle = makeStyles((theme: Theme) => ({ root: { borderRadius: '5rem', - height: '1rem', }, redColorPrimary: { backgroundColor: theme.palette.error.main, }, + redColorSecondary: { + backgroundColor: theme.palette.error.light, + }, greenColorPrimary: { backgroundColor: theme.palette.success.main, }, + greenColorSecondary: { + backgroundColor: theme.palette.success.light, + }, yellowColorPrimary: { backgroundColor: theme.palette.warning.main, }, + yellowColorSecondary: { + backgroundColor: theme.palette.warning.light, + }, })); export default useStyle; diff --git a/litmus-portal/frontend/src/pages/MyHub/index.tsx b/litmus-portal/frontend/src/pages/MyHub/index.tsx index a4196b9ba..811f4b3de 100644 --- a/litmus-portal/frontend/src/pages/MyHub/index.tsx +++ b/litmus-portal/frontend/src/pages/MyHub/index.tsx @@ -145,9 +145,6 @@ const MyHub: React.FC = () => { {t('myhub.mainPage.header')} - - {t('myhub.mainPage.github')} - {/* Charts Div */}
diff --git a/litmus-portal/frontend/src/pages/WorkflowDetails/index.tsx b/litmus-portal/frontend/src/pages/WorkflowDetails/index.tsx index 518f9ff0b..462361eff 100644 --- a/litmus-portal/frontend/src/pages/WorkflowDetails/index.tsx +++ b/litmus-portal/frontend/src/pages/WorkflowDetails/index.tsx @@ -31,7 +31,7 @@ const WorkflowDetails: React.FC = () => { const tabs = useActions(TabActions); const { pathname } = useLocation(); // Getting the workflow nome from the pathname - const workflowRunId = pathname.split('/')[3]; + const workflowRunId = pathname.split('/')[2]; const { t } = useTranslation(); // get ProjectID diff --git a/litmus-portal/frontend/src/views/AnalyticsDashboard/LitmusDashboard/WorkflowRunDetailsTable/TableData.tsx b/litmus-portal/frontend/src/views/AnalyticsDashboard/LitmusDashboard/WorkflowRunDetailsTable/TableData.tsx index 5dad9c398..e75a94ae5 100644 --- a/litmus-portal/frontend/src/views/AnalyticsDashboard/LitmusDashboard/WorkflowRunDetailsTable/TableData.tsx +++ b/litmus-portal/frontend/src/views/AnalyticsDashboard/LitmusDashboard/WorkflowRunDetailsTable/TableData.tsx @@ -66,7 +66,7 @@ const TableData: React.FC = ({ data }) => {
{data.resulting_points} Points
- +
diff --git a/litmus-portal/frontend/src/views/ChaosWorkflows/BrowseSchedule/ExperimentPoints.tsx b/litmus-portal/frontend/src/views/ChaosWorkflows/BrowseSchedule/ExperimentPoints.tsx index 928bcac6e..464a630f9 100644 --- a/litmus-portal/frontend/src/views/ChaosWorkflows/BrowseSchedule/ExperimentPoints.tsx +++ b/litmus-portal/frontend/src/views/ChaosWorkflows/BrowseSchedule/ExperimentPoints.tsx @@ -21,7 +21,7 @@ const ExperimentPoints: React.FC = ({ {weight === 1 || 0 ? `${weight} point` : `${weight} points`}
- + ); }; diff --git a/litmus-portal/frontend/src/views/ChaosWorkflows/BrowseSchedule/TableData.tsx b/litmus-portal/frontend/src/views/ChaosWorkflows/BrowseSchedule/TableData.tsx index 199811289..b0f8f463a 100644 --- a/litmus-portal/frontend/src/views/ChaosWorkflows/BrowseSchedule/TableData.tsx +++ b/litmus-portal/frontend/src/views/ChaosWorkflows/BrowseSchedule/TableData.tsx @@ -27,7 +27,6 @@ import * as TabActions from '../../../redux/actions/tabs'; import * as WorkflowActions from '../../../redux/actions/workflow'; import { history } from '../../../redux/configureStore'; import { ReactComponent as CrossMarkIcon } from '../../../svg/crossmark.svg'; -import { getUserRole } from '../../../utils/auth'; import { getProjectID, getProjectRole } from '../../../utils/getSearchParams'; import ExperimentPoints from './ExperimentPoints'; import useStyles from './styles'; @@ -41,7 +40,6 @@ const TableData: React.FC = ({ data, deleteRow }) => { const classes = useStyles(); const { t } = useTranslation(); - const userRole = getUserRole(); const projectID = getProjectID(); const projectRole = getProjectRole(); @@ -238,7 +236,7 @@ const TableData: React.FC = ({ data, deleteRow }) => {
{data.weightages.map((expData) => { return ( -
+
= ({ data, deleteRow }) => { ) : ( <> )} - {data.cronSyntax === '' ? ( + {projectRole !== 'Viewer' && data.cronSyntax === '' ? ( reRunSchedule()}>
@@ -312,7 +310,7 @@ const TableData: React.FC = ({ data, deleteRow }) => {
- {userRole !== 'Viewer' ? ( + {projectRole !== 'Viewer' ? ( setIsModalOpen(true)}>
({ weightInfo: { display: 'flex', flexDirection: 'row', - paddingBottom: theme.spacing(0.625), + paddingBottom: theme.spacing(1), }, points: { marginLeft: 'auto', diff --git a/litmus-portal/frontend/src/views/ChaosWorkflows/BrowseWorkflow/TableData.tsx b/litmus-portal/frontend/src/views/ChaosWorkflows/BrowseWorkflow/TableData.tsx index 4314620f1..c3fdb62c5 100644 --- a/litmus-portal/frontend/src/views/ChaosWorkflows/BrowseWorkflow/TableData.tsx +++ b/litmus-portal/frontend/src/views/ChaosWorkflows/BrowseWorkflow/TableData.tsx @@ -7,6 +7,7 @@ import { } from '@material-ui/core'; import MoreVertIcon from '@material-ui/icons/MoreVert'; import React from 'react'; +import { useTranslation } from 'react-i18next'; import LinearProgressBar from '../../../components/ProgressBar/LinearProgressBar'; import { ExecutionData, @@ -28,6 +29,8 @@ const TableData: React.FC = ({ data, exeData }) => { const projectID = getProjectID(); const projectRole = getProjectRole(); + const { t } = useTranslation(); + const [anchorEl, setAnchorEl] = React.useState(null); const open = Boolean(anchorEl); @@ -74,22 +77,29 @@ const TableData: React.FC = ({ data, exeData }) => {
- {exeData.phase === 'Failed' || exeData.phase === '' ? ( + {exeData.finishedAt.length === 0 ? ( + + {t('workflowDetails.overallRR')} + NA + + ) : exeData.phase === 'Failed' || exeData.phase === '' ? ( <> - Overall RR: 0% + {t('workflowDetails.overallRR')} + 0%
- +
) : ( <> - Overall RR: 100% + {t('workflowDetails.overallRR')} + 100%
- +
)} diff --git a/litmus-portal/frontend/src/views/ChaosWorkflows/BrowseWorkflow/styles.ts b/litmus-portal/frontend/src/views/ChaosWorkflows/BrowseWorkflow/styles.ts index 7338afccb..824cfc137 100644 --- a/litmus-portal/frontend/src/views/ChaosWorkflows/BrowseWorkflow/styles.ts +++ b/litmus-portal/frontend/src/views/ChaosWorkflows/BrowseWorkflow/styles.ts @@ -101,6 +101,7 @@ const useStyles = makeStyles((theme) => ({ }, progressBar: { width: '6.5rem', + marginTop: theme.spacing(2), }, steps: { marginLeft: theme.spacing(5.625), @@ -135,6 +136,9 @@ const useStyles = makeStyles((theme) => ({ success: { color: theme.palette.success.main, }, + warning: { + color: theme.palette.warning.main, + }, // Menu option with icon expDiv: { display: 'flex', diff --git a/litmus-portal/frontend/src/views/CreateWorkflow/CustomWorkflow/ScheduleWorkflow/index.tsx b/litmus-portal/frontend/src/views/CreateWorkflow/CustomWorkflow/ScheduleWorkflow/index.tsx index cea5e4df6..e507aa9c2 100644 --- a/litmus-portal/frontend/src/views/CreateWorkflow/CustomWorkflow/ScheduleWorkflow/index.tsx +++ b/litmus-portal/frontend/src/views/CreateWorkflow/CustomWorkflow/ScheduleWorkflow/index.tsx @@ -189,7 +189,7 @@ const ScheduleCustomWorkflow: React.FC = ({ gotoStep }) => { container: { args: [`${installAllExp}sleep 30`], command: ['sh', '-c'], - image: 'alpine/k8s:1.18.2', + image: 'litmuschaos/k8s:latest', }, }; workflows.forEach((data) => { @@ -242,7 +242,7 @@ const ScheduleCustomWorkflow: React.FC = ({ gotoStep }) => { `kubectl delete chaosengine ${removeChaosEngine} -n {{workflow.parameters.adminModeNamespace}}`, ], command: ['sh', '-c'], - image: 'alpine/k8s:1.18.2', + image: 'litmuschaos/k8s:latest', }, }; } diff --git a/litmus-portal/frontend/src/views/CreateWorkflow/ReliabilityScore/ResultTable.tsx b/litmus-portal/frontend/src/views/CreateWorkflow/ReliabilityScore/ResultTable.tsx index e2db7dfa1..da6184979 100644 --- a/litmus-portal/frontend/src/views/CreateWorkflow/ReliabilityScore/ResultTable.tsx +++ b/litmus-portal/frontend/src/views/CreateWorkflow/ReliabilityScore/ResultTable.tsx @@ -116,7 +116,7 @@ const ResultTable: React.FC = ({ testValue, testNames }) => { {t('createWorkflow.reliabilityScore.resultTable.points')}
- +
@@ -125,7 +125,7 @@ const ResultTable: React.FC = ({ testValue, testNames }) => { {t('createWorkflow.reliabilityScore.resultTable.points')}
- +