diff options
author | Yarin Dekel <yarind@amdocs.com> | 2019-02-14 16:48:48 +0200 |
---|---|---|
committer | Yarin Dekel <yarind@amdocs.com> | 2019-02-14 16:48:55 +0200 |
commit | ef1f266830af27744b6cad58c50eb1573f9d432c (patch) | |
tree | 8f23185c80d99b5e0c7df50aa16c485bdf7fac74 | |
parent | c038b3ef99805a3ba15bfba9bce0c396022177c4 (diff) |
support route path change in workflow
Issue-ID: SDC-2122
Change-Id: I85e712d1a119475a48a22cd21fd4f29d54f9c607
Signed-off-by: Yarin Dekel <yarind@amdocs.com>
9 files changed, 14 insertions, 14 deletions
diff --git a/workflow-designer-ui/src/main/frontend/index.html b/workflow-designer-ui/src/main/frontend/index.html index 09d2d0a9..f0d2b573 100644 --- a/workflow-designer-ui/src/main/frontend/index.html +++ b/workflow-designer-ui/src/main/frontend/index.html @@ -1,8 +1,7 @@ <!DOCTYPE html> <html> <head> - <base href="/"> - <meta charset="utf-8"> + <meta charset="utf-8"> <title>SDC Workflow App</title> </head> <body> diff --git a/workflow-designer-ui/src/main/frontend/src/features/catalog/CatalogView.jsx b/workflow-designer-ui/src/main/frontend/src/features/catalog/CatalogView.jsx index b9d6f863..c1cd68ce 100644 --- a/workflow-designer-ui/src/main/frontend/src/features/catalog/CatalogView.jsx +++ b/workflow-designer-ui/src/main/frontend/src/features/catalog/CatalogView.jsx @@ -100,7 +100,8 @@ class CatalogView extends Component { goToOverviewPage = id => { const { history } = this.props; - history.push('/workflow/' + id + '/overview'); + const { location } = history; + history.push(`${location.pathname}/workflow/${id}/overview`); }; searchChange = searchValue => { diff --git a/workflow-designer-ui/src/main/frontend/src/features/version/versionController/VersionControllerView.jsx b/workflow-designer-ui/src/main/frontend/src/features/version/versionController/VersionControllerView.jsx index f2511c08..ef5e1168 100644 --- a/workflow-designer-ui/src/main/frontend/src/features/version/versionController/VersionControllerView.jsx +++ b/workflow-designer-ui/src/main/frontend/src/features/version/versionController/VersionControllerView.jsx @@ -55,7 +55,7 @@ export default class VersionControllerView extends Component { routeToOverview = () => { const { history, match } = this.props; const workflowId = match.params.workflowId; - history.push('/workflow/' + workflowId + '/overview'); + history.push(`/workflows/workflow/${workflowId}/overview`); }; sendSaveParamsToServer = () => { diff --git a/workflow-designer-ui/src/main/frontend/src/features/version/versionSaga.js b/workflow-designer-ui/src/main/frontend/src/features/version/versionSaga.js index cf391f33..56dd7a5d 100644 --- a/workflow-designer-ui/src/main/frontend/src/features/version/versionSaga.js +++ b/workflow-designer-ui/src/main/frontend/src/features/version/versionSaga.js @@ -86,7 +86,7 @@ function* watchSubmitVersion(action) { const versions = yield call(overviewApi.getVersions, workflowId); yield put(versionListFetchAction(versions)); yield call( - history.push('/workflow/' + workflowId + '/version/' + data.id) + history.push(`/workflows/workflow/${workflowId}/version/${data.id}`) ); } catch (error) { yield put(genericNetworkErrorAction(error)); diff --git a/workflow-designer-ui/src/main/frontend/src/features/workflow/overview/OverviewView.jsx b/workflow-designer-ui/src/main/frontend/src/features/workflow/overview/OverviewView.jsx index 1089e209..952e93cf 100644 --- a/workflow-designer-ui/src/main/frontend/src/features/workflow/overview/OverviewView.jsx +++ b/workflow-designer-ui/src/main/frontend/src/features/workflow/overview/OverviewView.jsx @@ -55,8 +55,8 @@ class OverviewView extends Component { } onSelectVersionFromTable = data => { - const { history, workflow } = this.props; - history.push('/workflow/' + workflow.id + '/version/' + data.id); + const { history } = this.props; + history.push('version/' + data.id); }; onCreateNewVersionFromTable = () => { diff --git a/workflow-designer-ui/src/main/frontend/src/features/workflow/overview/overviewSagas.js b/workflow-designer-ui/src/main/frontend/src/features/workflow/overview/overviewSagas.js index 8b5f04f9..41002c89 100644 --- a/workflow-designer-ui/src/main/frontend/src/features/workflow/overview/overviewSagas.js +++ b/workflow-designer-ui/src/main/frontend/src/features/workflow/overview/overviewSagas.js @@ -93,7 +93,7 @@ export function* archiveWorkflow(action) { }) }) ); - history.push('/'); + history.push('/workflows'); } export function* watchOverview() { diff --git a/workflow-designer-ui/src/main/frontend/src/features/workflow/overview/views/WorkflowHeader.jsx b/workflow-designer-ui/src/main/frontend/src/features/workflow/overview/views/WorkflowHeader.jsx index 3175cbba..e40b19a2 100644 --- a/workflow-designer-ui/src/main/frontend/src/features/workflow/overview/views/WorkflowHeader.jsx +++ b/workflow-designer-ui/src/main/frontend/src/features/workflow/overview/views/WorkflowHeader.jsx @@ -23,7 +23,7 @@ import ArchiveLabel from 'shared/archiveLabel/ArchiveLabel'; const Buttons = ({ history, archiveWorkflow, restoreWorkflow, isArchive }) => ( <div className="header-buttons"> <SVGIcon - onClick={() => history.push('/')} + onClick={() => history.push('/workflows')} label={I18n.t('workflow.overview.backBtnLabel')} className="go-catalog-btn" labelPosition="right" diff --git a/workflow-designer-ui/src/main/frontend/src/routes.js b/workflow-designer-ui/src/main/frontend/src/routes.js index ea433cca..4be77016 100644 --- a/workflow-designer-ui/src/main/frontend/src/routes.js +++ b/workflow-designer-ui/src/main/frontend/src/routes.js @@ -23,7 +23,7 @@ import Composition from 'features/version/composition/Composition'; export const routes = [ { - path: '/workflow/:workflowId/version/:versionId', + path: '/workflows/workflow/:workflowId/version/:versionId', component: Version, routes: [ { @@ -48,12 +48,12 @@ export const routes = [ ] }, { - path: '/', + path: '/workflows', exact: true, component: Catalog }, { - path: '/workflow/:workflowId/overview', + path: '/workflows/workflow/:workflowId/overview', component: OverviewView } ]; diff --git a/workflow-designer-ui/src/main/webapp/WEB-INF/jetty-web.xml b/workflow-designer-ui/src/main/webapp/WEB-INF/jetty-web.xml index 1867004f..92e847c8 100644 --- a/workflow-designer-ui/src/main/webapp/WEB-INF/jetty-web.xml +++ b/workflow-designer-ui/src/main/webapp/WEB-INF/jetty-web.xml @@ -2,5 +2,5 @@ <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd"> <Configure class="org.eclipse.jetty.webapp.WebAppContext"> - <Set name="contextPath">/</Set> -</Configure>
\ No newline at end of file + <Set name="contextPath">/workflows</Set> +</Configure> |