forked from galaxyproject/galaxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvements to workflow parameter validators.
- Allow specifying a min/max for integer and float parameters. - Swap language from regex to "Regular Expression" and synchronize help with regular expression fields in rule builder. - Extend regular expression help. - Improve default message for in_range validator. Probably a reversion in some ways introduced with galaxyproject#19027.
- Loading branch information
Showing
9 changed files
with
156 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters