From dd0fbf147af6fb1c16c6f2cddfbbed2eb0a62e33 Mon Sep 17 00:00:00 2001 From: Bhargav Date: Tue, 26 Aug 2025 11:12:03 +0530 Subject: [PATCH] fix: remove environment option from list (#8141) ### **PR Type** Enhancement ___ ### **Description** - Split index options for environment fields - Remove env options from default list - Conditionally render options based on row settings - Expose new env options in component state ___ ### Diagram Walkthrough ```mermaid flowchart LR UI["Schema Index Select (QSelect)"] RowCheck["isEnvironmentSettings(row)"] DefaultOpts["streamIndexType"] EnvOpts["streamIndexTypeEnv"] State["Component exports"] UI -- evaluates --> RowCheck RowCheck -- true --> EnvOpts RowCheck -- false --> DefaultOpts EnvOpts -- provided as :options --> UI DefaultOpts -- provided as :options --> UI EnvOpts -- added to --> State ```

File Walkthrough

Relevant files
Enhancement
schema.vue
Split and conditionally apply environment index options   

web/src/components/logstream/schema.vue
  • Add streamIndexTypeEnv with environment-only options.
  • Remove environment options from streamIndexType.
  • Conditionally set QSelect :options based on
    isEnvironmentSettings(row).
  • Expose streamIndexTypeEnv from setup return.
+7/-3     
___ --- web/src/components/logstream/schema.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/web/src/components/logstream/schema.vue b/web/src/components/logstream/schema.vue index 19122d6896..ead313671b 100644 --- a/web/src/components/logstream/schema.vue +++ b/web/src/components/logstream/schema.vue @@ -442,7 +442,7 @@ along with this program. If not, see . " :disable="isEnvironmentSettings(props.row)" v-model="props.row.index_type" - :options="streamIndexType" + :options="isEnvironmentSettings(props.row) ? streamIndexTypeEnv : streamIndexType" :popup-content-style="{ textTransform: 'capitalize' }" color="input-border" bg-color="input-bg" @@ -888,11 +888,14 @@ export default defineComponent({ return "Other Fields"; }); + const streamIndexTypeEnv = [ + { label: "Full text search (Environment setting)", value: "fullTextSearchKeyEnv" }, + { label: "Secondary index (Environment setting)", value: "secondaryIndexKeyEnv" }, + ]; + const streamIndexType = [ { label: "Full text search", value: "fullTextSearchKey" }, { label: "Secondary index", value: "secondaryIndexKey" }, - { label: "Full text search (Environment setting)", value: "fullTextSearchKeyEnv" }, - { label: "Secondary index (Environment setting)", value: "secondaryIndexKeyEnv" }, { label: "Bloom filter", value: "bloomFilterKey" }, { label: "KeyValue partition", value: "keyPartition" }, { label: "Prefix partition", value: "prefixPartition" }, @@ -1807,6 +1810,7 @@ export default defineComponent({ markFormDirty, formDirtyFlag, streamIndexType, + streamIndexTypeEnv, disableOptions, loadingState, filterFieldFn,