Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
Remove group and project related code as it’s not needed for now
Tianzhou Chen0f537e2e294a
diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.tsindex beb782443b..a6d02714ef 100644--- a/frontend/src/router/index.ts+++ b/frontend/src/router/index.ts@@ -2,18 +2,13 @@ import { defineAsyncComponent } from "vue";import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";import DashboardLayout from "../layouts/DashboardLayout.vue";import ThreeColumnView from "../views/ThreeColumnView.vue";-import MainContent from "../views/MainContent.vue";import MainSidebar from "../views/MainSidebar.vue";-import EmptyView from "../views/EmptyView.vue";import ActivitySidebar from "../views/ActivitySidebar.vue";import Home from "../views/Home.vue";-import ActionbarHome from "../views/ActionbarHome.vue";import Signin from "../views/auth/Signin.vue";import Signup from "../views/auth/Signup.vue";import PasswordReset from "../views/auth/PasswordReset.vue";-import MasterDetail from "../views/MasterDetail.vue";import { store } from "../store";-import { Group, Project } from "../types";const HOME_MODULE = "workspace.home";const SIGNIN_MODULE = "auth.signin";@@ -157,16 +152,6 @@ const routes: Array<RouteRecordRaw> = [),props: true,},- {- // Use absolute path to specify the whole path while still leverages the nested route- path: "/:groupSlug/:projectSlug/setting",- name: "setting.workspace.project",- meta: { displayName: "Setting" },- component: defineAsyncComponent(- () => import("../views/SettingWorkspaceProject.vue")- ),- props: true,- },],},{@@ -193,44 +178,6 @@ const routes: Array<RouteRecordRaw> = [},props: { actionbar: true, content: true },},- {- path: ":groupSlug",- name: "workspace.group",- meta: { displayName: "Dashboard" },- components: {- actionbar: defineAsyncComponent(- () => import("../views/ActionbarGroup.vue")- ),- content: defineAsyncComponent(- () => import("../views/GroupDashboard.vue")- ),- },- props: { actionbar: true, content: true },- },- {- path: ":groupSlug/setting",- name: "workspace.group.setting",- meta: { displayName: "Setting" },- components: {- actionbar: EmptyView,- content: defineAsyncComponent(- () => import("../views/GroupSetting.vue")- ),- },- props: { actionbar: true, content: true },- },- {- path: ":groupSlug/:projectSlug/repository",- name: "workspace.project.repository",- meta: { displayName: "Repository" },- components: {- actionbar: EmptyView,- content: defineAsyncComponent(- () => import("../views/RepositoryDashboard.vue")- ),- },- props: { actionbar: true, content: true },- },],},],@@ -290,8 +237,6 @@ router.beforeEach((to, from, next) => {const routerSlug = store.getters["router/routeSlug"](to);const pipelineId = routerSlug.pipelineId;- const groupSlug = routerSlug.groupSlug;- const projectSlug = routerSlug.projectSlug;console.log("RouterSlug:", routerSlug);@@ -310,57 +255,5 @@ router.beforeEach((to, from, next) => {return;}- store- .dispatch("group/fetchGroupListForUser", loginUser.id)- .then((list: Group[]) => {- let matchedGroup;- if (groupSlug) {- matchedGroup = list.find(- (group: Group) => group.attributes.slug === groupSlug- );- }-- if (!matchedGroup) {- next({- name: "error.404",- replace: false,- });- return;- }-- // If no project path is specified, just go to group default page- if (!projectSlug || to.name === "workspace.group.setting") {- next();- return;- }-- let matchedProject;- store- .dispatch("project/fetchProjectListForGroup", matchedGroup.id)- .then((list: Project[]) => {- matchedProject = list.find(- (project: Project) => project.attributes.slug === projectSlug- );-- if (!matchedProject) {- next({- name: "error.404",- replace: false,- });- return;- }-- next();- return;- })- .catch((error: Error) => {- console.log("error", typeof error);- next(error);- return;- });- })- .catch((error: Error) => {- next(error);- return;- });+ next();});diff --git a/frontend/src/views/ActionbarEnvironment.vue b/frontend/src/views/ActionbarEnvironment.vuedeleted file mode 100644index 8970454f78..0000000000--- a/frontend/src/views/ActionbarEnvironment.vue+++ /dev/null@@ -1,17 +0,0 @@-<template>- <div />-</template>--<script lang="ts">-import { computed, inject } from "vue";--export default {- name: "ActionbarEnvironment",- components: {},- props: {},- setup(props, ctx) {- return {};- },- methods: {},-};-</script>diff --git a/frontend/src/views/ActionbarGroup.vue b/frontend/src/views/ActionbarGroup.vuedeleted file mode 100644index aa94529521..0000000000--- a/frontend/src/views/ActionbarGroup.vue+++ /dev/null@@ -1,22 +0,0 @@-<template>- <button- type="button"- class="btn-primary relative inline-flex items-center px-4 py-2"- >- New Project- </button>-</template>--<script lang="ts">-export default {- name: "ActionbarGroup",- components: {},- props: {- groupSlug: {- required: false,- type: String,- },- },- setup(props, ctx) {},-};-</script>diff --git a/frontend/src/views/ActionbarHome.vue b/frontend/src/views/ActionbarHome.vuedeleted file mode 100644index 1d47a0e863..0000000000--- a/frontend/src/views/ActionbarHome.vue+++ /dev/null@@ -1,21 +0,0 @@-<template>- <button- type="button"- class="btn-primary relative inline-flex items-center px-4 py-2"- >- Create Project- </button>-</template>--<script lang="ts">-export default {- name: "ActionbarHome",- components: {},- props: {- projectSlug: {- required: false,- },- },- setup(props, ctx) {},-};-</script>diff --git a/frontend/src/views/GroupDashboard.vue b/frontend/src/views/GroupDashboard.vuedeleted file mode 100644index b43b1aa57f..0000000000--- a/frontend/src/views/GroupDashboard.vue+++ /dev/null@@ -1,17 +0,0 @@-<template>- <h1>Group {{ groupSlug }}</h1>-</template>--<script lang="ts">-export default {- name: "Group Dashboard",- components: {},- props: {- groupSlug: {- required: true,- type: String,- },- },- setup(props, ctx) {},-};-</script>diff --git a/frontend/src/views/GroupSetting.vue b/frontend/src/views/GroupSetting.vuedeleted file mode 100644index 24ce9f3e08..0000000000--- a/frontend/src/views/GroupSetting.vue+++ /dev/null@@ -1,17 +0,0 @@-<template>- <h1>Group {{ groupSlug }} Setting</h1>-</template>--<script lang="ts">-export default {- name: "Group Setting",- components: {},- props: {- groupSlug: {- required: true,- type: String,- },- },- setup(props, ctx) {},-};-</script>diff --git a/frontend/src/views/MainContent.vue b/frontend/src/views/MainContent.vuedeleted file mode 100644index 8ed016369a..0000000000--- a/frontend/src/views/MainContent.vue+++ /dev/null@@ -1,31 +0,0 @@-<template>- <div class="bg-normal py-4 sm:px-6">- <div class="flex -ml-4 justify-between flex-wrap sm:flex-no-wrap">- <!-- Breadcrumb section -->- <div class="ml-4 mt-2" aria-label="Breadcrumb">- <Breadcrumb />- </div>- <div class="ml-4 mt-2 flex-shrink-0">- <span class="inline-flex rounded-md shadow-sm">- <router-view name="actionbar"></router-view>- </span>- </div>- </div>- </div>- <div class="mt-2">- <router-view name="content"></router-view>- </div>-</template>--<script lang="ts">-import Breadcrumb from "../components/Breadcrumb.vue";--export default {- name: "MainContent",- components: {- Breadcrumb,- },- props: {},- setup(props, ctx) {},-};-</script>diff --git a/frontend/src/views/MasterDetail.vue b/frontend/src/views/MasterDetail.vuedeleted file mode 100644index 26368e57d5..0000000000--- a/frontend/src/views/MasterDetail.vue+++ /dev/null@@ -1,171 +0,0 @@-<template>- <!--- Tailwind UI components require Tailwind CSS v1.8 and the @tailwindcss/ui plugin.- Read the documentation to get started: https://tailwindui.com/documentation--->- <!-- Background color split screen for large screens -->- <div class="relative min-h-screen flex flex-col">- <div class="flex-grow w-full max-w-full mx-auto lg:flex">- <!-- Off-canvas menu for mobile, show/hide based on off-canvas menu state. -->- <div v-if="showMobileOverlay" class="lg:hidden">- <div class="fixed inset-0 flex z-40">- <!--- Off-canvas menu overlay, show/hide based on off-canvas menu state.-- Entering: "transition-opacity ease-linear duration-300"- From: "opacity-0"- To: "opacity-100"- Leaving: "transition-opacity ease-linear duration-300"- From: "opacity-100"- To: "opacity-0"- -->- <div class="fixed inset-0">- <div class="absolute inset-0 bg-gray-600 opacity-75"></div>- </div>- <!--- Off-canvas menu, show/hide based on off-canvas menu state.-- Entering: "transition ease-in-out duration-300 transform"- From: "-translate-x-full"- To: "translate-x-0"- Leaving: "transition ease-in-out duration-300 transform"- From: "translate-x-0"- To: "-translate-x-full"- -->- <div class="sidebar relative flex-1 flex flex-col max-w-xs pt-4">- <div class="absolute top-0 right-0 -mr-14 p-1">- <button- @click.prevent="state.showMobileOverlay = false"- class="flex items-center justify-center h-12 w-12 rounded-full focus:outline-none focus:bg-gray-600"- aria-label="Close sidebar"- >- <svg- class="h-6 w-6 text-white"- stroke="currentColor"- fill="none"- viewBox="0 0 24 24"- >- <path- stroke-linecap="round"- stroke-linejoin="round"- stroke-width="2"- d="M6 18L18 6M6 6l12 12"- />- </svg>- </button>- </div>- <div class="flex-shrink-0 flex justify-between px-4 mb-6">- <router-link to="/" active-class="" exact-active-class=""- ><img- class="h-10 w-auto"- src="../assets/logo.svg"- alt="Bytebase"- /></router-link>- <ProfileDropdown />- </div>- <router-view name="leftSidebar" />- <div- class="flex-shrink-0 flex flex-row border-t border-block-border p-3 text-gray-700"- >- <svg- class="w-5 h-5"- fill="none"- stroke="currentColor"- viewBox="0 0 24 24"- xmlns="http://www.w3.org/2000/svg"- >- <path- stroke-linecap="round"- stroke-linejoin="round"- stroke-width="2"- d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"- ></path>- </svg>- <a href="/" class="ml-1 text-sm">Help & Feedback</a>- </div>- </div>- </div>- </div>- <div- class="bg-normal hidden lg:flex lg:flex-shrink-0 flex-col w-64 border-r border-block-border pt-4"- >- <div class="flex justify-between flex-shrink-0 px-4 mb-2">- <router-link to="/" active-class="" exact-active-class=""- ><img class="h-10 w-auto" src="../assets/logo.svg" alt="Bytebase"- /></router-link>- <div class="flex items-center flex-shrink-0 pl-4">- <ProfileDropdown />- </div>- </div>- <router-view name="leftSidebar" />- <div- class="flex-shrink-0 flex flex-row border-t border-block-border p-3 text-gray-700"- >- <svg- class="w-5 h-5"- fill="none"- stroke="currentColor"- viewBox="0 0 24 24"- xmlns="http://www.w3.org/2000/svg"- >- <path- stroke-linecap="round"- stroke-linejoin="round"- stroke-width="2"- d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"- ></path>- </svg>- <a href="/" class="ml-1 text-sm">Help & Feedback</a>- </div>- </div>- <div class="lg:flex flex-col flex-1">- <div- class="bg-normal flex-shrink-0 border-b border-block-border px-2 py-2"- >- <TheHeader v-on:open-sidebar="state.showMobileOverlay = true" />- </div>- <div class="lg:flex flex-1">- <!-- Main Content-->- <div class="bg-normal lg:min-w-0 lg:flex-1">- <router-view name="content" />- </div>- <!-- Activity feed -->- <div- class="lg:block bg-gray-50 pr-4 sm:pr-6 lg:pr-8 lg:flex-shrink-0 lg:border-l lg:border-block-border xl:pr-0"- >- <div class="pl-6 lg:w-80">- <router-view name="rightsidebar" />- </div>- </div>- </div>- </div>- </div>- </div>-</template>--<script lang="ts">-import { reactive } from "vue";-import ActivitySidebar from "../views/ActivitySidebar.vue";-import ProfileDropdown from "../components/ProfileDropdown.vue";-import TheHeader from "../components/TheHeader.vue";--interface LocalState {- showMobileOverlay: boolean;-}--export default {- name: "MaseterDetail",- components: {- ActivitySidebar,- ProfileDropdown,- TheHeader,- },- setup(props, ctx) {- const state = reactive<LocalState>({- showMobileOverlay: false,- });-- return state;- },-};-</script>