.licenseignore
.yarnrc
.npmrc
+src/lib/cwl-svg/*
"redux-thunk": "2.3.0",
"reselect": "4.0.0",
"shell-quote": "1.6.1",
+ "tslint-etc": "1.6.0",
"unionize": "2.1.2",
"uuid": "3.3.2"
},
import { formatFileSize } from "~/common/formatters";
import { ListItemTextIcon } from "../list-item-text-icon/list-item-text-icon";
import { FileTreeData } from "./file-tree-data";
-import { FileThumbnail } from '~/components/file-tree/file-thumbnail';
type CssRules = "root" | "spacer" | "sizeInfo" | "button" | "moreOptions";
timeout: number;
render() {
- const { classes } = this.props;
return <form onSubmit={this.handleSubmit}>
<FormControl>
<InputLabel>Search</InputLabel>
import * as React from 'react';
import { WrappedFieldProps } from 'redux-form';
import { ArvadosTheme } from '~/common/custom-theme';
-import { StyleRulesCallback, WithStyles, withStyles, FormControl, InputLabel, Select, MenuItem, FormHelperText } from '@material-ui/core';
+import { StyleRulesCallback, WithStyles, withStyles, FormControl, InputLabel, Select, FormHelperText } from '@material-ui/core';
type CssRules = 'formControl' | 'selectWrapper' | 'select' | 'option';
import { processResourceActionSet } from '~/views-components/context-menu/action-sets/process-resource-action-set';
import { progressIndicatorActions } from '~/store/progress-indicator/progress-indicator-actions';
import { trashedCollectionActionSet } from '~/views-components/context-menu/action-sets/trashed-collection-action-set';
-import { ContainerRequestState } from '~/models/container-request';
-import { MountKind } from '~/models/mount-types';
import { setBuildInfo } from '~/store/app-info/app-info-actions';
import { getBuildInfo } from '~/common/app-info';
import { DragDropContextProvider } from 'react-dnd';
};
};
-const createDirectoriesArrayCollectorWorkflow = ({ workflowService }: ServiceRepository) => {
- workflowService.create({
- name: 'Directories array collector',
- description: 'Workflow for collecting directories array',
- definition: "cwlVersion: v1.0\n$graph:\n- class: CommandLineTool\n\n requirements:\n - listing:\n - entryname: input_collector.log\n entry: |\n \"multiple_collections\":\n $(inputs.multiple_collections)\n\n class: InitialWorkDirRequirement\n inputs:\n - type:\n type: array\n items: Directory\n id: '#input_collector.cwl/multiple_collections'\n outputs:\n - type: File\n outputBinding:\n glob: '*'\n id: '#input_collector.cwl/output'\n\n baseCommand: [echo]\n id: '#input_collector.cwl'\n- class: Workflow\n doc: This is the description of the workflow\n inputs:\n - type:\n type: array\n items: Directory\n label: Multiple Collections\n doc: This should allow for selecting multiple collections.\n id: '#main/multiple_collections'\n default:\n - class: Directory\n location: keep:1e1682585d576f031b2d8b4944f989ee+57\n basename: 1e1682585d576f031b2d8b4944f989ee+57\n - class: Directory\n location: keep:326f692370e9e121fcbd013796f7352a+57\n basename: 326f692370e9e121fcbd013796f7352a+57\n \n outputs:\n - type: File\n outputSource: '#main/input_collector/output'\n\n id: '#main/log_file'\n steps:\n - run: '#input_collector.cwl'\n in:\n - source: '#main/multiple_collections'\n id: '#main/input_collector/multiple_collections'\n out: ['#main/input_collector/output']\n id: '#main/input_collector'\n id: '#main'\n",
- });
-};
-
-const createPrimitiveArraysCollectorWorkflow = ({ workflowService }: ServiceRepository) => {
- workflowService.create({
- name: 'String, Int and Float arrays collector',
- description: 'Workflow for collecting primitive data arrays',
- definition: "cwlVersion: v1.0\n$graph:\n- class: CommandLineTool\n\n requirements:\n - listing:\n - entryname: input_collector.log\n entry: |\n \"string array\":\n $(inputs.example_string_array)\n \"int array\":\n $(inputs.example_int_array)\n \"float array\":\n $(inputs.example_float_array)\n\n class: InitialWorkDirRequirement\n inputs:\n - type:\n type: array\n items: string\n id: '#input_collector.cwl/example_string_array'\n - type:\n type: array\n items: int\n id: '#input_collector.cwl/example_int_array'\n - type:\n type: array\n items: float\n id: '#input_collector.cwl/example_float_array'\n \n outputs:\n - type: File\n outputBinding:\n glob: '*'\n id: '#input_collector.cwl/output'\n\n baseCommand: [echo]\n id: '#input_collector.cwl'\n- class: Workflow\n doc: This is the description of the workflow\n inputs:\n - type:\n type: array\n items: string\n label: Freetext Array\n doc: This should allow for entering multiple strings.\n id: '#main/example_string_array'\n default:\n - This is the first string\n - This is the second string\n - type:\n type: array\n items: int\n label: Integer Array\n doc: This should allow for entering multiple integers.\n id: '#main/example_int_array'\n default:\n - 3\n - 6\n - type:\n type: array\n items: float\n label: Float Array\n doc: This should allow for entering multiple floats.\n id: '#main/example_float_array'\n default:\n - 3.33\n - 66.6\n\n outputs:\n - type: File\n outputSource: '#main/input_collector/output'\n\n id: '#main/log_file'\n steps:\n - run: '#input_collector.cwl'\n in:\n - source: '#main/example_string_array'\n id: '#main/input_collector/example_string_array'\n - source: '#main/example_int_array'\n id: '#main/input_collector/example_int_array'\n - source: '#main/example_float_array'\n id: '#main/input_collector/example_float_array'\n out: ['#main/input_collector/output']\n id: '#main/input_collector'\n id: '#main'\n",
- });
-};
-
-const createFilesArrayCollectorWorkflow = ({ workflowService }: ServiceRepository) => {
- workflowService.create({
- name: 'Files array collector',
- description: 'Workflow for collecting files array',
- definition: "cwlVersion: v1.0\n$graph:\n- class: CommandLineTool\n\n requirements:\n - listing:\n - entryname: input_collector.log\n entry: |\n \"multiple_files\":\n $(inputs.multiple_files)\n\n class: InitialWorkDirRequirement\n inputs:\n - type:\n type: array\n items: File\n id: '#input_collector.cwl/multiple_files'\n outputs:\n - type: File\n outputBinding:\n glob: '*'\n id: '#input_collector.cwl/output'\n\n baseCommand: [cat]\n id: '#input_collector.cwl'\n- class: Workflow\n doc: This is the description of the workflow\n inputs:\n - type:\n type: array\n items: File\n label: Multiple Files\n doc: This should allow for selecting multiple files.\n id: '#main/multiple_files'\n default:\n - class: File\n location: keep:af831660d820bcbb98f473355e6e1b85+67/fileA\n basename: fileA\n nameroot: fileA\n nameext: ''\n outputs:\n - type: File\n outputSource: '#main/input_collector/output'\n\n id: '#main/log_file'\n steps:\n - run: '#input_collector.cwl'\n in:\n - source: '#main/multiple_files'\n id: '#main/input_collector/multiple_files'\n out: ['#main/input_collector/output']\n id: '#main/input_collector'\n id: '#main'\n",
- });
-};
-
-const createPrimitivesCollectorWorkflow = ({ workflowService }: ServiceRepository) => {
- workflowService.create({
- name: 'Primitive values collector',
- description: 'Workflow for collecting primitive values',
- definition: "cwlVersion: v1.0\n$graph:\n- class: CommandLineTool\n requirements:\n - listing:\n - entryname: input_collector.log\n entry: |\n \"flag\":\n $(inputs.example_flag)\n \"string\":\n $(inputs.example_string)\n \"int\":\n $(inputs.example_int)\n \"long\":\n $(inputs.example_long)\n \"float\":\n $(inputs.example_float)\n \"double\":\n $(inputs.example_double)\n class: InitialWorkDirRequirement\n inputs:\n - type: double\n id: '#input_collector.cwl/example_double'\n - type: boolean\n id: '#input_collector.cwl/example_flag'\n - type: float\n id: '#input_collector.cwl/example_float'\n - type: int\n id: '#input_collector.cwl/example_int'\n - type: long\n id: '#input_collector.cwl/example_long'\n - type: string\n id: '#input_collector.cwl/example_string'\n outputs:\n - type: File\n outputBinding:\n glob: '*'\n id: '#input_collector.cwl/output'\n baseCommand: [echo]\n id: '#input_collector.cwl'\n- class: Workflow\n doc: Workflw for collecting primitive values\n inputs:\n - type: double\n label: Double value\n doc: This should allow for entering a decimal number (64-bit).\n id: '#main/example_double'\n default: 0.3333333333333333\n - type: boolean\n label: Boolean Flag\n doc: This should render as in checkbox.\n id: '#main/example_flag'\n default: true\n - type: float\n label: Float value\n doc: This should allow for entering a decimal number (32-bit).\n id: '#main/example_float'\n default: 0.15625\n - type: int\n label: Integer Number\n doc: This should allow for entering a number (32-bit signed).\n id: '#main/example_int'\n default: 2147483647\n - type: long\n label: Long Number\n doc: This should allow for entering a number (64-bit signed).\n id: '#main/example_long'\n default: 9223372036854775807\n - type: string\n label: Freetext\n doc: This should allow for entering an arbitrary char sequence.\n id: '#main/example_string'\n default: This is a string\n outputs:\n - type: File\n outputSource: '#main/input_collector/output'\n id: '#main/log_file'\n steps:\n - run: '#input_collector.cwl'\n in:\n - source: '#main/example_double'\n id: '#main/input_collector/example_double'\n - source: '#main/example_flag'\n id: '#main/input_collector/example_flag'\n - source: '#main/example_float'\n id: '#main/input_collector/example_float'\n - source: '#main/example_int'\n id: '#main/input_collector/example_int'\n - source: '#main/example_long'\n id: '#main/input_collector/example_long'\n - source: '#main/example_string'\n id: '#main/input_collector/example_string'\n out: ['#main/input_collector/output']\n id: '#main/input_collector'\n id: '#main'\n",
- });
-};
-
-const createEnumCollectorWorkflow = ({ workflowService }: ServiceRepository) => {
- workflowService.create({
- name: 'Enum values collector',
- description: 'Workflow for collecting enum values',
- definition: "cwlVersion: v1.0\n$graph:\n- class: CommandLineTool\n requirements:\n - listing:\n - entryname: input_collector.log\n entry: |\n \"enum_type\":\n $(inputs.enum_type)\n\n class: InitialWorkDirRequirement\n inputs:\n - type:\n type: enum\n symbols: ['#input_collector.cwl/enum_type/OTU table', '#input_collector.cwl/enum_type/Pathway\n table', '#input_collector.cwl/enum_type/Function table', '#input_collector.cwl/enum_type/Ortholog\n table']\n id: '#input_collector.cwl/enum_type'\n outputs:\n - type: File\n outputBinding:\n glob: '*'\n id: '#input_collector.cwl/output'\n baseCommand: [echo]\n id: '#input_collector.cwl'\n- class: Workflow\n doc: This is the description of the workflow\n inputs:\n - type:\n type: enum\n symbols: ['#main/enum_type/OTU table', '#main/enum_type/Pathway table', '#main/enum_type/Function\n table', '#main/enum_type/Ortholog table']\n name: '#enum_typef4179c7f-45f9-482d-a5db-1abb86698384'\n label: Enumeration Type\n doc: This should render as a drop-down menu.\n id: '#main/enum_type'\n default: OTU table\n outputs:\n - type: File\n outputSource: '#main/input_collector/output'\n id: '#main/log_file'\n steps:\n - run: '#input_collector.cwl'\n in:\n - source: '#main/enum_type'\n id: '#main/input_collector/enum_type'\n out: ['#main/input_collector/output']\n id: '#main/input_collector'\n id: '#main'\n",
- });
-};
-
-const createFilesCollectorWorkflow = ({ workflowService }: ServiceRepository) => {
- workflowService.create({
- name: 'File values collector',
- description: 'Workflow for collecting file values',
- definition: "cwlVersion: v1.0\n$graph:\n- class: CommandLineTool\n\n requirements:\n - listing:\n - entryname: input_collector.log\n entry: |\n \"single_file\":\n $(inputs.single_file.basename)\n \"optional_file\":\n $(inputs.optional_file.basename)\n\n class: InitialWorkDirRequirement\n inputs:\n - type:\n - 'null'\n - File\n id: '#input_collector.cwl/optional_file'\n - type:\n - 'null'\n - File\n id: '#input_collector.cwl/optional_file_missing_label'\n - type: File\n id: '#input_collector.cwl/single_file'\n outputs:\n - type: File\n outputBinding:\n glob: '*'\n id: '#input_collector.cwl/output'\n\n baseCommand: [echo]\n id: '#input_collector.cwl'\n- class: Workflow\n doc: This is the description of the workflow\n inputs:\n - type:\n - 'null'\n - File\n label: Single File (Optional)\n doc: This should allow for single File selection only. Input should be marked\n as optional and not enforced by form validation.\n id: '#main/optional_file'\n default:\n class: File\n location: keep:af831660d820bcbb98f473355e6e1b85+67/fileA\n basename: fileA\n nameroot: fileA\n nameext: ''\n - type:\n - 'null'\n - File\n doc: Label should be the input field name because of missing label.\n id: '#main/optional_file_missing_label'\n - type: File\n label: Single File\n doc: This should allow for single File selection only.\n id: '#main/single_file'\n default:\n class: File\n location: keep:af831660d820bcbb98f473355e6e1b85+67/fileA\n basename: fileA\n nameroot: fileA\n nameext: ''\n outputs:\n - type: File\n outputSource: '#main/input_collector/output'\n id: '#main/log_file'\n steps:\n - run: '#input_collector.cwl'\n in:\n - source: '#main/optional_file'\n id: '#main/input_collector/optional_file'\n - source: '#main/single_file'\n id: '#main/input_collector/single_file'\n out: ['#main/input_collector/output']\n id: '#main/input_collector'\n id: '#main'\n",
- });
-};
-
-const createCollectionCollectorWorkflow = ({ workflowService }: ServiceRepository) => {
- workflowService.create({
- name: 'Collection value collector',
- description: 'Workflow for collecting a collecion',
- definition: "cwlVersion: v1.0\n$graph:\n- class: CommandLineTool\n\n requirements:\n - listing:\n - entryname: input_collector.log\n entry: |\n \"collection\":\n $(inputs.collection.location)\n\n class: InitialWorkDirRequirement\n inputs:\n - type: Directory\n id: '#input_collector.cwl/collection'\n\n outputs:\n - type: File\n outputBinding:\n glob: '*'\n id: '#input_collector.cwl/output'\n\n baseCommand: [echo]\n id: '#input_collector.cwl'\n- class: Workflow\n doc: This is the description of the workflow\n inputs:\n - type: Directory\n label: Single Collection\n doc: This should allow for single Collection selection only.\n id: '#main/collection'\n default:\n class: Directory\n location: keep:af831660d820bcbb98f473355e6e1b85+67\n basename: af831660d820bcbb98f473355e6e1b85+67\n outputs:\n - type: File\n outputSource: '#main/input_collector/output'\n\n id: '#main/log_file'\n steps:\n - run: '#input_collector.cwl'\n in:\n - source: '#main/collection'\n id: '#main/input_collector/collection'\n out: ['#main/input_collector/output']\n id: '#main/input_collector'\n id: '#main'\n",
- });
-};
-
-const createSampleProcess = ({ containerRequestService }: ServiceRepository) => {
- containerRequestService.create({
- ownerUuid: 'c97qk-j7d0g-s3ngc1z0748hsmf',
- name: 'Simple process 7',
- state: ContainerRequestState.COMMITTED,
- mounts: {
- '/var/spool/cwl': {
- kind: MountKind.COLLECTION,
- writable: true,
- },
- 'stdout': {
- kind: MountKind.MOUNTED_FILE,
- path: '/var/spool/cwl/cwl.output.json'
- },
- '/var/lib/cwl/workflow.json': {
- kind: MountKind.JSON,
- content: {
- "cwlVersion": "v1.0",
- "$graph": [
- {
- "class": "CommandLineTool",
- "requirements": [
- {
- "listing": [
- {
- "entryname": "input_collector.log",
- "entry": "$(inputs.single_file.basename)\n"
- }
- ],
- "class": "InitialWorkDirRequirement"
- }
- ],
- "inputs": [
- {
- "type": "File",
- "id": "#input_collector.cwl/single_file"
- }
- ],
- "outputs": [
- {
- "type": "File",
- "outputBinding": {
- "glob": "*"
- },
- "id": "#input_collector.cwl/output"
- }
- ],
- "baseCommand": [
- "echo"
- ],
- "id": "#input_collector.cwl"
- },
- {
- "class": "Workflow",
- "doc": "This is the description of the workflow",
- "inputs": [
- {
- "type": "File",
- "label": "Single File",
- "doc": "This should allow for single File selection only.",
- "id": "#main/single_file"
- }
- ],
- "outputs": [
- {
- "type": "File",
- "outputSource": "#main/input_collector/output",
- "id": "#main/log_file"
- }
- ],
- "steps": [
- {
- "run": "#input_collector.cwl",
- "in": [
- {
- "source": "#main/single_file",
- "id": "#main/input_collector/single_file"
- }
- ],
- "out": [
- "#main/input_collector/output"
- ],
- "id": "#main/input_collector"
- }
- ],
- "id": "#main"
- }
- ]
- },
- },
- '/var/lib/cwl/cwl.input.json': {
- kind: MountKind.JSON,
- content: {
- "single_file": {
- "class": "File",
- "location": "keep:233454526794c0a2d56a305baeff3d30+145/1.txt",
- "basename": "fileA"
- }
- },
- }
- },
- runtimeConstraints: {
- API: true,
- vcpus: 1,
- ram: 1073741824,
- },
- containerImage: 'arvados/jobs:1.1.4.20180618144723',
- cwd: '/var/spool/cwl',
- command: [
- 'arvados-cwl-runner',
- '--local',
- '--api=containers',
- "--project-uuid=c97qk-j7d0g-s3ngc1z0748hsmf",
- '/var/lib/cwl/workflow.json#main',
- '/var/lib/cwl/cwl.input.json'
- ],
- outputPath: '/var/spool/cwl',
- priority: 1,
- });
-};
-
// force build comment #1
import {
StepModel,
WorkflowInputParameterModel,
- WorkflowOutputParameterModel,
- WorkflowStepInputModel,
- WorkflowStepOutputModel
+ WorkflowOutputParameterModel
} from "cwlts/models";
export class SVGArrangePlugin implements SVGPlugin {
groupClass: GroupClass | null;
description: string;
properties: any;
- writeableBy: string[];
+ writableBy: string[];
ensure_unique_name: boolean;
}
properties: "",
trashAt: "",
uuid: "",
- writeableBy: [],
+ writableBy: [],
ensure_unique_name: true,
...data
});
return definition;
};
-export const getWorkflowInputs = (workflowDefinition: WorkflowResourceDefinition) => {
+export const getWorkflow = (workflowDefinition: WorkflowResourceDefinition) => {
if (!workflowDefinition.$graph) { return undefined; }
const mainWorkflow = workflowDefinition.$graph.find(item => item.class === 'Workflow' && item.id === '#main');
return mainWorkflow
- ? mainWorkflow.inputs
+ ? mainWorkflow
+ : undefined;
+};
+
+export const getWorkflowInputs = (workflowDefinition: WorkflowResourceDefinition) => {
+ if (!workflowDefinition) { return undefined; }
+ return getWorkflow(workflowDefinition)
+ ? getWorkflow(workflowDefinition)!.inputs
: undefined;
};
//
// SPDX-License-Identifier: AGPL-3.0
-import { OrderBuilder } from "./order-builder";
import { joinUrls } from "~/services/api/url-builder";
describe("UrlBuilder", () => {
import { CollectionService } from "../collection-service/collection-service";
import { parseKeepManifestText, stringifyKeepManifest } from "./collection-manifest-parser";
import { mapManifestToCollectionFilesTree } from "./collection-manifest-mapper";
-import { CommonResourceService } from "~/services/common-service/common-resource-service";
-import * as _ from "lodash";
export class CollectionFilesService {
: stream
);
const manifestText = stringifyKeepManifest(updatedManifest);
- const data = { ...collection, manifestText };
- return this.collectionService.update(collectionUuid, CommonResourceService.mapKeys(_.snakeCase)(data));
+ return this.collectionService.update(collectionUuid, { manifestText });
}
async deleteFile(collectionUuid: string, file: { name: string, path: string }) {
const manifestText = stringifyKeepManifest(updatedManifest);
return this.collectionService.update(collectionUuid, { manifestText });
}
-
- renameTest() {
- const u = this.renameFile('qr1hi-4zz18-n0sx074erl4p0ph', {
- name: 'extracted2.txt.png',
- path: ''
- }, 'extracted-new.txt.png');
- }
}
import { AuthService } from "../auth-service/auth-service";
import { mapTreeValues } from "~/models/tree";
import { parseFilesResponse } from "./collection-service-files-response";
-import { fileToArrayBuffer } from "~/common/file";
import { TrashableResourceService } from "~/services/common-service/trashable-resource-service";
import { ApiActions } from "~/services/api/api-actions";
-import { snakeCase } from 'lodash';
export type UploadProgress = (fileId: number, loaded: number, total: number, currentTime: number) => void;
};
return this.webdavClient.upload(fileURL, [file], requestConfig);
}
-
- update(uuid: string, data: Partial<CollectionResource>) {
- if (uuid && data && data.properties) {
- const { properties } = data;
- const mappedData = {
- ...TrashableResourceService.mapKeys(snakeCase)(data),
- properties,
- };
- return TrashableResourceService
- .defaultResponse(
- this.serverApi
- .put<CollectionResource>(this.resourceType + uuid, mappedData),
- this.actions,
- false
- );
- }
- return TrashableResourceService
- .defaultResponse(
- this.serverApi
- .put<CollectionResource>(this.resourceType + uuid, data && TrashableResourceService.mapKeys(snakeCase)(data)),
- this.actions
- );
- }
}
//
// SPDX-License-Identifier: AGPL-3.0
-import { snakeCase } from 'lodash';
import { CommonResourceService } from "~/services/common-service/common-resource-service";
import { AxiosInstance } from "axios";
import { ContainerRequestResource } from '~/models/container-request';
constructor(serverApi: AxiosInstance, actions: ApiActions) {
super(serverApi, "container_requests", actions);
}
-
- create(data?: Partial<ContainerRequestResource>) {
- if (data) {
- const { mounts } = data;
- if (mounts) {
- const mappedData = {
- ...CommonResourceService.mapKeys(snakeCase)(data),
- mounts,
- };
- return CommonResourceService
- .defaultResponse(
- this.serverApi.post<ContainerRequestResource>(this.resourceType, mappedData),
- this.actions);
- }
- }
- return CommonResourceService
- .defaultResponse(
- this.serverApi
- .post<ContainerRequestResource>(this.resourceType, data && CommonResourceService.mapKeys(snakeCase)(data)),
- this.actions);
- }
}
import { CollectionResource } from "~/models/collection";
import { ProjectResource } from "~/models/project";
import { ProcessResource } from "~/models/process";
-import { ResourceKind } from '~/models/resource';
import { TrashableResourceService } from "~/services/common-service/trashable-resource-service";
import { ApiActions } from "~/services/api/api-actions";
import { GroupResource } from "~/models/group";
this.serverApi.get(this.resourceType + pathUrl, cfg), this.actions, false
);
- const { items, ...res } = response;
- const mappedItems = (items || []).map((item: GroupContentsResource) => {
- const mappedItem = TrashableResourceService.mapKeys(_.camelCase)(item);
- if (item.kind === ResourceKind.COLLECTION || item.kind === ResourceKind.PROJECT) {
- const { properties } = item;
- return { ...mappedItem, properties };
- } else {
- return mappedItem;
- }
- });
- const mappedResponse = { ...TrashableResourceService.mapKeys(_.camelCase)(res) };
- return { ...mappedResponse, items: mappedItems, clusterId: session && session.clusterId };
+ return { ...TrashableResourceService.mapKeys(_.camelCase)(response), clusterId: session && session.clusterId };
}
shared(params: SharedArguments = {}): Promise<ListResults<GroupContentsResource>> {
import { GroupClass } from "~/models/group";
import { ListArguments } from "~/services/common-service/common-service";
import { FilterBuilder, joinFilters } from "~/services/api/filter-builder";
-import { TrashableResourceService } from '~/services/common-service/trashable-resource-service';
-import { snakeCase } from 'lodash';
export class ProjectService extends GroupsService<ProjectResource> {
create(data: Partial<ProjectResource>) {
return super.create(projectData);
}
- update(uuid: string, data: Partial<ProjectResource>) {
- if (uuid && data && data.properties) {
- const { properties } = data;
- const mappedData = {
- ...TrashableResourceService.mapKeys(snakeCase)(data),
- properties,
- };
- return TrashableResourceService
- .defaultResponse(
- this.serverApi
- .put<ProjectResource>(this.resourceType + uuid, mappedData),
- this.actions,
- false
- );
- }
- return TrashableResourceService
- .defaultResponse(
- this.serverApi
- .put<ProjectResource>(this.resourceType + uuid, data && TrashableResourceService.mapKeys(snakeCase)(data)),
- this.actions
- );
- }
-
list(args: ListArguments = {}) {
return super.list({
...args,
};
const groupRequestApiResponse = (apiResponse: ProjectResource) => {
- const { uuid, ownerUuid, createdAt, modifiedAt, modifiedByClientUuid, modifiedByUserUuid, name, description, groupClass, trashAt, isTrashed, deleteAt, properties, writeableBy } = apiResponse;
+ const { uuid, ownerUuid, createdAt, modifiedAt, modifiedByClientUuid, modifiedByUserUuid, name, description, groupClass, trashAt, isTrashed, deleteAt, properties, writableBy } = apiResponse;
const response = `
"uuid": "${uuid}",
"owner_uuid": "${ownerUuid}",
"is_trashed": ${stringify(isTrashed)},
"delete_at": ${stringify(deleteAt)},
"properties": ${stringifyObject(properties)},
-"witable_by": ${stringifyObject(writeableBy)}`;
+"writable_by": ${stringifyObject(writableBy)}`;
return <span style={{ marginLeft: '-15px' }}>{'{'} {response} {'\n'} <span style={{ marginLeft: '-15px' }}>{'}'}</span></span>;
};
import { createServices } from "~/services/services";
import { configureStore, RootStore } from "../store";
import createBrowserHistory from "history/createBrowserHistory";
-import { Config, mockConfig } from '~/common/config';
+import { mockConfig } from '~/common/config';
import { ApiActions } from "~/services/api/api-actions";
import { ACCOUNT_LINK_STATUS_KEY} from '~/services/link-account-service/link-account-service';
const uuid = item ? item.uuid : '';
try {
if (item) {
- const d: Partial<CollectionResource> = {
- properties: JSON.parse(JSON.stringify(item.properties))
- };
- d.properties[data.key] = data.value;
- const updatedCollection = await services.collectionService.update(uuid, d);
+ const updatedCollection = await services.collectionService.update(
+ uuid, {
+ properties: {
+ ...JSON.parse(JSON.stringify(item.properties)),
+ [data.key]: data.value
+ }
+ }
+ );
item.properties[data.key] = data.value;
dispatch(resourcesActions.SET_RESOURCES([updatedCollection]));
dispatch(snackbarActions.OPEN_SNACKBAR({ message: "Tag has been successfully added.", hideDuration: 2000, kind: SnackbarKind.SUCCESS }));
const uuid = item ? item.uuid : '';
try {
if (item) {
- const data: Partial<CollectionResource> = {
- properties: JSON.parse(JSON.stringify(item.properties))
- };
- delete data.properties[key];
- const updatedCollection = await services.collectionService.update(uuid, data);
delete item.properties[key];
+ const updatedCollection = await services.collectionService.update(
+ uuid, {
+ properties: {...item.properties}
+ }
+ );
dispatch(resourcesActions.SET_RESOURCES([updatedCollection]));
dispatch(snackbarActions.OPEN_SNACKBAR({ message: "Tag has been successfully deleted.", hideDuration: 2000, kind: SnackbarKind.SUCCESS }));
return updatedCollection;
import { dialogActions } from '../../dialog/dialog-actions';
import { getNodeValue } from "~/models/tree";
import { filterCollectionFilesBySelection } from './collection-panel-files-state';
-import { startSubmit, stopSubmit, reset, initialize, FormErrors } from 'redux-form';
+import { startSubmit, stopSubmit, initialize, FormErrors } from 'redux-form';
import { getDialog } from "~/store/dialog/dialog-reducer";
import { getFileFullPath } from "~/services/collection-service/collection-service-files-response";
import { resourcesDataActions } from "~/store/resources-data/resources-data-actions";
dispatch(startSubmit(COLLECTION_MOVE_FORM_NAME));
try {
dispatch(progressIndicatorActions.START_WORKING(COLLECTION_MOVE_FORM_NAME));
+ await services.collectionService.update(resource.uuid, { ownerUuid: resource.ownerUuid });
const collection = await services.collectionService.get(resource.uuid);
- await services.collectionService.update(resource.uuid, { ...collection, ownerUuid: resource.ownerUuid });
dispatch(projectPanelActions.REQUEST_ITEMS());
dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_MOVE_FORM_NAME }));
dispatch(progressIndicatorActions.STOP_WORKING(COLLECTION_MOVE_FORM_NAME));
try {
if (project) {
delete project.properties[key];
- const updatedProject = await services.projectService.update(project.uuid, project);
+ const updatedProject = await services.projectService.update(project.uuid, { properties: project.properties });
dispatch(resourcesActions.SET_RESOURCES([updatedProject]));
dispatch(snackbarActions.OPEN_SNACKBAR({ message: "Property has been successfully deleted.", hideDuration: 2000, kind: SnackbarKind.SUCCESS }));
}
try {
if (project) {
project.properties[data.key] = data.value;
- const updatedProject = await services.projectService.update(project.uuid, project);
+ const updatedProject = await services.projectService.update(project.uuid, { properties: project.properties });
dispatch(resourcesActions.SET_RESOURCES([updatedProject]));
dispatch(snackbarActions.OPEN_SNACKBAR({ message: "Property has been successfully added.", hideDuration: 2000, kind: SnackbarKind.SUCCESS }));
dispatch(stopSubmit(PROJECT_PROPERTIES_FORM_NAME));
import { RootState } from '~/store/store';
import { ServiceRepository } from '~/services/services';
import { PermissionResource } from '~/models/permission';
-import { GroupDetailsPanel } from '~/views/group-details-panel/group-details-panel';
import { snackbarActions, SnackbarKind } from '~/store/snackbar/snackbar-actions';
import { UserResource, getUserFullname } from '~/models/user';
import { GroupResource } from '~/models/group';
import { getCommonResourceServiceError, CommonResourceServiceError } from '~/services/common-service/common-resource-service';
import { snackbarActions, SnackbarKind } from '~/store/snackbar/snackbar-actions';
-import { PermissionLevel, PermissionResource } from '~/models/permission';
+import { PermissionLevel } from '~/models/permission';
import { PermissionService } from '~/services/permission-service/permission-service';
import { FilterBuilder } from '~/services/api/filter-builder';
import { RootState } from "~/store/store";
import { ServiceRepository } from "~/services/services";
import { snackbarActions, SnackbarKind } from '~/store/snackbar/snackbar-actions';
-import { getDataExplorer, DataExplorer, getSortColumn } from "~/store/data-explorer/data-explorer-reducer";
+import { getDataExplorer, getSortColumn } from "~/store/data-explorer/data-explorer-reducer";
import { GroupsPanelActions } from '~/store/groups-panel/groups-panel-actions';
import { FilterBuilder } from '~/services/api/filter-builder';
import { updateResources } from '~/store/resources/resources-actions';
import { linkAccountPanelReducer, LinkAccountPanelError, LinkAccountPanelStatus, OriginatingUser } from "~/store/link-account-panel/link-account-panel-reducer";
import { linkAccountPanelActions } from "~/store/link-account-panel/link-account-panel-actions";
-import { UserResource } from "~/models/user";
describe('link-account-panel-reducer', () => {
const initialState = undefined;
// SPDX-License-Identifier: AGPL-3.0
import { Dispatch, compose, AnyAction } from 'redux';
-import { push, RouterAction } from "react-router-redux";
+import { push } from "react-router-redux";
import { ResourceKind, extractUuidKind } from '~/models/resource';
-import { getCollectionUrl } from "~/models/collection";
-import { getProjectUrl } from "~/models/project";
import { SidePanelTreeCategory } from '../side-panel-tree/side-panel-tree-actions';
-import { Routes, getProcessUrl, getProcessLogUrl, getGroupUrl, getNavUrl } from '~/routes/routes';
+import { Routes, getProcessLogUrl, getGroupUrl, getNavUrl } from '~/routes/routes';
import { RootState } from '~/store/store';
import { ServiceRepository } from '~/services/services';
import { GROUPS_PANEL_LABEL } from '~/store/breadcrumbs/breadcrumbs-actions';
import { RUN_PROCESS_BASIC_FORM, RunProcessBasicFormData } from "~/views/run-process-panel/run-process-basic-form";
import { RunProcessAdvancedFormData, RUN_PROCESS_ADVANCED_FORM } from "~/views/run-process-panel/run-process-advanced-form";
import { MOUNT_PATH_CWL_WORKFLOW, MOUNT_PATH_CWL_INPUT } from '~/models/process';
-import { getWorkflowInputs } from "~/models/workflow";
+import { getWorkflow, getWorkflowInputs } from "~/models/workflow";
export const loadProcess = (containerRequestUuid: string) =>
async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository): Promise<Process> => {
const workflows = getState().runProcessPanel.searchWorkflows;
const workflow = workflows.find(workflow => workflow.uuid === workflowUuid);
if (workflow && process) {
- let inputs = getWorkflowInputs(process.mounts[MOUNT_PATH_CWL_WORKFLOW]);
- inputs = getInputs(process);
+ const mainWf = getWorkflow(process.mounts[MOUNT_PATH_CWL_WORKFLOW]);
+ if (mainWf) { mainWf.inputs = getInputs(process); }
const stringifiedDefinition = JSON.stringify(process.mounts[MOUNT_PATH_CWL_WORKFLOW].content);
const newWorkflow = { ...workflow, definition: stringifiedDefinition };
const userUuid = getState().auth.user!.uuid;
dispatch(startSubmit(PROJECT_MOVE_FORM_NAME));
try {
- const project = await services.projectService.get(resource.uuid);
- const newProject = await services.projectService.update(resource.uuid, { ...project, ownerUuid: resource.ownerUuid });
+ const newProject = await services.projectService.update(resource.uuid, { ownerUuid: resource.ownerUuid });
dispatch(projectPanelActions.REQUEST_ITEMS());
dispatch(dialogActions.CLOSE_DIALOG({ id: PROJECT_MOVE_FORM_NAME }));
await dispatch<any>(loadSidePanelTreeProjects(userUuid));
//
// SPDX-License-Identifier: AGPL-3.0
-import { Dispatch } from "redux";
import { dialogActions } from "~/store/dialog/dialog-actions";
export const RICH_TEXT_EDITOR_DIALOG_NAME = 'richTextEditorDialogName';
-export const openRichTextEditorDialog = (title: string, text: string) =>
+export const openRichTextEditorDialog = (title: string, text: string) =>
dialogActions.OPEN_DIALOG({ id: RICH_TEXT_EDITOR_DIALOG_NAME, data: { title, text } });
\ No newline at end of file
import { initUserProject, treePickerActions } from '~/store/tree-picker/tree-picker-actions';
import { ServiceRepository } from '~/services/services';
import { FilterBuilder } from "~/services/api/filter-builder";
-import { ResourceKind, isResourceUuid, extractUuidKind, RESOURCE_UUID_REGEX, COLLECTION_PDH_REGEX } from '~/models/resource';
+import { ResourceKind, RESOURCE_UUID_REGEX, COLLECTION_PDH_REGEX } from '~/models/resource';
import { SearchView } from '~/store/search-bar/search-bar-reducer';
import { navigateTo, navigateToSearchResults } from '~/store/navigation/navigation-action';
import { snackbarActions, SnackbarKind } from '~/store/snackbar/snackbar-actions';
import { PropertyValue, SearchBarAdvanceFormData } from '~/models/search-bar';
-import { debounce } from 'debounce';
import * as _ from "lodash";
import { getModifiedKeysValues } from "~/common/objects";
import { activateSearchBarProject } from "~/store/search-bar/search-bar-tree-actions";
};
-const startSearch = () =>
- (dispatch: Dispatch, getState: () => RootState) => {
- const searchValue = getState().searchBar.searchValue;
- dispatch<any>(searchData(searchValue));
- };
-
const searchGroups = (searchValue: string, limit: number) =>
async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
const currentView = getState().searchBar.currentView;
.forEach(p => keyMap.push([`has:"${p.key}"`, `prop-"${p.key}"`]));
if (prevData) {
- const fd = flatData(data);
- const pfd = flatData(prevData);
const obj = getModifiedKeysValues(flatData(data), flatData(prevData));
value = buildQueryFromKeyMap({
searchValue: data.searchValue,
import { DataExplorer, getDataExplorer } from '~/store/data-explorer/data-explorer-reducer';
import { updateResources } from '~/store/resources/resources-actions';
import { SortDirection } from '~/components/data-table/data-column';
-import { SearchResultsPanelColumnNames } from '~/views/search-results-panel/search-results-panel-view';
import { OrderDirection, OrderBuilder } from '~/services/api/order-builder';
import { GroupContentsResource, GroupContentsResourcePrefix } from "~/services/groups-service/groups-service";
import { ListResults } from '~/services/common-service/common-service';
import { DataColumns } from '~/components/data-table/data-table';
import { serializeResourceTypeFilters } from '~/store//resource-type-filters/resource-type-filters';
import { ProjectPanelColumnNames } from '~/views/project-panel/project-panel';
-import * as _ from 'lodash';
import { Resource } from '~/models/resource';
export class SearchResultsMiddlewareService extends DataExplorerMiddlewareService {
//
// SPDX-License-Identifier: AGPL-3.0
-import { createTree, TreeNode, setNode, Tree, TreeNodeStatus, setNodeStatus, expandNode, deactivateNode, deselectNode, selectNode, selectNodes, deselectNodes } from '~/models/tree';
+import { createTree, TreeNode, setNode, Tree, TreeNodeStatus, setNodeStatus, expandNode, deactivateNode, selectNodes, deselectNodes } from '~/models/tree';
import { TreePicker } from "./tree-picker";
import { treePickerActions, TreePickerAction } from "./tree-picker-actions";
import { compose } from "redux";
const { resources } = getState();
const data = getResource<UserResource>(uuid)(resources);
const isActive = data!.isActive;
- const newActivity = await services.userService.update(uuid, { ...data, isActive: !isActive });
+ const newActivity = await services.userService.update(uuid, { isActive: !isActive });
dispatch<any>(loadUsersPanel());
return newActivity;
};
const { resources } = getState();
const data = getResource<UserResource>(uuid)(resources);
const isAdmin = data!.isAdmin;
- const newActivity = await services.userService.update(uuid, { ...data, isAdmin: !isAdmin });
+ const newActivity = await services.userService.update(uuid, { isAdmin: !isAdmin });
dispatch<any>(loadUsersPanel());
return newActivity;
};
loadSidePanelTreeProjects,
SidePanelTreeCategory
} from '~/store/side-panel-tree/side-panel-tree-actions';
-import { loadResource, updateResources } from '~/store/resources/resources-actions';
+import { updateResources } from '~/store/resources/resources-actions';
import { projectPanelColumns } from '~/views/project-panel/project-panel';
import { favoritePanelColumns } from '~/views/favorite-panel/favorite-panel';
import { matchRootRoute } from '~/routes/routes';
//
// SPDX-License-Identifier: AGPL-3.0
-import { isInteger, isNumber } from 'lodash';
+import { isNumber } from 'lodash';
const ERROR_MESSAGE = 'This field must be a float';
export const ERROR_MESSAGE = 'Maximum string length of this field is: ';
export const DEFAULT_MAX_VALUE = 60;
-interface MaxLengthProps {
- maxLengthValue: number;
- defaultErrorMessage: string;
-}
-
-// TODO types for maxLength
export const maxLength: any = (maxLengthValue = DEFAULT_MAX_VALUE, errorMessage = ERROR_MESSAGE) => {
return (value: string) => {
if (value) {
export const ERROR_MESSAGE = 'This field is required.';
-interface RequiredProps {
- value: string;
-}
-
-// TODO types for require
export const require: any = (value: string) => {
return value && value.length > 0 ? undefined : ERROR_MESSAGE;
};
// SPDX-License-Identifier: AGPL-3.0
import * as React from "react";
-import { Dialog, DialogTitle, DialogContent, DialogActions, Button, Typography } from "@material-ui/core";
+import { Dialog, DialogTitle, DialogContent, DialogActions, Button } from "@material-ui/core";
import { WithDialogProps } from "~/store/dialog/with-dialog";
import { withDialog } from '~/store/dialog/with-dialog';
import { DefaultCodeSnippet } from '~/components/default-code-snippet/default-code-snippet';
import { RouteProps } from "react-router";
import * as React from "react";
import { connect, DispatchProp } from "react-redux";
-import { authActions, getUserDetails, saveApiToken } from "~/store/auth/auth-action";
+import { getUserDetails, saveApiToken } from "~/store/auth/auth-action";
import { getUrlParameter } from "~/common/url";
import { AuthService } from "~/services/auth-service/auth-service";
import { navigateToRootProject, navigateToLinkAccount } from "~/store/navigation/navigation-action";
import { ContextMenuActionSet } from "../context-menu-action-set";
import { ToggleFavoriteAction } from "../actions/favorite-action";
import { toggleFavorite } from "~/store/favorites/favorites-actions";
-import { RenameIcon, ShareIcon, MoveToIcon, CopyIcon, DetailsIcon, ProvenanceGraphIcon, AdvancedIcon, RemoveIcon } from "~/components/icon/icon";
+import { RenameIcon, ShareIcon, MoveToIcon, CopyIcon, DetailsIcon, AdvancedIcon } from "~/components/icon/icon";
import { openCollectionUpdateDialog } from "~/store/collections/collection-update-actions";
import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-action";
import { openMoveCollectionDialog } from '~/store/collections/collection-move-actions';
import { ToggleFavoriteAction } from "../actions/favorite-action";
import { ToggleTrashAction } from "~/views-components/context-menu/actions/trash-action";
import { toggleFavorite } from "~/store/favorites/favorites-actions";
-import { RenameIcon, ShareIcon, MoveToIcon, CopyIcon, DetailsIcon, RemoveIcon, AdvancedIcon } from '~/components/icon/icon';
+import { RenameIcon, ShareIcon, MoveToIcon, CopyIcon, DetailsIcon, AdvancedIcon } from '~/components/icon/icon';
import { openCollectionUpdateDialog } from "~/store/collections/collection-update-actions";
import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-action";
import { openMoveCollectionDialog } from '~/store/collections/collection-move-actions';
import { openCollectionCopyDialog } from '~/store/collections/collection-copy-actions';
import { toggleCollectionTrashed } from "~/store/trash/trash-actions";
-import { detailsPanelActions } from '~/store/details-panel/details-panel-action';
import { openSharingDialog } from "~/store/sharing-dialog/sharing-dialog-actions";
import { openAdvancedTabDialog } from '~/store/advanced-tab/advanced-tab';
import { toggleDetailsPanel } from '~/store/details-panel/details-panel-action';
import { ToggleFavoriteAction } from "~/views-components/context-menu/actions/favorite-action";
import { toggleFavorite } from "~/store/favorites/favorites-actions";
import {
- RenameIcon, ShareIcon, MoveToIcon, CopyIcon, DetailsIcon, ProvenanceGraphIcon,
+ RenameIcon, ShareIcon, MoveToIcon, CopyIcon, DetailsIcon,
AdvancedIcon, RemoveIcon, ReRunProcessIcon, LogIcon, InputIcon, CommandIcon, OutputIcon
} from "~/components/icon/icon";
import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-action";
// SPDX-License-Identifier: AGPL-3.0
import * as React from 'react';
-import { compose } from 'redux';
import { connect } from 'react-redux';
import { openProjectPropertiesDialog } from '~/store/details-panel/details-panel-action';
import { ProjectIcon, RenameIcon } from '~/components/icon/icon';
import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles';
import { User, getUserFullname } from "~/models/user";
import { DropdownMenu } from "~/components/dropdown-menu/dropdown-menu";
-import { Link } from "react-router-dom";
import { UserPanelIcon } from "~/components/icon/icon";
import { DispatchProp, connect } from 'react-redux';
import { logout } from '~/store/auth/auth-action';
import { DropdownMenu } from "~/components/dropdown-menu/dropdown-menu";
import { AdminMenuIcon } from "~/components/icon/icon";
import { DispatchProp, connect } from 'react-redux';
-import { logout } from '~/store/auth/auth-action';
import { RootState } from "~/store/store";
import { openRepositoriesPanel } from "~/store/repositories/repositories-actions";
import * as NavigationAction from '~/store/navigation/navigation-action';
import * as React from 'react';
import { ReactElement } from 'react';
import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles';
-import { Tree, TreeItem, TreeItemStatus } from '~/components/tree/tree';
+import { Tree, TreeItem } from '~/components/tree/tree';
import { ProjectResource } from '~/models/project';
import { ProjectIcon } from '~/components/icon/icon';
import { ArvadosTheme } from '~/common/custom-theme';
// SPDX-License-Identifier: AGPL-3.0
import * as React from 'react';
-import { values, memoize, pipe, pick } from 'lodash/fp';
+import { values, memoize, pipe } from 'lodash/fp';
import { HomeTreePicker } from '~/views-components/projects-tree-picker/home-tree-picker';
import { SharedTreePicker } from '~/views-components/projects-tree-picker/shared-tree-picker';
import { FavoritesTreePicker } from '~/views-components/projects-tree-picker/favorites-tree-picker';
import * as React from 'react';
import { Paper, StyleRulesCallback, withStyles, WithStyles } from '@material-ui/core';
-import { SearchView } from '~/store/search-bar/search-bar-reducer';
import {
SearchBarRecentQueries,
SearchBarRecentQueriesActionProps
// SPDX-License-Identifier: AGPL-3.0
import * as React from 'react';
-import { MenuItem, Select, withStyles, StyleRulesCallback } from '@material-ui/core';
+import { MenuItem, Select } from '@material-ui/core';
import RemoveRedEye from '@material-ui/icons/RemoveRedEye';
import Edit from '@material-ui/icons/Edit';
import Computer from '@material-ui/icons/Computer';
-import { WithStyles } from '@material-ui/core/styles';
import { SelectProps } from '@material-ui/core/Select';
import { SelectItem } from './select-item';
import { PermissionLevel } from '../../models/permission';
import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles';
import { ArvadosTheme } from '~/common/custom-theme';
import { SidePanelTree, SidePanelTreeProps } from '~/views-components/side-panel-tree/side-panel-tree';
-import { compose, Dispatch } from 'redux';
+import { Dispatch } from 'redux';
import { connect } from 'react-redux';
import { navigateFromSidePanel } from '~/store/side-panel/side-panel-action';
import { Grid } from '@material-ui/core';
import { RouteComponentProps } from 'react-router';
import { ArvadosTheme } from '~/common/custom-theme';
import { RootState } from '~/store/store';
-import { MoreOptionsIcon, CollectionIcon, CopyIcon } from '~/components/icon/icon';
+import { MoreOptionsIcon, CollectionIcon } from '~/components/icon/icon';
import { DetailsAttribute } from '~/components/details-attribute/details-attribute';
import { CollectionResource } from '~/models/collection';
import { CollectionPanelFiles } from '~/views-components/collection-panel-files/collection-panel-files';
import { CollectionTagForm } from './collection-tag-form';
import { deleteCollectionTag, navigateToProcess } from '~/store/collection-panel/collection-panel-action';
-import { snackbarActions, SnackbarKind } from '~/store/snackbar/snackbar-actions';
import { getResource } from '~/store/resources/resources';
import { openContextMenu } from '~/store/context-menu/context-menu-actions';
import { ContextMenuKind } from '~/views-components/context-menu/context-menu';
// SPDX-License-Identifier: AGPL-3.0
import * as React from 'react';
-import { StyleRulesCallback, WithStyles, withStyles, Card, CardContent, Button, Typography, Grid, Table, TableHead, TableRow, TableCell, TableBody, Tooltip, IconButton, Checkbox } from '@material-ui/core';
+import { StyleRulesCallback, WithStyles, withStyles, Card, CardContent, Grid, Table, TableHead, TableRow, TableCell, TableBody, Tooltip, IconButton, Checkbox } from '@material-ui/core';
import { ArvadosTheme } from '~/common/custom-theme';
import { MoreOptionsIcon } from '~/components/icon/icon';
import { KeepServiceResource } from '~/models/keep-services';
import * as React from 'react';
import { connect, DispatchProp } from 'react-redux';
-import { Grid, Typography, Button, Select, FormControl } from '@material-ui/core';
+import { Grid, Typography, Button, Select } from '@material-ui/core';
import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles';
import { login, authActions } from '~/store/auth/auth-action';
import { ArvadosTheme } from '~/common/custom-theme';
import { InactivePanel } from '~/views/inactive-panel/inactive-panel';
import { WorkbenchLoadingScreen } from '~/views/workbench/workbench-loading-screen';
import { MainAppBar } from '~/views-components/main-app-bar/main-app-bar';
-import { LinkAccountPanel } from '~/views/link-account-panel/link-account-panel';
type CssRules = 'root';
} from '~/models/workflow';
import { Field } from 'redux-form';
import { ERROR_MESSAGE } from '~/validators/require';
-import { Input, Dialog, DialogTitle, DialogContent, DialogActions, Button, Divider, Grid, WithStyles, Typography } from '@material-ui/core';
+import { Input, Dialog, DialogTitle, DialogContent, DialogActions, Button, Divider, WithStyles, Typography } from '@material-ui/core';
import { GenericInputProps, GenericInput } from './generic-input';
import { ProjectsTreePicker } from '~/views-components/projects-tree-picker/projects-tree-picker';
import { connect, DispatchProp } from 'react-redux';
} from '~/models/workflow';
import { Field } from 'redux-form';
import { ERROR_MESSAGE } from '~/validators/require';
-import { Input, Dialog, DialogTitle, DialogContent, DialogActions, Button, Divider, Grid, WithStyles, Typography } from '@material-ui/core';
+import { Input, Dialog, DialogTitle, DialogContent, DialogActions, Button, Divider, WithStyles, Typography } from '@material-ui/core';
import { GenericInputProps, GenericInput } from './generic-input';
import { ProjectsTreePicker } from '~/views-components/projects-tree-picker/projects-tree-picker';
import { connect, DispatchProp } from 'react-redux';
import { TextField } from '~/components/text-field/text-field';
import { ExpandIcon } from '~/components/icon/icon';
import * as IntInput from './inputs/int-input';
-import { require } from '~/validators/require';
import { min } from '~/validators/min';
import { optional } from '~/validators/optional';
import { SwitchField } from '~/components/switch-field/switch-field';
import { CommandInputParameter, CWLType, IntCommandInputParameter, BooleanCommandInputParameter, FileCommandInputParameter, DirectoryCommandInputParameter, DirectoryArrayCommandInputParameter, FloatArrayCommandInputParameter, IntArrayCommandInputParameter } from '~/models/workflow';
import { IntInput } from '~/views/run-process-panel/inputs/int-input';
import { StringInput } from '~/views/run-process-panel/inputs/string-input';
-import { StringCommandInputParameter, FloatCommandInputParameter, isPrimitiveOfType, File, Directory, WorkflowInputsData, EnumCommandInputParameter, isArrayOfType, StringArrayCommandInputParameter, FileArrayCommandInputParameter } from '../../models/workflow';
+import { StringCommandInputParameter, FloatCommandInputParameter, isPrimitiveOfType, WorkflowInputsData, EnumCommandInputParameter, isArrayOfType, StringArrayCommandInputParameter, FileArrayCommandInputParameter } from '../../models/workflow';
import { FloatInput } from '~/views/run-process-panel/inputs/float-input';
import { BooleanInput } from './inputs/boolean-input';
import { FileInput } from './inputs/file-input';
import { isValid } from 'redux-form';
import { RUN_PROCESS_INPUTS_FORM } from './run-process-inputs-form';
import { RunProcessAdvancedForm, RUN_PROCESS_ADVANCED_FORM } from './run-process-advanced-form';
-import { createSelector, createStructuredSelector } from 'reselect';
+import { createStructuredSelector } from 'reselect';
import { WorkflowPresetSelect } from '~/views/run-process-panel/workflow-preset-select';
import { selectPreset } from '~/store/run-process-panel/run-process-panel-actions';
import { DataTableDefaultView } from '~/components/data-table-default-view/data-table-default-view';
import { createTree } from '~/models/tree';
import {
- getInitialResourceTypeFilters,
getTrashPanelTypeFilters
} from '~/store/resource-type-filters/resource-type-filters';
// SPDX-License-Identifier: AGPL-3.0
import * as React from 'react';
-import { WithStyles, withStyles, Typography, Tabs, Tab, Paper, Button, Grid } from '@material-ui/core';
+import { WithStyles, withStyles, Tabs, Tab, Paper, Button, Grid } from '@material-ui/core';
import { DataExplorer } from "~/views-components/data-explorer/data-explorer";
import { connect, DispatchProp } from 'react-redux';
import { DataColumns } from '~/components/data-table/data-table';
import * as React from 'react';
import { connect } from 'react-redux';
import { RootState } from '~/store/store';
-import { AuthState } from '~/store/auth/auth-reducer';
import { User } from "~/models/user";
import { getSaltedToken } from '~/store/auth/auth-action-session';
import { Config } from '~/common/config';
// SPDX-License-Identifier: AGPL-3.0
import * as React from 'react';
-import { connect } from 'react-redux';
import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles';
import { Route, Switch } from "react-router";
import { ProjectPanel } from "~/views/project-panel/project-panel";
SHARED = "Shared"
}
-const resourceStatus = (type: string) => {
- switch (type) {
- case ResourceStatus.PUBLIC:
- return "Public";
- case ResourceStatus.PRIVATE:
- return "Private";
- case ResourceStatus.SHARED:
- return "Shared";
- default:
- return "Unknown";
- }
-};
+// TODO: restore filters
+// const resourceStatus = (type: string) => {
+// switch (type) {
+// case ResourceStatus.PUBLIC:
+// return "Public";
+// case ResourceStatus.PRIVATE:
+// return "Private";
+// case ResourceStatus.SHARED:
+// return "Shared";
+// default:
+// return "Unknown";
+// }
+// };
export const workflowPanelColumns: DataColumns<string> = [
{
import { LogEventType } from '~/models/log';
import { addProcessLogsPanelItem } from '../store/process-logs-panel/process-logs-panel-actions';
import { FilterBuilder } from "~/services/api/filter-builder";
-import { snackbarActions, SnackbarKind } from "~/store/snackbar/snackbar-actions";
export const initWebSocket = (config: Config, authService: AuthService, store: RootStore) => {
if (config.websocketUrl) {
{
- "extends": ["tslint:recommended", "tslint-react", "tslint-config-prettier"],
+ "extends": ["tslint:recommended", "tslint-react", "tslint-config-prettier", "tslint-etc"],
"rules": {
"ordered-imports": false,
"member-ordering": false,
"interface-over-type-literal": false,
"no-empty": false,
"no-bitwise": false,
- "ban-types": false
+ "ban-types": false,
+ "no-unused-declaration": true
},
"linterOptions": {
"exclude": [
"config/**/*.js",
"node_modules/**/*.ts",
"src/lib/**",
- "coverage/lcov-report/*.js"
+ "src/**/*.test.ts",
+ "coverage/lcov-report/*.js",
+ "src/common/custom-theme.ts"
]
}
}
"@babel/runtime" "7.0.0"
recompose "^0.29.0"
+"@phenomnomnominal/tsquery@^3.0.0":
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/@phenomnomnominal/tsquery/-/tsquery-3.0.0.tgz#6f2f4dbf6304ff52b12cc7a5b979f20c3794a22a"
+ integrity sha512-SW8lKitBHWJ9fAYkJ9kJivuctwNYCh3BUxLdH0+XiR1GPBiu+7qiZzh8p8jqlj1LgVC1TbvfNFroaEsmYlL8Iw==
+ dependencies:
+ esquery "^1.0.1"
+
"@types/cheerio@*":
version "0.22.9"
resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.9.tgz#b5990152604c2ada749b7f88cab3476f21f39d7b"
version "4.0.1"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
+esquery@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708"
+ integrity sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==
+ dependencies:
+ estraverse "^4.0.0"
+
esrecurse@^4.1.0:
version "4.2.1"
resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf"
dependencies:
estraverse "^4.1.0"
+estraverse@^4.0.0:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d"
+ integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==
+
estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13"
version "1.15.0"
resolved "https://registry.yarnpkg.com/tslint-config-prettier/-/tslint-config-prettier-1.15.0.tgz#76b9714399004ab6831fdcf76d89b73691c812cf"
+tslint-etc@1.6.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/tslint-etc/-/tslint-etc-1.6.0.tgz#99d1ddf79dc5eaefa14ddbd94742197d0ba0ff45"
+ integrity sha512-+7YkUcHhRowg3odIKV8V4FtrHyf2q/jlabSvn4KjMV+Uansncdq10s0MhFPFCYrSv6Eyhh0vUyu3+T/PcuDO/g==
+ dependencies:
+ "@phenomnomnominal/tsquery" "^3.0.0"
+ tslib "^1.8.0"
+ tsutils "^3.0.0"
+ tsutils-etc "^1.0.0"
+
tslint-react@^3.2.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/tslint-react/-/tslint-react-3.6.0.tgz#7f462c95c4a0afaae82507f06517ff02942196a1"
tslib "^1.8.0"
tsutils "^2.27.2"
+tsutils-etc@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/tsutils-etc/-/tsutils-etc-1.1.0.tgz#82ce1c92da29e07d3cde95692d5c5e8dbdc92fd0"
+ integrity sha512-pJlLtLmQPUyGHqY/Pq6EGnpGmQCnnTDZetQ7eWkeQ5xaw4GtfcR1Zt7HMKFHGDDp53HzQfbqQ+7ps6iJbfa9Hw==
+
tsutils@^2.13.1, tsutils@^2.27.2:
version "2.29.0"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99"
dependencies:
tslib "^1.8.1"
+tsutils@^3.0.0:
+ version "3.17.1"
+ resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759"
+ integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==
+ dependencies:
+ tslib "^1.8.1"
+
tty-browserify@0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6"