diff --git a/litmus-portal/frontend/src/pages/MyHub/customMyHubCard.tsx b/litmus-portal/frontend/src/pages/MyHub/customMyHubCard.tsx index 77c08b399..4ebcb0499 100644 --- a/litmus-portal/frontend/src/pages/MyHub/customMyHubCard.tsx +++ b/litmus-portal/frontend/src/pages/MyHub/customMyHubCard.tsx @@ -10,10 +10,12 @@ import MoreVertIcon from '@material-ui/icons/MoreVert'; import moment from 'moment'; import React from 'react'; import { useTranslation } from 'react-i18next'; +import { useSelector } from 'react-redux'; import ButtonFilled from '../../components/Button/ButtonFilled'; import Loader from '../../components/Loader'; import { HubDetails } from '../../models/redux/myhub'; import { history } from '../../redux/configureStore'; +import { RootState } from '../../redux/reducers'; import useStyles from './styles'; interface customMyHubCardProp { @@ -37,6 +39,9 @@ const CustomMyHubCard: React.FC = ({ }) => { const classes = useStyles(); + // UserData from Redux + const userData = useSelector((state: RootState) => state.userData); + // States for PopOver to display Experiment Weights const [anchorEl, setAnchorEl] = React.useState(null); const open = Boolean(anchorEl); @@ -68,74 +73,81 @@ const CustomMyHubCard: React.FC = ({ > {hub.IsAvailable ? 'Connected' : 'Error'} - - - - - { - handleRefresh(hub.id); - }} - > -
- Refresh - {t('myhub.refresh')} -
-
- { - history.push(`/myhub/edit/${hub.HubName}`); - }} - > -
- Edit - {t('myhub.edit')} -
-
- { - handleDelete(hub.id); - }} - > -
- disconnect - + + + + + { + handleRefresh(hub.id); + }} > - {t('myhub.disconnect')} - -
-
-
+
+ Refresh + + {t('myhub.refresh')} + +
+ + { + history.push(`/myhub/edit/${hub.HubName}`); + }} + > +
+ Edit + {t('myhub.edit')} +
+
+ + { + handleDelete(hub.id); + }} + > +
+ disconnect + + {t('myhub.disconnect')} + +
+
+ + + )} = ({ gotoStep }) => { FileType: 'experiment', }, }, + fetchPolicy: 'no-cache', onCompleted: (data) => { const parsedYaml = YAML.parse(data.getYAMLData); workflowAction.setWorkflowDetails({ diff --git a/litmus-portal/frontend/src/views/CreateWorkflow/CustomWorkflow/TuneWorkflow/index.tsx b/litmus-portal/frontend/src/views/CreateWorkflow/CustomWorkflow/TuneWorkflow/index.tsx index e32ed2252..c09952566 100644 --- a/litmus-portal/frontend/src/views/CreateWorkflow/CustomWorkflow/TuneWorkflow/index.tsx +++ b/litmus-portal/frontend/src/views/CreateWorkflow/CustomWorkflow/TuneWorkflow/index.tsx @@ -51,6 +51,7 @@ const TuneCustomWorkflow: React.FC = ({ gotoStep }) => { const { t } = useTranslation(); const userData = useSelector((state: RootState) => state.userData); const [getEngineYaml] = useLazyQuery(GET_ENGINE_YAML, { + fetchPolicy: 'no-cache', onCompleted: (data) => { const parsedYaml = YAML.parse(data.getYAMLData); setEnv([...parsedYaml.spec.experiments[0].spec.components.env]);