diff --git a/client/src/api/schema/schema.ts b/client/src/api/schema/schema.ts index 89116fec0911..697f187d4188 100644 --- a/client/src/api/schema/schema.ts +++ b/client/src/api/schema/schema.ts @@ -1592,6 +1592,14 @@ export interface paths { /** Remove the object from user's favorites */ delete: operations["remove_favorite_api_users__user_id__favorites__object_type___object_id__delete"]; }; + "/api/users/{user_id}/recalculate_disk_usage": { + /** Triggers a recalculation of the current user disk usage. */ + put: operations["recalculate_disk_usage_by_user_id_api_users__user_id__recalculate_disk_usage_put"]; + }; + "/api/users/{user_id}/send_activation_email": { + /** Sends activation email to user. */ + post: operations["send_activation_email_api_users__user_id__send_activation_email_post"]; + }; "/api/users/{user_id}/theme/{theme}": { /** Set the user's theme choice */ put: operations["set_theme_api_users__user_id__theme__theme__put"]; @@ -18988,6 +18996,62 @@ export interface operations { }; }; }; + recalculate_disk_usage_by_user_id_api_users__user_id__recalculate_disk_usage_put: { + /** Triggers a recalculation of the current user disk usage. */ + parameters: { + /** @description The user ID that will be used to effectively make this API call. Only admins and designated users can make API calls on behalf of other users. */ + header?: { + "run-as"?: string; + }; + /** @description The ID of the user to get. */ + path: { + user_id: string; + }; + }; + responses: { + /** @description The asynchronous task summary to track the task state. */ + 200: { + content: { + "application/json": components["schemas"]["AsyncTaskResultSummary"]; + }; + }; + /** @description The background task was submitted but there is no status tracking ID available. */ + 204: never; + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + send_activation_email_api_users__user_id__send_activation_email_post: { + /** Sends activation email to user. */ + parameters: { + /** @description The user ID that will be used to effectively make this API call. Only admins and designated users can make API calls on behalf of other users. */ + header?: { + "run-as"?: string; + }; + /** @description The ID of the user to get. */ + path: { + user_id: string; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": Record; + }; + }; + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; set_theme_api_users__user_id__theme__theme__put: { /** Set the user's theme choice */ parameters: { diff --git a/client/src/api/users.ts b/client/src/api/users.ts index d3a2a7ac010f..7a59d96ea839 100644 --- a/client/src/api/users.ts +++ b/client/src/api/users.ts @@ -1,7 +1,15 @@ import { fetcher } from "@/api/schema"; -export const recalculateDiskUsage = fetcher.path("/api/users/current/recalculate_disk_usage").method("put").create(); +export const createApiKey = fetcher.path("/api/users/{user_id}/api_key").method("post").create(); +export const deleteUser = fetcher.path("/api/users/{user_id}").method("delete").create(); export const fetchQuotaUsages = fetcher.path("/api/users/{user_id}/usage").method("get").create(); +export const recalculateDiskUsage = fetcher.path("/api/users/current/recalculate_disk_usage").method("put").create(); +export const recalculateDiskUsageByUserId = fetcher + .path("/api/users/{user_id}/recalculate_disk_usage") + .method("put") + .create(); +export const sendActivationEmail = fetcher.path("/api/users/{user_id}/send_activation_email").method("post").create(); +export const undeleteUser = fetcher.path("/api/users/deleted/{user_id}/undelete").method("post").create(); const getUsers = fetcher.path("/api/users").method("get").create(); export async function getAllUsers() { diff --git a/client/src/components/Grid/GridElements/GridBoolean.vue b/client/src/components/Grid/GridElements/GridBoolean.vue new file mode 100644 index 000000000000..c98c590290a3 --- /dev/null +++ b/client/src/components/Grid/GridElements/GridBoolean.vue @@ -0,0 +1,14 @@ + + + diff --git a/client/src/components/Grid/GridElements/GridOperations.vue b/client/src/components/Grid/GridElements/GridOperations.vue index d135109286fc..8f1fae493d6b 100644 --- a/client/src/components/Grid/GridElements/GridOperations.vue +++ b/client/src/components/Grid/GridElements/GridOperations.vue @@ -4,12 +4,17 @@ import { faCaretDown } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; import type { Operation, RowData } from "@/components/Grid/configs/types"; +import { useConfig } from "@/composables/config"; +import type { GalaxyConfiguration } from "@/stores/configurationStore"; library.add(faCaretDown); +const { config, isConfigLoaded } = useConfig(); + interface Props { rowData: RowData; operations: Array; + title: string; } const props = defineProps(); @@ -21,13 +26,13 @@ const emit = defineEmits<{ /** * Availibility of operations might required certain conditions */ -function hasCondition(conditionHandler: (rowData: RowData) => Boolean) { - return conditionHandler ? conditionHandler(props.rowData) : true; +function hasCondition(conditionHandler: (rowData: RowData, config: GalaxyConfiguration) => Boolean) { + return conditionHandler ? conditionHandler(props.rowData, config) : true; }