Skip to content

Commit 57b4595

Browse files
mvdbeekahmedhamidawan
authored andcommitted
Hack Best Practices into special workflow thing
1 parent bbcbbeb commit 57b4595

7 files changed

Lines changed: 234 additions & 148 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"
@@ -546,10 +545,12 @@ export default {
546545
}
547546
548547
const isNewTempWorkflow = computed(() => !props.workflowId);
548+
const lintData = useLintData(id, steps, datatypesMapper);
549549
550550
const { specialWorkflowActivities } = useSpecialWorkflowActivities(
551551
computed(() => ({
552552
hasInvalidConnections: hasInvalidConnections.value,
553+
lintData: lintData,
553554
}))
554555
);
555556
@@ -571,8 +572,6 @@ export default {
571572
const { confirm } = useConfirmDialog();
572573
const inputs = getWorkflowInputs();
573574
574-
const lintData = useLintData(id, steps, datatypesMapper);
575-
576575
return {
577576
id,
578577
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
readme: "readme",

0 commit comments

Comments
 (0)