Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Pass Pipeline to all pipeline related components

Tianzhou Chen6bad53150a5d
diff --git a/frontend/src/views/PipelineActivityPanel.vue b/frontend/src/views/PipelineActivityPanel.vue
index bc7d81be62..fa01f22ab4 100644
--- a/frontend/src/views/PipelineActivityPanel.vue
+++ b/frontend/src/views/PipelineActivityPanel.vue
@@ -326,8 +326,17 @@
</template>
<script lang="ts">
+import { PropType } from "vue";
+import { Pipeline } from "../types";
+
export default {
name: "PipelineActivityPanel",
+ props: {
+ pipeline: {
+ required: true,
+ type: Object as PropType<Pipeline>,
+ },
+ },
components: {},
setup(props, ctx) {},
};
diff --git a/frontend/src/views/PipelineContent.vue b/frontend/src/views/PipelineContent.vue
index 115a61ef97..b1f9ae1941 100644
--- a/frontend/src/views/PipelineContent.vue
+++ b/frontend/src/views/PipelineContent.vue
@@ -25,8 +25,17 @@
</template>
<script lang="ts">
+import { PropType } from "vue";
+import { Pipeline } from "../types";
+
export default {
name: "PipelineContent",
+ props: {
+ pipeline: {
+ required: true,
+ type: Object as PropType<Pipeline>,
+ },
+ },
components: {},
setup(props, ctx) {},
};
diff --git a/frontend/src/views/PipelineContentBar.vue b/frontend/src/views/PipelineContentBar.vue
index 37182cbb20..f9d0f2bcfd 100644
--- a/frontend/src/views/PipelineContentBar.vue
+++ b/frontend/src/views/PipelineContentBar.vue
@@ -55,8 +55,17 @@
</template>
<script lang="ts">
+import { PropType } from "vue";
+import { Pipeline } from "../types";
+
export default {
name: "PipelineToolbar",
+ props: {
+ pipeline: {
+ required: true,
+ type: Object as PropType<Pipeline>,
+ },
+ },
components: {},
setup(props, ctx) {},
};
diff --git a/frontend/src/views/PipelineDetail.vue b/frontend/src/views/PipelineDetail.vue
index 45b41e2e81..8eba9f1694 100644
--- a/frontend/src/views/PipelineDetail.vue
+++ b/frontend/src/views/PipelineDetail.vue
@@ -2,11 +2,11 @@
<div class="flex-1 overflow-auto focus:outline-none" tabindex="0">
<!-- Page header -->
<div class="bg-white shadow">
- <PipelineHighlightPanel />
+ <PipelineHighlightPanel :pipeline="pipeline" />
</div>
<!-- Flow -->
- <PipelineFlow />
+ <PipelineFlow :pipeline="pipeline" />
<!-- Main Content -->
<main
@@ -19,17 +19,20 @@
>
<div class="lg:col-span-2 lg:pr-8 lg:border-r lg:border-gray-200">
<div>
- <PipelineContentBar />
- <PipelineSidebar class="mt-8 lg:hidden" />
+ <PipelineContentBar :pipeline="pipeline" />
+ <PipelineSidebar class="mt-8 lg:hidden" :pipeline="pipeline" />
<div class="py-3 lg:pt-6 lg:pb-0">
- <PipelineContent />
+ <PipelineContent :pipeline="pipeline" />
</div>
</div>
<section aria-labelledby="activity-title" class="mt-8 lg:mt-10">
- <PipelineActivityPanel />
+ <PipelineActivityPanel :pipeline="pipeline" />
</section>
</div>
- <PipelineSidebar class="hidden lg:block lg:pl-8" />
+ <PipelineSidebar
+ class="hidden lg:block lg:pl-8"
+ :pipeline="pipeline"
+ />
</div>
</div>
</main>
@@ -37,6 +40,9 @@
</template>
<script lang="ts">
+import { computed } from "vue";
+import { useStore } from "vuex";
+import { humanize } from "../utils";
import PipelineActivityPanel from "../views/PipelineActivityPanel.vue";
import PipelineFlow from "../views/PipelineFlow.vue";
import PipelineHighlightPanel from "../views/PipelineHighlightPanel.vue";
@@ -46,6 +52,12 @@ import PipelineSidebar from "../views/PipelineSidebar.vue";
export default {
name: "PipelineDetail",
+ props: {
+ pipelineId: {
+ required: true,
+ type: String,
+ },
+ },
components: {
PipelineActivityPanel,
PipelineContent,
@@ -54,6 +66,14 @@ export default {
PipelineHighlightPanel,
PipelineSidebar,
},
- setup(props, ctx) {},
+
+ setup(props, ctx) {
+ const store = useStore();
+ const pipeline = computed(() =>
+ store.getters["pipeline/pipelineById"](props.pipelineId)
+ );
+
+ return { pipeline, humanize };
+ },
};
</script>
diff --git a/frontend/src/views/PipelineFlow.vue b/frontend/src/views/PipelineFlow.vue
index d090fa31c2..ecb361bacb 100644
--- a/frontend/src/views/PipelineFlow.vue
+++ b/frontend/src/views/PipelineFlow.vue
@@ -106,8 +106,17 @@
</template>
<script lang="ts">
+import { PropType } from "vue";
+import { Pipeline } from "../types";
+
export default {
name: "PipelineFlow",
+ props: {
+ pipeline: {
+ required: true,
+ type: Object as PropType<Pipeline>,
+ },
+ },
components: {},
setup(props, ctx) {},
};
diff --git a/frontend/src/views/PipelineHighlightPanel.vue b/frontend/src/views/PipelineHighlightPanel.vue
index d30821a091..15f11337ff 100644
--- a/frontend/src/views/PipelineHighlightPanel.vue
+++ b/frontend/src/views/PipelineHighlightPanel.vue
@@ -21,7 +21,7 @@
<h1
class="ml-3 text-2xl font-bold leading-7 text-gray-900 sm:leading-9 sm:truncate"
>
- Good morning, Emilia Birch
+ {{ pipeline.attributes.name }}
</h1>
</div>
<dl
@@ -90,8 +90,17 @@
</template>
<script lang="ts">
+import { PropType } from "vue";
+import { Pipeline } from "../types";
+
export default {
name: "PipelineHighlightPanel",
+ props: {
+ pipeline: {
+ required: true,
+ type: Object as PropType<Pipeline>,
+ },
+ },
components: {},
setup(props, ctx) {},
};
diff --git a/frontend/src/views/PipelineSidebar.vue b/frontend/src/views/PipelineSidebar.vue
index e1446d7d1c..3dc8853fd8 100644
--- a/frontend/src/views/PipelineSidebar.vue
+++ b/frontend/src/views/PipelineSidebar.vue
@@ -116,8 +116,17 @@
</template>
<script lang="ts">
+import { PropType } from "vue";
+import { Pipeline } from "../types";
+
export default {
name: "PipelineSidebar",
+ props: {
+ pipeline: {
+ required: true,
+ type: Object as PropType<Pipeline>,
+ },
+ },
components: {},
setup(props, ctx) {},
};