Skip to content

Commit 707c516

Browse files
committed
Hack Best Practices into special workflow thing
1 parent 4af650a commit 707c516

7 files changed

Lines changed: 234 additions & 146 deletions

File tree

client/src/components/ActivityBar/ActivityBar.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ defineExpose({
258258
v-else
259259
:id="`${activity.id}`"
260260
:key="activity.id"
261+
:indicator="activity.indicator"
261262
:activity-bar-id="props.activityBarId"
262263
:icon="activity.icon"
263264
:is-active="isActiveRoute(activity.to)"
@@ -304,6 +305,7 @@ defineExpose({
304305
:key="activity.id"
305306
:activity-bar-id="props.activityBarId"
306307
:icon="activity.icon"
308+
:indicator="activity.indicator"
307309
:is-active="panelActivityIsActive(activity)"
308310
:title="activity.title"
309311
:tooltip="activity.tooltip"
@@ -316,6 +318,7 @@ defineExpose({
316318
:key="activity.id"
317319
:activity-bar-id="props.activityBarId"
318320
:icon="activity.icon"
321+
:indicator="activity.indicator"
319322
:is-active="isActiveRoute(activity.to)"
320323
:title="activity.title"
321324
:tooltip="activity.tooltip"

client/src/components/Workflow/Editor/Index.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<template>
22
<div id="columns" class="d-flex">
3-
<div>{{ lintData.disconnectedInputs }}</div>
43
<StateUpgradeModal :state-messages="stateMessages" />
54
<StateUpgradeModal
65
:state-messages="insertedStateMessages"
@@ -460,10 +459,12 @@ export default {
460459
}
461460
462461
const isNewTempWorkflow = computed(() => !props.workflowId);
462+
const lintData = useLintData(id, steps, datatypesMapper);
463463
464464
const { specialWorkflowActivities } = useSpecialWorkflowActivities(
465465
computed(() => ({
466466
hasInvalidConnections: hasInvalidConnections.value,
467+
lintData: lintData,
467468
}))
468469
);
469470
@@ -483,8 +484,6 @@ export default {
483484
const { confirm } = useConfirmDialog();
484485
const inputs = getWorkflowInputs();
485486
486-
const lintData = useLintData(id, steps, datatypesMapper);
487-
488487
return {
489488
id,
490489
name,

client/src/components/Workflow/Editor/Lint.test.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ import { createTestingPinia } from "@pinia/testing";
22
import { mount } from "@vue/test-utils";
33
import { PiniaVuePlugin, setActivePinia } from "pinia";
44
import { getLocalVue } from "tests/jest/helpers";
5+
import { ref } from "vue";
56

67
import { testDatatypesMapper } from "@/components/Datatypes/test_fixtures";
78
import { useWorkflowStepStore } from "@/stores/workflowStepStore";
89

9-
import { getUntypedWorkflowParameters } from "./modules/parameters";
10+
import { useLintData } from "./modules/useLinting";
1011

1112
import Lint from "./Lint.vue";
1213

@@ -30,6 +31,8 @@ const steps = {
3031
},
3132
],
3233
annotation: "",
34+
input_connections: null,
35+
tool_state: null,
3336
},
3437
1: {
3538
id: 1,
@@ -72,6 +75,7 @@ const steps = {
7275
output_name: "output",
7376
},
7477
],
78+
tool_state: null,
7579
},
7680
2: {
7781
id: 2,
@@ -80,8 +84,11 @@ const steps = {
8084
annotation: "",
8185
outpus: {},
8286
inputs: [],
87+
input_connections: null,
88+
tool_state: null,
8389
},
8490
};
91+
const stepsRef = ref(steps);
8592

8693
describe("Lint", () => {
8794
let wrapper;
@@ -93,7 +100,7 @@ describe("Lint", () => {
93100

94101
wrapper = mount(Lint, {
95102
propsData: {
96-
untypedParameters: getUntypedWorkflowParameters(steps),
103+
lintData: useLintData(ref("1"), stepsRef, ref(testDatatypesMapper)),
97104
steps: steps,
98105
annotation: "annotation",
99106
license: null,

0 commit comments

Comments
 (0)