X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/da85f1807c0223ab3de12448ae75df5482a457d8..08fb41e26f7227e85c56faf833918e94ebf8531e:/src/views/subprocess-panel/subprocess-panel-root.tsx

diff --git a/src/views/subprocess-panel/subprocess-panel-root.tsx b/src/views/subprocess-panel/subprocess-panel-root.tsx
index fac421bc..a8ce6075 100644
--- a/src/views/subprocess-panel/subprocess-panel-root.tsx
+++ b/src/views/subprocess-panel/subprocess-panel-root.tsx
@@ -16,6 +16,7 @@ import { SUBPROCESS_PANEL_ID } from '~/store/subprocess-panel/subprocess-panel-a
 import { DataTableDefaultView } from '~/components/data-table-default-view/data-table-default-view';
 import { createTree } from '~/models/tree';
 import { getInitialProcessStatusFilters } from '~/store/resource-type-filters/resource-type-filters';
+import { ResourcesState } from '~/store/resources/resources';
 
 export enum SubprocessPanelColumnNames {
     NAME = "Name",
@@ -63,27 +64,32 @@ export const subprocessPanelColumns: DataColumns<string> = [
 ];
 
 export interface SubprocessPanelDataProps {
-    isAdmin: boolean;
+    resources: ResourcesState;
 }
 
 export interface SubprocessPanelActionProps {
     onItemClick: (item: string) => void;
-    onContextMenu: (event: React.MouseEvent<HTMLElement>, item: string, isAdmin: boolean) => void;
+    onContextMenu: (event: React.MouseEvent<HTMLElement>, item: string, resources: ResourcesState) => void;
     onItemDoubleClick: (item: string) => void;
 }
 
 type SubprocessPanelProps = SubprocessPanelActionProps & SubprocessPanelDataProps;
 
+const DEFAULT_VIEW_MESSAGES = [
+    'No subprocesses available for listing.',
+    'The current process may not have any or none matches current filtering.'
+];
+
 export const SubprocessPanelRoot = (props: SubprocessPanelProps) => {
     return <DataExplorer
         id={SUBPROCESS_PANEL_ID}
         onRowClick={props.onItemClick}
         onRowDoubleClick={props.onItemDoubleClick}
-        onContextMenu={(event, item) => props.onContextMenu(event, item, props.isAdmin)}
+        onContextMenu={(event, item) => props.onContextMenu(event, item, props.resources)}
         contextMenuColumn={true}
         dataTableDefaultView={
             <DataTableDefaultView
                 icon={ProcessIcon}
-                messages={['This process has no subprocesses.']} />
+                messages={DEFAULT_VIEW_MESSAGES} />
         } />;
 };
\ No newline at end of file
