[ARVADOS-WORKBENCH2] updated: 1.3.0-280-g08ff9a34

Git user git at public.curoverse.com
Wed Jan 2 02:56:33 EST 2019


Summary of changes:
 src/components/data-explorer/data-explorer.tsx   | 6 +++---
 src/views-components/data-explorer/renderers.tsx | 7 ++++---
 2 files changed, 7 insertions(+), 6 deletions(-)

       via  08ff9a348a1177bb0cf8516f36c5d6a28be3778b (commit)
      from  bc46216258b4a6f8894133b9c33d228d091e2f86 (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 08ff9a348a1177bb0cf8516f36c5d6a28be3778b
Author: Daniel Kos <daniel.kos at contractors.roche.com>
Date:   Wed Jan 2 08:56:28 2019 +0100

    CR fixes
    
    Feature #14348
    
    Arvados-DCO-1.1-Signed-off-by: Daniel Kos <daniel.kos at contractors.roche.com>

diff --git a/src/components/data-explorer/data-explorer.tsx b/src/components/data-explorer/data-explorer.tsx
index d2b161ed..878f47ff 100644
--- a/src/components/data-explorer/data-explorer.tsx
+++ b/src/components/data-explorer/data-explorer.tsx
@@ -122,7 +122,7 @@ export const DataExplorer = withStyles(styles)(
                             component="div" /> : <Button
                                 variant="text"
                                 size="medium"
-                                onClick={() => this.loadMore(this.props.page)}
+                                onClick={this.loadMore}
                                 >Load more</Button>}
                     </Grid>
                 </Toolbar>
@@ -137,8 +137,8 @@ export const DataExplorer = withStyles(styles)(
             this.props.onChangeRowsPerPage(parseInt(event.target.value, 10));
         }
 
-        loadMore = (page: number) => {
-            this.props.onLoadMore(page + 1);
+        loadMore = () => {
+            this.props.onLoadMore(this.props.page + 1);
         }
 
         renderContextMenuTrigger = (item: T) =>
diff --git a/src/views-components/data-explorer/renderers.tsx b/src/views-components/data-explorer/renderers.tsx
index d52dcab1..6905e960 100644
--- a/src/views-components/data-explorer/renderers.tsx
+++ b/src/views-components/data-explorer/renderers.tsx
@@ -233,9 +233,10 @@ const clusterColors = [
 ];
 
 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;
+    const CLUSTER_ID_LENGTH = 5;
+    const pos = props.uuid.indexOf('-');
+    const clusterId = pos >= CLUSTER_ID_LENGTH ? props.uuid.substr(0, pos) : '';
+    const ci = pos >= CLUSTER_ID_LENGTH ? (props.uuid.charCodeAt(0) + props.uuid.charCodeAt(1)) % clusterColors.length : 0;
     return <Typography>
         <div style={{
             backgroundColor: clusterColors[ci][0],

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list