Skip to content

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

Change datasource.create to datasource.request to be more accurate

天舟3052bdb684a2
diff --git a/frontend/src/components/ProfileDropdown.vue b/frontend/src/components/ProfileDropdown.vue
index 1f6cf6e6fe..5394d2cc95 100644
--- a/frontend/src/components/ProfileDropdown.vue
+++ b/frontend/src/components/ProfileDropdown.vue
@@ -126,7 +126,7 @@ export default {
newState: false,
});
store.dispatch("uistate/saveIntroStateByKey", {
- key: "datasource.create",
+ key: "datasource.request",
newState: false,
});
store.dispatch("uistate/saveIntroStateByKey", {
diff --git a/frontend/src/components/QuickActionPanel.vue b/frontend/src/components/QuickActionPanel.vue
index cd4e9b2a2f..bd3cf6d5b2 100644
--- a/frontend/src/components/QuickActionPanel.vue
+++ b/frontend/src/components/QuickActionPanel.vue
@@ -109,11 +109,11 @@
</div>
<div
- v-if="quickActionList.includes('datasource.create')"
+ v-if="quickActionList.includes('datasource.request')"
class="flex flex-col items-center w-28"
>
<router-link
- to="/task/new?template=bytebase.datasource.create"
+ to="/task/new?template=bytebase.datasource.request"
class="p-3 btn-icon-primary"
>
<svg
diff --git a/frontend/src/components/Quickstart.vue b/frontend/src/components/Quickstart.vue
index 55d0ac5569..4c7b4ca288 100644
--- a/frontend/src/components/Quickstart.vue
+++ b/frontend/src/components/Quickstart.vue
@@ -104,9 +104,9 @@ export default {
},
{
name: "Request a database",
- link: "/task/new?template=bytebase.datasource.create",
+ link: "/task/new?template=bytebase.datasource.request",
done: computed(() =>
- store.getters["uistate/introStateByKey"]("datasource.create")
+ store.getters["uistate/introStateByKey"]("datasource.request")
),
},
{
diff --git a/frontend/src/miragejs/factories/task.js b/frontend/src/miragejs/factories/task.js
index a51fb1e03d..7855523c84 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.create";
+ return "bytebase.datasource.request";
},
description() {
return faker.fake("{{lorem.paragraphs}}");
diff --git a/frontend/src/miragejs/seeds/index.js b/frontend/src/miragejs/seeds/index.js
index 82b34bc7b4..5883f2b23c 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.create",
+ type: "bytebase.datasource.request",
name: "Request data source for environment - " + environmentList1[1].name,
creatorId: ws1Dev1.id,
assigneeId: ws1Owner.id,
diff --git a/frontend/src/plugins/task/template.ts b/frontend/src/plugins/task/template.ts
index 49665bcacf..3a4c0c01a2 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.create",
+ type: "bytebase.datasource.request",
buildTask: (ctx: TemplateContext): TaskNew => {
return {
name: "New Data Source",
- type: "bytebase.datasource.create",
+ type: "bytebase.datasource.request",
description: "Estimated QPS: 10",
stageProgressList: [
{
diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts
index daf05a0ec5..858aace6ad 100644
--- a/frontend/src/router/index.ts
+++ b/frontend/src/router/index.ts
@@ -78,7 +78,7 @@ const routes: Array<RouteRecordRaw> = [
quickActionList: [
"instance.create",
"user.manage",
- "datasource.create",
+ "datasource.request",
"datasource.schema.update",
"ticket.create",
],
diff --git a/frontend/src/types/bytebase.ts b/frontend/src/types/bytebase.ts
index 821c2d7a1c..c8d58e308a 100644
--- a/frontend/src/types/bytebase.ts
+++ b/frontend/src/types/bytebase.ts
@@ -125,7 +125,7 @@ export type StageProgressPatch = {
type TaskTypeGeneral = "bytebase.general";
type TaskTypeDataSource =
- | "bytebase.datasource.create"
+ | "bytebase.datasource.request"
| "bytebase.datasource.schema.update";
export type TaskType = TaskTypeGeneral | TaskTypeDataSource;
diff --git a/frontend/src/views/TaskDetail.vue b/frontend/src/views/TaskDetail.vue
index ad4e57e31c..5004088ba1 100644
--- a/frontend/src/views/TaskDetail.vue
+++ b/frontend/src/views/TaskDetail.vue
@@ -414,9 +414,9 @@ export default {
.then((createdTask) => {
router.push(`/task/${taskSlug(createdTask.name, createdTask.id)}`);
- if (taskTemplate.value.type == "bytebase.datasource.create") {
+ if (taskTemplate.value.type == "bytebase.datasource.request") {
store.dispatch("uistate/saveIntroStateByKey", {
- key: "datasource.create",
+ key: "datasource.request",
newState: true,
});
} else if (