Merge branch 'origin/master' into 14348-cluster-search
authorDaniel Kos <daniel.kos@contractors.roche.com>
Fri, 28 Dec 2018 09:16:13 +0000 (10:16 +0100)
committerDaniel Kos <daniel.kos@contractors.roche.com>
Fri, 28 Dec 2018 09:16:13 +0000 (10:16 +0100)
# Conflicts:
# src/views/compute-node-panel/compute-node-panel-root.tsx

Feature #14348

Arvados-DCO-1.1-Signed-off-by: Daniel Kos <daniel.kos@contractors.roche.com>

1  2 
src/components/data-explorer/data-explorer.tsx
src/store/auth/auth-action-session.ts
src/store/store.ts
src/store/workbench/workbench-actions.ts
src/views-components/data-explorer/renderers.tsx
src/views/compute-node-panel/compute-node-panel-root.tsx

index db9252362a634e6a0e6ffb71888ae7bc2cc78c49,b2377888ea432b90bb4e64d431286a0b69f45516..d2b161edc24e9ba68e0a97c32de02f5d663efa36
@@@ -83,10 -81,10 +83,10 @@@ export const DataExplorer = withStyles(
                  rowsPerPage, rowsPerPageOptions, onColumnToggle, searchValue, onSearch,
                  items, itemsAvailable, onRowClick, onRowDoubleClick, classes,
                  dataTableDefaultView, hideColumnSelector, actions, paperProps, hideSearchInput,
 -                paperKey
 +                paperKey, fetchMode
              } = this.props;
              return <Paper className={classes.root} {...paperProps} key={paperKey}>
-                 <Toolbar className={classes.toolbar}>
+                 {(!hideColumnSelector || !hideSearchInput) && <Toolbar className={classes.toolbar}>
                      <Grid container justify="space-between" wrap="nowrap" alignItems="center">
                          {!hideSearchInput && <div className={classes.searchBox}>
                              <SearchInput
Simple merge
Simple merge
index f90dac6b22c46c276afcb03db0b38fb6564d9b5e,0637676c03836bf8b389a4f81dcf24dfd763f028..d52dcab1b9e31fa7a4978b2e65d4794904e829bb
@@@ -203,43 -224,19 +224,41 @@@ const renderNodeInfo = (data: string) =
      return <Typography>{JSON.stringify(data, null, 4)}</Typography>;
  };
  
 +const clusterColors = [
 +    ['#f44336', '#fff'],
 +    ['#2196f3', '#fff'],
 +    ['#009688', '#fff'],
 +    ['#cddc39', '#fff'],
 +    ['#ff9800', '#fff']
 +];
 +
 +export const ResourceCluster = (props: { uuid: string }) => {
 +    const p = props.uuid.indexOf('-');
 +    const clusterId = p >= 5 ? props.uuid.substr(0, p) : '';
 +    const ci = p >= 5 ? (props.uuid.charCodeAt(0) + props.uuid.charCodeAt(1)) % clusterColors.length : 0;
 +    return <Typography>
 +        <div style={{
 +            backgroundColor: clusterColors[ci][0],
 +            color: clusterColors[ci][1],
 +            padding: "2px 7px",
 +            borderRadius: 3
 +        }}>{clusterId}</div>
 +    </Typography>;
 +};
 +
  export const ComputeNodeInfo = withResourceData('info', renderNodeInfo);
  
- export const ComputeNodeUuid = withResourceData('uuid', renderNodeData);
- export const ComputeNodeDomain = withResourceData('domain', renderNodeData);
+ export const ComputeNodeDomain = withResourceData('domain', renderCommonData);
  
- export const ComputeNodeFirstPingAt = withResourceData('firstPingAt', renderNodeDate);
+ export const ComputeNodeFirstPingAt = withResourceData('firstPingAt', renderCommonDate);
  
- export const ComputeNodeHostname = withResourceData('hostname', renderNodeData);
+ export const ComputeNodeHostname = withResourceData('hostname', renderCommonData);
  
- export const ComputeNodeIpAddress = withResourceData('ipAddress', renderNodeData);
+ export const ComputeNodeIpAddress = withResourceData('ipAddress', renderCommonData);
  
- export const ComputeNodeJobUuid = withResourceData('jobUuid', renderNodeData);
+ export const ComputeNodeJobUuid = withResourceData('jobUuid', renderCommonData);
  
- export const ComputeNodeLastPingAt = withResourceData('lastPingAt', renderNodeDate);
+ export const ComputeNodeLastPingAt = withResourceData('lastPingAt', renderCommonDate);
  
  // Links Resources
  const renderLinkName = (item: { name: string }) =>
index 88a0e5513ce9c68936eaecca5c78c3d52a0dbf2b,e49fc79d0fbef7df23e05aa1aa72b5f09af4cfcf..530b75378da314cf8f11dc64f467e6268b8ff936
@@@ -7,11 -7,11 +7,11 @@@ import { ShareMeIcon } from '~/componen
  import { DataExplorer } from '~/views-components/data-explorer/data-explorer';
  import { DataTableDefaultView } from '~/components/data-table-default-view/data-table-default-view';
  import { COMPUTE_NODE_PANEL_ID } from '~/store/compute-nodes/compute-nodes-actions';
 -import { DataColumns } from '~/components/data-table/data-table';
 +import { DataColumns, DataTableFetchMode } from '~/components/data-table/data-table';
  import { SortDirection } from '~/components/data-table/data-column';
  import { createTree } from '~/models/tree';
 -import { 
 -    CommonUuid, ComputeNodeInfo, ComputeNodeDomain, ComputeNodeHostname, ComputeNodeJobUuid,
 +import {
-     ComputeNodeUuid, ComputeNodeInfo, ComputeNodeDomain, ComputeNodeHostname, ComputeNodeJobUuid,
++    ComputeUuid, ComputeNodeInfo, ComputeNodeDomain, ComputeNodeHostname, ComputeNodeJobUuid,
      ComputeNodeFirstPingAt, ComputeNodeLastPingAt, ComputeNodeIpAddress
  } from '~/views-components/data-explorer/renderers';
  import { ResourcesState } from '~/store/resources/resources';