Skip to content

Commit

Permalink
[AMORO-3139] Improve list content of optimizing page
Browse files Browse the repository at this point in the history
  • Loading branch information
chouchouji committed Oct 17, 2024
1 parent 7daa95f commit a33505d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 22 deletions.
2 changes: 1 addition & 1 deletion amoro-web/src/hooks/usePlaceholder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function usePlaceholder() {
const catalogPh = computed(() => t('catalog')).value
const dbNamePh = computed(() => t('databaseName')).value
const tableNamePh = computed(() => t('tableName')).value
const optimizerGroupPh = computed(() => t('optimzerGroup')).value
const optimizerGroupPh = computed(() => t('optimizerGroup')).value
const resourceGroupPh = computed(() => t('resourceGroup')).value
const parallelismPh = computed(() => t('parallelism')).value
const usernamePh = computed(() => t('username')).value
Expand Down
11 changes: 4 additions & 7 deletions amoro-web/src/language/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export default {
optimizing: 'Optimizing',
terminal: 'Terminal',
settings: 'Settings',
optimizergroup: 'Optimizer Groups',
systemSetting: 'System Settings',
containerSetting: 'Container Settings',
backHome: 'Back to Home',
Expand Down Expand Up @@ -108,7 +107,6 @@ export default {
container: 'Container',
status: 'Status',
optimizingStatus: 'Optimizing Status',
optimzerGroup: 'Optimizer Group',
allGroups: 'All Groups',
retry: 'Retry',
costTime: 'Cost Time',
Expand All @@ -125,8 +123,8 @@ export default {
optimizerGroups: 'Optimizer Groups',
resourceAllocation: 'Resource Allocation',
resourceGroup: 'Resource Group',
releaseOptModalTitle: 'Release this optimizer',
cancelOptimizingProcessOptModalTitle: 'Cancel the optimizing process of this table',
releaseOptModalTitle: 'Release this optimizer?',
cancelOptimizingProcessOptModalTitle: 'Cancel the optimizing process of this table?',
welcomeTip: 'Welcome to Amoro!',
signIn: 'Sign in',
username: 'Username',
Expand Down Expand Up @@ -182,13 +180,12 @@ export default {
save: 'Save',
remove: 'Remove',
edit: 'Edit',
deleteCatalogModalTitle: 'Remove this catalog',
deleteCatalogModalTitle: 'Remove this catalog?',
cannotDeleteModalTitle: 'Can\'t remove this catalog.',
cannotDeleteModalContent: 'This catalog has been used.',
success: 'Success',
optimzeGroup: 'Optimize Group',
propertiesMemory: 'properties.{type}.memory',
leavePageModalTitle: 'Leave this page',
leavePageModalTitle: 'Leave this page?',
leavePageModalContent: 'Changes you made may not be saved.',
leave: 'Leave',
search: 'Search',
Expand Down
11 changes: 4 additions & 7 deletions amoro-web/src/language/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
*/

export default {
last1h: '最近 1小时',
last12h: '最近 12小时',
last24h: '最近 24小时',
last7day: '最近 7天',
last1h: '最近 1 小时',
last12h: '最近 12 小时',
last24h: '最近 24 小时',
last7day: '最近 7 天',
healthScore: '健康度',
overview: '总览',
top10Tables: '表 TOP 10',
Expand All @@ -31,7 +31,6 @@ export default {
optimizing: '优化',
terminal: '终端',
settings: '设置',
optimizergroup: '优化器组',
systemSetting: '系统设置',
containerSetting: '容器设置',
backHome: '返回首页',
Expand Down Expand Up @@ -108,7 +107,6 @@ export default {
container: '容器',
status: '状态',
optimizingStatus: '优化状态',
optimzerGroup: '优化器组',
allGroups: '全部优化器',
retry: '重试',
costTime: '花费时长',
Expand Down Expand Up @@ -186,7 +184,6 @@ export default {
cannotDeleteModalTitle: '不能移除这个目录',
cannotDeleteModalContent: '这个目录已被使用',
success: '成功',
optimzeGroup: '优化组',
propertiesMemory: 'properties.{type}.memory',
leavePageModalTitle: '离开当前页面?',
leavePageModalContent: '您所做的更改可能无法保存。',
Expand Down
2 changes: 1 addition & 1 deletion amoro-web/src/views/catalogs/Detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ async function getOptimizerGroupList() {
okText: t('goToButtonText'),
onOk: async () => {
try {
router.push({ path: '/optimizing', query: { tab: 'optimizergroup' } })
router.push({ path: '/optimizing', query: { tab: 'optimizerGroups' } })
}
catch (error) {
console.error('Navigation error:', error)
Expand Down
12 changes: 6 additions & 6 deletions amoro-web/src/views/resource/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ export default defineComponent({
const router = useRouter()
const route = useRoute()
const tabConfig: ILableAndValue[] = shallowReactive([
{ label: t('optimizergroup'), value: 'optimizergroup' },
{ label: t('optimizerGroups'), value: 'optimizerGroups' },
{ label: t('optimizers'), value: 'optimizers' },
])
const placeholder = reactive(usePlaceholder())
const pagination = reactive(usePagination())
const state = reactive({
activeTab: 'optimizergroup' as string,
activeTab: 'optimizerGroups' as string,
showGroupModal: false as boolean,
groupEdit: false,
groupEditRecord: {
Expand Down Expand Up @@ -159,16 +159,16 @@ export default defineComponent({
<List type="optimizers" />
</a-tab-pane>
<a-tab-pane
key="optimizergroup"
:tab="t('optimizergroup')"
:class="[activeTab === 'optimizergroup' ? 'active' : '']"
key="optimizerGroups"
:tab="t('optimizerGroups')"
:class="[activeTab === 'optimizerGroups' ? 'active' : '']"
>
<a-button type="primary" class="g-mb-16" @click="editGroup(null)">
{{ t("addGroup") }}
</a-button>
<List
:key="groupKeyCount"
type="optimizergroup"
type="optimizerGroups"
@edit-group="editGroup"
/>
</a-tab-pane>
Expand Down

0 comments on commit a33505d

Please sign in to comment.