[ARVADOS-WORKBENCH2] created: 1.4.1-343-g0cfd92cc
Git user
git at public.arvados.org
Wed Jun 3 16:54:17 UTC 2020
at 0cfd92ccb88a7cac4ff6d1645bbbe62386f4bb1b (commit)
commit 0cfd92ccb88a7cac4ff6d1645bbbe62386f4bb1b
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date: Tue Jun 2 16:05:22 2020 -0300
16439: Disables +NEW button even on trashed subprojects.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>
diff --git a/src/views-components/side-panel-button/side-panel-button.tsx b/src/views-components/side-panel-button/side-panel-button.tsx
index 4e2e90f1..5e547740 100644
--- a/src/views-components/side-panel-button/side-panel-button.tsx
+++ b/src/views-components/side-panel-button/side-panel-button.tsx
@@ -17,6 +17,7 @@ import { getUserUuid } from '~/common/getuser';
import { matchProjectRoute } from '~/routes/routes';
import { GroupResource } from '~/models/group';
import { ResourcesState, getResource } from '~/store/resources/resources';
+import { extractUuidKind, ResourceKind } from '~/models/resource';
type CssRules = 'button' | 'menuItem' | 'icon';
@@ -53,6 +54,13 @@ const transformOrigin: PopoverOrigin = {
horizontal: 0
};
+const isProjectTrashed = (proj: GroupResource, resources: ResourcesState): boolean => {
+ if (proj.isTrashed) { return true; }
+ if (extractUuidKind(proj.ownerUuid) === ResourceKind.USER) { return false; }
+ const parentProj = getResource<GroupResource>(proj.ownerUuid)(resources);
+ return isProjectTrashed(parentProj!, resources);
+};
+
export const SidePanelButton = withStyles(styles)(
connect((state: RootState) => ({
currentItemId: state.router.location
@@ -78,7 +86,7 @@ export const SidePanelButton = withStyles(styles)(
const currentProject = getResource<GroupResource>(currentItemId)(resources);
if (currentProject &&
currentProject.writableBy.indexOf(currentUserUUID || '') >= 0 &&
- !currentProject.isTrashed) {
+ !isProjectTrashed(currentProject, resources)) {
enabled = true;
}
}
commit cab2443132229dcc3c1623b6760b1ad59e220737
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date: Tue Jun 2 15:47:42 2020 -0300
16439: Fixes colletion/project creation placement.
When the user was placed on other sections than 'Projects' on the side
panel, the newly created collections/projects were going to the user's
home project.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>
diff --git a/src/store/collections/collection-create-actions.ts b/src/store/collections/collection-create-actions.ts
index 140756bf..b6f0ddcc 100644
--- a/src/store/collections/collection-create-actions.ts
+++ b/src/store/collections/collection-create-actions.ts
@@ -12,7 +12,7 @@ import { getCommonResourceServiceError, CommonResourceServiceError } from "~/ser
import { uploadCollectionFiles } from './collection-upload-actions';
import { fileUploaderActions } from '~/store/file-uploader/file-uploader-actions';
import { progressIndicatorActions } from "~/store/progress-indicator/progress-indicator-actions";
-import { isItemNotInProject, isProjectOrRunProcessRoute } from '~/store/projects/project-create-actions';
+import { isProjectOrRunProcessRoute } from '~/store/projects/project-create-actions';
import { snackbarActions, SnackbarKind } from '~/store/snackbar/snackbar-actions';
import { CollectionResource } from "~/models/collection";
@@ -26,9 +26,8 @@ export const COLLECTION_CREATE_FORM_NAME = "collectionCreateFormName";
export const openCollectionCreateDialog = (ownerUuid: string) =>
(dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
- const router = getState();
- const properties = getState().properties;
- if (isItemNotInProject(properties) || !isProjectOrRunProcessRoute(router)) {
+ const { router } = getState();
+ if (!isProjectOrRunProcessRoute(router)) {
const userUuid = getUserUuid(getState());
if (!userUuid) { return; }
dispatch(initialize(COLLECTION_CREATE_FORM_NAME, { ownerUuid: userUuid }));
diff --git a/src/store/projects/project-create-actions.ts b/src/store/projects/project-create-actions.ts
index 6f45bc38..583a4bd6 100644
--- a/src/store/projects/project-create-actions.ts
+++ b/src/store/projects/project-create-actions.ts
@@ -12,6 +12,7 @@ import { ProjectResource } from '~/models/project';
import { ServiceRepository } from '~/services/services';
import { matchProjectRoute, matchRunProcessRoute } from '~/routes/routes';
import { ResourcePropertiesFormData } from '~/views-components/resource-properties-form/resource-properties-form';
+import { RouterState } from "react-router-redux";
export interface ProjectCreateFormDialogData {
ownerUuid: string;
@@ -28,26 +29,17 @@ export const PROJECT_CREATE_FORM_NAME = 'projectCreateFormName';
export const PROJECT_CREATE_PROPERTIES_FORM_NAME = 'projectCreatePropertiesFormName';
export const PROJECT_CREATE_FORM_SELECTOR = formValueSelector(PROJECT_CREATE_FORM_NAME);
-export const isProjectOrRunProcessRoute = ({ router }: RootState) => {
+export const isProjectOrRunProcessRoute = (router: RouterState) => {
const pathname = router.location ? router.location.pathname : '';
const matchProject = matchProjectRoute(pathname);
const matchRunProcess = matchRunProcessRoute(pathname);
return Boolean(matchProject || matchRunProcess);
};
-export const isItemNotInProject = (properties: any) => {
- if (properties.breadcrumbs) {
- return Boolean(properties.breadcrumbs[0].label !== 'Projects');
- } else {
- return;
- }
-};
-
export const openProjectCreateDialog = (ownerUuid: string) =>
(dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
- const router = getState();
- const properties = getState().properties;
- if (isItemNotInProject(properties) || !isProjectOrRunProcessRoute(router)) {
+ const { router } = getState();
+ if (!isProjectOrRunProcessRoute(router)) {
const userUuid = getUserUuid(getState());
if (!userUuid) { return; }
dispatch(initialize(PROJECT_CREATE_FORM_NAME, { ownerUuid: userUuid }));
commit 4dc0af70795f76fc89eba414199cf4145f276b88
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date: Mon Jun 1 18:30:19 2020 -0300
16439: Enables the +NEW button only when the user's view is writable.
Also, makes the SidePanelButton component to not depend on a state property
set by a something rendered later, because that makes the button being
re-renderered at least twice on every location change, instead try to get the
current item id from the location url.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>
diff --git a/src/views-components/side-panel-button/side-panel-button.tsx b/src/views-components/side-panel-button/side-panel-button.tsx
index 0f797590..4e2e90f1 100644
--- a/src/views-components/side-panel-button/side-panel-button.tsx
+++ b/src/views-components/side-panel-button/side-panel-button.tsx
@@ -5,8 +5,6 @@
import * as React from 'react';
import { connect, DispatchProp } from 'react-redux';
import { RootState } from '~/store/store';
-import { getProperty } from '~/store/properties/properties';
-import { PROJECT_PANEL_CURRENT_UUID } from '~/store/project-panel/project-panel-action';
import { ArvadosTheme } from '~/common/custom-theme';
import { PopoverOrigin } from '@material-ui/core/Popover';
import { StyleRulesCallback, WithStyles, withStyles, Toolbar, Grid, Button, MenuItem, Menu } from '@material-ui/core';
@@ -15,6 +13,10 @@ import { openProjectCreateDialog } from '~/store/projects/project-create-actions
import { openCollectionCreateDialog } from '~/store/collections/collection-create-actions';
import { navigateToRunProcess } from '~/store/navigation/navigation-action';
import { runProcessPanelActions } from '~/store/run-process-panel/run-process-panel-actions';
+import { getUserUuid } from '~/common/getuser';
+import { matchProjectRoute } from '~/routes/routes';
+import { GroupResource } from '~/models/group';
+import { ResourcesState, getResource } from '~/store/resources/resources';
type CssRules = 'button' | 'menuItem' | 'icon';
@@ -36,6 +38,8 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
interface SidePanelDataProps {
location: any;
currentItemId: string;
+ resources: ResourcesState;
+ currentUserUUID: string | undefined;
}
interface SidePanelState {
@@ -51,8 +55,12 @@ const transformOrigin: PopoverOrigin = {
export const SidePanelButton = withStyles(styles)(
connect((state: RootState) => ({
- currentItemId: getProperty(PROJECT_PANEL_CURRENT_UUID)(state.properties),
- location: state.router.location
+ currentItemId: state.router.location
+ ? state.router.location.pathname.split('/').slice(-1)[0]
+ : null,
+ location: state.router.location,
+ resources: state.resources,
+ currentUserUUID: getUserUuid(state),
}))(
class extends React.Component<SidePanelProps> {
@@ -61,12 +69,24 @@ export const SidePanelButton = withStyles(styles)(
};
render() {
- const { classes } = this.props;
+ const { classes, location, resources, currentUserUUID, currentItemId } = this.props;
const { anchorEl } = this.state;
+ let enabled = false;
+ if (currentItemId === currentUserUUID) {
+ enabled = true;
+ } else if (matchProjectRoute(location ? location.pathname : '')) {
+ const currentProject = getResource<GroupResource>(currentItemId)(resources);
+ if (currentProject &&
+ currentProject.writableBy.indexOf(currentUserUUID || '') >= 0 &&
+ !currentProject.isTrashed) {
+ enabled = true;
+ }
+ }
return <Toolbar>
<Grid container>
<Grid container item xs alignItems="center" justify="flex-start">
- <Button variant="contained" color="primary" size="small" className={classes.button}
+ <Button variant="contained" disabled={!enabled}
+ color="primary" size="small" className={classes.button}
aria-owns={anchorEl ? 'aside-menu-list' : undefined}
aria-haspopup="true"
onClick={this.handleOpen}>
@@ -104,7 +124,7 @@ export const SidePanelButton = withStyles(styles)(
this.props.dispatch(runProcessPanelActions.RESET_RUN_PROCESS_PANEL());
this.props.dispatch(runProcessPanelActions.SET_PROCESS_PATHNAME(location.pathname));
this.props.dispatch(runProcessPanelActions.SET_PROCESS_OWNER_UUID(this.props.currentItemId));
-
+
this.props.dispatch<any>(navigateToRunProcess);
}
commit 3d1c23fe4f88c28a66ea1f4c5a730c37ecbe58bd
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date: Mon Jun 1 10:49:29 2020 -0300
16439: Reduces vertical spacing between form elements.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>
diff --git a/src/components/form-dialog/form-dialog.tsx b/src/components/form-dialog/form-dialog.tsx
index e95693df..3df874b7 100644
--- a/src/components/form-dialog/form-dialog.tsx
+++ b/src/components/form-dialog/form-dialog.tsx
@@ -16,22 +16,24 @@ const styles: StyleRulesCallback<CssRules> = theme => ({
},
lastButton: {
marginLeft: theme.spacing.unit,
- marginRight: "20px",
+ marginRight: "0",
},
formContainer: {
display: "flex",
flexDirection: "column",
- marginTop: "20px",
+ paddingBottom: "0",
},
dialogTitle: {
- paddingBottom: "0"
+ paddingTop: theme.spacing.unit,
+ paddingBottom: theme.spacing.unit,
},
progressIndicator: {
position: "absolute",
minWidth: "20px",
},
dialogActions: {
- marginBottom: theme.spacing.unit * 3
+ marginBottom: theme.spacing.unit,
+ marginRight: theme.spacing.unit * 3,
}
});
diff --git a/src/components/text-field/text-field.tsx b/src/components/text-field/text-field.tsx
index 82d640d8..1cf9a81d 100644
--- a/src/components/text-field/text-field.tsx
+++ b/src/components/text-field/text-field.tsx
@@ -19,7 +19,7 @@ type CssRules = 'textField' | 'rte';
const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
textField: {
- marginBottom: theme.spacing.unit * 3
+ marginBottom: theme.spacing.unit
},
rte: {
fontFamily: 'Arial',
diff --git a/src/views-components/dialog-create/dialog-collection-create.tsx b/src/views-components/dialog-create/dialog-collection-create.tsx
index 86d6a217..a70030c7 100644
--- a/src/views-components/dialog-create/dialog-collection-create.tsx
+++ b/src/views-components/dialog-create/dialog-collection-create.tsx
@@ -9,7 +9,7 @@ import { CollectionCreateFormDialogData } from '~/store/collections/collection-c
import { FormDialog } from '~/components/form-dialog/form-dialog';
import { CollectionNameField, CollectionDescriptionField } from '~/views-components/form-fields/collection-form-fields';
import { FileUploaderField } from '../file-uploader/file-uploader';
-import { ResourceLocationField } from '../form-fields/resource-form-fields';
+import { ResourceParentField } from '../form-fields/resource-form-fields';
type DialogCollectionProps = WithDialogProps<{}> & InjectedFormProps<CollectionCreateFormDialogData>;
@@ -22,7 +22,7 @@ export const DialogCollectionCreate = (props: DialogCollectionProps) =>
/>;
const CollectionAddFields = () => <span>
- <ResourceLocationField />
+ <ResourceParentField />
<CollectionNameField />
<CollectionDescriptionField />
<Field
diff --git a/src/views-components/dialog-create/dialog-project-create.tsx b/src/views-components/dialog-create/dialog-project-create.tsx
index 7359ba84..c835e04e 100644
--- a/src/views-components/dialog-create/dialog-project-create.tsx
+++ b/src/views-components/dialog-create/dialog-project-create.tsx
@@ -10,7 +10,7 @@ import { FormDialog } from '~/components/form-dialog/form-dialog';
import { ProjectNameField, ProjectDescriptionField } from '~/views-components/form-fields/project-form-fields';
import { CreateProjectPropertiesForm } from '~/views-components/project-properties/create-project-properties-form';
import { CreateProjectPropertiesList } from '~/views-components/project-properties/create-project-properties-list';
-import { ResourceLocationField } from '../form-fields/resource-form-fields';
+import { ResourceParentField } from '../form-fields/resource-form-fields';
type DialogProjectProps = WithDialogProps<{}> & InjectedFormProps<ProjectCreateFormDialogData>;
@@ -23,7 +23,7 @@ export const DialogProjectCreate = (props: DialogProjectProps) =>
/>;
const ProjectAddFields = () => <span>
- <ResourceLocationField />
+ <ResourceParentField />
<ProjectNameField />
<ProjectDescriptionField />
<CreateProjectPropertiesForm />
diff --git a/src/views-components/form-fields/resource-form-fields.tsx b/src/views-components/form-fields/resource-form-fields.tsx
index 60bcafc0..0c4ae64a 100644
--- a/src/views-components/form-fields/resource-form-fields.tsx
+++ b/src/views-components/form-fields/resource-form-fields.tsx
@@ -11,19 +11,19 @@ import { GroupResource } from "~/models/group";
import { TextField } from "~/components/text-field/text-field";
import { getUserUuid } from "~/common/getuser";
-interface ResourceLocationFieldProps {
+interface ResourceParentFieldProps {
resources: ResourcesState;
userUuid: string|undefined;
}
-export const ResourceLocationField = connect(
+export const ResourceParentField = connect(
(state: RootState) => {
return {
resources: state.resources,
userUuid: getUserUuid(state),
};
})
- ((props: ResourceLocationFieldProps) =>
+ ((props: ResourceParentFieldProps) =>
<Field
name='ownerUuid'
disabled={true}
commit 7c636b5648176c7138ecce3f5c632dac359d1690
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date: Fri May 29 15:59:42 2020 -0300
16439: Updates field label.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>
diff --git a/src/views-components/form-fields/resource-form-fields.tsx b/src/views-components/form-fields/resource-form-fields.tsx
index 0ba357c3..60bcafc0 100644
--- a/src/views-components/form-fields/resource-form-fields.tsx
+++ b/src/views-components/form-fields/resource-form-fields.tsx
@@ -27,7 +27,7 @@ export const ResourceLocationField = connect(
<Field
name='ownerUuid'
disabled={true}
- label='Location'
+ label='Parent project'
format={
(value, name) => {
if (value === props.userUuid) {
@@ -35,7 +35,7 @@ export const ResourceLocationField = connect(
}
const rsc = getResource<GroupResource>(value)(props.resources);
if (rsc !== undefined) {
- return `Project '${rsc.name}' (${rsc.uuid})`;
+ return `${rsc.name} (${rsc.uuid})`;
}
return value;
}
commit 2d04921ec52baaa9da2e0ffee436ad24e13e9921
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date: Fri May 29 11:05:24 2020 -0300
16439: Adds read-only field 'Location' to project/collection creation dialogs.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>
diff --git a/src/store/collections/collection-create-actions.ts b/src/store/collections/collection-create-actions.ts
index 39565f1d..140756bf 100644
--- a/src/store/collections/collection-create-actions.ts
+++ b/src/store/collections/collection-create-actions.ts
@@ -31,7 +31,7 @@ export const openCollectionCreateDialog = (ownerUuid: string) =>
if (isItemNotInProject(properties) || !isProjectOrRunProcessRoute(router)) {
const userUuid = getUserUuid(getState());
if (!userUuid) { return; }
- dispatch(initialize(COLLECTION_CREATE_FORM_NAME, { userUuid }));
+ dispatch(initialize(COLLECTION_CREATE_FORM_NAME, { ownerUuid: userUuid }));
} else {
dispatch(initialize(COLLECTION_CREATE_FORM_NAME, { ownerUuid }));
}
diff --git a/src/store/projects/project-create-actions.ts b/src/store/projects/project-create-actions.ts
index a303b551..6f45bc38 100644
--- a/src/store/projects/project-create-actions.ts
+++ b/src/store/projects/project-create-actions.ts
@@ -50,7 +50,7 @@ export const openProjectCreateDialog = (ownerUuid: string) =>
if (isItemNotInProject(properties) || !isProjectOrRunProcessRoute(router)) {
const userUuid = getUserUuid(getState());
if (!userUuid) { return; }
- dispatch(initialize(PROJECT_CREATE_FORM_NAME, { userUuid }));
+ dispatch(initialize(PROJECT_CREATE_FORM_NAME, { ownerUuid: userUuid }));
} else {
dispatch(initialize(PROJECT_CREATE_FORM_NAME, { ownerUuid }));
}
diff --git a/src/views-components/dialog-create/dialog-collection-create.tsx b/src/views-components/dialog-create/dialog-collection-create.tsx
index fb492c43..86d6a217 100644
--- a/src/views-components/dialog-create/dialog-collection-create.tsx
+++ b/src/views-components/dialog-create/dialog-collection-create.tsx
@@ -9,7 +9,7 @@ import { CollectionCreateFormDialogData } from '~/store/collections/collection-c
import { FormDialog } from '~/components/form-dialog/form-dialog';
import { CollectionNameField, CollectionDescriptionField } from '~/views-components/form-fields/collection-form-fields';
import { FileUploaderField } from '../file-uploader/file-uploader';
-
+import { ResourceLocationField } from '../form-fields/resource-form-fields';
type DialogCollectionProps = WithDialogProps<{}> & InjectedFormProps<CollectionCreateFormDialogData>;
@@ -22,6 +22,7 @@ export const DialogCollectionCreate = (props: DialogCollectionProps) =>
/>;
const CollectionAddFields = () => <span>
+ <ResourceLocationField />
<CollectionNameField />
<CollectionDescriptionField />
<Field
diff --git a/src/views-components/dialog-create/dialog-project-create.tsx b/src/views-components/dialog-create/dialog-project-create.tsx
index 02fb67e5..7359ba84 100644
--- a/src/views-components/dialog-create/dialog-project-create.tsx
+++ b/src/views-components/dialog-create/dialog-project-create.tsx
@@ -10,6 +10,7 @@ import { FormDialog } from '~/components/form-dialog/form-dialog';
import { ProjectNameField, ProjectDescriptionField } from '~/views-components/form-fields/project-form-fields';
import { CreateProjectPropertiesForm } from '~/views-components/project-properties/create-project-properties-form';
import { CreateProjectPropertiesList } from '~/views-components/project-properties/create-project-properties-list';
+import { ResourceLocationField } from '../form-fields/resource-form-fields';
type DialogProjectProps = WithDialogProps<{}> & InjectedFormProps<ProjectCreateFormDialogData>;
@@ -22,6 +23,7 @@ export const DialogProjectCreate = (props: DialogProjectProps) =>
/>;
const ProjectAddFields = () => <span>
+ <ResourceLocationField />
<ProjectNameField />
<ProjectDescriptionField />
<CreateProjectPropertiesForm />
diff --git a/src/views-components/form-fields/resource-form-fields.tsx b/src/views-components/form-fields/resource-form-fields.tsx
new file mode 100644
index 00000000..0ba357c3
--- /dev/null
+++ b/src/views-components/form-fields/resource-form-fields.tsx
@@ -0,0 +1,44 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import * as React from "react";
+import { connect } from "react-redux";
+import { RootState } from "~/store/store";
+import { Field } from "redux-form";
+import { ResourcesState, getResource } from "~/store/resources/resources";
+import { GroupResource } from "~/models/group";
+import { TextField } from "~/components/text-field/text-field";
+import { getUserUuid } from "~/common/getuser";
+
+interface ResourceLocationFieldProps {
+ resources: ResourcesState;
+ userUuid: string|undefined;
+}
+
+export const ResourceLocationField = connect(
+ (state: RootState) => {
+ return {
+ resources: state.resources,
+ userUuid: getUserUuid(state),
+ };
+ })
+ ((props: ResourceLocationFieldProps) =>
+ <Field
+ name='ownerUuid'
+ disabled={true}
+ label='Location'
+ format={
+ (value, name) => {
+ if (value === props.userUuid) {
+ return 'Home project';
+ }
+ const rsc = getResource<GroupResource>(value)(props.resources);
+ if (rsc !== undefined) {
+ return `Project '${rsc.name}' (${rsc.uuid})`;
+ }
+ return value;
+ }
+ }
+ component={TextField} />
+ );
commit a14e75ef7270c29001e8ca462b35bf58588674ed
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date: Thu May 28 15:05:01 2020 -0300
16439: Sends the user to the newly created project/collection.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>
diff --git a/src/store/workbench/workbench-actions.ts b/src/store/workbench/workbench-actions.ts
index dbf795b6..7faad1e8 100644
--- a/src/store/workbench/workbench-actions.ts
+++ b/src/store/workbench/workbench-actions.ts
@@ -237,7 +237,7 @@ export const createProject = (data: projectCreateActions.ProjectCreateFormDialog
kind: SnackbarKind.SUCCESS
}));
await dispatch<any>(loadSidePanelTreeProjects(newProject.ownerUuid));
- dispatch<any>(reloadProjectMatchingUuid([newProject.ownerUuid]));
+ dispatch<any>(navigateTo(newProject.uuid));
}
};
@@ -301,7 +301,6 @@ export const loadCollection = (uuid: string) =>
dispatch(activateSidePanelTreeItem(SidePanelTreeCategory.TRASH));
dispatch(loadCollectionPanel(collection.uuid));
},
-
});
}
});
@@ -316,7 +315,7 @@ export const createCollection = (data: collectionCreateActions.CollectionCreateF
kind: SnackbarKind.SUCCESS
}));
dispatch<any>(updateResources([collection]));
- dispatch<any>(reloadProjectMatchingUuid([collection.ownerUuid]));
+ dispatch<any>(navigateTo(collection.uuid));
}
};
commit a91eb68405cf1fe41fbb605d2330a69ede463b88
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date: Tue May 26 12:18:17 2020 -0300
16439: Allows creation of empty (no files) collections.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>
diff --git a/src/views-components/dialog-create/dialog-collection-create.tsx b/src/views-components/dialog-create/dialog-collection-create.tsx
index 690cf8e5..fb492c43 100644
--- a/src/views-components/dialog-create/dialog-collection-create.tsx
+++ b/src/views-components/dialog-create/dialog-collection-create.tsx
@@ -8,7 +8,6 @@ import { WithDialogProps } from '~/store/dialog/with-dialog';
import { CollectionCreateFormDialogData } from '~/store/collections/collection-create-actions';
import { FormDialog } from '~/components/form-dialog/form-dialog';
import { CollectionNameField, CollectionDescriptionField } from '~/views-components/form-fields/collection-form-fields';
-import { require } from '~/validators/require';
import { FileUploaderField } from '../file-uploader/file-uploader';
@@ -27,7 +26,6 @@ const CollectionAddFields = () => <span>
<CollectionDescriptionField />
<Field
name='files'
- validate={[require]}
label='Files'
component={FileUploaderField} />
</span>;
commit 438374da6034095db7c1013dd95ba4b77ca0c6d8
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date: Wed May 27 18:21:38 2020 -0300
16439: Fixes WebDAV request URL.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>
diff --git a/src/common/webdav.ts b/src/common/webdav.ts
index a09e8fdd..b2f43348 100644
--- a/src/common/webdav.ts
+++ b/src/common/webdav.ts
@@ -61,7 +61,11 @@ export class WebDAV {
private request = (config: RequestConfig) => {
return new Promise<XMLHttpRequest>((resolve, reject) => {
const r = this.createRequest();
- r.open(config.method, this.defaults.baseURL + config.url);
+ this.defaults.baseURL = this.defaults.baseURL.replace(/\/+$/, '');
+ r.open(config.method,
+ `${this.defaults.baseURL
+ ? this.defaults.baseURL+'/'
+ : ''}${config.url}`);
const headers = { ...this.defaults.headers, ...config.headers };
Object
.keys(headers)
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list