Skip to content

Commit d470e05

Browse files
committed
SSL offloading: UI changes part 2
1 parent 3a457ab commit d470e05

File tree

2 files changed

+44
-31
lines changed

2 files changed

+44
-31
lines changed

ui/public/locales/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2057,8 +2057,8 @@
20572057
"label.remove.vpc.offering": "Remove VPC Offering",
20582058
"label.removed": "Removed",
20592059
"label.removing": "Removing",
2060+
"label.replace": "Replace",
20602061
"label.replace.acl": "Replace ACL",
2061-
"label.replace.ssl.cert": "Replace SSL certificate",
20622062
"label.report.bug": "Ask a question or Report an issue",
20632063
"label.request": "Request",
20642064
"label.required": "Required",

ui/src/views/network/LoadBalancing.vue

Lines changed: 43 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -577,34 +577,47 @@
577577
@ok="addSslCertModalVisible = false"
578578
:cancelButtonProps="{ style: { display: 'none' } }"
579579
>
580-
<div>
581-
<div class="form">
580+
<a-row v-show="showAssignedSsl && assignedSslCert !== 'None'">
581+
<a-col :span="8">
582+
<div class="form__label">{{ $t("label.current") + ' ' + $t('label.sslcertificate') }}</div>
583+
</a-col>
584+
<a-col :span="10">
585+
<div>{{ assignedSslCert }}</div>
586+
</a-col>
587+
<a-col :span="6">
588+
<a-button :disabled="!deleteSslButtonVisible" type="danger" @click="removeSslFromLbRule()">
589+
<template #icon><delete-outlined /></template>
590+
{{ $t('label.remove') }}
591+
</a-button>
592+
</a-col>
593+
</a-row>
594+
<a-row style="margin-top: 16px">
595+
<a-col :span="8">
596+
<div class="form__label">{{ $t("label.new") + ' ' + $t('label.sslcertificate') }}</div>
597+
</a-col>
598+
<a-col :span="10">
582599
<div class="form__item">
583-
<div v-show="showAssignedSsl" class="form__item">
584-
<div class="form__label">{{ $t("label.current") + ' ' + $t('label.sslcertificate') }}</div>
585-
{{ assignedSslCert }}
586-
<a-button :disabled="!deleteSslButtonVisible" type="danger" @click="removeSslFromLbRule()">
587-
<template #icon><delete-outlined /></template>
588-
{{ $t('label.remove') }}
589-
</a-button>
590-
</div>
591-
<br>
592-
<div class="form__label">{{ $t("label.new") + ' ' + $t('label.sslcertificate') }}</div>
593-
<div class="form__item">
594-
<a-select v-model:value="selectedSsl.name" style="width: 80%;" @change="selectssl">
595-
<a-select-option
596-
v-for="sslcert in sslcerts.data"
597-
:key="sslcert.id">{{ sslcert.name }}
598-
</a-select-option>
599-
</a-select>
600-
<a-button v-show="addSslButtonVisible" type="primary" @click="addSslTolbRule()">
601-
<template #icon><plus-outlined /></template>
602-
{{ $t('label.replace.ssl.cert') }}
603-
</a-button>
604-
</div>
600+
<a-select v-model:value="selectedSsl.name" style="width: 80%;" @change="selectssl">
601+
<a-select-option
602+
v-for="sslcert in sslcerts.data"
603+
:key="sslcert.id">{{ sslcert.name }}
604+
</a-select-option>
605+
</a-select>
605606
</div>
606-
</div>
607-
</div>
607+
</a-col>
608+
<a-col :span="6">
609+
<div>
610+
<a-button v-show="addSslButtonVisible && assignedSslCert !== 'None'" type="primary" @click="addSslTolbRule()">
611+
<template #icon><swap-outlined /></template>
612+
{{ $t('label.replace') }}
613+
</a-button>
614+
<a-button v-show="addSslButtonVisible && assignedSslCert === 'None'" type="primary" @click="addSslTolbRule()">
615+
<template #icon><plus-outlined /></template>
616+
{{ $t('label.assign') }}
617+
</a-button>
618+
</div>
619+
</a-col>
620+
</a-row>
608621
</a-modal>
609622

610623
<a-modal
@@ -1195,10 +1208,10 @@ export default {
11951208
this.sslcerts.loading = false
11961209
})
11971210
if (this.selectedRule !== null) {
1198-
this.getCurrentlyAssignedSslCert()
1211+
this.getCurrentAssignedSslCert()
11991212
}
12001213
},
1201-
getCurrentlyAssignedSslCert () {
1214+
getCurrentAssignedSslCert () {
12021215
getAPI('listSslCerts', {
12031216
accountid: this.currentAccountId,
12041217
lbruleid: this.selectedRule.id
@@ -1240,7 +1253,7 @@ export default {
12401253
successMessage: this.$t('message.success.assign.sslcert'),
12411254
successMethod: () => {
12421255
if (this.selectedRule !== null) {
1243-
this.getCurrentlyAssignedSslCert()
1256+
this.getCurrentAssignedSslCert()
12441257
}
12451258
this.enableSslAddDeleteButtons()
12461259
},
@@ -1268,7 +1281,7 @@ export default {
12681281
successMessage: this.$t('message.success.remove.sslcert'),
12691282
successMethod: () => {
12701283
this.visible = true
1271-
this.getCurrentlyAssignedSslCert()
1284+
this.getCurrentAssignedSslCert()
12721285
this.enableSslAddDeleteButtons()
12731286
},
12741287
errorMessage: this.$t('message.remove.sslcert.failed'),

0 commit comments

Comments
 (0)