Skip to content

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

Rework Quickstart list

天舟4a57618555be
diff --git a/frontend/src/components/ProfileDropdown.vue b/frontend/src/components/ProfileDropdown.vue
index 829d128761..25cf01afd9 100644
--- a/frontend/src/components/ProfileDropdown.vue
+++ b/frontend/src/components/ProfileDropdown.vue
@@ -120,12 +120,16 @@ export default {
key: "instance.create",
newState: false,
});
+ store.dispatch("uistate/saveIntroStateByKey", {
+ key: "project.create",
+ newState: false,
+ });
store.dispatch("uistate/saveIntroStateByKey", {
key: "database.create",
newState: false,
});
store.dispatch("uistate/saveIntroStateByKey", {
- key: "table.create",
+ key: "schema.update",
newState: false,
});
store.dispatch("uistate/saveIntroStateByKey", {
diff --git a/frontend/src/components/ProjectCreate.vue b/frontend/src/components/ProjectCreate.vue
index 554c1817b6..4054406a6a 100644
--- a/frontend/src/components/ProjectCreate.vue
+++ b/frontend/src/components/ProjectCreate.vue
@@ -98,6 +98,11 @@ export default {
store
.dispatch("project/createProject", state.project)
.then((createdProject: Project) => {
+ store.dispatch("uistate/saveIntroStateByKey", {
+ key: "project.create",
+ newState: true,
+ });
+
store.dispatch("notification/pushNotification", {
module: "bytebase",
style: "SUCCESS",
diff --git a/frontend/src/components/Quickstart.vue b/frontend/src/components/Quickstart.vue
index 7dd7790204..062f33d0f2 100644
--- a/frontend/src/components/Quickstart.vue
+++ b/frontend/src/components/Quickstart.vue
@@ -97,12 +97,12 @@
<script lang="ts">
import { computed, reactive, ComputedRef } from "vue";
import { useStore } from "vuex";
-import { isDeveloper } from "../utils";
+import { isDBAOrOwner } from "../utils";
type IntroItem = {
name: string;
link: string;
- allowDeveloper: boolean;
+ dbaAndOwnerOnly: boolean;
done: ComputedRef<boolean>;
};
@@ -118,9 +118,9 @@ export default {
const introList: IntroItem[] = reactive([
{
- name: "Bookmark a issue",
+ name: "Bookmark an issue",
link: "/issue/hello-world-1",
- allowDeveloper: true,
+ dbaAndOwnerOnly: false,
done: computed(() => {
return store.getters["uistate/introStateByKey"]("bookmark.create");
}),
@@ -128,7 +128,7 @@ export default {
{
name: "Add an environment",
link: "/environment",
- allowDeveloper: false,
+ dbaAndOwnerOnly: true,
done: computed(() => {
return store.getters["uistate/introStateByKey"]("environment.create");
}),
@@ -136,43 +136,51 @@ export default {
{
name: "Add an instance",
link: "/instance",
- allowDeveloper: false,
+ dbaAndOwnerOnly: true,
done: computed(() => {
return store.getters["uistate/introStateByKey"]("instance.create");
}),
},
{
- name: "Request a database",
- link: "/issue/new?template=bb.database.create&description=Estimated QPS: 10",
- allowDeveloper: true,
- done: computed(() =>
- store.getters["uistate/introStateByKey"]("database.create")
- ),
+ name: "Create a project",
+ link: "/project",
+ dbaAndOwnerOnly: false,
+ done: computed(() => {
+ return store.getters["uistate/introStateByKey"]("project.create");
+ }),
},
{
- name: "Create a table",
- link: "/issue/new?template=bb.database.schema.update&name=Create employee table&description=Stores employee basic info&sql=CREATE TABLE employee (\n id INT NOT NULL,\n name TEXT,\n age INT,\n PRIMARY KEY (name)\n);&rollbacksql=DROP TABLE employee;",
- allowDeveloper: true,
+ name: "Create a database",
+ link: "/db/new",
+ dbaAndOwnerOnly: store.getters["plan/feature"]("bb.dba-workflow"),
done: computed(() =>
- store.getters["uistate/introStateByKey"]("table.create")
+ store.getters["uistate/introStateByKey"]("database.create")
),
},
{
- name: "Invite a member",
- link: "/setting/member",
- allowDeveloper: false,
+ name: "Alter schema",
+ link: "/",
+ dbaAndOwnerOnly: false,
done: computed(() =>
- store.getters["uistate/introStateByKey"]("member.invite")
+ store.getters["uistate/introStateByKey"]("schema.update")
),
},
+ // {
+ // name: "Invite a member",
+ // link: "/setting/member",
+ // dbaAndOwnerOnly: true,
+ // done: computed(() =>
+ // store.getters["uistate/introStateByKey"]("member.invite")
+ // ),
+ // },
]);
const devIntroList: IntroItem[] = introList.filter(
- (item) => item.allowDeveloper
+ (item) => !item.dbaAndOwnerOnly
);
const effectiveList = computed(() => {
- return isDeveloper(currentUser.value.role) ? devIntroList : introList;
+ return isDBAOrOwner(currentUser.value.role) ? introList : devIntroList;
});
const isTaskActive = (index: number): boolean => {
diff --git a/frontend/src/views/IssueDetail.vue b/frontend/src/views/IssueDetail.vue
index 666be67a27..3a2aa36273 100644
--- a/frontend/src/views/IssueDetail.vue
+++ b/frontend/src/views/IssueDetail.vue
@@ -554,7 +554,7 @@ export default {
issueTemplate.value.type == "bb.issue.database.schema.update"
) {
store.dispatch("uistate/saveIntroStateByKey", {
- key: "table.create",
+ key: "schema.update",
newState: true,
});
}