[ARVADOS-WORKBENCH2] updated: 1.2.0-924-gd406878

Git user git at public.curoverse.com
Wed Nov 21 06:52:22 EST 2018


Summary of changes:
 src/store/auth/auth-reducer.test.ts                        |  4 +++-
 src/views-components/main-content-bar/main-content-bar.tsx | 11 ++++++++---
 2 files changed, 11 insertions(+), 4 deletions(-)

       via  d4068786fd7136cfe21c3ef3ad3040f57ed3385a (commit)
      from  b56fac763b24e34c5c2ba42cf9e183ffcc2014fc (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 d4068786fd7136cfe21c3ef3ad3040f57ed3385a
Author: Janicki Artur <artur.janicki at contractors.roche.com>
Date:   Wed Nov 21 12:52:12 2018 +0100

    refs #master Fix test and hide details panel from ssh-keys panel
    
    Arvados-DCO-1.1-Signed-off-by: Janicki Artur <artur.janicki at contractors.roche.com>

diff --git a/src/store/auth/auth-reducer.test.ts b/src/store/auth/auth-reducer.test.ts
index 1202bac..25ce2c1 100644
--- a/src/store/auth/auth-reducer.test.ts
+++ b/src/store/auth/auth-reducer.test.ts
@@ -44,7 +44,8 @@ describe('auth-reducer', () => {
         const state = reducer(initialState, authActions.SAVE_API_TOKEN("token"));
         expect(state).toEqual({
             apiToken: "token",
-            user: undefined
+            user: undefined,
+            sshKeys: []
         });
     });
 
@@ -62,6 +63,7 @@ describe('auth-reducer', () => {
         const state = reducer(initialState, authActions.USER_DETAILS_SUCCESS(user));
         expect(state).toEqual({
             apiToken: undefined,
+            sshKeys: [],
             user: {
                 email: "test at test.com",
                 firstName: "John",
diff --git a/src/views-components/main-content-bar/main-content-bar.tsx b/src/views-components/main-content-bar/main-content-bar.tsx
index b047837..16fa2a9 100644
--- a/src/views-components/main-content-bar/main-content-bar.tsx
+++ b/src/views-components/main-content-bar/main-content-bar.tsx
@@ -6,10 +6,9 @@ import * as React from "react";
 import { Toolbar, IconButton, Tooltip, Grid } from "@material-ui/core";
 import { DetailsIcon } from "~/components/icon/icon";
 import { Breadcrumbs } from "~/views-components/breadcrumbs/breadcrumbs";
-import { detailsPanelActions } from "~/store/details-panel/details-panel-action";
 import { connect } from 'react-redux';
 import { RootState } from '~/store/store';
-import { matchWorkflowRoute } from '~/routes/routes';
+import { matchWorkflowRoute, matchSshKeysRoute } from '~/routes/routes';
 import { toggleDetailsPanel } from '~/store/details-panel/details-panel-action';
 
 interface MainContentBarProps {
@@ -23,8 +22,14 @@ const isWorkflowPath = ({ router }: RootState) => {
     return !!match;
 };
 
+const isSshKeysPath = ({ router }: RootState) => {
+    const pathname = router.location ? router.location.pathname : '';
+    const match = matchSshKeysRoute(pathname);
+    return !!match;
+};
+
 export const MainContentBar = connect((state: RootState) => ({
-    buttonVisible: !isWorkflowPath(state)
+    buttonVisible: !isWorkflowPath(state) && !isSshKeysPath(state)
 }), {
         onDetailsPanelToggle: toggleDetailsPanel
     })((props: MainContentBarProps) =>

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list