diff --git a/SAS/TMSS/frontend/tmss_webapp/src/layout/components/PageHeader.js b/SAS/TMSS/frontend/tmss_webapp/src/layout/components/PageHeader.js index 05648df30a821b8b89b2696f52df68ee7a7e5f16..bc835979e1806deb5d4df907004effcde76e032a 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/layout/components/PageHeader.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/layout/components/PageHeader.js @@ -3,6 +3,7 @@ import { routes } from '../../routes'; import {matchPath, Link} from 'react-router-dom'; export default ({ title, subTitle, actions, ...props}) => { + debugger; const [page, setPage] = useState({}); useEffect(() => { @@ -40,7 +41,7 @@ export default ({ title, subTitle, actions, ...props}) => { </div> <div className="page-action-menu"> {(actions || []).map((action, index) =>{ - if (action.type === 'button') { + if(action.type === 'button') { return ( <button className="p-link" key={index} title={action.title || ''}> <i className={`fa ${action.disabled?'fa-disabled':''} ${action.icon}`} @@ -48,6 +49,15 @@ export default ({ title, subTitle, actions, ...props}) => { onClick={(e) => action.disabled?'':onButtonClick(e, action)} /> </button> ); + } else if(action.type === 'element'){ + return( + <div className={action.classes} dangerouslySetInnerHTML={{ __html: action.element }}/> + ) + } else if (action.type === 'ext_link') { + return ( + <a href={action.props.pathname} title={action.title || ''} + target={action.target?action.target:"_blank"}>{action.label}</a> + ); } else { return ( <Link key={index} className={action.classname} to={action.disabled?{}:{ ...action.props }} diff --git a/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_workflow.scss b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_workflow.scss index e9172f64cf59d4f24fdcaf09752ebcbe494786c3..c1935e5355f79b0a0281046b1ebf1bf3d0976772 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_workflow.scss +++ b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_workflow.scss @@ -39,6 +39,13 @@ } } } + + .help-desk-link{ + display: inline-block; + margin-right: 7px; + text-decoration: underline; + font-weight: bolder; + } } .step-header-1 { @@ -89,4 +96,4 @@ .btn-bar { padding: 10px; -} \ No newline at end of file +} diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Workflow/index.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Workflow/index.js index 4fe4ee6675ff8c29ff6893460177ef8010e72c48..f2baaf1d0d7b6c317da5d7f55c3b429ceabf33d4 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Workflow/index.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Workflow/index.js @@ -199,7 +199,11 @@ export default (props) => { return ( <> <Growl ref={(el) => growl = el} /> - {currentView && <PageHeader location={props.location} title={`${title}`} actions={[{ icon: 'fa-window-close', link: props.history.goBack, title: 'Click to Close Workflow'}]} />} + {currentStep && + <PageHeader location={props.location} title={`${title}`} + actions={[{type:'ext_link', icon:'', label: 'SDC Helpdesk', title: 'Report major issues here', props: { pathname: 'https://support.astron.nl/sdchelpdesk' } }, + {icon: 'fa-window-close', link: props.history.goBack, title: 'Click to Close Workflow', props: { pathname: '/schedulingunit/1/workflow' } }, + ]} />} {loader && <AppLoader />} {!loader && schedulingUnit && <> @@ -225,7 +229,7 @@ export default (props) => { <label className="col-sm-10 "> <a href=" https://proxy.lofar.eu/lofmonitor/" target="_blank">Station Monitor</a> </label> - </div> + </div> </div>} <div className={`step-header-${currentStep}`}> <Steps model={getStepItems()} activeIndex={currentView - 1} readOnly={false}