Skip to content

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

Rename data source action to database action

天舟8cefc44e1255
diff --git a/frontend/src/components/ProfileDropdown.vue b/frontend/src/components/ProfileDropdown.vue
index ce18dd1e21..224ac7bb69 100644
--- a/frontend/src/components/ProfileDropdown.vue
+++ b/frontend/src/components/ProfileDropdown.vue
@@ -124,7 +124,7 @@ export default {
newState: false,
});
store.dispatch("uistate/saveIntroStateByKey", {
- key: "datasource.request",
+ key: "database.request",
newState: false,
});
store.dispatch("uistate/saveIntroStateByKey", {
diff --git a/frontend/src/components/QuickActionPanel.vue b/frontend/src/components/QuickActionPanel.vue
index 2f4d24ecf6..a6a38bb345 100644
--- a/frontend/src/components/QuickActionPanel.vue
+++ b/frontend/src/components/QuickActionPanel.vue
@@ -112,7 +112,7 @@
class="flex flex-col items-center w-28"
>
<router-link
- to="/task/new?template=bytebase.datasource.request"
+ to="/task/new?template=bytebase.database.request"
class="p-3 btn-icon-primary"
>
<svg
@@ -140,7 +140,7 @@
class="flex flex-col items-center w-28"
>
<router-link
- to="/task/new?template=bytebase.datasource.schema.update"
+ to="/task/new?template=bytebase.database.schema.update"
class="btn-icon-primary p-3"
>
<svg
diff --git a/frontend/src/components/Quickstart.vue b/frontend/src/components/Quickstart.vue
index 128882d445..6570ec4e40 100644
--- a/frontend/src/components/Quickstart.vue
+++ b/frontend/src/components/Quickstart.vue
@@ -104,14 +104,14 @@ export default {
},
{
name: "Request a database",
- link: "/task/new?template=bytebase.datasource.request",
+ link: "/task/new?template=bytebase.database.request",
done: computed(() =>
- store.getters["uistate/introStateByKey"]("datasource.request")
+ store.getters["uistate/introStateByKey"]("database.request")
),
},
{
name: "Create a table",
- link: "/task/new?template=bytebase.datasource.schema.update",
+ link: "/task/new?template=bytebase.database.schema.update",
done: computed(() =>
store.getters["uistate/introStateByKey"]("table.create")
),
diff --git a/frontend/src/miragejs/factories/task.js b/frontend/src/miragejs/factories/task.js
index 7855523c84..2262c179c1 100644
--- a/frontend/src/miragejs/factories/task.js
+++ b/frontend/src/miragejs/factories/task.js
@@ -26,7 +26,7 @@ export default {
}
},
type() {
- return "bytebase.datasource.request";
+ return "bytebase.database.request";
},
description() {
return faker.fake("{{lorem.paragraphs}}");
diff --git a/frontend/src/miragejs/seeds/index.js b/frontend/src/miragejs/seeds/index.js
index 2e76120403..7686252c88 100644
--- a/frontend/src/miragejs/seeds/index.js
+++ b/frontend/src/miragejs/seeds/index.js
@@ -105,7 +105,7 @@ const workspacesSeeder = (server) => {
}
task = server.create("task", {
- type: "bytebase.datasource.request",
+ type: "bytebase.database.request",
name: "Request data source for environment - " + environmentList1[1].name,
creatorId: ws1Dev1.id,
assigneeId: ws1Owner.id,
@@ -150,7 +150,7 @@ const workspacesSeeder = (server) => {
for (let i = 0; i < 5; i++) {
task = server.create("task", {
- type: "bytebase.datasource.schema.update",
+ type: "bytebase.database.schema.update",
creatorId: ws1Dev1.id,
assigneeId: ws1Owner.id,
creator: {
@@ -186,7 +186,7 @@ const workspacesSeeder = (server) => {
for (let i = 0; i < 15; i++) {
task = server.create("task", {
- type: "bytebase.datasource.schema.update",
+ type: "bytebase.database.schema.update",
creatorId: ws1Owner.id,
assigneeId: ws1DBA.id,
creatorId: ws1Owner.id,
@@ -222,7 +222,7 @@ const workspacesSeeder = (server) => {
for (let i = 0; i < 15; i++) {
task = server.create("task", {
- type: "bytebase.datasource.schema.update",
+ type: "bytebase.database.schema.update",
creatorId: ws1Dev2.id,
assigneeId: ws1DBA.id,
creatorId: ws1Dev2.id,
@@ -254,7 +254,7 @@ const workspacesSeeder = (server) => {
}
task = server.create("task", {
- type: "bytebase.datasource.schema.update",
+ type: "bytebase.database.schema.update",
creatorId: ws2Dev.id,
assigneeId: ws2DBA.id,
creatorId: ws2Dev.id,
diff --git a/frontend/src/plugins/task/template.ts b/frontend/src/plugins/task/template.ts
index 3a4c0c01a2..3e36d4ad2b 100644
--- a/frontend/src/plugins/task/template.ts
+++ b/frontend/src/plugins/task/template.ts
@@ -31,11 +31,11 @@ const DEFAULT_TEMPLATE = {
const allTaskTemplateList: TaskTemplate[] = [
DEFAULT_TEMPLATE,
{
- type: "bytebase.datasource.request",
+ type: "bytebase.database.request",
buildTask: (ctx: TemplateContext): TaskNew => {
return {
- name: "New Data Source",
- type: "bytebase.datasource.request",
+ name: "Request new database",
+ type: "bytebase.database.request",
description: "Estimated QPS: 10",
stageProgressList: [
{
@@ -89,11 +89,11 @@ const allTaskTemplateList: TaskTemplate[] = [
],
},
{
- type: "bytebase.datasource.schema.update",
+ type: "bytebase.database.schema.update",
buildTask: (ctx: TemplateContext): TaskNew => {
return {
name: "Update Schema",
- type: "bytebase.datasource.schema.update",
+ type: "bytebase.database.schema.update",
description: "DDL: ",
stageProgressList: ctx.environmentList.map((env) => {
return {
diff --git a/frontend/src/types/bytebase.ts b/frontend/src/types/bytebase.ts
index 19bee9bb0b..36408e1f39 100644
--- a/frontend/src/types/bytebase.ts
+++ b/frontend/src/types/bytebase.ts
@@ -134,11 +134,13 @@ export type StageProgressPatch = {
// Task
type TaskTypeGeneral = "bytebase.general";
-type TaskTypeDataSource =
- | "bytebase.datasource.request"
- | "bytebase.datasource.schema.update";
+type TaskTypeDatabase =
+ | "bytebase.database.request"
+ | "bytebase.database.schema.update";
-export type TaskType = TaskTypeGeneral | TaskTypeDataSource;
+type TaskTypeDataSource = "bytebase.datasource.request";
+
+export type TaskType = TaskTypeGeneral | TaskTypeDatabase | TaskTypeDataSource;
export type TaskStatus = "OPEN" | "DONE" | "CANCELED";
diff --git a/frontend/src/views/TaskDetail.vue b/frontend/src/views/TaskDetail.vue
index 5004088ba1..232a927bc6 100644
--- a/frontend/src/views/TaskDetail.vue
+++ b/frontend/src/views/TaskDetail.vue
@@ -414,13 +414,13 @@ export default {
.then((createdTask) => {
router.push(`/task/${taskSlug(createdTask.name, createdTask.id)}`);
- if (taskTemplate.value.type == "bytebase.datasource.request") {
+ if (taskTemplate.value.type == "bytebase.database.request") {
store.dispatch("uistate/saveIntroStateByKey", {
- key: "datasource.request",
+ key: "database.request",
newState: true,
});
} else if (
- taskTemplate.value.type == "bytebase.datasource.schema.update"
+ taskTemplate.value.type == "bytebase.database.schema.update"
) {
store.dispatch("uistate/saveIntroStateByKey", {
key: "table.create",