You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
1.6 KiB
67 lines
1.6 KiB
import CRUDBase from '../CRUDBase.js'
|
|
|
|
class ClientResource extends CRUDBase {
|
|
endpoint = '/api/v1/ldap/clients'
|
|
required_fields = ['name', 'uid', 'password']
|
|
|
|
item = 'LDAP Client'
|
|
plural = 'LDAP Clients'
|
|
|
|
listing_definition = {
|
|
columns: [
|
|
{
|
|
name: 'Client Name',
|
|
field: 'name',
|
|
},
|
|
{
|
|
name: 'User ID',
|
|
field: 'uid',
|
|
},
|
|
],
|
|
actions: [
|
|
{
|
|
type: 'resource',
|
|
position: 'main',
|
|
action: 'insert',
|
|
text: 'Create New',
|
|
color: 'success',
|
|
},
|
|
{
|
|
type: 'resource',
|
|
position: 'row',
|
|
action: 'update',
|
|
icon: 'fa fa-edit',
|
|
color: 'primary',
|
|
},
|
|
],
|
|
}
|
|
|
|
form_definition = {
|
|
fields: [
|
|
{
|
|
name: 'Provider Name',
|
|
field: 'name',
|
|
placeholder: 'Awesome External App',
|
|
required: true,
|
|
type: 'text',
|
|
},
|
|
{
|
|
name: 'User ID',
|
|
field: 'uid',
|
|
placeholder: 'some_username',
|
|
required: true,
|
|
type: 'text',
|
|
},
|
|
{
|
|
name: 'Password',
|
|
field: 'password',
|
|
required: ['insert'],
|
|
type: 'password',
|
|
},
|
|
],
|
|
}
|
|
}
|
|
|
|
const ldap_client = new ClientResource()
|
|
export { ldap_client }
|