projects
/
arvados-workbench2.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '17337-files-not-visible-in-arvados'
[arvados-workbench2.git]
/
src
/
views
/
run-process-panel
/
inputs
/
file-input.tsx
diff --git
a/src/views/run-process-panel/inputs/file-input.tsx
b/src/views/run-process-panel/inputs/file-input.tsx
index 0611100722a2e30512a675dc770b933d34cd88b6..0b80050d56533780152009e240783034b4430ba9 100644
(file)
--- a/
src/views/run-process-panel/inputs/file-input.tsx
+++ b/
src/views/run-process-panel/inputs/file-input.tsx
@@
-23,14
+23,18
@@
import { CollectionFile, CollectionFileType } from '~/models/collection-file';
export interface FileInputProps {
input: FileCommandInputParameter;
export interface FileInputProps {
input: FileCommandInputParameter;
+ options?: { showOnlyOwned: boolean, showOnlyWritable: boolean };
}
}
-export const FileInput = ({ input }: FileInputProps) =>
+export const FileInput = ({ input
, options
}: FileInputProps) =>
<Field
name={input.id}
commandInput={input}
component={FileInputComponent}
format={format}
parse={parse}
<Field
name={input.id}
commandInput={input}
component={FileInputComponent}
format={format}
parse={parse}
+ {...{
+ options
+ }}
validate={getValidation(input)} />;
const format = (value?: File) => value ? value.basename : '';
validate={getValidation(input)} />;
const format = (value?: File) => value ? value.basename : '';
@@
-54,7
+58,9
@@
interface FileInputComponentState {
}
const FileInputComponent = connect()(
}
const FileInputComponent = connect()(
- class FileInputComponent extends React.Component<GenericInputProps & DispatchProp, FileInputComponentState> {
+ class FileInputComponent extends React.Component<GenericInputProps & DispatchProp & {
+ options?: { showOnlyOwned: boolean, showOnlyWritable: boolean };
+ }, FileInputComponentState> {
state: FileInputComponentState = {
open: false,
};
state: FileInputComponentState = {
open: false,
};
@@
-111,6
+117,7
@@
const FileInputComponent = connect()(
open={this.state.open}
onClose={this.closeDialog}
fullWidth
open={this.state.open}
onClose={this.closeDialog}
fullWidth
+ data-cy="choose-a-file-dialog"
maxWidth='md'>
<DialogTitle>Choose a file</DialogTitle>
<DialogContent>
maxWidth='md'>
<DialogTitle>Choose a file</DialogTitle>
<DialogContent>
@@
-118,6
+125,7
@@
const FileInputComponent = connect()(
pickerId={this.props.commandInput.id}
includeCollections
includeFiles
pickerId={this.props.commandInput.id}
includeCollections
includeFiles
+ options={this.props.options}
toggleItemActive={this.setFile} />
</DialogContent>
<DialogActions>
toggleItemActive={this.setFile} />
</DialogContent>
<DialogActions>