Skip to content

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

For EnvironmentSelect, normally hide the archived environment, unless the current selected environment is archived.

天舟8b7653718bba
diff --git a/frontend/src/components/EnvironmentSelect.vue b/frontend/src/components/EnvironmentSelect.vue
index d90e895d10..29bb108090 100644
--- a/frontend/src/components/EnvironmentSelect.vue
+++ b/frontend/src/components/EnvironmentSelect.vue
@@ -11,14 +11,22 @@
<option disabled :selected="undefined === state.selectedId">
Select environment
</option>
- <option
- v-for="(environment, index) in environmentList"
- :key="index"
- :value="environment.id"
- :selected="environment.id == state.selectedId"
- >
- {{ environment.name }}
- </option>
+ <template v-for="(environment, index) in environmentList" :key="index">
+ <option
+ v-if="environment.rowStatus == 'NORMAL'"
+ :value="environment.id"
+ :selected="environment.id == state.selectedId"
+ >
+ {{ environment.name }}
+ </option>
+ <option
+ v-else-if="environment.id == state.selectedId"
+ :value="environment.id"
+ :selected="true"
+ >
+ {{ environmentName(environment) }}
+ </option>
+ </template>
</select>
</template>
@@ -57,7 +65,7 @@ export default {
const environmentList = computed(() => {
return cloneDeep(
- store.getters["environment/environmentList"]("NORMAL")
+ store.getters["environment/environmentList"]()
).reverse();
});