Skip to content

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

chore: add creating status to action button (#2563)

boojack70d1692f8aab
diff --git a/frontend/src/components/CreateInstanceForm.vue b/frontend/src/components/CreateInstanceForm.vue
index 9048a630ab..db6a7360d3 100644
--- a/frontend/src/components/CreateInstanceForm.vue
+++ b/frontend/src/components/CreateInstanceForm.vue
@@ -235,6 +235,9 @@
:ok-text="warningModalOkText"
:title="$t('instance.connection-info-seems-to-be-incorrect')"
:description="state.createInstanceWarning"
+ :in-progress="
+ shouldShowCreateEmbeddedPostgresButton && isCreatingEmbeddedInstance
+ "
@ok="handleWarningModalOkClick"
@cancel="state.showCreateInstanceWarningModal = false"
></BBAlert>
@@ -308,6 +311,7 @@ const state = reactive<LocalState>({
isCreatingInstance: false,
});
+const isCreatingEmbeddedInstance = ref(false);
// For creating database onboarding guide, we only try to start our embedded sample postgres instance once.
const embeddedPostgresInstance = ref<Partial<InstanceCreate>>();
@@ -447,6 +451,7 @@ const handleWarningModalOkClick = async () => {
// When user get the warning of incorrect instance info in creating database onboarding guide,
// we'd like to display the `create an embedded PostgreSQL database` button instead of `ignore and create`.
if (shouldShowCreateEmbeddedPostgresButton.value) {
+ isCreatingEmbeddedInstance.value = true;
const connectionInfo =
await useInstanceStore().createEmbeddedPostgresInstance();
embeddedPostgresInstance.value = {
@@ -460,6 +465,7 @@ const handleWarningModalOkClick = async () => {
...state.instance,
...embeddedPostgresInstance.value,
};
+ isCreatingEmbeddedInstance.value = false;
pushNotification({
module: "bytebase",
style: "SUCCESS",
diff --git a/frontend/src/plugins/demo/components/GuideDialog.vue b/frontend/src/plugins/demo/components/GuideDialog.vue
index 301cfe603f..bb0d78bd68 100644
--- a/frontend/src/plugins/demo/components/GuideDialog.vue
+++ b/frontend/src/plugins/demo/components/GuideDialog.vue
@@ -304,6 +304,6 @@ const updateDialogPosition = async () => {
}
.guide-wrapper.center {
- @apply w-64 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 -mt-16;
+ @apply w-64 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 -mt-16 whitespace-nowrap;
}
</style>