Skip to content

Commit 3a457ab

Browse files
committed
SSL offloading: UI fixes part 1
1 parent 104e5c1 commit 3a457ab

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

ui/public/locales/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@
974974
"label.enable.vpn": "Enable remote access VPN",
975975
"label.enable.webhook": "Enable Webhook",
976976
"label.enabled": "Enabled",
977-
"label.enabled.revocation.check": "Enables evocation checking for certificates",
977+
"label.enabled.revocation.check": "Enables revocation checking for certificates",
978978
"label.encrypt": "Encrypt",
979979
"label.encryptroot": "Encrypt Root Disk",
980980
"label.end": "End",
@@ -2317,6 +2317,7 @@
23172317
"label.uefi.supported": "UEFI supported",
23182318
"label.unregister.extension": "Unregister Extension",
23192319
"label.usediops": "IOPS used",
2320+
"label.userdata": "User Data",
23202321
"label.user.data.id": "User Data ID",
23212322
"label.user.data.name": "User Data name",
23222323
"label.user.data.details": "User Data details",

ui/src/views/iam/SSLCertificateTab.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,12 @@ export default {
367367
const params = {
368368
name: formValues.name,
369369
certificate: formValues.certificate,
370-
privatekey: formValues.privatekey,
371-
enabledrevocationcheck: formValues.enabledrevocationcheck
370+
privatekey: formValues.privatekey
371+
}
372+
if (formValues.enabledrevocationcheck != null && formValues.enabledrevocationcheck) {
373+
params.enabledrevocationcheck = 'true'
374+
} else {
375+
params.enabledrevocationcheck = 'false'
372376
}
373377
if (this.$route.meta.name === 'account') {
374378
params.account = this.resource.name

ui/src/views/network/LoadBalancing.vue

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
<div class="form__item" v-if="newRule.protocol === 'ssl'" >
8989
<div class="form__label">{{ $t('label.sslcertificate') }}</div>
9090
<a-button :disabled="!('createLoadBalancerRule' in $store.getters.apis)" type="primary" @click="handleOpenAddSslCertModal(null)">
91-
{{ $t('label.add') }}
91+
{{ this.selectedSsl.id != null ? this.selectedSsl.name : $t('label.add') }}
9292
</a-button>
9393
</div>
9494
<div class="form__item" v-if="!newRule.autoscale || newRule.autoscale === 'no'">
@@ -568,10 +568,12 @@
568568

569569
<a-modal
570570
:title="$t('label.manage.ssl.cert')"
571+
:maskClosable="false"
572+
:closable="true"
571573
v-if="addSslCertModalVisible"
572574
:visible="addSslCertModalVisible"
573-
class="vm-modal"
574575
width="30vw"
576+
@cancel="addSslCertModalVisible = false"
575577
@ok="addSslCertModalVisible = false"
576578
:cancelButtonProps="{ style: { display: 'none' } }"
577579
>
@@ -1178,10 +1180,10 @@ export default {
11781180
getAPI('listSslCerts', {
11791181
accountid: this.currentAccountId
11801182
}).then(json => {
1181-
if (json.listsslcertsresponse.sslcert && json.listsslcertsresponse.sslcert.length > 0) {
1183+
json.listsslcertsresponse.sslcert.forEach(entry => this.sslcerts.data.push(entry))
1184+
if (json.listsslcertsresponse.sslcert && json.listsslcertsresponse.sslcert.length > 0 && this.selectedSsl.id == null) {
11821185
this.selectedSsl.name = json.listsslcertsresponse.sslcert[0].name
11831186
this.selectedSsl.id = json.listsslcertsresponse.sslcert[0].id
1184-
json.listsslcertsresponse.sslcert.forEach(entry => this.sslcerts.data.push(entry))
11851187
}
11861188
}).catch(error => {
11871189
this.$notifyError(error)
@@ -1214,6 +1216,10 @@ export default {
12141216
},
12151217
selectssl (e) {
12161218
this.selectedSsl.id = e
1219+
const sslcert = this.sslcerts.data.find(entry => entry.id === this.selectedSsl.id)
1220+
if (sslcert) {
1221+
this.selectedSsl.name = sslcert.name
1222+
}
12171223
},
12181224
handleAddSslCert (data) {
12191225
this.addSslCert(data, this.selectedSsl.id)
@@ -1293,6 +1299,7 @@ export default {
12931299
if (record) {
12941300
this.showAssignedSsl = true
12951301
this.addSslButtonVisible = true
1302+
this.selectedSsl = {}
12961303
} else {
12971304
this.showAssignedSsl = false
12981305
this.addSslButtonVisible = false
@@ -1990,6 +1997,7 @@ export default {
19901997
this.addNetworkModalLoading = false
19911998
this.addNetworkModalVisible = false
19921999
this.selectedTierForAutoScaling = null
2000+
this.addSslCertModalVisible = null
19932001
},
19942002
handleChangePage (page, pageSize) {
19952003
this.page = page

0 commit comments

Comments
 (0)