[ARVADOS-WORKBENCH2] updated: 1.2.0-435-g20bb212

Git user git at public.curoverse.com
Mon Sep 24 09:40:22 EDT 2018


Summary of changes:
 src/views-components/data-explorer/renderers.tsx | 13 +++++++++----
 src/views/workflow-panel/workflow-panel.tsx      | 19 ++++++++++++-------
 2 files changed, 21 insertions(+), 11 deletions(-)

       via  20bb2125fddc247d8ff2df960b3d4d316e4a0d13 (commit)
      from  c04071992d624a6aec1185898e58ce848086684f (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 20bb2125fddc247d8ff2df960b3d4d316e4a0d13
Author: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
Date:   Mon Sep 24 15:40:13 2018 +0200

    auth
    
    Feature #13857
    
    Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>

diff --git a/src/views-components/data-explorer/renderers.tsx b/src/views-components/data-explorer/renderers.tsx
index b9d0bc8..039ef47 100644
--- a/src/views-components/data-explorer/renderers.tsx
+++ b/src/views-components/data-explorer/renderers.tsx
@@ -17,6 +17,7 @@ import { getProcess, Process, getProcessStatus, getProcessStatusColor } from '~/
 import { ArvadosTheme } from '~/common/custom-theme';
 import { compose } from 'redux';
 import { WorkflowResource } from '~/models/workflow';
+import { ResourceStatus } from '~/views/workflow-panel/workflow-panel';
 
 export const renderName = (item: { name: string; uuid: string, kind: string }) =>
     <Grid container alignItems="center" wrap="nowrap" spacing={16}>
@@ -78,15 +79,19 @@ export const renderDate = (date?: string) => {
     return <Typography noWrap style={{ minWidth: '100px' }}>{formatDate(date)}</Typography>;
 };
 
-export const renderWorkflowStatus = () => {
-    return <Typography noWrap style={{ width: '60px' }}>{"Public"}</Typography>;
+export const renderWorkflowStatus = (ownerUuid?: string) => {
+    if (ownerUuid === 'qr1hi-j7d0g-2ax8o1pscovq2lg') {
+        return <Typography noWrap style={{ width: '60px' }}>{ResourceStatus.PUBLIC}</Typography>;
+    } else {
+        return <Typography noWrap style={{ width: '60px' }}>{ResourceStatus.PRIVATE}</Typography>;
+    }
 };
 
 export const ResourceWorkflowStatus = connect(
     (state: RootState, props: { uuid: string }) => {
         const resource = getResource<WorkflowResource>(props.uuid)(state.resources);
-        return {};
-    })((props: { status?: string }) => renderWorkflowStatus());
+        return { ownerUuid: resource ? resource.ownerUuid : '' };
+    })((props: { ownerUuid?: string }) => renderWorkflowStatus(props.ownerUuid));
 
 export const ResourceLastModifiedDate = connect(
     (state: RootState, props: { uuid: string }) => {
diff --git a/src/views/workflow-panel/workflow-panel.tsx b/src/views/workflow-panel/workflow-panel.tsx
index ae058c3..8cbdb1a 100644
--- a/src/views/workflow-panel/workflow-panel.tsx
+++ b/src/views/workflow-panel/workflow-panel.tsx
@@ -33,14 +33,18 @@ export enum WorkflowPanelColumnNames {
     SHARE = 'Share'
 }
 
+export interface WorkflowPanelFilter extends DataTableFilterItem {
+    type: ResourceStatus;
+}
+
 interface WorkflowPanelDataProps {
     resources: ResourcesState;
 }
 
 export enum ResourceStatus {
-    PUBLIC = 'public',
-    PRIVATE = 'private',
-    SHARED = 'shared'
+    PUBLIC = "Public",
+    PRIVATE = "Private",
+    SHARED = "Shared"
 }
 
 const resourceStatus = (type: string) => {
@@ -64,7 +68,7 @@ const ResourceShare = (props: { uuid: string }) => {
     </Tooltip>;
 };
 
-export const workflowPanelColumns: DataColumns<string, DataTableFilterItem> = [
+export const workflowPanelColumns: DataColumns<string, WorkflowPanelFilter> = [
     {
         name: WorkflowPanelColumnNames.NAME,
         selected: true,
@@ -77,19 +81,21 @@ export const workflowPanelColumns: DataColumns<string, DataTableFilterItem> = [
         name: WorkflowPanelColumnNames.AUTHORISATION,
         selected: true,
         configurable: true,
-        sortDirection: SortDirection.NONE,
         filters: [
             {
                 name: resourceStatus(ResourceStatus.PUBLIC),
                 selected: true,
+                type: ResourceStatus.PUBLIC
             },
             {
                 name: resourceStatus(ResourceStatus.PRIVATE),
                 selected: true,
+                type: ResourceStatus.PRIVATE
             },
             {
                 name: resourceStatus(ResourceStatus.SHARED),
                 selected: true,
+                type: ResourceStatus.SHARED
             }
         ],
         render: (uuid: string) => <ResourceWorkflowStatus uuid={uuid} />,
@@ -105,8 +111,7 @@ export const workflowPanelColumns: DataColumns<string, DataTableFilterItem> = [
     {
         name: '',
         selected: true,
-        configurable: true,
-        sortDirection: SortDirection.NONE,
+        configurable: false,
         filters: [],
         render: (uuid: string) => <ResourceShare uuid={uuid} />
     }

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list