Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ui/src/views/network/AclListRulesTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ export default {
},
filters: {
capitalise: val => {
if (val === 'all') return this.$t('label.all')
return val.toUpperCase()
}
},
Expand Down
7 changes: 5 additions & 2 deletions ui/src/views/network/EgressRulesTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
:pagination="false"
:rowKey="record => record.id">
<template slot="protocol" slot-scope="record">
{{ record.protocol | capitalise }}
{{ getCapitalise(record.protocol) }}
</template>
<template slot="startport" slot-scope="record">
{{ record.icmptype || record.startport >= 0 ? record.icmptype || record.startport : 'All' }}
Expand Down Expand Up @@ -165,7 +165,6 @@ export default {
},
filters: {
capitalise: val => {
if (val === 'all') return this.$t('label.all')
return val.toUpperCase()
}
},
Expand Down Expand Up @@ -193,6 +192,10 @@ export default {
this.loading = false
})
},
getCapitalise (val) {
if (val === 'all') return this.$t('label.all')
return val.toUpperCase()
},
deleteRule (rule) {
this.loading = true
api('deleteEgressFirewallRule', { id: rule.id }).then(response => {
Expand Down
12 changes: 5 additions & 7 deletions ui/src/views/network/FirewallRules.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
:pagination="false"
:rowKey="record => record.id">
<template slot="protocol" slot-scope="record">
{{ record.protocol | capitalise }}
{{ getCapitalise(record.protocol) }}
</template>
<template slot="startport" slot-scope="record">
{{ record.icmptype || record.startport >= 0 ? record.icmptype || record.startport : $t('label.all') }}
Expand Down Expand Up @@ -205,12 +205,6 @@ export default {
created () {
this.fetchData()
},
filters: {
capitalise: val => {
if (val === 'all') return 'All'
return val.toUpperCase()
}
},
watch: {
resource: function (newItem, oldItem) {
if (!newItem || !newItem.id) {
Expand All @@ -237,6 +231,10 @@ export default {
this.loading = false
})
},
getCapitalise (val) {
if (val === 'all') return this.$t('label.all')
return val.toUpperCase()
},
deleteRule (rule) {
this.loading = true
api('deleteFirewallRule', { id: rule.id }).then(response => {
Expand Down
7 changes: 5 additions & 2 deletions ui/src/views/network/IngressEgressRuleConfigure.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
:pagination="{ pageSizeOptions: ['10', '20', '40', '80', '100', '200'], showSizeChanger: true}"
:rowKey="record => record.ruleid">
<template slot="protocol" slot-scope="record">
{{ record.protocol | capitalise }}
{{ getCapitalise(record.protocol) }}
</template>
<template slot="account" slot-scope="record">
<div v-if="record.account && record.securitygroupname">
Expand Down Expand Up @@ -261,7 +261,6 @@ export default {
},
filters: {
capitalise: val => {
if (val === 'all') return this.$t('label.all')
return val.toUpperCase()
}
},
Expand All @@ -273,6 +272,10 @@ export default {
this.tabType = this.$parent.tab === this.$t('label.ingress.rule') ? 'ingress' : 'egress'
this.rules = this.tabType === 'ingress' ? this.resource.ingressrule : this.resource.egressrule
},
getCapitalise (val) {
if (val === 'all') return this.$t('label.all')
return val.toUpperCase()
},
handleAddRule () {
this.parentToggleLoading()
api(this.tabType === 'ingress' ? 'authorizeSecurityGroupIngress' : 'authorizeSecurityGroupEgress', {
Expand Down
12 changes: 5 additions & 7 deletions ui/src/views/network/LoadBalancing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
{{ returnAlgorithmName(record.algorithm) }}
</template>
<template slot="protocol" slot-scope="record">
{{ record.protocol | capitalise }}
{{ getCapitalise(record.protocol) }}
</template>
<template slot="stickiness" slot-scope="record">
<a-button @click="() => openStickinessModal(record.id)">
Expand Down Expand Up @@ -535,12 +535,6 @@ export default {
this.fetchData()
}
},
filters: {
capitalise: val => {
if (val === 'all') return this.$t('label.all')
return val.toUpperCase()
}
},
methods: {
fetchData () {
this.fetchListTiers()
Expand Down Expand Up @@ -639,6 +633,10 @@ export default {
}
return 'Configure'
},
getCapitalise (val) {
if (val === 'all') return this.$t('label.all')
return val.toUpperCase()
},
openTagsModal (id) {
this.tagsModalLoading = true
this.tagsModalVisible = true
Expand Down
12 changes: 5 additions & 7 deletions ui/src/views/network/PortForwarding.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
{{ record.publicport }} - {{ record.publicendport }}
</template>
<template slot="protocol" slot-scope="record">
{{ record.protocol | capitalise }}
{{ getCapitalise(record.protocol) }}
</template>
<template slot="vm" slot-scope="record">
<div><a-icon type="desktop"/>
Expand Down Expand Up @@ -381,12 +381,6 @@ export default {
this.fetchData()
}
},
filters: {
capitalise: val => {
if (val === 'all') return this.$t('label.all')
return val.toUpperCase()
}
},
methods: {
fetchData () {
this.fetchListTiers()
Expand Down Expand Up @@ -429,6 +423,10 @@ export default {
this.loading = false
})
},
getCapitalise (val) {
if (val === 'all') return this.$t('label.all')
return val.toUpperCase()
},
deleteRule (rule) {
this.loading = true
api('deletePortForwardingRule', { id: rule.id }).then(response => {
Expand Down