Skip to content

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

Make Pipeline table use BBTable Section list

Tianzhou Chen6735ef4491ef
diff --git a/frontend/src/components/PipelineTable.vue b/frontend/src/components/PipelineTable.vue
index f1506df068..cc15263554 100644
--- a/frontend/src/components/PipelineTable.vue
+++ b/frontend/src/components/PipelineTable.vue
@@ -1,7 +1,7 @@
<template>
<BBTable
:columnList="state.columnList"
- :dataSource="pipelineList"
+ :sectionDataSource="pipelineSectionList"
:showHeader="false"
@click-row="clickPipeline"
>
@@ -40,8 +40,12 @@
import { reactive, PropType } from "vue";
import { useRouter } from "vue-router";
import moment from "moment";
-import { BBTableColumn, BBStep, BBStepStatus } from "../bbkit/types";
-import { UserStateSymbol } from "./ProvideUser.vue";
+import {
+ BBTableColumn,
+ BBTableSectionDataSource,
+ BBStep,
+ BBStepStatus,
+} from "../bbkit/types";
import { Pipeline } from "../types";
interface LocalState {
@@ -76,9 +80,9 @@ export default {
name: "PipelineTable",
components: {},
props: {
- pipelineList: {
+ pipelineSectionList: {
required: true,
- type: Object as PropType<Pipeline[]>,
+ type: Object as PropType<BBTableSectionDataSource<Pipeline>[]>,
},
},
setup(props, ctx) {
@@ -155,8 +159,10 @@ export default {
return time.format("MMM D YYYY");
};
- const clickPipeline = function (index: number) {
- router.push(`/pipeline/${props.pipelineList[index].id}`);
+ const clickPipeline = function (section: number, row: number) {
+ router.push(
+ `/pipeline/${props.pipelineSectionList[section].list[row].id}`
+ );
};
return {
diff --git a/frontend/src/views/Home.vue b/frontend/src/views/Home.vue
index a79ead5a8f..13fd4f8b58 100644
--- a/frontend/src/views/Home.vue
+++ b/frontend/src/views/Home.vue
@@ -1,38 +1,19 @@
<template>
<div class="flex flex-col">
- <div class="px-2 py-2 border-b">
+ <div class="px-2 py-2">
<BBTableTabFilter
:itemList="state.environmentFilterList"
:selectedIndex="state.selectedFilterIndex"
@select-index="selectFilter"
/>
</div>
- <template
- v-for="(item, index) in [
- {
- title: 'Attention',
- list: state.attentionList,
- },
- {
- title: 'Subscribed',
- list: state.subscribeList,
- },
- {
- title: 'Recently Closed',
- list: state.closeList,
- },
+ <PipelineTable
+ :pipelineSectionList="[
+ { title: 'Attention', list: filteredList(state.attentionList) },
+ { title: 'Subscribed', list: filteredList(state.subscribeList) },
+ { title: 'Recently Closed', list: filteredList(state.closeList) },
]"
- :key="index"
- >
- <h3 class="mt-4 pl-4 text-base leading-6 font-medium text-gray-900">
- {{ item.title }}
- </h3>
- <div class="overflow-x-auto">
- <div class="py-2 align-middle inline-block min-w-full">
- <PipelineTable :pipelineList="filteredList(item.list)" />
- </div>
- </div>
- </template>
+ />
</div>
</template>