Skip to content

Commit

Permalink
Merge branch 'master' into amoro-2875
Browse files Browse the repository at this point in the history
  • Loading branch information
huyuanfeng2018 authored Jul 4, 2024
2 parents f405de4 + 69445d7 commit d03922e
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 18 deletions.
2 changes: 1 addition & 1 deletion amoro-ams/amoro-ams-dashboard/src/language/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,5 +204,5 @@ export default {
fileSearchPlaceholder: 'Filter partitions',
noResourceGroupsTitle: 'No resource groups available.',
noResourceGroupsContent: 'Please create an optimizer group first.',
goToButtonText: 'Go'
goToButtonText: 'Go',
}
7 changes: 3 additions & 4 deletions amoro-ams/amoro-ams-dashboard/src/language/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export default {
remove: '移除',
edit: '编辑',
deleteCatalogModalTitle: '移除此目录?',
cannotDeleteModalTitle: "不能移除这个目录",
cannotDeleteModalTitle: '不能移除这个目录',
cannotDeleteModalContent: '这个目录已被使用',
success: '成功',
optimzeGroup: '优化组',
Expand All @@ -183,7 +183,7 @@ export default {
invalidInput: '非法输入',
addgroup: '添加组',
editgroup: '编辑组',
cannotDeleteGroupModalTitle: "不能移除这个组",
cannotDeleteGroupModalTitle: '不能移除这个组',
cannotDeleteGroupModalContent: '这个组已被使用',
deleteGroupModalTitle: '移除这个组',
processId: '进程 ID',
Expand All @@ -204,6 +204,5 @@ export default {
fileSearchPlaceholder: '过滤分区',
noResourceGroupsTitle: '没有任何优化组',
noResourceGroupsContent: '需要首先创建一个默认优化组',
goToButtonText: '前往'
goToButtonText: '前往',
}

22 changes: 15 additions & 7 deletions amoro-ams/amoro-ams-dashboard/src/views/catalogs/Detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,14 @@ async function getOptimizerGroupList() {
onOk: async () => {
try {
router.push({ path: '/optimizing', query: { tab: 'optimizergroup' } })
} catch (error) {
}
catch (error) {
console.error('Navigation error:', error)
}
},
})
} else {
}
else {
optimizerGroupList.value = list
}
}
Expand Down Expand Up @@ -524,7 +526,7 @@ function handleSave() {
.catch(() => {
})
}
function handleCancle() {
function handleCancel() {
formRef.value.resetFields()
emit('updateEdit', false)
getConfigInfo()
Expand All @@ -533,9 +535,15 @@ async function deleteCatalogModal() {
Modal.confirm({
title: t('deleteCatalogModalTitle'),
onOk: async () => {
await delCatalog(formState.catalog.name || '')
message.success(`${t('remove')} ${t('success')}`)
emit('updateEdit', false)
try {
await delCatalog(formState.catalog.name || '')
message.success(`${t('remove')} ${t('success')}`, 1, () => {
router.replace({ path: '/catalogs', query: {} }).then(() => router.go(0))
})
}
catch (error) {
message.error(`${t('remove')} ${t('failed')}`)
}
},
})
}
Expand Down Expand Up @@ -770,7 +778,7 @@ onMounted(() => {
<a-button type="primary" class="save-btn g-mr-12" @click="handleSave">
{{ $t('save') }}
</a-button>
<a-button @click="handleCancle">
<a-button @click="handleCancel">
{{ $t('cancel') }}
</a-button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { ref } from 'vue'

const props = defineProps<{ msg: string }>()
const emit = defineEmits<{
(e: 'cancle'): void
(e: 'cancel'): void
}>()
const open = ref(true)
</script>
Expand All @@ -34,7 +34,7 @@ const open = ref(true)
:title="`${$t('errorMessage')}`"
:footer="null"
class="upgrade-error"
@cancel="emit('cancle')"
@cancel="emit('cancel')"
>
<p class="msg">
{{ props.msg }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export default defineComponent({
<u-loading v-if="loading" />
<!-- upgrade table secondary page -->
<router-view v-if="isSecondaryNav" @go-back="goBack" @refresh="refresh" />
<ErrorMsg v-if="showErrorMsg" :msg="errorMessage" @cancle="showErrorMsg = false" />
<ErrorMsg v-if="showErrorMsg" :msg="errorMessage" @cancel="showErrorMsg = false" />
</div>
</template>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ function viewDetail(record: OperationItem) {
activeCopyText.value = record.operation
}

function cancle() {
function cancel() {
visible.value = false
}

async function onCopy() {
try {
await toClipboard(activeCopyText.value)
message.success(t('copySuccess'))
cancle()
cancel()
}
catch (error) {}
}
Expand Down Expand Up @@ -128,7 +128,7 @@ onMounted(() => {
:width="560"
:title="`${$t('operationDetails')}`"
class="operation-wrap"
@cancel="cancle"
@cancel="cancel"
>
{{ activeCopyText }}
<template #footer>
Expand Down

0 comments on commit d03922e

Please sign in to comment.