diff --git a/client/src/components/History/CurrentHistory/HistoryPanel.vue b/client/src/components/History/CurrentHistory/HistoryPanel.vue
index 5250251220bf..6705265b40de 100644
--- a/client/src/components/History/CurrentHistory/HistoryPanel.vue
+++ b/client/src/components/History/CurrentHistory/HistoryPanel.vue
@@ -18,7 +18,7 @@
:scope-key="queryKey"
:get-item-key="(item) => item.type_id"
:filter-text="filterText"
- :total-items-in-query="totalItemsInQuery"
+ :total-items-in-query="totalMatchesCount"
@query-selection-break="querySelectionBreak = true">
@@ -63,7 +63,7 @@
:content-selection="selectedItems"
:selection-size="selectionSize"
:is-query-selection="isQuerySelection"
- :total-items-in-query="totalItemsInQuery"
+ :total-items-in-query="totalMatchesCount"
:operation-running.sync="operationRunning"
@update:show-selection="setShowSelection"
@operation-error="onOperationError"
@@ -156,7 +156,7 @@ import LoadingSpan from "components/LoadingSpan";
import { Toast } from "composables/toast";
import { mapActions, mapState, storeToRefs } from "pinia";
import { rewatchHistory } from "store/historyStore/model/watchHistory";
-import { useHistoryItemsStore } from "stores/history/historyItemsStore";
+import { useHistoryItemsStore } from "stores/historyItemsStore";
import { useHistoryStore } from "stores/historyStore";
import { getOperatorForAlias } from "utils/filtering";
import Vue from "vue";
@@ -199,6 +199,11 @@ export default {
showControls: { type: Boolean, default: true },
filterable: { type: Boolean, default: false },
},
+ setup() {
+ const { currentFilterText, currentHistoryId } = storeToRefs(useHistoryStore());
+ const { lastCheckedTime, totalMatchesCount, isWatching } = storeToRefs(useHistoryItemsStore());
+ return { currentFilterText, currentHistoryId, lastCheckedTime, totalMatchesCount, isWatching };
+ },
data() {
return {
filterText: "",
@@ -244,21 +249,6 @@ export default {
itemsLoaded() {
return this.getHistoryItems(this.historyId, this.filterText);
},
- /** @returns {Date} */
- lastChecked() {
- const { getLastCheckedTime } = storeToRefs(useHistoryItemsStore());
- return getLastCheckedTime.value;
- },
- /** @returns {Number} */
- totalItemsInQuery() {
- const { getTotalMatchesCount } = storeToRefs(useHistoryItemsStore());
- return getTotalMatchesCount.value;
- },
- /** @returns {Boolean} */
- isWatching() {
- const { getWatchingVisibility } = storeToRefs(useHistoryItemsStore());
- return getWatchingVisibility.value;
- },
/** @returns {Object} */
formattedSearchError() {
if (this.searchError) {
@@ -278,9 +268,8 @@ export default {
},
/** @returns {String} */
storeFilterText() {
- const { currentFilterText, currentHistoryId } = storeToRefs(useHistoryStore());
- if (this.historyId === currentHistoryId.value) {
- return currentFilterText.value || "";
+ if (this.historyId === this.currentHistoryId) {
+ return this.currentFilterText || "";
} else {
return "";
}
@@ -313,8 +302,8 @@ export default {
offset() {
this.loadHistoryItems();
},
- historyUpdateTime() {
- this.loadHistoryItems();
+ async historyUpdateTime() {
+ await this.loadHistoryItems();
},
},
async mounted() {
@@ -363,9 +352,11 @@ export default {
this.loading = false;
}
},
- onDelete(item, recursive = false) {
+ async onDelete(item, recursive = false) {
+ this.loading = true;
this.setInvisible(item);
- deleteContent(item, { recursive: recursive });
+ await deleteContent(item, { recursive: recursive });
+ this.loading = false;
},
onHideSelection(selectedItems) {
selectedItems.forEach((item) => {
@@ -375,13 +366,17 @@ export default {
onScroll(offset) {
this.offset = offset;
},
- onUndelete(item) {
+ async onUndelete(item) {
this.setInvisible(item);
- updateContentFields(item, { deleted: false });
+ this.loading = true;
+ await updateContentFields(item, { deleted: false });
+ this.loading = false;
},
- onUnhide(item) {
+ async onUnhide(item) {
this.setInvisible(item);
- updateContentFields(item, { visible: true });
+ this.loading = true;
+ await updateContentFields(item, { visible: true });
+ this.loading = false;
},
reloadContents() {
rewatchHistory();
@@ -405,7 +400,7 @@ export default {
this.showDropZone = false;
}
},
- onDrop(evt) {
+ async onDrop(evt) {
this.showDropZone = false;
let data;
try {
@@ -416,18 +411,17 @@ export default {
if (data) {
const dataSource = data.history_content_type === "dataset" ? "hda" : "hdca";
if (data.history_id != this.historyId) {
- copyDataset(data.id, this.historyId, data.history_content_type, dataSource)
- .then(() => {
- if (data.history_content_type === "dataset") {
- Toast.info("Dataset copied to history");
- } else {
- Toast.info("Collection copied to history");
- }
- this.loadHistoryById(this.historyId);
- })
- .catch((error) => {
- this.onError(error);
- });
+ try {
+ await copyDataset(data.id, this.historyId, data.history_content_type, dataSource);
+ if (data.history_content_type === "dataset") {
+ Toast.info("Dataset copied to history");
+ } else {
+ Toast.info("Collection copied to history");
+ }
+ this.loadHistoryById(this.historyId);
+ } catch (error) {
+ this.onError(error);
+ }
}
}
},
diff --git a/client/src/components/History/adapters/HistoryPanelProxy.js b/client/src/components/History/adapters/HistoryPanelProxy.js
index b5b3483d2f6c..1ad3b8f6f966 100644
--- a/client/src/components/History/adapters/HistoryPanelProxy.js
+++ b/client/src/components/History/adapters/HistoryPanelProxy.js
@@ -5,7 +5,7 @@
import Backbone from "backbone";
import { createDatasetCollection } from "components/History/model/queries";
import { watchHistory } from "store/historyStore/model/watchHistory";
-import { useHistoryItemsStore } from "stores/history/historyItemsStore";
+import { useHistoryItemsStore } from "stores/historyItemsStore";
import { useHistoryStore } from "stores/historyStore";
import { buildCollectionModal } from "./buildCollectionModal";
diff --git a/client/src/components/Panels/utilities.ts b/client/src/components/Panels/utilities.ts
index ff75e194b13d..8bda77394f33 100644
--- a/client/src/components/Panels/utilities.ts
+++ b/client/src/components/Panels/utilities.ts
@@ -291,7 +291,7 @@ export function searchToolsByKeys(
? keys.startsWith
: order;
- const wordMatches = actualValueWords.filter((word) => queryWords.includes(word));
+ const wordMatches = Array.from(new Set(actualValueWords.filter((word) => queryWords.includes(word))));
if (!usesDL) {
if (actualValue.match(queryValue)) {
// if string.match() returns true, matching tool found
diff --git a/client/src/components/Tool/ToolForm.vue b/client/src/components/Tool/ToolForm.vue
index bcca2a7c2302..f7b5f7b8182b 100644
--- a/client/src/components/Tool/ToolForm.vue
+++ b/client/src/components/Tool/ToolForm.vue
@@ -107,7 +107,7 @@ import FormElement from "components/Form/FormElement";
import LoadingSpan from "components/LoadingSpan";
import ToolEntryPoints from "components/ToolEntryPoints/ToolEntryPoints";
import { mapActions, mapState } from "pinia";
-import { useHistoryItemsStore } from "stores/history/historyItemsStore";
+import { useHistoryItemsStore } from "stores/historyItemsStore";
import { useJobStore } from "stores/jobStore";
import { refreshContentsWrapper } from "utils/data";
@@ -187,7 +187,7 @@ export default {
computed: {
...mapState(useUserStore, ["currentUser"]),
...mapState(useHistoryStore, ["currentHistoryId"]),
- ...mapState(useHistoryItemsStore, ["getLastUpdateTime"]),
+ ...mapState(useHistoryItemsStore, ["lastUpdateTime"]),
toolName() {
return this.formConfig.name;
},
@@ -225,7 +225,7 @@ export default {
currentHistoryId() {
this.onHistoryChange();
},
- getLastUpdateTime() {
+ lastUpdateTime() {
this.onHistoryChange();
},
},
diff --git a/client/src/components/Workflow/Run/WorkflowRun.vue b/client/src/components/Workflow/Run/WorkflowRun.vue
index fb24d55f5ad8..8ab28c028b09 100644
--- a/client/src/components/Workflow/Run/WorkflowRun.vue
+++ b/client/src/components/Workflow/Run/WorkflowRun.vue
@@ -47,7 +47,7 @@