Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Messaging for Tool Form Modal Errors #19562

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions client/src/components/Common/ErrorPluginTracker.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<script setup lang="ts">
import { computed } from "vue";

import { getGalaxyInstance } from "@/app";

const errorReportingAvailable = computed(() => {
const Galaxy = getGalaxyInstance();
return Galaxy.Sentry.isInitialized ?? "Your error has been logged in Sentry to improve your experience.";
});
</script>
<template>
<span v-localize>
{{ errorReportingAvailable }}
</span>
</template>
23 changes: 20 additions & 3 deletions client/src/components/Tool/ToolForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,22 @@
<b-modal v-model="showError" size="sm" :title="errorTitle | l" scrollable ok-only>
<b-alert v-if="errorMessage" show variant="danger">
{{ errorMessage }}
<ErrorPluginTracker />
</b-alert>
<b-alert v-if="submissionRequestFailed" show variant="warning">
The server could not complete this request. Please verify your parameter settings, retry submission and
contact the Galaxy Team if this error persists. A transcript of the submitted data is shown below.
</b-alert>
<small class="text-muted">
<pre>{{ errorContentPretty }}</pre>
</small>
<BLink
:aria-expanded="isExpanded ? 'true' : 'false'"
aria-controls="collapse-previous"
@click="isExpanded = !isExpanded">
({{ expandedIcon }}) Error transcript:
</BLink>
<BCollapse id="collapse-previous" v-model="isExpanded">
<pre class="rounded code">{{ errorContentPretty }}</pre>
</BCollapse>
<br />
</b-modal>
<ToolRecommendation v-if="showRecommendation" :tool-id="formConfig.id" />
<ToolCard
Expand Down Expand Up @@ -111,6 +119,7 @@

<script>
import { getGalaxyInstance } from "app";
import { BCollapse, BLink } from "bootstrap-vue";
import ButtonSpinner from "components/Common/ButtonSpinner";
import Heading from "components/Common/Heading";
import FormDisplay from "components/Form/FormDisplay";
Expand All @@ -132,6 +141,7 @@ import { getToolFormData, submitJob, updateToolFormData } from "./services";
import ToolCard from "./ToolCard";
import { allowCachedJobs } from "./utilities";

import ErrorPluginTracker from "@/components/Common/ErrorPluginTracker.vue";
import FormSelect from "@/components/Form/Elements/FormSelect.vue";

export default {
Expand All @@ -145,6 +155,9 @@ export default {
ToolEntryPoints,
ToolRecommendation,
Heading,
ErrorPluginTracker,
BCollapse,
BLink,
},
props: {
id: {
Expand Down Expand Up @@ -205,6 +218,7 @@ export default {
],
immutableHistoryMessage:
"This history is immutable and you cannot run tools in it. Please switch to a different history.",
isExpanded: false,
};
},
computed: {
Expand Down Expand Up @@ -252,6 +266,9 @@ export default {
runButtonTitle() {
return "Run Tool";
},
expandedIcon() {
return this.isExpanded ? "-" : "+";
},
},
watch: {
currentHistoryId() {
Expand Down
Loading