Skip to content
Snippets Groups Projects
Verified Commit 96df9598 authored by Daniel Göbel's avatar Daniel Göbel
Browse files

Migrate t new service architecture of CloWM

#32
parent 9aabe703
No related branches found
No related tags found
2 merge requests!84Remove development branch,!27Resolve "Migrate to new service architecture"
Showing
with 782 additions and 21 deletions
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ValidationError = {
loc: Array<(string | number)>;
msg: string;
type: string;
};
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type WorkflowExecutionIn = {
/**
* Workflow version git commit hash
*/
workflow_version_id: string;
/**
* Optional notes for this workflow execution
*/
notes?: string;
/**
* Parameters for this workflow
*/
parameters: any;
/**
* Bucket where to save the Nextflow report. If None, no report will be generated
*/
report_output_bucket?: string;
};
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { WorkflowExecutionStatus } from './WorkflowExecutionStatus';
export type WorkflowExecutionOut = {
/**
* Workflow version git commit hash
*/
workflow_version_id: string;
/**
* Optional notes for this workflow execution
*/
notes?: string;
/**
* ID of the workflow execution
*/
execution_id: string;
/**
* UID of user who started the workflow
*/
user_id: string;
/**
* Start time of the workflow execution
*/
start_time: string;
/**
* End time of the workflow execution
*/
end_time?: string;
/**
* Status of the workflow execution
*/
status: WorkflowExecutionStatus;
};
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
/**
* Enumeration for the status on a workflow execution.
*/
export enum WorkflowExecutionStatus {
PENDING = 'PENDING',
SCHEDULED = 'SCHEDULED',
RUNNING = 'RUNNING',
CANCELED = 'CANCELED',
SUCCESS = 'SUCCESS',
ERROR = 'ERROR',
}
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { WorkflowVersionReduced } from './WorkflowVersionReduced';
export type WorkflowOut = {
/**
* Short descriptive name of the workflow
*/
name: string;
/**
* Short description of the workflow
*/
short_description: string;
/**
* URL to the Git repository belonging to this workflow
*/
repository_url: string;
/**
* Id of the workflow
*/
workflow_id: string;
/**
* Versions of the workflow
*/
versions: Array<WorkflowVersionReduced>;
};
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Status } from './Status';
export type WorkflowVersionFull = {
/**
* Status of the workflow version
*/
status: Status;
/**
* Version of the Workflow. Should follow semantic versioning
*/
version: string;
/**
* Hash of the git commit
*/
git_commit_hash: string;
/**
* URL of the icon for this workflow version
*/
icon_url?: string;
/**
* Timestamp when the version was created
*/
created_at: string;
/**
* ID of the corresponding workflow
*/
workflow_id: string;
/**
* URL to download README.md from
*/
readme_url: string;
/**
* URL to download CHAnGELOG.md from
*/
changelog_url: string;
/**
* URL to download nextflow_schema.json from
*/
parameter_schema_url: string;
};
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Status } from './Status';
export type WorkflowVersionReduced = {
/**
* Status of the workflow version
*/
status: Status;
/**
* Version of the Workflow. Should follow semantic versioning
*/
version: string;
/**
* Hash of the git commit
*/
git_commit_hash: string;
/**
* URL of the icon for this workflow version
*/
icon_url?: string;
/**
* Timestamp when the version was created
*/
created_at: string;
};
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Status } from './Status';
export type WorkflowVersionStatus = {
/**
* Status of the workflow version
*/
status: Status;
};
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { S3Key } from '../models/S3Key';
import type { User } from '../models/User';
import type { DevWorkflowExecutionIn } from '../models/DevWorkflowExecutionIn';
import type { WorkflowExecutionIn } from '../models/WorkflowExecutionIn';
import type { WorkflowExecutionOut } from '../models/WorkflowExecutionOut';
import type { WorkflowExecutionStatus } from '../models/WorkflowExecutionStatus';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class UserService {
export class WorkflowExecutionService {
/**
* Get the logged in user
* Return the user associated with the used JWT.
* Get all workflow executions
* Get all workflow executions.
*
* @returns User Successful Response
* Permission "workflow_execution:list" required, if 'user_id' is the same as the current user,
* otherwise "workflow_execution:list_all" required.
* @param userId Filter for workflow executions by a user. If none, Permission 'workflow_execution:read_any' required.
* @param executionStatus Filter for status of workflow execution
* @param workflowVersionId Filter for workflow version
* @returns WorkflowExecutionOut Successful Response
* @throws ApiError
*/
public static userGetLoggedInUser(): CancelablePromise<User> {
public static workflowExecutionListWorkflowExecutions(
userId?: string,
executionStatus?: Array<WorkflowExecutionStatus>,
workflowVersionId?: string,
): CancelablePromise<Array<WorkflowExecutionOut>> {
return __request(OpenAPI, {
method: 'GET',
url: '/users/me',
errors: {
400: `Error decoding JWT Token`,
403: `Not authenticated`,
404: `Entity not Found`,
},
});
}
/**
* Search for users by their name
* Return the users that have a specific substring in their name.
*
* @param nameLike
* @returns User Successful Response
* @throws ApiError
*/
public static userSearchUsers(
nameLike: string,
): CancelablePromise<Array<User>> {
return __request(OpenAPI, {
method: 'GET',
url: '/users/',
url: '/workflow_executions',
query: {
'name_like': nameLike,
'user_id': userId,
'execution_status': executionStatus,
'workflow_version_id': workflowVersionId,
},
errors: {
400: `Error decoding JWT Token`,
......@@ -56,22 +47,23 @@ export class UserService {
}
/**
* Get a user by its uid
* Return the user with the specific uid. A user can only view himself.
* Start a new workflow execution
* Start a new workflow execution. Workflow versions wit status `DEPRECATED` or `DENIED` can't be started.
*
* @param uid UID of a user
* @returns User Successful Response
* Permission "workflow_execution:start" required if workflow versions status is `PUBLISHED`,
* otherwise "workflow_execution:start_unpublished" required.
* @param requestBody
* @returns WorkflowExecutionOut Successful Response
* @throws ApiError
*/
public static userGetUser(
uid: string,
): CancelablePromise<User> {
public static workflowExecutionStartWorkflow(
requestBody: WorkflowExecutionIn,
): CancelablePromise<WorkflowExecutionOut> {
return __request(OpenAPI, {
method: 'GET',
url: '/users/{uid}',
path: {
'uid': uid,
},
method: 'POST',
url: '/workflow_executions',
body: requestBody,
mediaType: 'application/json',
errors: {
400: `Error decoding JWT Token`,
403: `Not authenticated`,
......@@ -82,22 +74,22 @@ export class UserService {
}
/**
* Get the S3 Access keys from a user
* Get all the S3 Access keys for a specific user.
* Start a workflow execution with arbitrary git repository
* Start a new workflow execution from an arbitrary git repository.
*
* @param uid UID of a user
* @returns S3Key Successful Response
* Permission "workflow:create" required.
* @param requestBody
* @returns WorkflowExecutionOut Successful Response
* @throws ApiError
*/
public static keyGetUserKeys(
uid: string,
): CancelablePromise<Array<S3Key>> {
public static workflowExecutionStartArbitraryWorkflow(
requestBody: DevWorkflowExecutionIn,
): CancelablePromise<WorkflowExecutionOut> {
return __request(OpenAPI, {
method: 'GET',
url: '/users/{uid}/keys',
path: {
'uid': uid,
},
method: 'POST',
url: '/workflow_executions/arbitrary',
body: requestBody,
mediaType: 'application/json',
errors: {
400: `Error decoding JWT Token`,
403: `Not authenticated`,
......@@ -108,21 +100,23 @@ export class UserService {
}
/**
* Create a Access key for a user
* Create a S3 Access key for a specific user.
* Get a workflow execution
* Get a specific workflow execution.
*
* @param uid UID of a user
* @returns S3Key Successful Response
* Permission "workflow_execution:read" required if the current user started the workflow execution,
* otherwise "workflow_execution:read_any" required.
* @param eid ID of a workflow execution.
* @returns WorkflowExecutionOut Successful Response
* @throws ApiError
*/
public static keyCreateUserKey(
uid: string,
): CancelablePromise<S3Key> {
public static workflowExecutionGetWorkflowExecution(
eid: string,
): CancelablePromise<WorkflowExecutionOut> {
return __request(OpenAPI, {
method: 'POST',
url: '/users/{uid}/keys',
method: 'GET',
url: '/workflow_executions/{eid}',
path: {
'uid': uid,
'eid': eid,
},
errors: {
400: `Error decoding JWT Token`,
......@@ -134,24 +128,23 @@ export class UserService {
}
/**
* Get a specific S3 Access key from a user
* Get a specific S3 Access Key for a specific user.
* Delete a workflow execution
* Delete a specific workflow execution.
*
* @param accessId ID of the S3 access key
* @param uid UID of a user
* @returns S3Key Successful Response
* Permission "workflow_execution:delete" required if the current user started the workflow execution,
* otherwise "workflow_execution:delete_any" required.
* @param eid ID of a workflow execution.
* @returns void
* @throws ApiError
*/
public static keyGetUserKey(
accessId: string,
uid: string,
): CancelablePromise<S3Key> {
public static workflowExecutionDeleteWorkflowExecution(
eid: string,
): CancelablePromise<void> {
return __request(OpenAPI, {
method: 'GET',
url: '/users/{uid}/keys/{access_id}',
method: 'DELETE',
url: '/workflow_executions/{eid}',
path: {
'access_id': accessId,
'uid': uid,
'eid': eid,
},
errors: {
400: `Error decoding JWT Token`,
......@@ -163,24 +156,23 @@ export class UserService {
}
/**
* Delete a specific S3 Access key from a user
* Delete a specific S3 Access key for a specific user.
* Cancel a workflow execution
* Cancel a running workflow execution.
*
* @param accessId ID of the S3 access key
* @param uid UID of a user
* Permission "workflow_execution:cancel" required if the current user started the workflow execution,
* otherwise "workflow_execution:cancel_any" required.
* @param eid ID of a workflow execution.
* @returns void
* @throws ApiError
*/
public static keyDeleteUserKey(
accessId: string,
uid: string,
public static workflowExecutionCancelWorkflowExecution(
eid: string,
): CancelablePromise<void> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/users/{uid}/keys/{access_id}',
method: 'POST',
url: '/workflow_executions/{eid}/cancel',
path: {
'access_id': accessId,
'uid': uid,
'eid': eid,
},
errors: {
400: `Error decoding JWT Token`,
......
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Body_Workflow_create_workflow } from '../models/Body_Workflow_create_workflow';
import type { Body_Workflow_update_workflow } from '../models/Body_Workflow_update_workflow';
import type { Status } from '../models/Status';
import type { WorkflowOut } from '../models/WorkflowOut';
import type { WorkflowVersionFull } from '../models/WorkflowVersionFull';
import type { WorkflowVersionStatus } from '../models/WorkflowVersionStatus';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class WorkflowService {
/**
* List workflows
* List all workflows.
*
* Permission "workflow:list" required.
* @param nameSubstring Filter workflows by a substring in their name.
* @param filterUnpublished Filter Workflows with unpublished versions. Permission 'Workflow:list_filter' required
* @returns WorkflowOut Successful Response
* @throws ApiError
*/
public static workflowListWorkflows(
nameSubstring?: string,
filterUnpublished: boolean = false,
): CancelablePromise<Array<WorkflowOut>> {
return __request(OpenAPI, {
method: 'GET',
url: '/workflows',
query: {
'name_substring': nameSubstring,
'filter_unpublished': filterUnpublished,
},
errors: {
400: `Error decoding JWT Token`,
403: `Not authenticated`,
404: `Entity not Found`,
422: `Validation Error`,
},
});
}
/**
* Create a new workflow
* Create a new workflow.
*
* Permission "workflow:create" required.
* @param formData
* @returns WorkflowOut Successful Response
* @throws ApiError
*/
public static workflowCreateWorkflow(
formData: Body_Workflow_create_workflow,
): CancelablePromise<WorkflowOut> {
return __request(OpenAPI, {
method: 'POST',
url: '/workflows',
formData: formData,
mediaType: 'multipart/form-data',
errors: {
400: `Error decoding JWT Token`,
403: `Not authenticated`,
404: `Entity not Found`,
422: `Validation Error`,
},
});
}
/**
* Get a workflow
* Get a specific workflow.
*
* Permission "workflow: read" required.
* @param wid ID of a workflow
* @param versionStatus Which versions of the workflow to include in the response. Permission 'workflow:read_any' required if you are not the developer of this workflow. Default PUBLISHED and DEPRECATED
* @returns WorkflowOut Successful Response
* @throws ApiError
*/
public static workflowGetWorkflow(
wid: string,
versionStatus?: Array<Status>,
): CancelablePromise<WorkflowOut> {
return __request(OpenAPI, {
method: 'GET',
url: '/workflows/{wid}',
path: {
'wid': wid,
},
query: {
'version_status': versionStatus,
},
errors: {
400: `Error decoding JWT Token`,
403: `Not authenticated`,
404: `Entity not Found`,
422: `Validation Error`,
},
});
}
/**
* Delete a workflow
* Delete a workflow.
*
* Permission "workflow:delete" required.
* @param wid ID of a workflow
* @returns void
* @throws ApiError
*/
public static workflowDeleteWorkflow(
wid: string,
): CancelablePromise<void> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/workflows/{wid}',
path: {
'wid': wid,
},
errors: {
400: `Error decoding JWT Token`,
403: `Not authenticated`,
404: `Entity not Found`,
422: `Validation Error`,
},
});
}
/**
* Update a workflow
* Create a new workflow version.
*
* Permission "workflow:update" required.
* @param wid ID of a workflow
* @param formData
* @returns WorkflowVersionFull Successful Response
* @throws ApiError
*/
public static workflowUpdateWorkflow(
wid: string,
formData: Body_Workflow_update_workflow,
): CancelablePromise<WorkflowVersionFull> {
return __request(OpenAPI, {
method: 'POST',
url: '/workflows/{wid}/update',
path: {
'wid': wid,
},
formData: formData,
mediaType: 'multipart/form-data',
errors: {
400: `Error decoding JWT Token`,
403: `Not authenticated`,
404: `Entity not Found`,
422: `Validation Error`,
},
});
}
/**
* Get all versions of a workflow
* List all versions of a Workflow.
*
* Permission "workflow:list" required.
* @param wid ID of a workflow
* @param versionStatus Which versions of the workflow to include in the response. Permission 'workflow:list_filter' required if you are not the developer of this workflow. Default PUBLISHED and DEPRECATED
* @returns WorkflowVersionFull Successful Response
* @throws ApiError
*/
public static workflowVersionListWorkflowVersion(
wid: string,
versionStatus?: Array<Status>,
): CancelablePromise<Array<WorkflowVersionFull>> {
return __request(OpenAPI, {
method: 'GET',
url: '/workflows/{wid}/versions',
path: {
'wid': wid,
},
query: {
'version_status': versionStatus,
},
errors: {
400: `Error decoding JWT Token`,
403: `Not authenticated`,
404: `Entity not Found`,
422: `Validation Error`,
},
});
}
/**
* Get a workflow version
* Get a specific version of a workflow.
*
* Permission "workflow:read" required if the version is public or you are the developer of the workflow,
* otherwise "workflow:read_any"
* @param gitCommitHash Git commit git_commit_hash of specific version or 'latest'.
* @param wid ID of a workflow
* @returns WorkflowVersionFull Successful Response
* @throws ApiError
*/
public static workflowVersionGetWorkflowVersion(
gitCommitHash: string,
wid: string,
): CancelablePromise<WorkflowVersionFull> {
return __request(OpenAPI, {
method: 'GET',
url: '/workflows/{wid}/versions/{git_commit_hash}',
path: {
'git_commit_hash': gitCommitHash,
'wid': wid,
},
errors: {
400: `Error decoding JWT Token`,
403: `Not authenticated`,
404: `Entity not Found`,
422: `Validation Error`,
},
});
}
/**
* Update status of workflow version
* Update the status of a workflow version.
*
* Permission "workflow:update_status"
* @param gitCommitHash Git commit git_commit_hash of specific version.
* @param wid ID of a workflow
* @param requestBody
* @returns WorkflowVersionFull Successful Response
* @throws ApiError
*/
public static workflowVersionUpdateWorkflowVersionStatus(
gitCommitHash: string,
wid: string,
requestBody: WorkflowVersionStatus,
): CancelablePromise<WorkflowVersionFull> {
return __request(OpenAPI, {
method: 'PATCH',
url: '/workflows/{wid}/versions/{git_commit_hash}/status',
path: {
'git_commit_hash': gitCommitHash,
'wid': wid,
},
body: requestBody,
mediaType: 'application/json',
errors: {
400: `Error decoding JWT Token`,
403: `Not authenticated`,
404: `Entity not Found`,
422: `Validation Error`,
},
});
}
}
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Status } from '../models/Status';
import type { WorkflowVersionFull } from '../models/WorkflowVersionFull';
import type { WorkflowVersionStatus } from '../models/WorkflowVersionStatus';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class WorkflowVersionService {
/**
* Get all versions of a workflow
* List all versions of a Workflow.
*
* Permission "workflow:list" required.
* @param wid ID of a workflow
* @param versionStatus Which versions of the workflow to include in the response. Permission 'workflow:list_filter' required if you are not the developer of this workflow. Default PUBLISHED and DEPRECATED
* @returns WorkflowVersionFull Successful Response
* @throws ApiError
*/
public static workflowVersionListWorkflowVersion(
wid: string,
versionStatus?: Array<Status>,
): CancelablePromise<Array<WorkflowVersionFull>> {
return __request(OpenAPI, {
method: 'GET',
url: '/workflows/{wid}/versions',
path: {
'wid': wid,
},
query: {
'version_status': versionStatus,
},
errors: {
400: `Error decoding JWT Token`,
403: `Not authenticated`,
404: `Entity not Found`,
422: `Validation Error`,
},
});
}
/**
* Get a workflow version
* Get a specific version of a workflow.
*
* Permission "workflow:read" required if the version is public or you are the developer of the workflow,
* otherwise "workflow:read_any"
* @param gitCommitHash Git commit git_commit_hash of specific version or 'latest'.
* @param wid ID of a workflow
* @returns WorkflowVersionFull Successful Response
* @throws ApiError
*/
public static workflowVersionGetWorkflowVersion(
gitCommitHash: string,
wid: string,
): CancelablePromise<WorkflowVersionFull> {
return __request(OpenAPI, {
method: 'GET',
url: '/workflows/{wid}/versions/{git_commit_hash}',
path: {
'git_commit_hash': gitCommitHash,
'wid': wid,
},
errors: {
400: `Error decoding JWT Token`,
403: `Not authenticated`,
404: `Entity not Found`,
422: `Validation Error`,
},
});
}
/**
* Update status of workflow version
* Update the status of a workflow version.
*
* Permission "workflow:update_status"
* @param gitCommitHash Git commit git_commit_hash of specific version.
* @param wid ID of a workflow
* @param requestBody
* @returns WorkflowVersionFull Successful Response
* @throws ApiError
*/
public static workflowVersionUpdateWorkflowVersionStatus(
gitCommitHash: string,
wid: string,
requestBody: WorkflowVersionStatus,
): CancelablePromise<WorkflowVersionFull> {
return __request(OpenAPI, {
method: 'PATCH',
url: '/workflows/{wid}/versions/{git_commit_hash}/status',
path: {
'git_commit_hash': gitCommitHash,
'wid': wid,
},
body: requestBody,
mediaType: 'application/json',
errors: {
400: `Error decoding JWT Token`,
403: `Not authenticated`,
404: `Entity not Found`,
422: `Validation Error`,
},
});
}
}
......@@ -3,7 +3,7 @@ import type {
BucketOut,
BucketPermissionIn,
BucketPermissionOut,
} from "@/client";
} from "@/client/s3proxy";
import BootstrapIcon from "@/components/BootstrapIcon.vue";
import PermissionModal from "@/components/Modals/PermissionModal.vue";
import BucketDetailModal from "@/components/Modals/BucketDetailModal.vue";
......@@ -73,7 +73,7 @@ onMounted(() => {
</div>
<div v-else>
<router-link
class="list-group-item list-group-item-action text-nowrap d-flex justify-content-between align-items-center"
class="list-group-item list-group-item-action d-flex justify-content-between align-items-center"
:class="{
active: props.active,
rounded: !props.active,
......@@ -85,7 +85,7 @@ onMounted(() => {
params: { bucketName: bucket.name, subFolders: [] },
}"
>
{{ bucket.name }}
<span class="text-truncate" style="width: 80%">{{ bucket.name }}</span>
<div>
<bootstrap-icon
v-if="props.active && permission == null"
......
<script setup lang="ts">
import { onMounted, reactive, watch, computed } from "vue";
import type { ComputedRef } from "vue";
import type { S3ObjectMetaInformation, BucketPermissionOut } from "@/client";
import type {
S3ObjectMetaInformation,
BucketPermissionOut,
} from "@/client/s3proxy";
import type {
FolderTree,
S3PseudoFolder,
S3ObjectWithFolder,
} from "@/types/PseudoFolder";
import { ObjectService } from "@/client";
import { ObjectService } from "@/client/s3proxy";
import BootstrapIcon from "@/components/BootstrapIcon.vue";
import { filesize } from "filesize";
import dayjs from "dayjs";
......
<script setup lang="ts">
import BootstrapModal from "@/components/Modals/BootstrapModal.vue";
import type { BucketOut } from "@/client";
import type { BucketOut } from "@/client/s3proxy";
import dayjs from "dayjs";
import { filesize } from "filesize";
......
......@@ -4,7 +4,7 @@ import { CopyObjectCommand } from "@aws-sdk/client-s3";
import BootstrapModal from "@/components/Modals/BootstrapModal.vue";
import { Modal, Toast } from "bootstrap";
import { onMounted, reactive, watch } from "vue";
import type { S3ObjectMetaInformation } from "@/client";
import type { S3ObjectMetaInformation } from "@/client/s3proxy";
import dayjs from "dayjs";
import { useBucketStore } from "@/stores/buckets";
......
<script setup lang="ts">
import type { BucketIn } from "@/client";
import type { BucketIn } from "@/client/s3proxy";
import { reactive, onMounted } from "vue";
import BootstrapModal from "@/components/Modals/BootstrapModal.vue";
import { useRouter } from "vue-router";
......
......@@ -4,7 +4,7 @@ import { PutObjectCommand } from "@aws-sdk/client-s3";
import BootstrapModal from "@/components/Modals/BootstrapModal.vue";
import { computed, onMounted, reactive } from "vue";
import type { ComputedRef } from "vue";
import type { S3ObjectMetaInformation } from "@/client";
import type { S3ObjectMetaInformation } from "@/client/s3proxy";
import dayjs from "dayjs";
import { Modal, Toast } from "bootstrap";
......
<script setup lang="ts">
import BootstrapModal from "@/components/Modals/BootstrapModal.vue";
import type { S3ObjectMetaInformation } from "@/client";
import type { S3ObjectMetaInformation } from "@/client/s3proxy";
import dayjs from "dayjs";
import { filesize } from "filesize";
......
<script setup lang="ts">
import type { BucketPermissionIn, BucketPermissionOut } from "@/client";
import type { BucketPermissionIn, BucketPermissionOut } from "@/client/s3proxy";
import type { FolderTree } from "@/types/PseudoFolder";
import { reactive } from "vue";
import { BucketPermissionsService } from "@/client";
import { BucketPermissionService } from "@/client/s3proxy";
import { onBeforeMount, watch } from "vue";
import BootstrapModal from "@/components/Modals/BootstrapModal.vue";
import PermissionModal from "@/components/Modals/PermissionModal.vue";
......@@ -57,7 +57,7 @@ watch(
// -----------------------------------------------------------------------------
function updateBucketPermissions(bucketName: string) {
state.loading = true;
BucketPermissionsService.bucketPermissionsListPermissionsPerBucket(bucketName)
BucketPermissionService.bucketPermissionListPermissionsPerBucket(bucketName)
.then((permissions) => {
state.permissions = permissions;
})
......
......@@ -9,11 +9,11 @@ import type {
BucketPermissionOut,
BucketPermissionIn,
BucketPermissionParameters,
User,
} from "@/client";
} from "@/client/s3proxy";
import type { User } from "@/client/auth";
import type { FolderTree } from "@/types/PseudoFolder";
import type { ComputedRef, Ref } from "vue";
import { PermissionEnum, BucketPermissionsService } from "@/client";
import { Permission, BucketPermissionService } from "@/client/s3proxy";
import { Toast } from "bootstrap";
import BootstrapIcon from "@/components/BootstrapIcon.vue";
......@@ -205,7 +205,7 @@ function formSubmit() {
}
formState.loading = true;
const serverAnswerPromise = editPermission.value
? BucketPermissionsService.bucketPermissionsUpdatePermission(
? BucketPermissionService.bucketPermissionUpdatePermission(
permission.uid,
permission.bucket_name,
{
......@@ -215,11 +215,11 @@ function formSubmit() {
file_prefix: tempPermission.file_prefix,
} as BucketPermissionParameters
)
: BucketPermissionsService.bucketPermissionsCreatePermission(
: BucketPermissionService.bucketPermissionCreatePermission(
tempPermission
);
serverAnswerPromise
.then((permission) => {
.then((permission: BucketPermissionOut) => {
if (editPermission.value) {
emit("permission-edited", permission);
} else {
......@@ -246,7 +246,7 @@ function formSubmit() {
function confirmedDeletePermission(bucketName: string, uid: string) {
if (!formState.loading) {
formState.loading = true;
BucketPermissionsService.bucketPermissionsDeletePermissionForBucket(
BucketPermissionService.bucketPermissionDeletePermissionForBucket(
bucketName,
uid
)
......@@ -423,7 +423,7 @@ onMounted(() => {
v-model="permission.permission"
>
<option disabled selected>Select one...</option>
<option v-for="perm in PermissionEnum" :key="perm" :value="perm">
<option v-for="perm in Permission" :key="perm" :value="perm">
{{ perm.toLowerCase() }}
</option>
</select>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment