Skip to content

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

chore: require environment on adding instances (#8902)

Danny Xu35259f51eadf
diff --git a/frontend/src/components/InstanceForm/InstanceForm.vue b/frontend/src/components/InstanceForm/InstanceForm.vue
index 414c7588b2..7dda0f19e0 100644
--- a/frontend/src/components/InstanceForm/InstanceForm.vue
+++ b/frontend/src/components/InstanceForm/InstanceForm.vue
@@ -99,9 +99,11 @@
<label for="environment" class="textlabel">
{{ $t("common.environment") }}
</label>
+ <span class="text-red-600 mr-2">*</span>
<EnvironmentSelect
class="mt-1 w-full"
:disabled="!isCreating"
+ required="true"
:environment="
environment.uid === String(UNKNOWN_ID)
? undefined
@@ -565,6 +567,9 @@ const currentMongoDBConnectionSchema = computed(() => {
: MongoDBConnectionStringSchemaList[1];
});
const allowCreate = computed(() => {
+ if (environment.value.uid === String(UNKNOWN_ID)) {
+ return false;
+ }
if (basicInfo.value.engine === Engine.SPANNER) {
return (
basicInfo.value.title.trim() &&