This is an automated email from the ASF dual-hosted git repository.
jinsongzhou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/amoro.git
The following commit(s) were added to refs/heads/master by this push:
new 68bda4820 [Improvement]: Add missing optimizingStatus key and format
code (#3152)
68bda4820 is described below
commit 68bda48206a3178b3838f10b8f6ffe61fe7693dc
Author: chouchouji <[email protected]>
AuthorDate: Tue Sep 3 19:27:23 2024 +0800
[Improvement]: Add missing optimizingStatus key and format code (#3152)
---
amoro-web/src/types/common.type.ts | 1 +
amoro-web/src/views/catalogs/Detail.vue | 3 +--
amoro-web/src/views/tables/components/Selector.vue | 23 ++++++++++++----------
3 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/amoro-web/src/types/common.type.ts
b/amoro-web/src/types/common.type.ts
index f697712bc..10b26d887 100644
--- a/amoro-web/src/types/common.type.ts
+++ b/amoro-web/src/types/common.type.ts
@@ -59,6 +59,7 @@ export interface IKeyAndValue {
value: string
}
export interface IBaseDetailInfo {
+ optimizingStatus: string
tableType: string
tableName: string
createTime: string
diff --git a/amoro-web/src/views/catalogs/Detail.vue
b/amoro-web/src/views/catalogs/Detail.vue
index 61bc43066..0dc7f70a6 100644
--- a/amoro-web/src/views/catalogs/Detail.vue
+++ b/amoro-web/src/views/catalogs/Detail.vue
@@ -125,8 +125,7 @@ const tableFormatText = {
}
const storeSupportFormat: { [prop: string]: string[] } = {
ams: [tableFormatMap.MIXED_ICEBERG, tableFormatMap.ICEBERG],
- hive: [tableFormatMap.MIXED_HIVE, tableFormatMap.MIXED_ICEBERG,
- tableFormatMap.ICEBERG, tableFormatMap.PAIMON, tableFormatMap.HUDI],
+ hive: [tableFormatMap.MIXED_HIVE, tableFormatMap.MIXED_ICEBERG,
tableFormatMap.ICEBERG, tableFormatMap.PAIMON, tableFormatMap.HUDI],
hadoop: [tableFormatMap.MIXED_ICEBERG, tableFormatMap.ICEBERG,
tableFormatMap.PAIMON],
glue: [tableFormatMap.MIXED_ICEBERG, tableFormatMap.ICEBERG],
custom: [tableFormatMap.MIXED_ICEBERG, tableFormatMap.ICEBERG],
diff --git a/amoro-web/src/views/tables/components/Selector.vue
b/amoro-web/src/views/tables/components/Selector.vue
index f7985d87a..afcddf4e8 100644
--- a/amoro-web/src/views/tables/components/Selector.vue
+++ b/amoro-web/src/views/tables/components/Selector.vue
@@ -20,7 +20,7 @@ limitations under the License.
import { computed, onMounted, reactive, ref } from 'vue'
import type { IBranchItem, IServiceBranchItem } from '@/types/common.type'
import { branchTypeMap, operationMap } from '@/types/common.type'
-import { getBranches, getTags, getConsumers } from '@/services/table.service'
+import { getBranches, getConsumers, getTags } from '@/services/table.service'
const props = defineProps({ catalog: String, db: String, table: String,
disabled: Boolean })
const emit = defineEmits(['refChange', 'consumerChange'])
@@ -30,15 +30,15 @@ const disabled = computed(() => props.disabled)
const selectedObj = ref<IBranchItem>({ value: '', type: branchTypeMap.BRANCH,
label: '' })
const branchSearchKey = ref<string>('')
const tagSearchKey = ref<string>('')
-const consumerSearchKey=ref<string>('')
+const consumerSearchKey = ref<string>('')
const tabActiveKey = ref<string>(branchTypeMap.BRANCH)
const branchList = ref<IBranchItem[]>([])
const tagList = ref<IBranchItem[]>([])
const consumerList = ref<IBranchItem[]>([])
const actualBranchList = computed(() => branchList.value.filter(item =>
!branchSearchKey.value || item.label.includes(branchSearchKey.value)))
const actualTagList = computed(() => tagList.value.filter(item =>
!tagSearchKey.value || item.label.includes(tagSearchKey.value)))
-const actualConsumerList = computed(() =>consumerList.value.filter((item) =>
!consumerSearchKey.value ||
-item.label.includes(consumerSearchKey.value)))
+const actualConsumerList = computed(() => consumerList.value.filter(item =>
!consumerSearchKey.value
+ || item.label.includes(consumerSearchKey.value)))
const operation = ref<string>(operationMap.ALL)
const operationList = reactive([operationMap.ALL, operationMap.OPTIMIZING,
operationMap.NONOPTIMIZING])
@@ -57,10 +57,11 @@ function selectObject(obj: IBranchItem) {
emit('refChange', { ref: obj.value, operation: operationMap.ALL })
}
function selectConsumer(obj: IBranchItem) {
- if (obj.value === selectedObj.value.value) return
+ if (obj.value === selectedObj.value.value)
+ return
selectedObj.value = obj
const amoroCurrentSnapshotsItem = { ...obj.amoroCurrentSnapshotsOfTable }
- emit('consumerChange', {ref: obj.value, amoroCurrentSnapshotsItem,
operation: operationMap.ALL})
+ emit('consumerChange', { ref: obj.value, amoroCurrentSnapshotsItem,
operation: operationMap.ALL })
}
function onChange(val: string) {
emit('refChange', { ref: selectedObj.value.value, operation: val })
@@ -78,7 +79,8 @@ async function getTagList() {
}
async function getConsumerList() {
const result = await getConsumers(props as any)
- consumerList.value = (result.list || []).map((l: IServiceBranchItem) => ({
value: l.consumerId, label: l.consumerId, type: branchTypeMap.CONSUMER,
amoroCurrentSnapshotsOfTable: l.amoroCurrentSnapshotsOfTable}))}
+ consumerList.value = (result.list || []).map((l: IServiceBranchItem) => ({
value: l.consumerId, label: l.consumerId, type: branchTypeMap.CONSUMER,
amoroCurrentSnapshotsOfTable: l.amoroCurrentSnapshotsOfTable }))
+}
async function init() {
await Promise.all([getBranchList(), getTagList(), getConsumerList()])
}
@@ -103,8 +105,9 @@ onMounted(() => {
<a-input v-show="tabActiveKey === branchTypeMap.BRANCH"
v-model:value="branchSearchKey"
:placeholder="$t('filterBranchesOrTagsOrConsumers')" @click="onClickInput" />
<a-input v-show="tabActiveKey === branchTypeMap.TAG"
v-model:value="tagSearchKey"
:placeholder="$t('filterBranchesOrTagsOrConsumers')" @click="onClickInput" />
<a-input
- v-show="tabActiveKey === branchTypeMap.CONSUMER"
v-model:value="consumerSearchKey"
:placeholder="$t('filterBranchesOrTagsOrConsumers')"
- @click="onClickInput"/>
+ v-show="tabActiveKey === branchTypeMap.CONSUMER"
v-model:value="consumerSearchKey"
:placeholder="$t('filterBranchesOrTagsOrConsumers')"
+ @click="onClickInput"
+ />
</div>
<a-tabs v-model:activeKey="tabActiveKey" type="card">
<a-tab-pane :key="branchTypeMap.BRANCH" :tab="$t('branches')">
@@ -156,7 +159,7 @@ onMounted(() => {
</div>
<div class="g-ml-24">
{{ $t('operation') }}:
- <a-select
+ <a-select
v-model:value="operation"
class="g-ml-8"
style="width: 160px"