Skip to content

Commit a68cbf3

Browse files
authored
Merge pull request galaxyproject#21305 from mvdbeek/merge_25_1_dev_17_11
Merge 25.1 into dev
2 parents 3595523 + 0abf58a commit a68cbf3

25 files changed

Lines changed: 447 additions & 317 deletions

File tree

.github/workflows/publish_artifacts.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,3 @@ jobs:
5353
if: "!github.event.release.prerelease"
5454
run: npm publish --provenance --access public
5555
working-directory: 'client'
56-
env:
57-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

client/src/components/History/CurrentHistory/HistoryPanel.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import { useHistoryStore } from "@/stores/historyStore";
1313
import { useUserStore } from "@/stores/userStore";
1414
import { type Alias, getOperatorForAlias } from "@/utils/filtering";
1515
import { setItemDragstart } from "@/utils/setDrag";
16-
import { startWatchingHistory } from "@/watch/watchHistoryProvided";
1716
1817
import { useHistoryDragDrop } from "../../../composables/historyDragDrop";
1918
@@ -329,7 +328,7 @@ function updateContentStats() {
329328
}
330329
331330
function reloadContents() {
332-
startWatchingHistory();
331+
historyStore.startWatchingHistory();
333332
}
334333
335334
function setInvisible(item: HistoryItemSummary) {

client/src/components/RuleCollectionBuilder.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,7 @@
608608
import HotTable from "@handsontable/vue";
609609
import axios from "axios";
610610
import BootstrapVue from "bootstrap-vue";
611+
import { mapActions } from "pinia";
611612
import _ from "underscore";
612613
import Vue from "vue";
613614
@@ -619,7 +620,6 @@ import { getAppRoot } from "@/onload/loadConfig";
619620
import { useHistoryStore } from "@/stores/historyStore";
620621
import _l from "@/utils/localization";
621622
import { errorMessageAsString } from "@/utils/simple-error";
622-
import { startWatchingHistory } from "@/watch/watchHistoryProvided";
623623
624624
import GButton from "./BaseComponents/GButton.vue";
625625
import ColumnSelector from "@/components/RuleBuilder/ColumnSelector.vue";
@@ -1327,6 +1327,7 @@ export default {
13271327
}
13281328
},
13291329
methods: {
1330+
...mapActions(useHistoryStore, ["startWatchingHistory"]),
13301331
restoreRules(event) {
13311332
const json = JSON.parse(event);
13321333
this.rules = json.rules;
@@ -1445,7 +1446,7 @@ export default {
14451446
this.mapping.splice(index, 1);
14461447
},
14471448
refreshAndWait(response) {
1448-
startWatchingHistory();
1449+
this.startWatchingHistory();
14491450
this.waitOnJob(response);
14501451
},
14511452
waitOnJob(response) {
@@ -1461,7 +1462,7 @@ export default {
14611462
"Unknown error encountered while running your upload job, this could be a server issue or a problem with the upload definition.";
14621463
this.doFullJobCheck(jobId);
14631464
} else {
1464-
startWatchingHistory();
1465+
this.startWatchingHistory();
14651466
this.$emit("onCreate", jobResponse.data);
14661467
if (this.oncreate) {
14671468
// legacy non-event handling

client/src/components/Tool/ToolForm.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ import { useJobStore } from "@/stores/jobStore";
121121
import { useTourStore } from "@/stores/tourStore";
122122
import { useUserStore } from "@/stores/userStore";
123123
import { useUserToolsServiceCredentialsStore } from "@/stores/userToolsServiceCredentialsStore";
124-
import { startWatchingHistory } from "@/watch/watchHistoryProvided";
125124
126125
import { getToolFormData, submitJob, updateToolFormData } from "./services";
127126
@@ -309,6 +308,7 @@ export default {
309308
methods: {
310309
...mapActions(useJobStore, ["saveLatestResponse"]),
311310
...mapActions(useTourStore, ["setTour"]),
311+
...mapActions(useHistoryStore, ["startWatchingHistory"]),
312312
emailAllowed(config, user) {
313313
return config.server_mail_configured && !user.isAnonymous;
314314
},
@@ -426,7 +426,7 @@ export default {
426426
this.submissionRequestFailed = false;
427427
this.showExecuting = false;
428428
let changeRoute = false;
429-
startWatchingHistory();
429+
this.startWatchingHistory();
430430
if (jobResponse.produces_entry_points) {
431431
this.showEntryPoints = true;
432432
this.entryPoints = jobResponse.jobs;

client/src/components/Workflow/Invocation/InvocationScrollList.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ function getInvocationBadges(invocation: WorkflowInvocation) {
123123
:title-icon="{ icon: faSitemap }"
124124
:title-n-lines="2"
125125
title-size="text"
126-
:update-time="invocation.create_time"
126+
:update-time="invocation.update_time"
127127
@title-click="workflowName(invocation.workflow_id)"
128128
@click="() => cardClicked(invocation)">
129129
<template v-slot:description>

client/src/components/Workflow/Run/WorkflowRunSuccess.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { computed, onMounted } from "vue";
33
44
import type { WorkflowInvocation } from "@/api/invocations";
5-
import { startWatchingHistory } from "@/watch/watchHistoryProvided";
5+
import { useHistoryStore } from "@/stores/historyStore";
66
77
import Webhook from "@/components/Common/Webhook.vue";
88
import GridInvocation from "@/components/Grid/GridInvocation.vue";
@@ -13,8 +13,10 @@ const props = defineProps<{
1313
invocations: WorkflowInvocation[];
1414
}>();
1515
16+
const historyStore = useHistoryStore();
17+
1618
onMounted(() => {
17-
startWatchingHistory();
19+
historyStore.startWatchingHistory();
1820
});
1921
2022
const targetHistories = computed(() =>

client/src/components/Workflow/WorkflowAnnotation.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ describe("WorkflowAnnotation renders", () => {
165165
const { wrapper } = await mountWorkflowAnnotation("invocation");
166166

167167
const timeInfo = wrapper.find(SELECTORS.TIME_INFO);
168-
expect(timeInfo.text()).toContain("invoked");
168+
expect(timeInfo.text()).toContain("updated");
169169
expect(timeInfo.find(SELECTORS.DATE).attributes("title")).toBe(INVOCATION_TIME);
170170
});
171171
});

client/src/components/Workflow/WorkflowAnnotation.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const workflowTags = computed(() => {
4949
<i v-if="timeElapsed" data-description="workflow annotation time info">
5050
<FontAwesomeIcon :icon="faClock" class="mr-1" />
5151
<span v-localize>
52-
{{ props.invocationUpdateTime ? "invoked" : "edited" }}
52+
{{ props.invocationUpdateTime ? "updated" : "edited" }}
5353
</span>
5454
<UtcDate :date="timeElapsed" mode="elapsed" data-description="workflow annotation date" />
5555
</i>

client/src/composables/keyedCache.test.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,25 @@ describe("useKeyedCache", () => {
5757
expect(fetchItem).not.toHaveBeenCalled();
5858
});
5959

60+
it("should not fetch if the stored item is 0 (or any falsy value)", async () => {
61+
const id = "1";
62+
const item = 0;
63+
64+
fetchItem.mockResolvedValue(item);
65+
66+
const { storedItems, getItemById, isLoadingItem } = useKeyedCache<number>(fetchItem);
67+
68+
storedItems.value[id] = item;
69+
70+
expect(isLoadingItem.value(id)).toBeFalsy();
71+
72+
getItemById.value(id);
73+
74+
expect(isLoadingItem.value(id)).toBeFalsy();
75+
expect(storedItems.value[id]).toEqual(item);
76+
expect(fetchItem).not.toHaveBeenCalled();
77+
});
78+
6079
it("should fetch the item regardless of whether it is already stored if shouldFetch returns true", async () => {
6180
const id = "1";
6281
const item = { id: id, name: "Item 1" };

client/src/composables/keyedCache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type ShouldFetchHandler<T> = (item?: T) => boolean;
2727
* Returns true if the item is not defined.
2828
* @param item The item to check.
2929
*/
30-
const fetchIfAbsent = <T>(item?: T) => !item;
30+
const fetchIfAbsent = <T>(item?: T) => item === undefined;
3131

3232
/**
3333
* A composable that provides a simple key-value cache for items fetched from the server.

0 commit comments

Comments
 (0)