Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
Create EnvironmentTable component
天舟3b47381fb06f
diff --git a/frontend/src/components/EnvironmentTable.vue b/frontend/src/components/EnvironmentTable.vuenew file mode 100644index 0000000000..566ed26c74--- /dev/null+++ b/frontend/src/components/EnvironmentTable.vue@@ -0,0 +1,70 @@+<template>+ <BBTable+ :columnList="COLUMN_LIST"+ :dataSource="environmentList"+ :showHeader="true"+ :leftBordered="false"+ :rightBordered="false"+ @click-row="clickEnvironment"+ >+ <template v-slot:body="{ rowData: environment }">+ <BBTableCell :leftPadding="4" class="w-4 table-cell text-gray-500">+ <span class="">#{{ environment.id }}</span>+ </BBTableCell>+ <BBTableCell class="w-48 table-cell">+ {{ environment.name }}+ </BBTableCell>+ <BBTableCell class="w-24 table-cell">+ {{ humanizeTs(environment.createdTs) }}+ </BBTableCell>+ <BBTableCell class="w-24 table-cell">+ {{ humanizeTs(environment.lastUpdatedTs) }}+ </BBTableCell>+ </template>+ </BBTable>+</template>++<script lang="ts">+import { PropType } from "vue";+import { useRouter } from "vue-router";+import { Environment } from "../types";++const COLUMN_LIST = [+ {+ title: "ID",+ },+ {+ title: "Name",+ },+ {+ title: "Created",+ },+ {+ title: "Last updated",+ },+];++export default {+ name: "EnvironmentTable",+ components: {},+ props: {+ environmentList: {+ required: true,+ type: Object as PropType<Environment[]>,+ },+ },+ setup(props, ctx) {+ const router = useRouter();++ const clickEnvironment = function (section: number, row: number) {+ const environment = props.environmentList[row];+ router.push(`/environment#${environment.id}`);+ };++ return {+ COLUMN_LIST,+ clickEnvironment,+ };+ },+};+</script>