Skip to content

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

Remove Project functionality for now

Tianzhou Chenc24c513aee39
diff --git a/frontend/src/components/ProjectListMobile.vue b/frontend/src/components/ProjectListMobile.vue
deleted file mode 100644
index 18568d6fe8..0000000000
--- a/frontend/src/components/ProjectListMobile.vue
+++ /dev/null
@@ -1,42 +0,0 @@
-<template>
- <div>
- <div class="px-4 sm:px-6">
- <h2 class="text-gray-500 text-xs font-medium uppercase tracking-wide">
- Projects
- </h2>
- </div>
- <ul class="mt-3 border-t border-block-border divide-y divide-gray-100">
- <li>
- <a
- href="#"
- class="flex items-center justify-between px-4 py-4 hover:bg-gray-300 sm:px-6"
- >
- <div class="flex items-center truncate space-x-3">
- <div
- class="w-2.5 h-2.5 flex-shrink-0 rounded-full bg-pink-600"
- ></div>
- <p class="font-medium truncate text-sm leading-6">
- GraphQL API
- <span class="truncate font-normal text-gray-500"
- >in Engineering</span
- >
- </p>
- </div>
- <svg
- class="ml-4 h-5 w-5 text-gray-400 group-hover:text-gray-500 group-focus:text-gray-600"
- viewBox="0 0 20 20"
- fill="currentColor"
- >
- <path
- fill-rule="evenodd"
- d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
- clip-rule="evenodd"
- />
- </svg>
- </a>
- </li>
-
- <!-- More project rows... -->
- </ul>
- </div>
-</template>
diff --git a/frontend/src/components/ProjectListSidePanel.vue b/frontend/src/components/ProjectListSidePanel.vue
deleted file mode 100644
index cb4303e9e2..0000000000
--- a/frontend/src/components/ProjectListSidePanel.vue
+++ /dev/null
@@ -1,53 +0,0 @@
-<template>
- <h3
- class="px-3 text-xs leading-4 font-semibold text-control-light uppercase tracking-wider"
- id="projects-headline"
- >
- Projects
- </h3>
- <ProjectSidePanel
- v-for="item in projectList"
- :key="item.id"
- :project="item"
- />
-</template>
-
-<script lang="ts">
-import { watchEffect, computed } from "vue";
-import { useStore } from "vuex";
-import ProjectSidePanel from "./ProjectSidePanel.vue";
-import { User } from "../types";
-
-export default {
- name: "ProjectListSidePanel",
- props: {},
- components: {
- ProjectSidePanel,
- },
- setup(props, ctx) {
- const store = useStore();
-
- const currentUser: User = computed(() =>
- store.getters["auth/currentUser"]()
- ).value;
-
- const prepareProjectList = () => {
- store
- .dispatch("project/fetchProjectListForUser", currentUser.id)
- .catch((error) => {
- console.log(error);
- });
- };
-
- const projectList = computed(() =>
- store.getters["project/projectListByUser"](currentUser.id)
- );
-
- watchEffect(prepareProjectList);
-
- return {
- projectList,
- };
- },
-};
-</script>
diff --git a/frontend/src/components/ProjectSidePanel.vue b/frontend/src/components/ProjectSidePanel.vue
deleted file mode 100644
index 857cb15195..0000000000
--- a/frontend/src/components/ProjectSidePanel.vue
+++ /dev/null
@@ -1,88 +0,0 @@
-<template>
- <div class="mt-1 space-y-1" role="group" aria-labelledby="projects-headline">
- <button
- @click.prevent="toggleExpand"
- class="outline-item mt-1 group w-full flex items-center pr-2 py-2"
- >
- <svg
- v-if="expandState"
- class="mr-2 h-5 w-5 transform rotate-90 group-hover:text-control-light-hover group-focus:text-control-light-hover transition-colors ease-in-out duration-150"
- viewBox="0 0 20 20"
- >
- <path d="M6 6L14 10L6 14V6Z" fill="currentColor" />
- </svg>
- <svg
- v-else
- class="mr-2 h-5 w-5 transform group-hover:text-control-light-hover group-focus:text-control-light-hover transition-colors ease-in-out duration-150"
- viewBox="0 0 20 20"
- >
- <path d="M6 6L14 10L6 14V6Z" fill="currentColor" />
- </svg>
- {{ project.attributes.name }}
- </button>
- <!-- Expandable link section, show/hide based on state. -->
- <div v-if="expandState" class="mt-1 space-y-1">
- <router-link
- :to="`/${project.attributes.namespace}/${project.attributes.slug}/task`"
- class="outline-item group w-full flex items-center pl-10 pr-2 py-1"
- >
- Task
- </router-link>
- <router-link
- :to="`/${project.attributes.namespace}/${project.attributes.slug}/environment`"
- class="outline-item group w-full flex items-center pl-10 pr-2 py-1"
- >
- Environment
- </router-link>
- <router-link
- :to="`/${project.attributes.namespace}/${project.attributes.slug}/repository`"
- class="outline-item group w-full flex items-center pl-10 pr-2 py-1"
- >
- Repository
- </router-link>
- </div>
- </div>
-</template>
-
-<script lang="ts">
-import { computed, PropType } from "vue";
-import { useStore } from "vuex";
-import { Project, ProjectId } from "../types";
-
-export default {
- name: "ProjectSidePanel",
- props: {
- project: {
- required: true,
- type: Object as PropType<Project>,
- },
- },
- setup(props, ctx) {
- const store = useStore();
-
- const projectId: ProjectId = props.project.id;
-
- const expandState = computed(() =>
- store.getters["uistate/expandStateByProject"](projectId)
- );
-
- const toggleExpand = () => {
- const newState = !expandState.value;
- store
- .dispatch("uistate/saveExpandStateByProject", {
- projectId,
- expand: newState,
- })
- .catch((error) => {
- console.log(error);
- return;
- });
- };
-
- return {
- expandState,
- toggleExpand,
- };
- },
-};
-</script>
diff --git a/frontend/src/components/ProjectTable.vue b/frontend/src/components/ProjectTable.vue
deleted file mode 100644
index 10574573ba..0000000000
--- a/frontend/src/components/ProjectTable.vue
+++ /dev/null
@@ -1,94 +0,0 @@
-<template>
- <div
- class="align-middle inline-block min-w-full border-b border-block-border"
- >
- <table class="min-w-full">
- <thead>
- <tr class="border-t border-block-border">
- <th
- class="px-6 py-3 border-b border-block-border bg-gray-50 text-left text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider"
- >
- <span class="lg:pl-2">Project</span>
- </th>
- <th
- class="hidden md:table-cell px-6 py-3 border-b border-block-border bg-gray-50 text-left text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider"
- >
- Slug
- </th>
- <th
- class="hidden md:table-cell px-6 py-3 border-b border-block-border bg-gray-50 text-right text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider"
- >
- Last updated
- </th>
- <th
- class="pr-6 py-3 border-b border-block-border bg-gray-50 text-right text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider"
- ></th>
- </tr>
- </thead>
- <tbody class="bg-normal divide-y divide-gray-100">
- <tr v-for="project in projectList" :key="project.id">
- <td
- class="px-6 py-3 max-w-0 w-full whitespace-nowrap text-sm leading-5 font-medium text-gray-900"
- >
- <div class="flex items-center space-x-3 lg:pl-2">
- <router-link
- :to="`/${project.attributes.namespace}/${project.attributes.slug}`"
- class="truncate hover:text-gray-600"
- >
- {{ project.attributes.name }}
- </router-link>
- </div>
- </td>
- <td
- class="hidden md:table-cell px-6 py-3 whitespace-nowrap text-sm leading-5 text-gray-900 text-left"
- >
- {{ project.attributes.slug }}
- </td>
- <td
- class="hidden md:table-cell px-6 py-3 whitespace-nowrap text-sm leading-5 text-gray-500 text-right"
- >
- March 17, 2020
- </td>
- <td class="pr-6">
- <div class="relative flex justify-end items-center">
- <ProjectTableActionButton />
- </div>
- </td>
- </tr>
-
- <!-- More project rows... -->
- </tbody>
- </table>
- </div>
-</template>
-
-<script lang="ts">
-import { computed } from "vue";
-import { useStore } from "vuex";
-
-import ProjectTableActionButton from "./ProjectTableActionButton.vue";
-import { User } from "../types";
-
-export default {
- name: "ProjectTable",
- components: {
- ProjectTableActionButton,
- },
- props: {},
- setup(props, ctx) {
- const store = useStore();
-
- const currentUser: User = computed(() =>
- store.getters["auth/currentUser"]()
- ).value;
-
- const projectList = computed(() =>
- store.getters["project/projectListByUser"](currentUser.id)
- );
-
- return {
- projectList,
- };
- },
-};
-</script>
diff --git a/frontend/src/components/ProjectTableActionButton.vue b/frontend/src/components/ProjectTableActionButton.vue
deleted file mode 100644
index 2f567c34ef..0000000000
--- a/frontend/src/components/ProjectTableActionButton.vue
+++ /dev/null
@@ -1,105 +0,0 @@
-<template>
- <button
- @click.prevent="$refs.menu.toggle($event)"
- @contextmenu.capture.prevent="$refs.menu.toggle($event)"
- id="project-options-menu-0"
- aria-has-popup="true"
- type="button"
- class="w-8 h-8 inline-flex items-center justify-center text-gray-400 rounded-full bg-transparent hover:text-gray-500 focus:outline-none focus:text-gray-500 focus:bg-gray-100"
- >
- <svg class="w-5 h-5" viewBox="0 0 20 20" fill="currentColor">
- <path
- d="M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z"
- />
- </svg>
- </button>
- <BBContextMenu
- ref="menu"
- class="z-10 mx-3 origin-top-right absolute right-7 top-0 w-48 mt-1 rounded-md shadow-lg"
- >
- <div class="py-1">
- <a
- href="#"
- class="group flex items-center px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"
- role="menuitem"
- >
- <svg
- class="mr-3 h-5 w-5 text-gray-400 group-hover:text-gray-500 group-focus:text-gray-500"
- viewBox="0 0 20 20"
- fill="currentColor"
- >
- <path
- d="M17.414 2.586a2 2 0 00-2.828 0L7 10.172V13h2.828l7.586-7.586a2 2 0 000-2.828z"
- />
- <path
- fill-rule="evenodd"
- d="M2 6a2 2 0 012-2h4a1 1 0 010 2H4v10h10v-4a1 1 0 112 0v4a2 2 0 01-2 2H4a2 2 0 01-2-2V6z"
- clip-rule="evenodd"
- />
- </svg>
- Edit
- </a>
- <a
- href="#"
- class="group flex items-center px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"
- role="menuitem"
- >
- <svg
- class="mr-3 h-5 w-5 text-gray-400 group-hover:text-gray-500 group-focus:text-gray-500"
- viewBox="0 0 20 20"
- fill="currentColor"
- >
- <path
- d="M7 9a2 2 0 012-2h6a2 2 0 012 2v6a2 2 0 01-2 2H9a2 2 0 01-2-2V9z"
- />
- <path d="M5 3a2 2 0 00-2 2v6a2 2 0 002 2V5h8a2 2 0 00-2-2H5z" />
- </svg>
- Duplicate
- </a>
- <a
- href="#"
- class="group flex items-center px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"
- role="menuitem"
- >
- <svg
- class="mr-3 h-5 w-5 text-gray-400 group-hover:text-gray-500 group-focus:text-gray-500"
- viewBox="0 0 20 20"
- fill="currentColor"
- >
- <path
- d="M8 9a3 3 0 100-6 3 3 0 000 6zM8 11a6 6 0 016 6H2a6 6 0 016-6zM16 7a1 1 0 10-2 0v1h-1a1 1 0 100 2h1v1a1 1 0 102 0v-1h1a1 1 0 100-2h-1V7z"
- />
- </svg>
- Share
- </a>
- </div>
- <div class="border-t border-gray-100"></div>
- <div class="py-1">
- <a
- href="#"
- class="group flex items-center px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"
- role="menuitem"
- >
- <svg
- class="mr-3 h-5 w-5 text-gray-400 group-hover:text-gray-500 group-focus:text-gray-500"
- viewBox="0 0 20 20"
- fill="currentColor"
- >
- <path
- fill-rule="evenodd"
- d="M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z"
- clip-rule="evenodd"
- />
- </svg>
- Delete
- </a>
- </div>
- </BBContextMenu>
-</template>
-
-<script lang="ts">
-export default {
- name: "ProjectTableActionButton",
- components: {},
-};
-</script>
diff --git a/frontend/src/components/SettingProjectListSidePanel.vue b/frontend/src/components/SettingProjectListSidePanel.vue
deleted file mode 100644
index 274aca063d..0000000000
--- a/frontend/src/components/SettingProjectListSidePanel.vue
+++ /dev/null
@@ -1,48 +0,0 @@
-<template>
- <div class="mt-1 space-y-1" role="group" aria-labelledby="projects-headline">
- <template v-for="project in projectList" :key="project.id">
- <router-link
- :to="`/${project.attributes.namespace}/${project.attributes.slug}/setting`"
- class="outline-item group w-full flex items-center pl-11 pr-2 py-2"
- >
- {{ project.attributes.name }}
- </router-link>
- </template>
- </div>
-</template>
-
-<script lang="ts">
-import { watchEffect, computed } from "vue";
-import { useStore } from "vuex";
-import { User } from "../types";
-
-export default {
- name: "SettingProjectListSidePanel",
- props: {},
- setup(props, ctx) {
- const store = useStore();
-
- const currentUser: User = computed(() =>
- store.getters["auth/currentUser"]()
- ).value;
-
- const prepareProjectList = () => {
- store
- .dispatch("project/fetchProjectListForUser", currentUser.id)
- .catch((error) => {
- console.log(error);
- });
- };
-
- const projectList = computed(() =>
- store.getters["project/projectListByUser"](currentUser.id)
- );
-
- watchEffect(prepareProjectList);
-
- return {
- projectList,
- };
- },
-};
-</script>
diff --git a/frontend/src/miragejs/factories/index.js b/frontend/src/miragejs/factories/index.js
index 063e85de27..7ffe357eab 100644
--- a/frontend/src/miragejs/factories/index.js
+++ b/frontend/src/miragejs/factories/index.js
@@ -4,7 +4,6 @@
import user from "./user";
import bookmark from "./bookmark";
-import project from "./project";
import environment from "./environment";
import instance from "./instance";
import dataSource from "./dataSource";
@@ -28,7 +27,6 @@ import loginInfo from "./loginInfo";
export default {
...user,
...bookmark,
- ...project,
...environment,
...instance,
...dataSource,
diff --git a/frontend/src/miragejs/factories/project.js b/frontend/src/miragejs/factories/project.js
deleted file mode 100644
index 8de4577cb7..0000000000
--- a/frontend/src/miragejs/factories/project.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { Factory } from "miragejs";
-import faker from "faker";
-
-export default {
- project: Factory.extend({
- name() {
- return "project " + faker.fake("{{lorem.word}}");
- },
- slug(i) {
- return "pro" + (i + 1);
- },
- namespace() {
- return "";
- },
- lastUpdated() {
- return Date.now() - 3600 * 1000;
- },
- pinned(i) {
- return i % 2 == 0;
- },
- afterCreate(project, server) {
- server.create("repository", { project });
- },
- }),
-};
diff --git a/frontend/src/miragejs/models/index.js b/frontend/src/miragejs/models/index.js
index ff8c0e6c9f..7cf099af32 100644
--- a/frontend/src/miragejs/models/index.js
+++ b/frontend/src/miragejs/models/index.js
@@ -16,7 +16,6 @@ export default {
workspace: Model.extend({
group: hasMany(),
- project: hasMany(),
member: hasMany(),
activity: hasMany(),
task: hasMany(),
@@ -40,7 +39,7 @@ export default {
group: Model.extend({
workspace: belongsTo(),
- project: hasMany(),
+
groupRole: hasMany(),
}),
@@ -68,17 +67,7 @@ export default {
instance: belongsTo(),
}),
- project: Model.extend({
- workspace: belongsTo(),
- group: belongsTo(),
- environment: hasMany(),
- // To signal 1:1 relationship
- repository: belongsTo(),
- }),
-
- repository: Model.extend({
- project: belongsTo(),
- }),
+ repository: Model.extend({}),
batchUpdate: Model,
diff --git a/frontend/src/miragejs/routes/index.js b/frontend/src/miragejs/routes/index.js
index 46cb1c43ef..bc33205b68 100644
--- a/frontend/src/miragejs/routes/index.js
+++ b/frontend/src/miragejs/routes/index.js
@@ -468,55 +468,4 @@ export default function routes() {
workspaceId: WORKSPACE_ID,
});
});
-
- // Project
- this.get("/project", function (schema, request) {
- const {
- queryParams: { groupid: groupId, userid: userId },
- } = request;
-
- if (groupId && userId) {
- return new Response(
- 400,
- {},
- { errors: "groupid and userid can't be specified together" }
- );
- }
-
- if (!groupId && !userId) {
- return schema.projects.where({
- workspaceId: WORKSPACE_ID,
- });
- }
-
- const groupIdList = [];
- if (groupId) {
- groupIdList.push(groupId);
- } else if (userId) {
- const groupList = schema.groups.where((group) => {
- return (
- group.workspaceId == WORKSPACE_ID &&
- group.groupRoleIds?.find((roleId) => {
- return schema.groupRoles.where({
- userId,
- groupId: group.id,
- });
- })
- );
- });
- groupList.models.forEach((group) => {
- groupIdList.push(group.id);
- });
- }
-
- if (groupIdList.length) {
- return schema.projects.where((project) => {
- return (
- project.workspaceId == WORKSPACE_ID &&
- groupIdList.includes(project.groupId)
- );
- });
- }
- return schema.environments.none();
- });
}
diff --git a/frontend/src/miragejs/seeds/index.js b/frontend/src/miragejs/seeds/index.js
index 264d9dc114..937321bc0f 100644
--- a/frontend/src/miragejs/seeds/index.js
+++ b/frontend/src/miragejs/seeds/index.js
@@ -328,9 +328,8 @@ const workspacesSeeder = (server) => {
});
// Naming convention
- // xxx <<workspace #>><<group #>><<project #>>
+ // xxx <<workspace #>><<group #>>
// e.g. group 12 (1st workspace and 1st group inside)
- // e.g. project 241 (2nd workspace, 4th group inside and 1st project inside)
// Group
// Workspace 1
@@ -360,38 +359,6 @@ const workspacesSeeder = (server) => {
workspace: workspace2,
});
- // Project
- // Workspace 1
- const project1 = server.create("project", {
- name: "proj 111",
- slug: "proj111",
- namespace: "grp11",
- workspace: workspace1,
- group: group1,
- });
- const project2 = server.create("project", {
- name: "proj 122",
- slug: "proj122",
- namespace: "grp12",
- workspace: workspace1,
- group: group2,
- });
- const project3 = server.create("project", {
- name: "proj 131",
- slug: "proj131",
- namespace: "grp13",
- workspace: workspace1,
- group: group3,
- });
- // Workspace 2
- const project4 = server.create("project", {
- name: "proj 241",
- slug: "proj241",
- namespace: "grp24",
- workspace: workspace2,
- group: group4,
- });
-
// User 1 is owner of group1, developer of group3 and owner of group4
const user1 = server.schema.users.find(1);
server.create("groupRole", {
diff --git a/frontend/src/store/index.ts b/frontend/src/store/index.ts
index 8006163d31..9ae02696f2 100644
--- a/frontend/src/store/index.ts
+++ b/frontend/src/store/index.ts
@@ -4,7 +4,6 @@ import { createStore, Store } from "vuex";
import activity from "./modules/activity";
import bookmark from "./modules/bookmark";
import member from "./modules/member";
-import project from "./modules/project";
import environment from "./modules/environment";
import instance from "./modules/instance";
import dataSource from "./modules/dataSource";
@@ -29,7 +28,6 @@ export const store: Store<any> = createStore({
activity,
bookmark,
member,
- project,
environment,
instance,
dataSource,
diff --git a/frontend/src/store/modules/project.ts b/frontend/src/store/modules/project.ts
deleted file mode 100644
index ef171605ea..0000000000
--- a/frontend/src/store/modules/project.ts
+++ /dev/null
@@ -1,92 +0,0 @@
-import axios from "axios";
-import { UserId, GroupId, Project, ProjectState } from "../../types";
-
-const state: () => ProjectState = () => ({
- projectListByGroup: new Map(),
- projectListByUser: new Map(),
-});
-
-const getters = {
- projectListByGroup: (state: ProjectState) => (groupId: GroupId) => {
- return state.projectListByGroup.get(groupId);
- },
-
- projectListByUser: (state: ProjectState) => (userId: UserId) => {
- return state.projectListByUser.get(userId);
- },
-
- projectByNamespaceAndSlug: (state: ProjectState) => (
- namespace: string,
- slug: string
- ) => {
- for (const projectList of state.projectListByGroup.values()) {
- for (const project of projectList) {
- if (
- project.attributes.namespace === namespace &&
- project.attributes.slug === slug
- ) {
- return project;
- }
- }
- }
- return null;
- },
-};
-
-const actions = {
- async fetchProjectListForGroup({ commit }: any, groupId: GroupId) {
- const projectList = (await axios.get(`/api/project?groupid=${groupId}`))
- .data.data;
- commit("setProjectListForGroup", {
- groupId,
- projectList,
- });
- return projectList;
- },
-
- async fetchProjectListForUser({ commit }: any, userId: UserId) {
- const projectList = (await axios.get(`/api/project?userid=${userId}`)).data
- .data;
- commit("setProjectListForUser", {
- userId,
- projectList,
- });
- return projectList;
- },
-};
-
-const mutations = {
- setProjectListForGroup(
- state: ProjectState,
- {
- groupId,
- projectList,
- }: {
- groupId: GroupId;
- projectList: Project[];
- }
- ) {
- state.projectListByGroup.set(groupId, projectList);
- },
-
- setProjectListForUser(
- state: ProjectState,
- {
- userId,
- projectList,
- }: {
- userId: UserId;
- projectList: Project[];
- }
- ) {
- state.projectListByUser.set(userId, projectList);
- },
-};
-
-export default {
- namespaced: true,
- state,
- getters,
- actions,
- mutations,
-};
diff --git a/frontend/src/store/modules/uistate.ts b/frontend/src/store/modules/uistate.ts
index 59a01aa2da..4091f5178c 100644
--- a/frontend/src/store/modules/uistate.ts
+++ b/frontend/src/store/modules/uistate.ts
@@ -43,11 +43,6 @@ const getters = {
const key = ["grp", groupId].join(".");
return expandStateByKey(state, key);
},
-
- expandStateByProject: (state: UIState) => (projectId: ProjectId) => {
- const key = ["proj", projectId].join(".");
- return expandStateByKey(state, key);
- },
};
const actions = {
@@ -86,20 +81,6 @@ const actions = {
const key = ["grp", groupId].join(".");
return saveExpandStateByKey(commit, key, expand);
},
-
- async saveExpandStateByProject(
- { commit }: any,
- {
- projectId,
- expand,
- }: {
- projectId: ProjectId;
- expand: boolean;
- }
- ) {
- const key = ["proj", projectId].join(".");
- return saveExpandStateByKey(commit, key, expand);
- },
};
const mutations = {
diff --git a/frontend/src/types/bytebase.ts b/frontend/src/types/bytebase.ts
index e702a0ba45..169338a2c7 100644
--- a/frontend/src/types/bytebase.ts
+++ b/frontend/src/types/bytebase.ts
@@ -21,7 +21,6 @@ export type ActivityId = string;
export type GroupId = string;
-export type ProjectId = string;
export type EnvironmentId = string;
@@ -233,9 +232,6 @@ export type DataSourceNew = Omit<DataSource, "id">;
export type Group = ResourceObject & {};
export type GroupNew = Omit<Group, "id">;
-// Project
-export type Project = ResourceObject & {};
-export type ProjectNew = Omit<Project, "id">;
// Repository
export type Repository = ResourceObject & {};
@@ -312,11 +308,6 @@ export interface GroupState {
groupListByUser: Map<UserId, Group[]>;
}
-export interface ProjectState {
- projectListByGroup: Map<GroupId, Project[]>;
- projectListByUser: Map<UserId, Project[]>;
-}
-
export interface EnvironmentState {
environmentList: Environment[];
}
diff --git a/frontend/src/views/DashboardSidebar.vue b/frontend/src/views/DashboardSidebar.vue
index 98f6f72c06..e280034d5e 100644
--- a/frontend/src/views/DashboardSidebar.vue
+++ b/frontend/src/views/DashboardSidebar.vue
@@ -26,9 +26,6 @@
<div>
<BookmarkListSidePanel />
</div>
- <!-- <div class="mt-4">
- <ProjectListSidePanel />
- </div>
<div class="mt-4">
<GroupListSidePanel />
</div> -->
@@ -39,7 +36,6 @@
import { reactive } from "vue";
import BookmarkListSidePanel from "../components/BookmarkListSidePanel.vue";
// import GroupListSidePanel from "../components/GroupListSidePanel.vue";
-// import ProjectListSidePanel from "../components/ProjectListSidePanel.vue";
interface LocalState {
hasUnreadMessage: boolean;
@@ -51,7 +47,6 @@ export default {
components: {
BookmarkListSidePanel,
// GroupListSidePanel,
- // ProjectListSidePanel,
},
setup(props, ctx) {
const state = reactive<LocalState>({
diff --git a/frontend/src/views/SettingSidebar.vue b/frontend/src/views/SettingSidebar.vue
index d7a778ac17..c002cd6bc5 100644
--- a/frontend/src/views/SettingSidebar.vue
+++ b/frontend/src/views/SettingSidebar.vue
@@ -112,28 +112,6 @@
</div>
</div>
</div>
- <div class="mt-8">
- <div
- class="group flex items-center px-2 py-2 text-sm leading-5 font-medium rounded-md text-gray-700"
- >
- <svg
- class="mr-3 h-6 w-6 text-gray-500"
- 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="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"
- ></path>
- </svg>
- Projects
- </div>
- <!-- <SettingProjectListSidePanel /> -->
- </div>
</div>
</nav>
</template>
@@ -142,7 +120,6 @@
import { reactive } from "vue";
import { useStore } from "vuex";
import { useRouter } from "vue-router";
-// import SettingProjectListSidePanel from "../components/SettingProjectListSidePanel.vue";
interface LocalState {
expandState: boolean;
@@ -151,9 +128,7 @@ interface LocalState {
export default {
name: "SettingSidebar",
props: {},
- components: {
- // SettingProjectListSidePanel,
- },
+ components: {},
setup(props, ctx) {
const store = useStore();
const router = useRouter();
diff --git a/frontend/src/views/SettingWorkspaceProject.vue b/frontend/src/views/SettingWorkspaceProject.vue
deleted file mode 100644
index be0ab9d62b..0000000000
--- a/frontend/src/views/SettingWorkspaceProject.vue
+++ /dev/null
@@ -1,15 +0,0 @@
-<template>
- <h1>Project Setting</h1>
-</template>
-
-<script lang="ts">
-export default {
- name: "SettingWorkspaceProject",
- props: {
- projectSlug: {
- required: true,
- },
- },
- setup(props, ctx) {},
-};
-</script>