Skip to content

Commit

Permalink
Merge pull request #6843 from GuoLiBin6/feat/glb-to-3.10/network
Browse files Browse the repository at this point in the history
feat(v3.11/4695): eip add filter options
  • Loading branch information
easy-mj committed Jun 28, 2024
2 parents 79dacca + 04b0a86 commit d81c723
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 4 deletions.
5 changes: 4 additions & 1 deletion containers/Network/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1131,5 +1131,8 @@
"network.backup.auto": "Automatic",
"network.backup.hand": "Manual",
"network.waf.source_site_address": "Source site address",
"network.cert_id": "Certificate ID"
"network.cert_id": "Certificate ID",
"network.associate_resource_type": "Bind resource type",
"network.associate_resource_name": "Bind resource name",
"network.associate_resource_id": "Bind resource ID"
}
5 changes: 4 additions & 1 deletion containers/Network/locales/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -1133,5 +1133,8 @@
"network.backup.auto": "自動",
"network.backup.hand": "手動",
"network.waf.source_site_address": "バックソースアドレス",
"network.cert_id": "証明書ID"
"network.cert_id": "証明書ID",
"network.associate_resource_type": "バインドリソースタイプ",
"network.associate_resource_name": "バインドリソース名",
"network.associate_resource_id": "バインドリソースID"
}
5 changes: 4 additions & 1 deletion containers/Network/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1140,5 +1140,8 @@
"network.waf.type.SaaS": "SaaS型",
"network.waf.type.Loadbalancer": "负载均衡型",
"network.waf.source_site_address": "回源地址",
"network.cert_id": "证书ID"
"network.cert_id": "证书ID",
"network.associate_resource_type": "绑定资源类型",
"network.associate_resource_name": "绑定资源名称",
"network.associate_resource_id": "绑定资源ID"
}
27 changes: 26 additions & 1 deletion containers/Network/views/eip/components/List.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,25 @@
<script>
import { mapGetters } from 'vuex'
import ListMixin from '@/mixins/list'
import { getNameFilter, getStatusFilter, getBrandFilter, getAccountFilter, getTenantFilter, getDomainFilter, getDescriptionFilter, getCreatedAtFilter } from '@/utils/common/tableFilter'
import {
getNameFilter,
getStatusFilter,
getBrandFilter,
getAccountFilter,
getTenantFilter,
getDomainFilter,
getDescriptionFilter,
getCreatedAtFilter,
getDistinctFieldFilter,
} from '@/utils/common/tableFilter'
import expectStatus from '@/constants/expectStatus'
import WindowsMixin from '@/mixins/windows'
import GlobalSearchMixin from '@/mixins/globalSearch'
import regexp from '@/utils/regexp'
import ResStatusFilterMixin from '@/mixins/resStatusFilterMixin'
import SingleActionsMixin from '../mixins/singleActions'
import ColumnsMixin from '../mixins/columns'
import { ASSOCIATE_MAP } from '../constants'
export default {
name: 'EipList',
Expand Down Expand Up @@ -186,6 +197,20 @@ export default {
region: {
label: this.$t('common_282'),
},
associate_type: getDistinctFieldFilter({
label: this.$t('network.associate_resource_type'),
field: 'associate_type',
mapper: (list) => {
return list.filter(item => item.key).map(item => {
return {
key: item.key,
label: ASSOCIATE_MAP[item.key]?.name || item.label,
}
})
},
}),
associate_name: { label: this.$t('network.associate_resource_name') },
associate_id: { label: this.$t('network.associate_resource_id') },
charge_type: {
label: this.$t('network.text_192'),
dropdown: true,
Expand Down

0 comments on commit d81c723

Please sign in to comment.