Skip to content

Commit dae3d32

Browse files
authored
Merge pull request galaxyproject#19798 from dannon/drop-cached-job-pref
Make job cache generally available
2 parents 2f6b162 + 7d40e35 commit dae3d32

5 files changed

Lines changed: 2 additions & 47 deletions

File tree

client/src/components/Tool/ToolForm.vue

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@
5353
@onValidation="onValidation" />
5454
</div>
5555

56-
<div
57-
v-if="emailAllowed(config, currentUser) || remapAllowed || reuseAllowed(currentUser)"
58-
class="mt-2 mb-4">
56+
<div class="mt-2 mb-4">
5957
<Heading h2 separator bold size="sm"> Additional Options </Heading>
6058
<FormElement
6159
v-if="emailAllowed(config, currentUser)"
@@ -72,7 +70,6 @@
7270
:help="remapHelp"
7371
type="boolean" />
7472
<FormElement
75-
v-if="reuseAllowed(currentUser)"
7673
id="use_cached_job"
7774
v-model="useCachedJobs"
7875
title="Attempt to re-use jobs with identical parameters?"
@@ -130,7 +127,6 @@ import { startWatchingHistory } from "@/watch/watchHistory";
130127
import ToolRecommendation from "../ToolRecommendation";
131128
import { getToolFormData, submitJob, updateToolFormData } from "./services";
132129
import ToolCard from "./ToolCard";
133-
import { allowCachedJobs } from "./utilities";
134130
135131
import FormSelect from "@/components/Form/Elements/FormSelect.vue";
136132
@@ -269,9 +265,6 @@ export default {
269265
emailAllowed(config, user) {
270266
return config.server_mail_configured && !user.isAnonymous;
271267
},
272-
reuseAllowed(user) {
273-
return allowCachedJobs(user.preferences);
274-
},
275268
onHistoryChange() {
276269
const Galaxy = getGalaxyInstance();
277270
if (this.initialized && Galaxy && Galaxy.currHistoryPanel) {

client/src/components/Tool/utilities.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,3 @@ export function downloadTool(toolId) {
1818
export function openLink(url) {
1919
window.open(url);
2020
}
21-
22-
export function allowCachedJobs(userPreferences) {
23-
if (userPreferences && "extra_user_preferences" in userPreferences) {
24-
const extra_user_preferences = JSON.parse(userPreferences.extra_user_preferences);
25-
const keyCached = "use_cached_job|use_cached_job_checkbox";
26-
const hasCachedJobs = keyCached in extra_user_preferences;
27-
return hasCachedJobs ? ["true", true].includes(extra_user_preferences[keyCached]) : false;
28-
} else {
29-
return false;
30-
}
31-
}

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<FormDisplay :inputs="historyInputs" @onChange="onHistoryInputs" />
3737
</template>
3838
</FormCard>
39-
<FormCard v-if="reuseAllowed(currentUser)" title="Job re-use Options">
39+
<FormCard title="Job re-use Options">
4040
<template v-slot:body>
4141
<FormElement
4242
v-model="useCachedJobs"
@@ -75,7 +75,6 @@ import ButtonSpinner from "components/Common/ButtonSpinner";
7575
import FormCard from "components/Form/FormCard";
7676
import FormDisplay from "components/Form/FormDisplay";
7777
import FormElement from "components/Form/FormElement";
78-
import { allowCachedJobs } from "components/Tool/utilities";
7978
import { mapState } from "pinia";
8079
8180
import { useHistoryStore } from "@/stores/historyStore";
@@ -175,9 +174,6 @@ export default {
175174
},
176175
},
177176
methods: {
178-
reuseAllowed(user) {
179-
return allowCachedJobs(user.preferences);
180-
},
181177
getReplaceParams(inputs) {
182178
return getReplacements(inputs, this.stepData, this.wpData);
183179
},

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@ import { BAlert, BButton, BDropdown, BDropdownForm, BFormCheckbox, BOverlay } fr
55
import { storeToRefs } from "pinia";
66
import { computed, ref, watch } from "vue";
77
8-
import { allowCachedJobs } from "@/components/Tool/utilities";
98
import { isWorkflowInput } from "@/components/Workflow/constants";
109
import { useConfig } from "@/composables/config";
1110
import { usePanels } from "@/composables/usePanels";
1211
import { provideScopedWorkflowStores } from "@/composables/workflowStores";
1312
import { useHistoryStore } from "@/stores/historyStore";
14-
import { useUserStore } from "@/stores/userStore";
1513
import { errorMessageAsString } from "@/utils/simple-error";
1614
1715
import { invokeWorkflow } from "./services";
@@ -48,7 +46,6 @@ const { stateStore } = provideScopedWorkflowStores(props.model.workflowId);
4846
const { activeNodeId } = storeToRefs(stateStore);
4947
5048
const { config, isConfigLoaded } = useConfig(true);
51-
const { currentUser } = storeToRefs(useUserStore());
5249
const { showPanels } = usePanels();
5350
5451
const formData = ref<Record<string, any>>({});
@@ -132,14 +129,6 @@ function onValidation(validation: [string, string] | null) {
132129
}
133130
}
134131
135-
function reuseAllowed(user: any) {
136-
return user && allowCachedJobs(user.preferences);
137-
}
138-
139-
function showRuntimeSettings(user: any) {
140-
return props.targetHistory && (props.targetHistory.indexOf("prefer") >= 0 || (user && reuseAllowed(user)));
141-
}
142-
143132
function onChange(data: any) {
144133
formData.value = data;
145134
}
@@ -230,7 +219,6 @@ async function onExecute() {
230219
<FontAwesomeIcon :icon="faSitemap" fixed-width />
231220
</BButton>
232221
<BDropdown
233-
v-if="showRuntimeSettings(currentUser)"
234222
id="dropdown-form"
235223
ref="dropdown"
236224
v-b-tooltip.hover.noninteractive
@@ -247,7 +235,6 @@ async function onExecute() {
247235
Send results to a new history
248236
</BFormCheckbox>
249237
<BFormCheckbox
250-
v-if="reuseAllowed(currentUser)"
251238
v-model="useCachedJobs"
252239
title="This may skip executing jobs that you have already run.">
253240
Attempt to re-use jobs with identical parameters?

lib/galaxy/config/sample/user_preferences_extra_conf.yml.sample

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,6 @@ preferences:
4040
type: text
4141
required: False
4242

43-
use_cached_job:
44-
description: Do you want to be able to re-use previously run jobs ?
45-
inputs:
46-
- name: use_cached_job_checkbox
47-
label: Do you want to be able to re-use equivalent jobs ?
48-
type: boolean
49-
checked: false
50-
value: false
51-
help: If you select yes, you will be able to select for each tool and workflow run if you would like to use this feature.
52-
5343
localization:
5444
description: Localization
5545
inputs:

0 commit comments

Comments
 (0)