[ARVADOS-WORKBENCH2] updated: 1.3.0-215-gde6a469e
Git user
git at public.curoverse.com
Tue Dec 18 07:27:45 EST 2018
Summary of changes:
.../site-manager-panel/site-manager-panel-root.tsx | 25 ++++++++++++----------
.../site-manager-panel/site-manager-panel.tsx | 3 +--
2 files changed, 15 insertions(+), 13 deletions(-)
via de6a469e1385883e1597a684811c4e02cefb7d9c (commit)
via a1be48a39f8904c2fed157a676ccfec3f43f4b8b (commit)
from df3c8dde9f8ec2189fd927ff3f225c167a595002 (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 de6a469e1385883e1597a684811c4e02cefb7d9c
Author: Daniel Kos <daniel.kos at contractors.roche.com>
Date: Tue Dec 18 13:27:39 2018 +0100
CR fix too big inlined onSumbit handler
Feature #14478
Arvados-DCO-1.1-Signed-off-by: Daniel Kos <daniel.kos at contractors.roche.com>
diff --git a/src/views/site-manager-panel/site-manager-panel-root.tsx b/src/views/site-manager-panel/site-manager-panel-root.tsx
index 5f9ce08c..2b6d3c97 100644
--- a/src/views/site-manager-panel/site-manager-panel-root.tsx
+++ b/src/views/site-manager-panel/site-manager-panel-root.tsx
@@ -21,7 +21,7 @@ import {
import { ArvadosTheme } from '~/common/custom-theme';
import { Session, SessionStatus } from "~/models/session";
import Button from "@material-ui/core/Button";
-import { compose } from "redux";
+import { compose, Dispatch } from "redux";
import { Field, FormErrors, InjectedFormProps, reduxForm, reset, stopSubmit } from "redux-form";
import { TextField } from "~/components/text-field/text-field";
import { addSession } from "~/store/auth/auth-action-session";
@@ -93,19 +93,24 @@ export interface SiteManagerPanelRootDataProps {
type SiteManagerPanelRootProps = SiteManagerPanelRootDataProps & SiteManagerPanelRootActionProps & WithStyles<CssRules> & InjectedFormProps;
const SITE_MANAGER_FORM_NAME = 'siteManagerForm';
+const submitSession = (remoteHost: string) =>
+ (dispatch: Dispatch) => {
+ dispatch<any>(addSession(remoteHost)).then(() => {
+ dispatch(reset(SITE_MANAGER_FORM_NAME));
+ }).catch((e: any) => {
+ const errors = {
+ remoteHost: e
+ } as FormErrors;
+ dispatch(stopSubmit(SITE_MANAGER_FORM_NAME, errors));
+ });
+ };
+
export const SiteManagerPanelRoot = compose(
reduxForm<{remoteHost: string}>({
form: SITE_MANAGER_FORM_NAME,
touchOnBlur: false,
onSubmit: (data, dispatch) => {
- dispatch<any>(addSession(data.remoteHost)).then(() => {
- dispatch(reset(SITE_MANAGER_FORM_NAME));
- }).catch((e: any) => {
- const errors = {
- remoteHost: e
- } as FormErrors;
- dispatch(stopSubmit(SITE_MANAGER_FORM_NAME, errors));
- });
+ dispatch(submitSession(data.remoteHost));
}
}),
withStyles(styles))
commit a1be48a39f8904c2fed157a676ccfec3f43f4b8b
Author: Daniel Kos <daniel.kos at contractors.roche.com>
Date: Tue Dec 18 13:24:01 2018 +0100
CR fix dereferencing nullable user
Feature #14478
Arvados-DCO-1.1-Signed-off-by: Daniel Kos <daniel.kos at contractors.roche.com>
diff --git a/src/views/site-manager-panel/site-manager-panel-root.tsx b/src/views/site-manager-panel/site-manager-panel-root.tsx
index 3b8053e7..5f9ce08c 100644
--- a/src/views/site-manager-panel/site-manager-panel-root.tsx
+++ b/src/views/site-manager-panel/site-manager-panel-root.tsx
@@ -21,7 +21,6 @@ import {
import { ArvadosTheme } from '~/common/custom-theme';
import { Session, SessionStatus } from "~/models/session";
import Button from "@material-ui/core/Button";
-import { User } from "~/models/user";
import { compose } from "redux";
import { Field, FormErrors, InjectedFormProps, reduxForm, reset, stopSubmit } from "redux-form";
import { TextField } from "~/components/text-field/text-field";
@@ -89,7 +88,6 @@ export interface SiteManagerPanelRootActionProps {
export interface SiteManagerPanelRootDataProps {
sessions: Session[];
- user: User;
}
type SiteManagerPanelRootProps = SiteManagerPanelRootDataProps & SiteManagerPanelRootActionProps & WithStyles<CssRules> & InjectedFormProps;
diff --git a/src/views/site-manager-panel/site-manager-panel.tsx b/src/views/site-manager-panel/site-manager-panel.tsx
index 8b762108..4532e856 100644
--- a/src/views/site-manager-panel/site-manager-panel.tsx
+++ b/src/views/site-manager-panel/site-manager-panel.tsx
@@ -14,8 +14,7 @@ import { toggleSession } from "~/store/auth/auth-action-session";
const mapStateToProps = (state: RootState): SiteManagerPanelRootDataProps => {
return {
- sessions: state.auth.sessions,
- user: state.auth.user!!
+ sessions: state.auth.sessions
};
};
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list