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

Add view to list all available resources in the system

#88
parent 3f9721ff
No related branches found
No related tags found
1 merge request!85Resolve "Add UI for viewing and managing Resources"
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ResourceIn } from '../models/ResourceIn';
import type { ResourceOut } from '../models/ResourceOut';
import type { Status } from '../models/Status';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class ResourceService {
/**
* List resources
* List all resources.
*
* Permission `resource:list` required.
* @param maintainerId Filter for resource by maintainer. If current user is the same as maintainer ID, permission `resource:list` required, otherwise `resource:list_filter`.
* @param versionStatus Which versions of the resource to include in the response. Permission `resource:list_filter` required, unless `maintainer_id` is provided and current user is maintainer, then only permission `resource:list` required. Default `LATEST` and `SYNCHRONIZED`.
* @param nameSubstring
* @returns ResourceOut Successful Response
* @throws ApiError
*/
public static resourceListResources(
maintainerId?: (string | null),
versionStatus?: (Array<Status> | null),
nameSubstring?: (string | null),
): CancelablePromise<Array<ResourceOut>> {
return __request(OpenAPI, {
method: 'GET',
url: '/resources',
query: {
'maintainer_id': maintainerId,
'version_status': versionStatus,
'name_substring': nameSubstring,
},
errors: {
400: `Error decoding JWT Token`,
403: `Not authenticated`,
404: `Entity not Found`,
422: `Validation Error`,
},
});
}
/**
* Request a new resource
* Request a new resources.
*
* Permission `resource:create` required.
* @param requestBody
* @returns ResourceOut Successful Response
* @throws ApiError
*/
public static resourceRequestResource(
requestBody: ResourceIn,
): CancelablePromise<ResourceOut> {
return __request(OpenAPI, {
method: 'POST',
url: '/resources',
body: requestBody,
mediaType: 'application/json',
errors: {
400: `Error decoding JWT Token`,
403: `Not authenticated`,
404: `Entity not Found`,
422: `Validation Error`,
},
});
}
/**
* Get a resource
* Get a specific resource.
*
* Permission `resource:read` required.
* @param rid
* @param versionStatus Which versions of the resource to include in the response. Permission `resource:read_any` required, unless the current user is the maintainer, then only permission `resource:read` required. Default `LATEST` and `SYNCHRONIZED`.
* @returns ResourceOut Successful Response
* @throws ApiError
*/
public static resourceGetResource(
rid: string,
versionStatus?: (Array<Status> | null),
): CancelablePromise<ResourceOut> {
return __request(OpenAPI, {
method: 'GET',
url: '/resources/{rid}',
path: {
'rid': rid,
},
query: {
'version_status': versionStatus,
},
errors: {
400: `Error decoding JWT Token`,
403: `Not authenticated`,
404: `Entity not Found`,
422: `Validation Error`,
},
});
}
/**
* Delete a resource
* Delete a resources.
*
* Permission `resource:delete` required.
* @param rid
* @returns void
* @throws ApiError
*/
public static resourceDeleteResource(
rid: string,
): CancelablePromise<void> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/resources/{rid}',
path: {
'rid': rid,
},
errors: {
400: `Error decoding JWT Token`,
403: `Not authenticated`,
404: `Entity not Found`,
422: `Validation Error`,
},
});
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -6,6 +6,7 @@ export const environment: env = { ...@@ -6,6 +6,7 @@ export const environment: env = {
S3PROXY_API_BASE_URL: windowEnv["s3proxyApiUrl"], S3PROXY_API_BASE_URL: windowEnv["s3proxyApiUrl"],
AUTH_API_BASE_URL: windowEnv["authApiUrl"], AUTH_API_BASE_URL: windowEnv["authApiUrl"],
WORKFLOW_API_BASE_URL: windowEnv["workflowApiUrl"], WORKFLOW_API_BASE_URL: windowEnv["workflowApiUrl"],
RESOURCE_API_BASE_URL: windowEnv["resourceApiUrl"],
DEV_SYSTEM: windowEnv["devSystem"].toLowerCase() === "true", DEV_SYSTEM: windowEnv["devSystem"].toLowerCase() === "true",
}; };
...@@ -14,5 +15,6 @@ type env = { ...@@ -14,5 +15,6 @@ type env = {
S3PROXY_API_BASE_URL: string; S3PROXY_API_BASE_URL: string;
AUTH_API_BASE_URL: string; AUTH_API_BASE_URL: string;
WORKFLOW_API_BASE_URL: string; WORKFLOW_API_BASE_URL: string;
RESOURCE_API_BASE_URL: string;
DEV_SYSTEM: boolean; DEV_SYSTEM: boolean;
}; };
...@@ -31,6 +31,11 @@ const router = createRouter({ ...@@ -31,6 +31,11 @@ const router = createRouter({
name: "s3_keys", name: "s3_keys",
component: () => import("../views/object-storage/S3KeysView.vue"), component: () => import("../views/object-storage/S3KeysView.vue"),
}, },
{
path: "resources",
name: "resources",
component: () => import("../views/resources/ListResourcesView.vue"),
},
{ {
path: "workflow-executions", path: "workflow-executions",
name: "workflow-executions", name: "workflow-executions",
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment