mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-01 15:37:32 +08:00
Not show group in use indicator when tool is missing
This commit is contained in:
@@ -95,12 +95,25 @@ const cardTitle = computed(() => (group: ServiceCredentialsGroupDetails) => {
|
||||
return `${group.serviceDefinition.name} (v${group.serviceDefinition.version}) - ${group.name}`;
|
||||
});
|
||||
|
||||
/**
|
||||
* Checks if the source tool for a credential group is missing/deleted.
|
||||
* @param {ServiceCredentialsGroupDetails} group - The credential group to check.
|
||||
* @returns {boolean} True if the tool is no longer available.
|
||||
*/
|
||||
const isToolMissing = computed(() => (group: ServiceCredentialsGroupDetails) => {
|
||||
return !getToolForId(group.sourceId);
|
||||
});
|
||||
|
||||
/**
|
||||
* Checks if a credential group is currently in use by any tool.
|
||||
* @param {ServiceCredentialsGroupDetails} group - The credential group to check.
|
||||
* @returns {boolean} True if the group is in use.
|
||||
*/
|
||||
const isGroupInUse = computed(() => (group: ServiceCredentialsGroupDetails) => {
|
||||
if (isToolMissing.value(group)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const userToolKey = userToolsServiceCredentialsStore.getUserToolKey(group.sourceId, group.sourceVersion);
|
||||
const userToolService = userToolsServicesCurrentGroupIds.value[userToolKey];
|
||||
for (const groupId of Object.values(userToolService || {})) {
|
||||
@@ -111,15 +124,6 @@ const isGroupInUse = computed(() => (group: ServiceCredentialsGroupDetails) => {
|
||||
return false;
|
||||
});
|
||||
|
||||
/**
|
||||
* Checks if the source tool for a credential group is missing/deleted.
|
||||
* @param {ServiceCredentialsGroupDetails} group - The credential group to check.
|
||||
* @returns {boolean} True if the tool is no longer available.
|
||||
*/
|
||||
const isToolMissing = computed(() => (group: ServiceCredentialsGroupDetails) => {
|
||||
return !getToolForId(group.sourceId);
|
||||
});
|
||||
|
||||
/**
|
||||
* Gets the display name for a tool, with a fallback for missing/deleted tools.
|
||||
* @param {ServiceCredentialsGroupDetails} group - The credential group.
|
||||
|
||||
Reference in New Issue
Block a user