From 1588028278054ea6bd1c78e9bc3ab35279493434 Mon Sep 17 00:00:00 2001
From: Ahmed Awan
Date: Tue, 12 Mar 2024 17:51:19 -0500
Subject: [PATCH 1/4] [24.0] Purge history from history panel
Clicking on the `Delete History` option from the `HistoryNavigation` dropdown in the `HistoryPanel` now provides you the option to also purge the history from the modal. Fixes https://github.com/galaxyproject/galaxy/issues/17606
---
.../CurrentHistory/HistoryNavigation.vue | 22 ++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/client/src/components/History/CurrentHistory/HistoryNavigation.vue b/client/src/components/History/CurrentHistory/HistoryNavigation.vue
index 79e730bd4faa..0eebb2e48b83 100644
--- a/client/src/components/History/CurrentHistory/HistoryNavigation.vue
+++ b/client/src/components/History/CurrentHistory/HistoryNavigation.vue
@@ -24,6 +24,7 @@ import {
BDropdownDivider,
BDropdownItem,
BDropdownText,
+ BFormCheckbox,
BModal,
BSpinner,
} from "bootstrap-vue";
@@ -63,12 +64,13 @@ interface Props {
historiesLoading?: boolean;
}
-withDefaults(defineProps(), {
+const props = withDefaults(defineProps(), {
title: "Histories",
historiesLoading: false,
});
const showSwitchModal = ref(false);
+const purgeHistory = ref(false);
const userStore = useUserStore();
const historyStore = useHistoryStore();
@@ -76,6 +78,14 @@ const historyStore = useHistoryStore();
const { isAnonymous } = storeToRefs(userStore);
const { totalHistoryCount } = storeToRefs(historyStore);
+function onDelete() {
+ if (purgeHistory.value) {
+ historyStore.deleteHistory(props.history.id, true);
+ } else {
+ historyStore.deleteHistory(props.history.id, false);
+ }
+}
+
function userTitle(title: string) {
if (isAnonymous.value) {
return localize("Log in to") + " " + localize(title);
@@ -264,8 +274,14 @@ function userTitle(title: string) {
id="delete-history-modal"
title="Delete History?"
title-tag="h2"
- @ok="historyStore.deleteHistory(history.id, false)">
- Really delete the current history?
+ @ok="onDelete"
+ @show="purgeHistory = false">
+
+ Do you also want to purge the history {{ history.name }}
+
+
+ Purge history
+
Date: Tue, 12 Mar 2024 17:57:04 -0500
Subject: [PATCH 2/4] remove unused purge history modal
---
.../History/CurrentHistory/HistoryNavigation.vue | 8 --------
1 file changed, 8 deletions(-)
diff --git a/client/src/components/History/CurrentHistory/HistoryNavigation.vue b/client/src/components/History/CurrentHistory/HistoryNavigation.vue
index 0eebb2e48b83..ea8bce71f748 100644
--- a/client/src/components/History/CurrentHistory/HistoryNavigation.vue
+++ b/client/src/components/History/CurrentHistory/HistoryNavigation.vue
@@ -283,13 +283,5 @@ function userTitle(title: string) {
Purge history
-
-
- Really delete the current history permanently? This cannot be undone.
-
From 6a33805d94cf87ef7c94fd124c2a701941ef656b Mon Sep 17 00:00:00 2001
From: Ahmed Hamid Awan
Date: Tue, 12 Mar 2024 18:36:27 -0500
Subject: [PATCH 3/4] Update
client/src/components/History/CurrentHistory/HistoryNavigation.vue
Co-authored-by: Dannon
---
.../src/components/History/CurrentHistory/HistoryNavigation.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/client/src/components/History/CurrentHistory/HistoryNavigation.vue b/client/src/components/History/CurrentHistory/HistoryNavigation.vue
index ea8bce71f748..a2c0f7b3a0d4 100644
--- a/client/src/components/History/CurrentHistory/HistoryNavigation.vue
+++ b/client/src/components/History/CurrentHistory/HistoryNavigation.vue
@@ -277,7 +277,7 @@ function userTitle(title: string) {
@ok="onDelete"
@show="purgeHistory = false">
- Do you also want to purge the history {{ history.name }}
+ Do you also want to permanently delete the history {{ history.name }}
Purge history
From ac6ca59baa83fccd7e9b02322c163e6b0a0bcbc7 Mon Sep 17 00:00:00 2001
From: Ahmed Hamid Awan
Date: Tue, 12 Mar 2024 18:37:02 -0500
Subject: [PATCH 4/4] Update
client/src/components/History/CurrentHistory/HistoryNavigation.vue
Co-authored-by: Dannon
---
.../src/components/History/CurrentHistory/HistoryNavigation.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/client/src/components/History/CurrentHistory/HistoryNavigation.vue b/client/src/components/History/CurrentHistory/HistoryNavigation.vue
index a2c0f7b3a0d4..1caa443ec266 100644
--- a/client/src/components/History/CurrentHistory/HistoryNavigation.vue
+++ b/client/src/components/History/CurrentHistory/HistoryNavigation.vue
@@ -280,7 +280,7 @@ function userTitle(title: string) {
Do you also want to permanently delete the history {{ history.name }}
- Purge history
+ Yes, permanently delete this history.