|
577 | 577 | @ok="addSslCertModalVisible = false" |
578 | 578 | :cancelButtonProps="{ style: { display: 'none' } }" |
579 | 579 | > |
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"> |
582 | 599 | <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> |
605 | 606 | </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> |
608 | 621 | </a-modal> |
609 | 622 |
|
610 | 623 | <a-modal |
@@ -1195,10 +1208,10 @@ export default { |
1195 | 1208 | this.sslcerts.loading = false |
1196 | 1209 | }) |
1197 | 1210 | if (this.selectedRule !== null) { |
1198 | | - this.getCurrentlyAssignedSslCert() |
| 1211 | + this.getCurrentAssignedSslCert() |
1199 | 1212 | } |
1200 | 1213 | }, |
1201 | | - getCurrentlyAssignedSslCert () { |
| 1214 | + getCurrentAssignedSslCert () { |
1202 | 1215 | getAPI('listSslCerts', { |
1203 | 1216 | accountid: this.currentAccountId, |
1204 | 1217 | lbruleid: this.selectedRule.id |
@@ -1240,7 +1253,7 @@ export default { |
1240 | 1253 | successMessage: this.$t('message.success.assign.sslcert'), |
1241 | 1254 | successMethod: () => { |
1242 | 1255 | if (this.selectedRule !== null) { |
1243 | | - this.getCurrentlyAssignedSslCert() |
| 1256 | + this.getCurrentAssignedSslCert() |
1244 | 1257 | } |
1245 | 1258 | this.enableSslAddDeleteButtons() |
1246 | 1259 | }, |
@@ -1268,7 +1281,7 @@ export default { |
1268 | 1281 | successMessage: this.$t('message.success.remove.sslcert'), |
1269 | 1282 | successMethod: () => { |
1270 | 1283 | this.visible = true |
1271 | | - this.getCurrentlyAssignedSslCert() |
| 1284 | + this.getCurrentAssignedSslCert() |
1272 | 1285 | this.enableSslAddDeleteButtons() |
1273 | 1286 | }, |
1274 | 1287 | errorMessage: this.$t('message.remove.sslcert.failed'), |
|
0 commit comments