Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into feature_stdout_live_re…
Browse files Browse the repository at this point in the history
…porting
  • Loading branch information
jmchilton committed Nov 18, 2024
2 parents be11412 + 4a7c220 commit a69031b
Show file tree
Hide file tree
Showing 100 changed files with 2,047 additions and 3,686 deletions.
5 changes: 1 addition & 4 deletions client/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const xml2js = require("xml2js");
const STATIC_PLUGIN_BUILD_IDS = [
"annotate_image",
"chiraviz",
"cytoscape",
"drawrna",
"editor",
"example",
Expand All @@ -28,17 +27,15 @@ const STATIC_PLUGIN_BUILD_IDS = [
"mvpapp",
"nora",
"nvd3/nvd3_bar",
"openlayers",
"openseadragon",
"PCA_3Dplot",
"phylocanvas",
"pv",
"scatterplot",
"tiffviewer",
"ts_visjs",
"venn",
];
const INSTALL_PLUGIN_BUILD_IDS = ["ngl", "msa"]; // todo: derive from XML
const INSTALL_PLUGIN_BUILD_IDS = ["cytoscape", "ngl", "msa", "openlayers", "venn", "vizarr"]; // todo: derive from XML
const DIST_PLUGIN_BUILD_IDS = ["new_user"];
const PLUGIN_BUILD_IDS = Array.prototype.concat(DIST_PLUGIN_BUILD_IDS, STATIC_PLUGIN_BUILD_IDS);

Expand Down
18 changes: 17 additions & 1 deletion client/src/api/schema/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11963,6 +11963,21 @@ export interface components {
*/
workflow_step_id: number;
};
/** InvocationFailureWorkflowParameterInvalidResponse */
InvocationFailureWorkflowParameterInvalidResponse: {
/**
* Details
* @description Message raised by validator
*/
details: string;
/**
* @description discriminator enum property added by openapi-typescript
* @enum {string}
*/
reason: "workflow_parameter_invalid";
/** Workflow parameter step that failed validation */
workflow_step_id: number;
};
/** InvocationInput */
InvocationInput: {
/**
Expand Down Expand Up @@ -12044,7 +12059,8 @@ export interface components {
| components["schemas"]["InvocationFailureExpressionEvaluationFailedResponse"]
| components["schemas"]["InvocationFailureWhenNotBooleanResponse"]
| components["schemas"]["InvocationUnexpectedFailureResponse"]
| components["schemas"]["InvocationEvaluationWarningWorkflowOutputNotFoundResponse"];
| components["schemas"]["InvocationEvaluationWarningWorkflowOutputNotFoundResponse"]
| components["schemas"]["InvocationFailureWorkflowParameterInvalidResponse"];
/** InvocationOutput */
InvocationOutput: {
/**
Expand Down
4 changes: 4 additions & 0 deletions client/src/components/Common/ButtonSpinner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ interface Props {
wait?: boolean;
tooltip?: string;
disabled?: boolean;
size?: string;
}
withDefaults(defineProps<Props>(), {
wait: false,
tooltip: undefined,
disabled: false,
size: "md",
});
</script>

Expand All @@ -25,6 +27,7 @@ withDefaults(defineProps<Props>(), {
v-if="wait"
v-b-tooltip.hover.bottom
disabled
:size="size"
variant="info"
title="Please Wait..."
class="d-flex flex-nowrap align-items-center text-nowrap">
Expand All @@ -38,6 +41,7 @@ withDefaults(defineProps<Props>(), {
class="d-flex flex-nowrap align-items-center text-nowrap"
:title="tooltip"
:disabled="disabled"
:size="size"
@click="$emit('onClick')">
<FontAwesomeIcon :icon="faPlay" class="mr-2" />
{{ title }}
Expand Down
11 changes: 10 additions & 1 deletion client/src/components/Form/FormElement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import FormSelection from "./Elements/FormSelection.vue";
import FormTags from "./Elements/FormTags.vue";
import FormText from "./Elements/FormText.vue";
import FormUpload from "./Elements/FormUpload.vue";
import FormElementHelpMarkdown from "./FormElementHelpMarkdown.vue";
interface FormElementProps {
id?: string;
Expand All @@ -35,6 +36,7 @@ interface FormElementProps {
title?: string;
refreshOnChange?: boolean;
help?: string;
helpFormat?: string;
error?: string;
warning?: string;
disabled?: boolean;
Expand Down Expand Up @@ -63,6 +65,7 @@ const props = withDefaults(defineProps<FormElementProps>(), {
connectedDisableText: "Add connection to module.",
connectedEnableIcon: "fa fa-times",
connectedDisableIcon: "fa fa-arrows-alt-h",
helpFormat: "html",
workflowBuildingMode: false,
});
Expand Down Expand Up @@ -337,7 +340,13 @@ function onAlert(value: string | undefined) {
</div>

<div v-if="showPreview" class="ui-form-preview pt-1 pl-2 mt-1">{{ previewText }}</div>
<span v-if="Boolean(helpText)" class="ui-form-info form-text text-muted" v-html="helpText" />
<span
v-if="Boolean(helpText) && helpFormat != 'markdown'"
class="ui-form-info form-text text-muted"
v-html="helpText" />
<span v-else-if="Boolean(helpText)" class="ui-form-info form-text text-muted"
><FormElementHelpMarkdown :content="helpText"
/></span>
</div>
</template>

Expand Down
56 changes: 56 additions & 0 deletions client/src/components/Form/FormElementHelpMarkdown.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<script setup lang="ts">
import { computed, onMounted, ref } from "vue";
import { markup } from "@/components/ObjectStore/configurationMarkdown";
import { getAppRoot } from "@/onload/loadConfig";
import HelpPopover from "@/components/Help/HelpPopover.vue";
const props = defineProps<{
content: string;
}>();
const markdownHtml = computed(() => markup(props.content ?? "", false));
const helpHtml = ref<HTMLDivElement>();
interface InternalTypeReference {
element: HTMLElement;
term: string;
}
const internalHelpReferences = ref<InternalTypeReference[]>([]);
function setupPopovers() {
internalHelpReferences.value.length = 0;
if (helpHtml.value) {
const links = helpHtml.value.getElementsByTagName("a");
Array.from(links).forEach((link) => {
if (link.href.startsWith("gxhelp://")) {
const uri = link.href.substr("gxhelp://".length);
internalHelpReferences.value.push({ element: link, term: uri });
link.href = `${getAppRoot()}help/terms/${uri}`;
link.style.color = "inherit";
link.style.textDecorationLine = "underline";
link.style.textDecorationStyle = "dashed";
}
});
}
}
onMounted(setupPopovers);
</script>

<template>
<span>
<!-- Disable v-html warning because we allow markdown generated HTML
in various places in the Galaxy interface. Raw HTML is not allowed
here because admin = false in the call to markup.
-->
<!-- eslint-disable-next-line vue/no-v-html -->
<div ref="helpHtml" v-html="markdownHtml" />
<span v-for="(value, i) in internalHelpReferences" :key="i">
<HelpPopover :target="value.element" :term="value.term" />
</span>
</span>
</template>
2 changes: 2 additions & 0 deletions client/src/components/Form/FormInputs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
v-model="input.test_param.value"
:type="input.test_param.type"
:help="input.test_param.help"
:help-format="input.test_param.help_format"
:refresh-on-change="false"
:disabled="sustainConditionals"
:attributes="input.test_param"
Expand Down Expand Up @@ -51,6 +52,7 @@
:error="input.error"
:warning="input.warning"
:help="input.help"
:help-format="input.help_format"
:refresh-on-change="input.refresh_on_change"
:attributes="input.attributes || input"
:collapsed-enable-text="collapsedEnableText"
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Grid/GridInvocation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function refreshTable() {
:extra-props="extraProps"
:embedded="forStoredWorkflow || forHistory || forBatch">
<template v-slot:expanded="{ rowData }">
<span class="position-absolute ml-4" :data-invocation-id="rowData.id">
<span class="mb-2" :data-invocation-id="rowData.id">
<small>
<b>Last updated: <UtcDate :date="rowData.update_time" mode="elapsed" />; Invocation ID:</b>
</small>
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Help/HelpPopover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defineProps<Props>();
</script>

<template>
<BPopover :target="target" triggers="hover" placement="bottom">
<BPopover v-if="target" :target="target" triggers="hover" placement="bottom">
<HelpTerm :term="term" />
</BPopover>
</template>
5 changes: 5 additions & 0 deletions client/src/components/Help/terms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ unix:
debug what is wrong with the execution of an application.
More information on stack traces can be found on [Wikipedia](https://en.wikipedia.org/wiki/Stack_trace).
programming:
python:
regex: |
Regular expressions are patterns used to match character combinations in strings. This input accepts Python-style regular expressions, find more information about these in [this Python for Biologists tutorial](https://pythonforbiologists.com/tutorial/regex.html).
The website [regex101](https://regex101.com/) is a useful playground to explore regular expressions (be sure to enable "Python" as your flavor) and language models such as ChatGPT can help interactively build up and explain regular expressions from natural language prompts or examples.
galaxy:
collections:
flatList: |
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/History/SwitchToHistoryLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function viewHistoryInNewTab(history: HistorySummary) {
<template>
<div>
<LoadingSpan v-if="!history" />
<div v-else class="history-link">
<div v-else class="history-link" data-description="switch to history link">
<BLink
v-b-tooltip.hover.top.noninteractive.html
data-description="switch to history link"
Expand Down
5 changes: 4 additions & 1 deletion client/src/components/JobMetrics/JobMetrics.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { getLocalVue } from "tests/jest/helpers";

import JobMetrics from "./JobMetrics";

const NO_METRICS_MESSAGE = "No metrics available for this job.";

// Ignore all axios calls, data is mocked locally -- just say "OKAY!"
jest.mock("axios", () => ({
get: async () => {
Expand All @@ -26,7 +28,8 @@ describe("JobMetrics/JobMetrics.vue", () => {
});

await wrapper.vm.$nextTick();
expect(wrapper.find("div").exists()).toBe(false);
const alert = wrapper.find(".alert-info");
expect(alert.text()).toBe(NO_METRICS_MESSAGE);
});

it("should group plugins by type", async () => {
Expand Down
2 changes: 2 additions & 0 deletions client/src/components/JobMetrics/JobMetrics.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script setup lang="ts">
import { BAlert } from "bootstrap-vue";
import { computed, ref, unref, watch } from "vue";
import { useJobMetricsStore } from "@/stores/jobMetricsStore";
Expand Down Expand Up @@ -217,4 +218,5 @@ const estimatedServerInstance = computed(() => {
:cores-allocated="coresAllocated"
:memory-allocated-in-mebibyte="memoryAllocatedInMebibyte" />
</div>
<BAlert v-else variant="info" show> No metrics available for this job. </BAlert>
</template>
12 changes: 5 additions & 7 deletions client/src/components/RuleBuilder/RegularExpressionInput.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div>
<label v-b-tooltip.hover for="regular_expression" :title="title">{{ label }}</label>
<span v-b-popover.html="popoverContent" :title="popoverTitle" class="fa fa-question"></span>
<label ref="helpTarget" v-b-tooltip.hover for="regular_expression">{{ label }}</label>
<HelpPopover :target="$refs.helpTarget" term="programming.python.regex" />
<input
v-b-tooltip.hover.left
:title="title"
Expand All @@ -16,7 +16,10 @@
<script>
import _l from "utils/localization";
import HelpPopover from "@/components/Help/HelpPopover.vue";
export default {
components: { HelpPopover },
props: {
target: {
required: true,
Expand All @@ -32,11 +35,6 @@ export default {
popoverTitle() {
return _l("Regular Expressions");
},
popoverContent() {
return _l(
`Regular expressions are patterns used to match character combinations in strings. This input accepts Python-style regular expressions, find more information about these in <a href="https://pythonforbiologists.com/tutorial/regex.html">this Python for Biologists tutorial</a>.`
);
},
},
};
</script>
27 changes: 18 additions & 9 deletions client/src/components/Workflow/Invocation/InvocationScrollList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,10 @@ const route = useRoute();
const router = useRouter();
function cardClicked(invocation: WorkflowInvocation) {
let path = `/workflows/invocations/${invocation.id}`;
if (props.inPanel) {
path += "?from_panel=true";
emit("invocation-clicked");
}
router.push(path);
router.push(`/workflows/invocations/${invocation.id}`);
}
function scrollToTop() {
Expand Down Expand Up @@ -204,10 +202,14 @@ function workflowName(workflowId: string) {
@click="() => cardClicked(invocation)">
<div class="overflow-auto w-100">
<Heading bold size="text" icon="fa-sitemap">
<span class="truncate-3-lines">{{ workflowName(invocation.workflow_id) }}</span>
<span class="truncate-n-lines three-lines">
{{ workflowName(invocation.workflow_id) }}
</span>
</Heading>
<Heading size="text" icon="fa-hdd">
<small class="text-muted">{{ historyName(invocation.history_id) }}</small>
<small class="text-muted truncate-n-lines two-lines">
{{ historyName(invocation.history_id) }}
</small>
</Heading>
<div class="d-flex justify-content-between">
<BBadge v-b-tooltip.noninteractive.hover pill>
Expand Down Expand Up @@ -257,12 +259,19 @@ function workflowName(workflowId: string) {
</template>

<style scoped lang="scss">
@import "theme/blue.scss";
.truncate-3-lines {
.truncate-n-lines {
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
word-break: break-word;
overflow-wrap: break-word;
&.three-lines {
-webkit-line-clamp: 3;
line-clamp: 3;
}
&.two-lines {
-webkit-line-clamp: 2;
line-clamp: 2;
}
}
</style>
6 changes: 4 additions & 2 deletions client/src/components/Workflow/List/WorkflowIndicators.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ library.add(faFileImport, faGlobe, faShieldAlt, faUsers, faUser);
interface Props {
workflow: any;
publishedView: boolean;
noEditTime?: boolean;
}
const props = defineProps<Props>();
Expand Down Expand Up @@ -118,7 +119,7 @@ function onViewUserPublished() {
<FontAwesomeIcon :icon="faFileImport" fixed-width @click="onCopyLink" />
</BButton>

<span class="mr-1">
<span v-if="!noEditTime" class="mr-1">
<small>
edited
<UtcDate :date="workflow.update_time" mode="elapsed" />
Expand All @@ -136,8 +137,9 @@ function onViewUserPublished() {
</BBadge>

<BBadge
v-if="publishedView"
v-if="publishedView && workflow.published"
v-b-tooltip.noninteractive.hover
data-description="published owner badge"
class="outline-badge cursor-pointer mx-1"
:title="publishedTitle"
@click="onViewUserPublished">
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Workflow/Run/WorkflowRun.vue
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ defineExpose({
Workflow submission failed: {{ submissionError }}
</BAlert>
<WorkflowRunFormSimple
v-else-if="fromVariant === 'simple'"
v-if="fromVariant === 'simple'"
:model="workflowModel"
:target-history="simpleFormTargetHistory"
:use-job-cache="simpleFormUseJobCache"
Expand Down
Loading

0 comments on commit a69031b

Please sign in to comment.