You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2020/01/15 08:15:39 UTC
[cloudstack-primate] branch master updated: config: ldap
configuration section changes
This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack-primate.git
The following commit(s) were added to refs/heads/master by this push:
new 17ba636 config: ldap configuration section changes
17ba636 is described below
commit 17ba636bf7e8a1ee67d7e0f413bfefeb3c5226ca
Author: Rohit Yadav <ro...@shapeblue.com>
AuthorDate: Wed Jan 15 13:45:12 2020 +0530
config: ldap configuration section changes
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
---
src/components/view/ListView.vue | 4 +++-
src/config/section/config.js | 15 ++++++++++++++-
src/config/section/iam.js | 19 +++++++++++++++++++
src/views/AutogenView.vue | 4 ++++
4 files changed, 40 insertions(+), 2 deletions(-)
diff --git a/src/components/view/ListView.vue b/src/components/view/ListView.vue
index 3c93db5..c4f7d22 100644
--- a/src/components/view/ListView.vue
+++ b/src/components/view/ListView.vue
@@ -105,7 +105,9 @@
<router-link :to="{ path: '/domain/' + record.domainid }">{{ text }}</router-link>
</a>
<a slot="hostname" slot-scope="text, record" href="javascript:;">
- <router-link :to="{ path: '/host/' + record.hostid }">{{ text }}</router-link>
+ <router-link v-if="record.hostid" :to="{ path: '/host/' + record.hostid }">{{ text }}</router-link>
+ <router-link v-else-if="record.hostname" :to="{ path: $route.path + '/' + record.id }">{{ text }}</router-link>
+ <span v-else>{{ text }}</span>
</a>
<a slot="clustername" slot-scope="text, record" href="javascript:;">
<router-link :to="{ path: '/cluster/' + record.clusterid }">{{ text }}</router-link>
diff --git a/src/config/section/config.js b/src/config/section/config.js
index eff2869..3108f90 100644
--- a/src/config/section/config.js
+++ b/src/config/section/config.js
@@ -34,7 +34,8 @@ export default {
title: 'LDAP Configuration',
icon: 'team',
permission: ['listLdapConfigurations'],
- columns: ['hostname', 'port'],
+ columns: ['hostname', 'port', 'domainid'],
+ details: ['hostname', 'port', 'domainid'],
actions: [
{
api: 'addLdapConfiguration',
@@ -44,6 +45,18 @@ export default {
args: [
'hostname', 'port'
]
+ },
+ {
+ api: 'deleteLdapConfiguration',
+ icon: 'delete',
+ label: 'label.remove.ldap',
+ dataView: true,
+ args: ['hostname'],
+ mapping: {
+ hostname: {
+ value: (record) => { return record.hostname }
+ }
+ }
}
]
},
diff --git a/src/config/section/iam.js b/src/config/section/iam.js
index b4d7450..9cdf377 100644
--- a/src/config/section/iam.js
+++ b/src/config/section/iam.js
@@ -257,6 +257,25 @@ export default {
}
},
{
+ api: 'linkDomainToLdap',
+ icon: 'link',
+ label: 'Link Domain to LDAP Group/OU',
+ listView: true,
+ dataView: true,
+ args: ['type', 'domainid', 'name', 'accounttype', 'admin'],
+ mapping: {
+ type: {
+ options: ['GROUP', 'OU']
+ },
+ accounttype: {
+ options: ['0', '2']
+ },
+ domainid: {
+ value: (record) => { return record.id }
+ }
+ }
+ },
+ {
api: 'deleteDomain',
icon: 'delete',
label: 'label.delete.domain',
diff --git a/src/views/AutogenView.vue b/src/views/AutogenView.vue
index 9f18436..c08f548 100644
--- a/src/views/AutogenView.vue
+++ b/src/views/AutogenView.vue
@@ -407,6 +407,8 @@ export default {
params.id = this.$route.params.id
if (this.$route.path.startsWith('/ssh/')) {
params.name = this.$route.params.id
+ } else if (this.$route.path.startsWith('/ldapsetting/')) {
+ params.hostname = this.$route.params.id
}
}
@@ -453,6 +455,8 @@ export default {
}
if (this.$route.path.startsWith('/ssh')) {
this.items[idx].id = this.items[idx].name
+ } else if (this.$route.path.startsWith('/ldapsetting')) {
+ this.items[idx].id = this.items[idx].hostname
}
}
}