From b5ff954e2a70ee7de105752b40f43274087549a0 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Fri, 23 Aug 2024 14:40:08 -0400 Subject: [PATCH] Fix resume paused jobs --- .../CurrentHistory/HistoryNavigation.vue | 18 +++++++++++++++++- .../webapps/galaxy/controllers/history.py | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/client/src/components/History/CurrentHistory/HistoryNavigation.vue b/client/src/components/History/CurrentHistory/HistoryNavigation.vue index 1dd671f0e6a0..bbba7cc22b18 100644 --- a/client/src/components/History/CurrentHistory/HistoryNavigation.vue +++ b/client/src/components/History/CurrentHistory/HistoryNavigation.vue @@ -18,6 +18,7 @@ import { faUserLock, } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; +import axios from "axios"; import { BButton, BButtonGroup, @@ -34,9 +35,12 @@ import { computed, ref } from "vue"; import { canMutateHistory, type HistorySummary } from "@/api"; import { iframeRedirect } from "@/components/plugins/legacyNavigation"; +import { useToast } from "@/composables/toast"; +import { getAppRoot } from "@/onload/loadConfig"; import { useHistoryStore } from "@/stores/historyStore"; import { useUserStore } from "@/stores/userStore"; import localize from "@/utils/localization"; +import { rethrowSimple } from "@/utils/simple-error"; import CopyModal from "@/components/History/Modals/CopyModal.vue"; import SelectorModal from "@/components/History/Modals/SelectorModal.vue"; @@ -74,6 +78,8 @@ const props = withDefaults(defineProps(), { const showSwitchModal = ref(false); const purgeHistory = ref(false); +const toast = useToast(); + const userStore = useUserStore(); const historyStore = useHistoryStore(); @@ -111,6 +117,16 @@ function userTitle(title: string) { return localize(title); } } + +async function resumePausedJobs() { + const url = `${getAppRoot()}history/resume_paused_jobs?current=True`; + try { + const response = await axios.get(url); + toast.success(response.data.message); + } catch (e) { + rethrowSimple(e); + } +}