Skip to content

Commit

Permalink
Cleanup per PR review.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Mar 25, 2024
1 parent 8399ee8 commit 3a38971
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
13 changes: 9 additions & 4 deletions client/src/components/Markdown/MarkdownDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,27 +151,32 @@ function onOk(selectedLabel: WorkflowLabel | undefined) {
const labelText: string = selectedLabel ? selectedLabel.label : "<ENTER LABEL>";
const labelType: string = selectedLabel ? selectedLabel.type : defaultLabelType;
selectedShow.value = false;
function onInsertArgument() {
emit("onInsert", `${props.argumentName}(${labelType}="${labelText}")`);
}
if (props.argumentType == "history_dataset_id") {
if (props.useLabels) {
emit("onInsert", `${props.argumentName}(${labelType}="${labelText}")`);
onInsertArgument();
} else {
dataShow.value = true;
}
} else if (props.argumentType == "history_dataset_collection_id") {
if (props.useLabels) {
emit("onInsert", `${props.argumentName}(${labelType}="${labelText}")`);
onInsertArgument();
} else {
dataCollectionShow.value = true;
}
} else if (props.argumentType == "job_id") {
if (props.useLabels) {
emit("onInsert", `${props.argumentName}(${labelType}="${labelText}")`);
onInsertArgument();
} else {
jobShow.value = true;
}
} else if (props.argumentType == "invocation_id") {
if (props.useLabels) {
emit("onInsert", `${props.argumentName}(${labelType}="${labelText}")`);
onInsertArgument();
} else {
invocationShow.value = true;
}
Expand Down
16 changes: 4 additions & 12 deletions client/src/components/Markdown/MarkdownSelector.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import BootstrapVue from "bootstrap-vue";
import Vue, { computed, ref } from "vue";
import { BModal } from "bootstrap-vue";
import { computed, ref } from "vue";
import { WorkflowLabel } from "./labels";
Expand Down Expand Up @@ -28,8 +28,6 @@ const emit = defineEmits<{
(e: "onCancel"): void;
}>();
Vue.use(BootstrapVue);
function onOk() {
emit("onOk", selectedValue.value);
}
Expand All @@ -41,19 +39,13 @@ function onCancel() {

<template>
<span>
<b-modal
v-model="modalShow"
:title="title"
ok-title="Continue"
@ok="onOk"
@cancel="onCancel"
@hidden="onCancel">
<BModal v-model="modalShow" :title="title" ok-title="Continue" @ok="onOk" @cancel="onCancel" @hidden="onCancel">
<LabelSelector
v-model="selectedValue"
class="ml-2"
:has-labels="hasLabels"
:label-title="labelTitle"
:labels="labels" />
</b-modal>
</BModal>
</span>
</template>

0 comments on commit 3a38971

Please sign in to comment.