[ARVADOS-WORKBENCH2] updated: 1.2.0-205-g21ee154
Git user
git at public.curoverse.com
Wed Aug 29 10:37:48 EDT 2018
Summary of changes:
src/routes/routes.ts | 18 +++++++++++-------
src/store/navigation/navigation-action.ts | 6 +++++-
src/views-components/details-panel/process-details.tsx | 2 +-
3 files changed, 17 insertions(+), 9 deletions(-)
via 21ee15421471ce0f0aa4a1241cab3498c335d682 (commit)
from 6149700b801fc2cdb83b0e700bbb319850ed471d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 21ee15421471ce0f0aa4a1241cab3498c335d682
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date: Wed Aug 29 16:37:35 2018 +0200
Update navigation with processes
Feature #14099
Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
diff --git a/src/routes/routes.ts b/src/routes/routes.ts
index 0bf7110..c46239e 100644
--- a/src/routes/routes.ts
+++ b/src/routes/routes.ts
@@ -31,6 +31,8 @@ export const getResourceUrl = (uuid: string) => {
}
};
+export const getProcessUrl = (uuid: string) => `/processes/${uuid}`;
+
export const addRouteChangeHandlers = (history: History, store: RootStore) => {
const handler = handleLocationChange(store);
handler(history.location);
@@ -43,30 +45,32 @@ export const matchRootRoute = (route: string) =>
export const matchFavoritesRoute = (route: string) =>
matchPath(route, { path: Routes.FAVORITES });
-export interface ProjectRouteParams {
+export interface ResourceRouteParams {
id: string;
}
export const matchProjectRoute = (route: string) =>
- matchPath<ProjectRouteParams>(route, { path: Routes.PROJECTS });
-
-export interface CollectionRouteParams {
- id: string;
-}
+ matchPath<ResourceRouteParams>(route, { path: Routes.PROJECTS });
export const matchCollectionRoute = (route: string) =>
- matchPath<CollectionRouteParams>(route, { path: Routes.COLLECTIONS });
+ matchPath<ResourceRouteParams>(route, { path: Routes.COLLECTIONS });
+
+export const matchProcessRoute = (route: string) =>
+ matchPath<ResourceRouteParams>(route, { path: Routes.COLLECTIONS });
const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => {
const projectMatch = matchProjectRoute(pathname);
const collectionMatch = matchCollectionRoute(pathname);
const favoriteMatch = matchFavoritesRoute(pathname);
+ const processMatch = matchProcessRoute(pathname);
if (projectMatch) {
store.dispatch(loadProject(projectMatch.params.id));
} else if (collectionMatch) {
store.dispatch(loadCollection(collectionMatch.params.id));
} else if (favoriteMatch) {
store.dispatch(loadFavorites());
+ } else if (processMatch) {
+ store.dispatch(processMatch.params.id);
}
};
diff --git a/src/store/navigation/navigation-action.ts b/src/store/navigation/navigation-action.ts
index 1d36bee..188acf1 100644
--- a/src/store/navigation/navigation-action.ts
+++ b/src/store/navigation/navigation-action.ts
@@ -9,7 +9,7 @@ import { getCollectionUrl } from "~/models/collection";
import { getProjectUrl } from "~/models/project";
import { SidePanelTreeCategory } from '../side-panel-tree/side-panel-tree-actions';
-import { Routes } from '~/routes/routes';
+import { Routes, getProcessUrl } from '~/routes/routes';
export const navigateTo = (uuid: string) =>
async (dispatch: Dispatch) => {
@@ -18,6 +18,8 @@ export const navigateTo = (uuid: string) =>
dispatch<any>(navigateToProject(uuid));
} else if (kind === ResourceKind.COLLECTION) {
dispatch<any>(navigateToCollection(uuid));
+ } else if (kind === ResourceKind.CONTAINER_REQUEST) {
+ dispatch<any>(navigateToProcess(uuid));
}
if (uuid === SidePanelTreeCategory.FAVORITES) {
dispatch<any>(navigateToFavorites);
@@ -29,3 +31,5 @@ export const navigateToFavorites = push(Routes.FAVORITES);
export const navigateToProject = compose(push, getProjectUrl);
export const navigateToCollection = compose(push, getCollectionUrl);
+
+export const navigateToProcess = compose(push, getProcessUrl);
diff --git a/src/views-components/details-panel/process-details.tsx b/src/views-components/details-panel/process-details.tsx
index d9ddfad..e3c9823 100644
--- a/src/views-components/details-panel/process-details.tsx
+++ b/src/views-components/details-panel/process-details.tsx
@@ -37,7 +37,7 @@ export class ProcessDetails extends DetailsData<ProcessResource> {
<DetailsAttribute label='Container UUID' link={this.item.containerUuid || ''} value={this.item.containerUuid} />
<DetailsAttribute label='Priority' value={this.item.priority} />
- <DetailsAttribute label='Runtime Constraints' value={this.item.runtimeConstraints} />
+ <DetailsAttribute label='Runtime Constraints' value={JSON.stringify(this.item.runtimeConstraints)} />
{/* Link but we dont have view */}
<DetailsAttribute label='Docker Image locator' link={this.item.containerImage} value={this.item.containerImage} />
</div>;
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list