support route path change in workflow 01/78501/1
authorYarin Dekel <yarind@amdocs.com>
Thu, 14 Feb 2019 14:48:48 +0000 (16:48 +0200)
committerYarin Dekel <yarind@amdocs.com>
Thu, 14 Feb 2019 14:48:55 +0000 (16:48 +0200)
Issue-ID: SDC-2122
Change-Id: I85e712d1a119475a48a22cd21fd4f29d54f9c607
Signed-off-by: Yarin Dekel <yarind@amdocs.com>
workflow-designer-ui/src/main/frontend/index.html
workflow-designer-ui/src/main/frontend/src/features/catalog/CatalogView.jsx
workflow-designer-ui/src/main/frontend/src/features/version/versionController/VersionControllerView.jsx
workflow-designer-ui/src/main/frontend/src/features/version/versionSaga.js
workflow-designer-ui/src/main/frontend/src/features/workflow/overview/OverviewView.jsx
workflow-designer-ui/src/main/frontend/src/features/workflow/overview/overviewSagas.js
workflow-designer-ui/src/main/frontend/src/features/workflow/overview/views/WorkflowHeader.jsx
workflow-designer-ui/src/main/frontend/src/routes.js
workflow-designer-ui/src/main/webapp/WEB-INF/jetty-web.xml

index 09d2d0a..f0d2b57 100644 (file)
@@ -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>
index b9d6f86..c1cd68c 100644 (file)
@@ -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 => {
index f2511c0..ef5e116 100644 (file)
@@ -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 = () => {
index cf391f3..56dd7a5 100644 (file)
@@ -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));
index 1089e20..952e93c 100644 (file)
@@ -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 = () => {
index 8b5f04f..41002c8 100644 (file)
@@ -93,7 +93,7 @@ export function* archiveWorkflow(action) {
             })
         })
     );
-    history.push('/');
+    history.push('/workflows');
 }
 
 export function* watchOverview() {
index 3175cbb..e40b19a 100644 (file)
@@ -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"
index ea433cc..4be7701 100644 (file)
@@ -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
     }
 ];
index 1867004..92e847c 100644 (file)
@@ -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>