summaryrefslogtreecommitdiff
path: root/src/views/AccessControl/Ldap/Ldap.vue
diff options
context:
space:
mode:
authorDerick Montague <derick.montague@ibm.com>2020-10-22 00:20:00 +0300
committerDerick Montague <derick.montague@ibm.com>2020-11-03 19:47:51 +0300
commit602e98aa32f82fd3b0c3d250c7cc1f8da971db24 (patch)
tree2894194868ff987718a8b19f112b8106d662aa83 /src/views/AccessControl/Ldap/Ldap.vue
parent47165201c79b3d2c4ccc62a49a9c75d038ee8fe6 (diff)
downloadwebui-vue-602e98aa32f82fd3b0c3d250c7cc1f8da971db24.tar.xz
Update linting packages to use latest
- 99% of changes were small syntax changes that were changed by the lint command. There were a couple of small manual changes to meet the property order patterns established as part of the vue:recommended guidelines. There are rules that were set from errors to warnings and new stories are being opened to address those issues. Testing: - Successfully ran npm run serve - Successfully ran npm run lint - Verified functionality works as expected, e.g. success and failure use cases - Resolved any JavaScript errors thrown to the console Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: Ie082f31c73ccbe8a60afa8f88a9ef6dbf33d9fd2
Diffstat (limited to 'src/views/AccessControl/Ldap/Ldap.vue')
-rw-r--r--src/views/AccessControl/Ldap/Ldap.vue68
1 files changed, 34 insertions, 34 deletions
diff --git a/src/views/AccessControl/Ldap/Ldap.vue b/src/views/AccessControl/Ldap/Ldap.vue
index 40164a5a..27172019 100644
--- a/src/views/AccessControl/Ldap/Ldap.vue
+++ b/src/views/AccessControl/Ldap/Ldap.vue
@@ -96,7 +96,7 @@
<b-row>
<b-col sm="6" xl="4">
<b-form-group label-for="server-uri">
- <template v-slot:label>
+ <template #label>
{{ $t('pageLdap.form.serverUri') }}
<info-tooltip
:title="$t('pageLdap.form.serverUriTooltip')"
@@ -174,7 +174,7 @@
</b-col>
<b-col sm="6" xl="4">
<b-form-group label-for="user-id-attribute">
- <template v-slot:label>
+ <template #label>
{{ $t('pageLdap.form.userIdAttribute') }} -
<span class="form-text d-inline">
{{ $t('global.form.optional') }}
@@ -190,7 +190,7 @@
</b-col>
<b-col sm="6" xl="4">
<b-form-group label-for="group-id-attribute">
- <template v-slot:label>
+ <template #label>
{{ $t('pageLdap.form.groupIdAttribute') }} -
<span class="form-text d-inline">
{{ $t('global.form.optional') }}
@@ -252,9 +252,13 @@ export default {
InputPasswordToggle,
PageTitle,
PageSection,
- TableRoleGroups
+ TableRoleGroups,
},
mixins: [BVToastMixin, VuelidateMixin, LoadingBarMixin],
+ beforeRouteLeave(to, from, next) {
+ this.hideLoader();
+ next();
+ },
data() {
return {
form: {
@@ -268,8 +272,8 @@ export default {
bindPassword: '',
baseDn: '',
userIdAttribute: '',
- groupIdAttribute: ''
- }
+ groupIdAttribute: '',
+ },
};
},
computed: {
@@ -277,70 +281,70 @@ export default {
'isServiceEnabled',
'isActiveDirectoryEnabled',
'ldap',
- 'activeDirectory'
+ 'activeDirectory',
]),
sslCertificates() {
return this.$store.getters['sslCertificates/allCertificates'];
},
caCertificateExpiration() {
const caCertificate = find(this.sslCertificates, {
- type: 'TrustStore Certificate'
+ type: 'TrustStore Certificate',
});
if (caCertificate === undefined) return null;
return caCertificate.validUntil;
},
ldapCertificateExpiration() {
const ldapCertificate = find(this.sslCertificates, {
- type: 'LDAP Certificate'
+ type: 'LDAP Certificate',
});
if (ldapCertificate === undefined) return null;
return ldapCertificate.validUntil;
},
ldapProtocol() {
return this.form.secureLdapEnabled ? 'ldaps://' : 'ldap://';
- }
+ },
},
watch: {
- isServiceEnabled: function(value) {
+ isServiceEnabled: function (value) {
this.form.ldapAuthenticationEnabled = value;
},
- isActiveDirectoryEnabled: function(value) {
+ isActiveDirectoryEnabled: function (value) {
this.form.activeDirectoryEnabled = value;
this.setFormValues();
- }
+ },
},
validations: {
form: {
ldapAuthenticationEnabled: {},
secureLdapEnabled: {},
activeDirectoryEnabled: {
- required: requiredIf(function() {
+ required: requiredIf(function () {
return this.form.ldapAuthenticationEnabled;
- })
+ }),
},
serverUri: {
- required: requiredIf(function() {
+ required: requiredIf(function () {
return this.form.ldapAuthenticationEnabled;
- })
+ }),
},
bindDn: {
- required: requiredIf(function() {
+ required: requiredIf(function () {
return this.form.ldapAuthenticationEnabled;
- })
+ }),
},
bindPassword: {
- required: requiredIf(function() {
+ required: requiredIf(function () {
return this.form.ldapAuthenticationEnabled;
- })
+ }),
},
baseDn: {
- required: requiredIf(function() {
+ required: requiredIf(function () {
return this.form.ldapAuthenticationEnabled;
- })
+ }),
},
userIdAttribute: {},
- groupIdAttribute: {}
- }
+ groupIdAttribute: {},
+ },
},
created() {
this.startLoader();
@@ -350,10 +354,6 @@ export default {
this.$store.dispatch('sslCertificates/getCertificates');
this.setFormValues();
},
- beforeRouteLeave(to, from, next) {
- this.hideLoader();
- next();
- },
methods: {
setFormValues(serviceType) {
if (!serviceType) {
@@ -366,7 +366,7 @@ export default {
bindDn = '',
baseDn = '',
userAttribute = '',
- groupsAttribute = ''
+ groupsAttribute = '',
} = serviceType;
const secureLdap =
serviceAddress && serviceAddress.includes('ldaps://') ? true : false;
@@ -392,12 +392,12 @@ export default {
bindPassword: this.form.bindPassword,
baseDn: this.form.baseDn,
userIdAttribute: this.form.userIdAttribute,
- groupIdAttribute: this.form.groupIdAttribute
+ groupIdAttribute: this.form.groupIdAttribute,
};
this.startLoader();
this.$store
.dispatch('ldap/saveAccountSettings', data)
- .then(success => {
+ .then((success) => {
this.successToast(success);
this.$v.form.$reset();
})
@@ -426,7 +426,7 @@ export default {
// disables the service.
this.setFormValues();
}
- }
- }
+ },
+ },
};
</script>