This is an automated email from the ASF dual-hosted git repository. xxyu pushed a commit to branch kylin5 in repository https://gitbox.apache.org/repos/asf/kylin.git
commit cf9b4fba092c7b09a98719df51d1670a1f053821 Author: Qian Xia <lauraxiaq...@gmail.com> AuthorDate: Tue Jun 6 15:18:51 2023 +0800 KYLIN-5549 display the number of used dimensions --- .../RecognizeAggregateModal.vue | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/kystudio/src/components/common/RecognizeAggregateModal/RecognizeAggregateModal.vue b/kystudio/src/components/common/RecognizeAggregateModal/RecognizeAggregateModal.vue index 35192396dd..554e73a2cf 100644 --- a/kystudio/src/components/common/RecognizeAggregateModal/RecognizeAggregateModal.vue +++ b/kystudio/src/components/common/RecognizeAggregateModal/RecognizeAggregateModal.vue @@ -34,6 +34,9 @@ <template v-if="form.dimensions.length"> <div class="results-header"> {{$tc('selectedDimensionCount', selectedDimensionCount, { count: selectedDimensionCount })}} + <template> + <span class="divide ksd-ml-8 ksd-mr-8">|</span><span>{{$t('usedDimensionCount', {count: usedDimensionCount})}}</span> + </template> </div> <div class="list-actions"> <el-checkbox :key="isSelectAll" :indeterminate="isIndeterminate" :checked="isSelectAll" @change="handleSelectAll" /> @@ -42,7 +45,7 @@ </div> <RecycleScroller class="dimension-list" - :items="form.dimensions" + :items="dimensionList" :item-size="37" key-field="value" > @@ -138,6 +141,12 @@ this.updatePlaceHolder() this.updateRecognizeShortcut(newVal, oldVal) } + get dimensionList () { + const { dimensions } = this.form + const usedItems = dimensions.filter(it => it.isDisabled) + const selectedItems = dimensions.filter(it => !it.isDisabled) + return [...selectedItems, ...usedItems] + } get errorCount () { const { errorInEditor } = this return errorInEditor.filter(line => [ERROR_TYPE.COLUMN_NOT_IN_MODEL, ERROR_TYPE.COLUMN_NOT_IN_INCLUDES].includes(line.type)).length @@ -150,6 +159,10 @@ const { form: { dimensions } } = this return dimensions.filter(dimension => dimension.isChecked).length } + get usedDimensionCount () { + const { form: { dimensions } } = this + return dimensions.filter(dimension => dimension.isDisabled).length + } get isSelectAll () { const { form: { dimensions } } = this return !dimensions.some(dimension => !dimension.isChecked && !dimension.isDisabled) @@ -475,6 +488,9 @@ font-weight: 400; font-size: 12px; line-height: 16px; + .divide { + color: @text-placeholder-color; + } } .actions { position: absolute;