summaryrefslogtreecommitdiff
path: root/src/views/AccessControl/SslCertificates
diff options
context:
space:
mode:
Diffstat (limited to 'src/views/AccessControl/SslCertificates')
-rw-r--r--src/views/AccessControl/SslCertificates/CsrCountryCodes.js48
-rw-r--r--src/views/AccessControl/SslCertificates/ModalGenerateCsr.vue52
-rw-r--r--src/views/AccessControl/SslCertificates/ModalUploadCertificate.vue38
-rw-r--r--src/views/AccessControl/SslCertificates/SslCertificates.vue72
4 files changed, 105 insertions, 105 deletions
diff --git a/src/views/AccessControl/SslCertificates/CsrCountryCodes.js b/src/views/AccessControl/SslCertificates/CsrCountryCodes.js
index 59e724b7..a2d70007 100644
--- a/src/views/AccessControl/SslCertificates/CsrCountryCodes.js
+++ b/src/views/AccessControl/SslCertificates/CsrCountryCodes.js
@@ -30,12 +30,12 @@ export const COUNTRY_LIST = [
{
name: 'Bonaire, Sint Eustatius and Saba',
code: 'BQ',
- label: i18n.t('countries.BQ')
+ label: i18n.t('countries.BQ'),
},
{
name: 'Bosnia and Herzegovina ',
code: 'BA',
- label: i18n.t('countries.BA')
+ label: i18n.t('countries.BA'),
},
{ name: 'Bostwana', code: 'BW', label: i18n.t('countries.BW') },
{ name: 'Bouvet Island', code: 'BV', label: i18n.t('countries.BV') },
@@ -43,7 +43,7 @@ export const COUNTRY_LIST = [
{
name: 'British Indian Ocean Territory',
code: 'IO',
- label: i18n.t('countries.IO')
+ label: i18n.t('countries.IO'),
},
{ name: 'Brunei Darussalam ', code: 'BN', label: i18n.t('countries.BN') },
{ name: 'Bulgaria', code: 'BG', label: i18n.t('countries.BG') },
@@ -57,7 +57,7 @@ export const COUNTRY_LIST = [
{
name: 'Central African Republic',
code: 'CF',
- label: i18n.t('countries.CF')
+ label: i18n.t('countries.CF'),
},
{ name: 'Chad', code: 'TD', label: i18n.t('countries.TD') },
{ name: 'Chile', code: 'CL', label: i18n.t('countries.CL') },
@@ -69,7 +69,7 @@ export const COUNTRY_LIST = [
{
name: 'Congo, The Democratic Republic of the',
code: 'CD',
- label: i18n.t('countries.CD')
+ label: i18n.t('countries.CD'),
},
{ name: 'Congo', code: 'CG', label: i18n.t('countries.CG') },
{ name: 'Cook Islands', code: 'CK', label: i18n.t('countries.CK') },
@@ -95,7 +95,7 @@ export const COUNTRY_LIST = [
{
name: 'Falkland Islands (Malvinas)',
code: 'FK',
- label: i18n.t('countries.FK')
+ label: i18n.t('countries.FK'),
},
{ name: 'Faroe Islands', code: 'FO', label: i18n.t('countries.FO') },
{ name: 'Fiji', code: 'FJ', label: i18n.t('countries.FJ') },
@@ -106,7 +106,7 @@ export const COUNTRY_LIST = [
{
name: 'French Southern Territories',
code: 'TF',
- label: i18n.t('countries.TF')
+ label: i18n.t('countries.TF'),
},
{ name: 'Gabon', code: 'GA', label: i18n.t('countries.GA') },
{ name: 'Gambia, The', code: 'GM', label: i18n.t('countries.GM') },
@@ -128,7 +128,7 @@ export const COUNTRY_LIST = [
{
name: 'Heard Island and McDonald Islands',
code: 'HM',
- label: i18n.t('countries.HM')
+ label: i18n.t('countries.HM'),
},
{ name: 'Holy See', code: 'VA', label: i18n.t('countries.VA') },
{ name: 'Honduras', code: 'HN', label: i18n.t('countries.HN') },
@@ -140,7 +140,7 @@ export const COUNTRY_LIST = [
{
name: 'Iran, Islamic Republic of',
code: 'IR',
- label: i18n.t('countries.IR')
+ label: i18n.t('countries.IR'),
},
{ name: 'Iraq', code: 'IQ', label: i18n.t('countries.IQ') },
{ name: 'Ireland', code: 'IE', label: i18n.t('countries.IE') },
@@ -158,14 +158,14 @@ export const COUNTRY_LIST = [
{
name: "Korea, Democratic People's Republic of",
code: 'KP',
- label: i18n.t('countries.KP')
+ label: i18n.t('countries.KP'),
},
{ name: 'Kuwait', code: 'KW', label: i18n.t('countries.KW') },
{ name: 'Kyrgyzstan', code: 'KG', label: i18n.t('countries.KG') },
{
name: "Lao People's Democratic Republic",
code: 'LA',
- label: i18n.t('countries.LA')
+ label: i18n.t('countries.LA'),
},
{ name: 'Latvia', code: 'LV', label: i18n.t('countries.LV') },
{ name: 'Lebanon', code: 'LB', label: i18n.t('countries.LB') },
@@ -179,7 +179,7 @@ export const COUNTRY_LIST = [
{
name: 'Macedonia, The Former Yugoslav Republic of',
code: 'MK',
- label: i18n.t('countries.MK')
+ label: i18n.t('countries.MK'),
},
{ name: 'Madagascar', code: 'MG', label: i18n.t('countries.MG') },
{ name: 'Malawi', code: 'MW', label: i18n.t('countries.MW') },
@@ -196,7 +196,7 @@ export const COUNTRY_LIST = [
{
name: 'Micronesia, Federated States of',
code: 'FM',
- label: i18n.t('countries.FM')
+ label: i18n.t('countries.FM'),
},
{ name: 'Moldova, Republic of', code: 'MD', label: i18n.t('countries.MD') },
{ name: 'Monaco', code: 'MC', label: i18n.t('countries.MC') },
@@ -220,7 +220,7 @@ export const COUNTRY_LIST = [
{
name: 'Northern Mariana Islands',
code: 'MP',
- label: i18n.t('countries.MP')
+ label: i18n.t('countries.MP'),
},
{ name: 'Norway', code: 'NO', label: i18n.t('countries.NO') },
{ name: 'Oman', code: 'OM', label: i18n.t('countries.OM') },
@@ -245,7 +245,7 @@ export const COUNTRY_LIST = [
{
name: 'Saint Helena, Ascension and Tristan da Cunha',
code: 'SH',
- label: i18n.t('countries.SH')
+ label: i18n.t('countries.SH'),
},
{ name: 'Saint Kitts and Nevis ', code: 'KN', label: i18n.t('countries.KN') },
{ name: 'Saint Lucia', code: 'LC', label: i18n.t('countries.LC') },
@@ -253,12 +253,12 @@ export const COUNTRY_LIST = [
{
name: 'Saint Pierre and Miquelon',
code: 'PM',
- label: i18n.t('countries.PM')
+ label: i18n.t('countries.PM'),
},
{
name: 'Saint Vincent and the Grenadines',
code: 'VC',
- label: i18n.t('countries.VC')
+ label: i18n.t('countries.VC'),
},
{ name: 'Samoa', code: 'WS', label: i18n.t('countries.WS') },
{ name: 'San Marino ', code: 'SM', label: i18n.t('countries.SM') },
@@ -278,7 +278,7 @@ export const COUNTRY_LIST = [
{
name: 'South Georgia and the South Sandwich Islands',
code: 'GS',
- label: i18n.t('countries.GS')
+ label: i18n.t('countries.GS'),
},
{ name: 'South Sudan', code: 'SS', label: i18n.t('countries.SS') },
{ name: 'Spain', code: 'ES', label: i18n.t('countries.ES') },
@@ -294,7 +294,7 @@ export const COUNTRY_LIST = [
{
name: 'Tanzania, United Republic of',
code: 'TZ',
- label: i18n.t('countries.TZ')
+ label: i18n.t('countries.TZ'),
},
{ name: 'Thailand', code: 'TH', label: i18n.t('countries.TH') },
{ name: 'Timor-Leste', code: 'TL', label: i18n.t('countries.TL') },
@@ -308,7 +308,7 @@ export const COUNTRY_LIST = [
{
name: 'Turks and Caicos Islands',
code: 'TC',
- label: i18n.t('countries.TC')
+ label: i18n.t('countries.TC'),
},
{ name: 'Tuvalu', code: 'TV', label: i18n.t('countries.TV') },
{ name: 'Uganda', code: 'UG', label: i18n.t('countries.UG') },
@@ -318,12 +318,12 @@ export const COUNTRY_LIST = [
{
name: 'United States Minor Outlying Islands',
code: 'UM',
- label: i18n.t('countries.UM')
+ label: i18n.t('countries.UM'),
},
{
name: 'United States of America',
code: 'US',
- label: i18n.t('countries.US')
+ label: i18n.t('countries.US'),
},
{ name: 'Uruguay', code: 'UY', label: i18n.t('countries.UY') },
{ name: 'Uzbekistan', code: 'UZ', label: i18n.t('countries.UZ') },
@@ -333,7 +333,7 @@ export const COUNTRY_LIST = [
{
name: 'Virgin Islands, British',
code: 'VG',
- label: i18n.t('countries.VG')
+ label: i18n.t('countries.VG'),
},
{ name: 'Virgin Islands, U.S', code: 'VI', label: i18n.t('countries.VI') },
{ name: 'Wallis and Futuna', code: 'WF', label: i18n.t('countries.WF') },
@@ -341,5 +341,5 @@ export const COUNTRY_LIST = [
{ name: 'Yemen', code: 'YE', label: i18n.t('countries.YE') },
{ name: 'Zambia', code: 'ZM', label: i18n.t('countries.ZM') },
{ name: 'Zimbabwe', code: 'ZW', label: i18n.t('countries.ZW') },
- { name: 'Åland Islands', code: 'AX', label: i18n.t('countries.AX') }
+ { name: 'Åland Islands', code: 'AX', label: i18n.t('countries.AX') },
];
diff --git a/src/views/AccessControl/SslCertificates/ModalGenerateCsr.vue b/src/views/AccessControl/SslCertificates/ModalGenerateCsr.vue
index 84f14c3b..da6b457c 100644
--- a/src/views/AccessControl/SslCertificates/ModalGenerateCsr.vue
+++ b/src/views/AccessControl/SslCertificates/ModalGenerateCsr.vue
@@ -30,7 +30,7 @@
:state="getValidationState($v.form.certificateType)"
@input="$v.form.certificateType.$touch()"
>
- <template v-slot:first>
+ <template #first>
<b-form-select-option :value="null" disabled>
{{ $t('global.form.selectAnOption') }}
</b-form-select-option>
@@ -54,7 +54,7 @@
:state="getValidationState($v.form.country)"
@input="$v.form.country.$touch()"
>
- <template v-slot:first>
+ <template #first>
<b-form-select-option :value="null" disabled>
{{ $t('global.form.selectAnOption') }}
</b-form-select-option>
@@ -158,7 +158,7 @@
</b-col>
<b-col lg="6">
<b-form-group label-for="challenge-password">
- <template v-slot:label>
+ <template #label>
{{ $t('pageSslCertificates.modal.challengePassword') }} -
<span class="form-text d-inline">
{{ $t('global.form.optional') }}
@@ -176,7 +176,7 @@
<b-row>
<b-col lg="6">
<b-form-group label-for="contact-person">
- <template v-slot:label>
+ <template #label>
{{ $t('pageSslCertificates.modal.contactPerson') }} -
<span class="form-text d-inline">
{{ $t('global.form.optional') }}
@@ -192,7 +192,7 @@
</b-col>
<b-col lg="6">
<b-form-group label-for="email-address">
- <template v-slot:label>
+ <template #label>
{{ $t('pageSslCertificates.modal.emailAddress') }} -
<span class="form-text d-inline">
{{ $t('global.form.optional') }}
@@ -210,7 +210,7 @@
<b-row>
<b-col lg="12">
<b-form-group label-for="alternate-name">
- <template v-slot:label>
+ <template #label>
{{ $t('pageSslCertificates.modal.alternateName') }} -
<span class="form-text d-inline">
{{ $t('global.form.optional') }}
@@ -229,14 +229,14 @@
size="lg"
separator=" "
:input-attrs="{
- 'aria-describedby': 'alternate-name-help-block'
+ 'aria-describedby': 'alternate-name-help-block',
}"
:duplicate-tag-text="
$t('pageSslCertificates.modal.duplicateAlternateName')
"
placeholder=""
>
- <template v-slot:add-button-text>
+ <template #add-button-text>
{{ $t('global.action.add') }} <icon-add />
</template>
</b-form-tags>
@@ -262,7 +262,7 @@
:state="getValidationState($v.form.keyPairAlgorithm)"
@input="$v.form.keyPairAlgorithm.$touch()"
>
- <template v-slot:first>
+ <template #first>
<b-form-select-option :value="null" disabled>
{{ $t('global.form.selectAnOption') }}
</b-form-select-option>
@@ -289,7 +289,7 @@
:state="getValidationState($v.form.keyCurveId)"
@input="$v.form.keyCurveId.$touch()"
>
- <template v-slot:first>
+ <template #first>
<b-form-select-option :value="null" disabled>
{{ $t('global.form.selectAnOption') }}
</b-form-select-option>
@@ -313,7 +313,7 @@
:state="getValidationState($v.form.keyBitLength)"
@input="$v.form.keyBitLength.$touch()"
>
- <template v-slot:first>
+ <template #first>
<b-form-select-option :value="null" disabled>
{{ $t('global.form.selectAnOption') }}
</b-form-select-option>
@@ -330,7 +330,7 @@
</b-row>
</b-container>
</b-form>
- <template v-slot:modal-footer="{ ok, cancel }">
+ <template #modal-footer="{ ok, cancel }">
<b-button variant="secondary" @click="cancel()">
{{ $t('global.action.cancel') }}
</b-button>
@@ -353,7 +353,7 @@
@hidden="onHiddenCsrStringModal"
>
{{ csrString }}
- <template v-slot:modal-footer>
+ <template #modal-footer>
<b-btn variant="secondary" @click="copyCsrString">
<template v-if="csrStringCopied">
<icon-checkmark />
@@ -406,25 +406,25 @@ export default {
alternateName: [],
keyPairAlgorithm: null,
keyCurveId: null,
- keyBitLength: null
+ keyBitLength: null,
},
certificateOptions: CERTIFICATE_TYPES.reduce((arr, cert) => {
if (cert.type === 'TrustStore Certificate') return arr;
arr.push({
text: cert.label,
- value: cert.type
+ value: cert.type,
});
return arr;
}, []),
- countryOptions: COUNTRY_LIST.map(country => ({
+ countryOptions: COUNTRY_LIST.map((country) => ({
text: country.label,
- value: country.code
+ value: country.code,
})),
keyPairAlgorithmOptions: ['EC', 'RSA'],
keyCurveIdOptions: ['prime256v1', 'secp521r1', 'secp384r1'],
keyBitLengthOptions: [2048],
csrString: '',
- csrStringCopied: false
+ csrStringCopied: false,
};
},
validations: {
@@ -442,16 +442,16 @@ export default {
alternateName: {},
keyPairAlgorithm: { required },
keyCurveId: {
- reuired: requiredIf(function(form) {
+ reuired: requiredIf(function (form) {
return form.keyPairAlgorithm === 'EC';
- })
+ }),
},
keyBitLength: {
- reuired: requiredIf(function(form) {
+ reuired: requiredIf(function (form) {
return form.keyPairAlgorithm === 'RSA';
- })
- }
- }
+ }),
+ },
+ },
},
methods: {
handleSubmit() {
@@ -493,7 +493,7 @@ export default {
this.csrStringCopied = false;
}, 5000 /*5 seconds*/);
});
- }
- }
+ },
+ },
};
</script>
diff --git a/src/views/AccessControl/SslCertificates/ModalUploadCertificate.vue b/src/views/AccessControl/SslCertificates/ModalUploadCertificate.vue
index 63c3b4e8..070dd0dc 100644
--- a/src/views/AccessControl/SslCertificates/ModalUploadCertificate.vue
+++ b/src/views/AccessControl/SslCertificates/ModalUploadCertificate.vue
@@ -1,6 +1,6 @@
<template>
<b-modal id="upload-certificate" ref="modal" @ok="onOk" @hidden="resetForm">
- <template v-slot:modal-title>
+ <template #modal-title>
<template v-if="certificate">
{{ $t('pageSslCertificates.replaceCertificate') }}
</template>
@@ -59,7 +59,7 @@
</b-form-invalid-feedback>
</b-form-group>
</b-form>
- <template v-slot:modal-ok>
+ <template #modal-ok>
<template v-if="certificate">
{{ $t('global.action.replace') }}
</template>
@@ -80,20 +80,20 @@ export default {
certificate: {
type: Object,
default: null,
- validator: prop => {
+ validator: (prop) => {
if (prop === null) return true;
return (
prop.hasOwnProperty('type') && prop.hasOwnProperty('certificate')
);
- }
- }
+ },
+ },
},
data() {
return {
form: {
certificateType: null,
- file: null
- }
+ file: null,
+ },
};
},
computed: {
@@ -104,30 +104,30 @@ export default {
return this.certificateTypes.map(({ type, label }) => {
return {
text: label,
- value: type
+ value: type,
};
});
- }
+ },
},
watch: {
- certificateOptions: function(options) {
+ certificateOptions: function (options) {
if (options.length) {
this.form.certificateType = options[0].value;
}
- }
+ },
},
validations() {
return {
form: {
certificateType: {
- required: requiredIf(function() {
+ required: requiredIf(function () {
return !this.certificate;
- })
+ }),
},
file: {
- required
- }
- }
+ required,
+ },
+ },
};
},
methods: {
@@ -140,7 +140,7 @@ export default {
location: this.certificate ? this.certificate.location : null,
type: this.certificate
? this.certificate.type
- : this.form.certificateType
+ : this.form.certificateType,
});
this.closeModal();
},
@@ -160,7 +160,7 @@ export default {
// prevent modal close
bvModalEvt.preventDefault();
this.handleSubmit();
- }
- }
+ },
+ },
};
</script>
diff --git a/src/views/AccessControl/SslCertificates/SslCertificates.vue b/src/views/AccessControl/SslCertificates/SslCertificates.vue
index bce50d72..fe63bd99 100644
--- a/src/views/AccessControl/SslCertificates/SslCertificates.vue
+++ b/src/views/AccessControl/SslCertificates/SslCertificates.vue
@@ -11,7 +11,7 @@
<template v-else>
{{
$t('pageSslCertificates.alert.certificateExpiredMessage', {
- certificate: expiredCertificateTypes[0]
+ certificate: expiredCertificateTypes[0],
})
}}
</template>
@@ -24,7 +24,7 @@
<template v-else>
{{
$t('pageSslCertificates.alert.certificateExpiringMessage', {
- certificate: expiringCertificateTypes[0]
+ certificate: expiringCertificateTypes[0],
})
}}
</template>
@@ -61,11 +61,11 @@
:items="tableItems"
:empty-text="$t('global.table.emptyMessage')"
>
- <template v-slot:cell(validFrom)="{ value }">
+ <template #cell(validFrom)="{ value }">
{{ value | formatDate }}
</template>
- <template v-slot:cell(validUntil)="{ value }">
+ <template #cell(validUntil)="{ value }">
<status-icon
v-if="getDaysUntilExpired(value) < 31"
:status="getIconStatus(value)"
@@ -73,7 +73,7 @@
{{ value | formatDate }}
</template>
- <template v-slot:cell(actions)="{ value, item }">
+ <template #cell(actions)="{ value, item }">
<table-row-action
v-for="(action, index) in value"
:key="index"
@@ -82,7 +82,7 @@
:enabled="action.enabled"
@click:tableAction="onTableRowAction($event, item)"
>
- <template v-slot:icon>
+ <template #icon>
<icon-replace v-if="action.value === 'replace'" />
<icon-trashcan v-if="action.value === 'delete'" />
</template>
@@ -124,39 +124,43 @@ export default {
ModalUploadCertificate,
PageTitle,
StatusIcon,
- TableRowAction
+ TableRowAction,
},
mixins: [BVToastMixin, LoadingBarMixin],
+ beforeRouteLeave(to, from, next) {
+ this.hideLoader();
+ next();
+ },
data() {
return {
modalCertificate: null,
fields: [
{
key: 'certificate',
- label: this.$t('pageSslCertificates.table.certificate')
+ label: this.$t('pageSslCertificates.table.certificate'),
},
{
key: 'issuedBy',
- label: this.$t('pageSslCertificates.table.issuedBy')
+ label: this.$t('pageSslCertificates.table.issuedBy'),
},
{
key: 'issuedTo',
- label: this.$t('pageSslCertificates.table.issuedTo')
+ label: this.$t('pageSslCertificates.table.issuedTo'),
},
{
key: 'validFrom',
- label: this.$t('pageSslCertificates.table.validFrom')
+ label: this.$t('pageSslCertificates.table.validFrom'),
},
{
key: 'validUntil',
- label: this.$t('pageSslCertificates.table.validUntil')
+ label: this.$t('pageSslCertificates.table.validUntil'),
},
{
key: 'actions',
label: '',
- tdClass: 'text-right text-nowrap'
- }
- ]
+ tdClass: 'text-right text-nowrap',
+ },
+ ],
};
},
computed: {
@@ -164,21 +168,21 @@ export default {
return this.$store.getters['sslCertificates/allCertificates'];
},
tableItems() {
- return this.certificates.map(certificate => {
+ return this.certificates.map((certificate) => {
return {
...certificate,
actions: [
{
value: 'replace',
- title: this.$t('pageSslCertificates.replaceCertificate')
+ title: this.$t('pageSslCertificates.replaceCertificate'),
},
{
value: 'delete',
title: this.$t('pageSslCertificates.deleteCertificate'),
enabled:
- certificate.type === 'TrustStore Certificate' ? true : false
- }
- ]
+ certificate.type === 'TrustStore Certificate' ? true : false,
+ },
+ ],
};
});
},
@@ -205,7 +209,7 @@ export default {
}
return acc;
}, []);
- }
+ },
},
async created() {
this.startLoader();
@@ -214,10 +218,6 @@ export default {
.dispatch('sslCertificates/getCertificates')
.finally(() => this.endLoader());
},
- beforeRouteLeave(to, from, next) {
- this.hideLoader();
- next();
- },
methods: {
onTableRowAction(event, rowItem) {
switch (event) {
@@ -240,14 +240,14 @@ export default {
.msgBoxConfirm(
this.$t('pageSslCertificates.modal.deleteConfirmMessage', {
issuedBy: certificate.issuedBy,
- certificate: certificate.certificate
+ certificate: certificate.certificate,
}),
{
title: this.$t('pageSslCertificates.deleteCertificate'),
- okTitle: this.$t('global.action.delete')
+ okTitle: this.$t('global.action.delete'),
}
)
- .then(deleteConfirmed => {
+ .then((deleteConfirmed) => {
if (deleteConfirmed) this.deleteCertificate(certificate);
});
},
@@ -264,7 +264,7 @@ export default {
this.startLoader();
this.$store
.dispatch('sslCertificates/addNewCertificate', { file, type })
- .then(success => this.successToast(success))
+ .then((success) => this.successToast(success))
.catch(({ message }) => this.errorToast(message))
.finally(() => this.endLoader());
},
@@ -272,15 +272,15 @@ export default {
this.startLoader();
const reader = new FileReader();
reader.readAsBinaryString(file);
- reader.onloadend = event => {
+ reader.onloadend = (event) => {
const certificateString = event.target.result;
this.$store
.dispatch('sslCertificates/replaceCertificate', {
certificateString,
type,
- location
+ location,
})
- .then(success => this.successToast(success))
+ .then((success) => this.successToast(success))
.catch(({ message }) => this.errorToast(message))
.finally(() => this.endLoader());
};
@@ -290,9 +290,9 @@ export default {
this.$store
.dispatch('sslCertificates/deleteCertificate', {
type,
- location
+ location,
})
- .then(success => this.successToast(success))
+ .then((success) => this.successToast(success))
.catch(({ message }) => this.errorToast(message))
.finally(() => this.endLoader());
},
@@ -312,7 +312,7 @@ export default {
} else if (daysUntilExpired < 31) {
return 'warning';
}
- }
- }
+ },
+ },
};
</script>