[ARVADOS-WORKBENCH2] updated: 1.3.0-122-g83d8f6e8

Git user git at public.curoverse.com
Mon Dec 17 01:43:40 EST 2018


Summary of changes:
 src/views-components/data-explorer/renderers.tsx      | 18 +++++++++---------
 src/views-components/data-explorer/with-resources.tsx |  3 +++
 2 files changed, 12 insertions(+), 9 deletions(-)

       via  83d8f6e889dde0b9c971d794f79f98556b2fdf14 (commit)
      from  6e0c6489bc761bac498ff4a77dc1bcd777594c67 (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 83d8f6e889dde0b9c971d794f79f98556b2fdf14
Author: Janicki Artur <artur.janicki at contractors.roche.com>
Date:   Mon Dec 17 07:43:31 2018 +0100

    change code after CR - add method to with-resources
    
    Feature #14602_admin_compute_node_paginations
    
    Arvados-DCO-1.1-Signed-off-by: Janicki Artur <artur.janicki at contractors.roche.com>

diff --git a/src/views-components/data-explorer/renderers.tsx b/src/views-components/data-explorer/renderers.tsx
index b74e8af1..ce4d430f 100644
--- a/src/views-components/data-explorer/renderers.tsx
+++ b/src/views-components/data-explorer/renderers.tsx
@@ -25,7 +25,7 @@ import { UserResource } from '~/models/user';
 import { toggleIsActive, toggleIsAdmin } from '~/store/users/users-actions';
 import { LinkResource } from '~/models/link';
 import { navigateTo } from '~/store/navigation/navigation-action';
-import { withResource, getDataFromResource } from './with-resources';
+import { withResource, getDataFromResource, withResourceData } from '~/views-components/data-explorer/with-resources';
 
 const renderName = (item: { name: string; uuid: string, kind: string }) =>
     <Grid container alignItems="center" wrap="nowrap" spacing={16}>
@@ -203,21 +203,21 @@ const renderNodeInfo = (data: string) => {
     return <Typography>{JSON.stringify(data, null, 4)}</Typography>;
 };
 
-export const ComputeNodeInfo = withResource(({ resource }) => renderNodeInfo(getDataFromResource('info', resource)));
+export const ComputeNodeInfo = withResourceData('info', renderNodeInfo);
 
-export const ComputeNodeUuid = withResource(({ resource }) => renderNodeData(getDataFromResource('uuid', resource)));
+export const ComputeNodeUuid = withResourceData('uuid', renderNodeData);
 
-export const ComputeNodeDomain = withResource(({ resource }) => renderNodeData(getDataFromResource('domain', resource)));
+export const ComputeNodeDomain = withResourceData('domain', renderNodeData);
 
-export const ComputeNodeFirstPingAt = withResource(({ resource }) => renderNodeDate(getDataFromResource('firstPingAt', resource)));
+export const ComputeNodeFirstPingAt = withResourceData('firstPingAt', renderNodeDate);
 
-export const ComputeNodeHostname = withResource(({ resource }) => renderNodeData(getDataFromResource('hostname', resource)));
+export const ComputeNodeHostname = withResourceData('hostname', renderNodeData);
 
-export const ComputeNodeIpAddress = withResource(({ resource }) => renderNodeData(getDataFromResource('ipAddress', resource)));
+export const ComputeNodeIpAddress = withResourceData('ipAddress', renderNodeData);
 
-export const ComputeNodeJobUuid = withResource(({ resource }) => renderNodeData(getDataFromResource('jobUuid', resource)));
+export const ComputeNodeJobUuid = withResourceData('jobUuid', renderNodeData);
 
-export const ComputeNodeLastPingAt = withResource(({ resource }) => renderNodeDate(getDataFromResource('lastPingAt', resource)));
+export const ComputeNodeLastPingAt = withResourceData('lastPingAt', renderNodeDate);
 
 // Links Resources
 const renderLinkName = (item: { name: string }) =>
diff --git a/src/views-components/data-explorer/with-resources.tsx b/src/views-components/data-explorer/with-resources.tsx
index f6670bd6..54c9396c 100644
--- a/src/views-components/data-explorer/with-resources.tsx
+++ b/src/views-components/data-explorer/with-resources.tsx
@@ -22,3 +22,6 @@ export const withResource = (component: React.ComponentType<WithResourceProps &
 export const getDataFromResource = (property: string, resource?: Resource) => {
     return resource && resource[property] ? resource[property] : '(none)';
 };
+
+export const withResourceData = (property: string, render: (data: any) => React.ReactElement<any>) =>
+    withResource(({ resource }) => render(getDataFromResource(property, resource)));

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list