LDAP.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <template>
  2. <div class="active-directory">
  3. <div class="configuration-title">LDAP/E-Directory Settings</div>
  4. <div class="configuration-btn-right">
  5. <Button type="primary" @click="modalSettings = true">Advanced Settings</Button>
  6. </div>
  7. <div class="configuration-text">The list below shows the current list of configured Role Groups. If you would like to delete or modify a role group, select the name in the list and click Delete Role Group or Modify Role Group. To add a new Role Group, select an unconfigured slot and click Add Role Group.</div>
  8. <div class="configuration-table">
  9. <Table :columns="columnsDirectory" :data="dataDirectory" size="small" ref="table"></Table>
  10. </div>
  11. <div class="configuration-btn-right">
  12. <Button type="primary" style="margin-right: 10px;">Add Role Group</Button>
  13. <Button type="primary" style="margin-right: 10px;">Modify Role Group</Button>
  14. <Button type="primary">Delete Role Group</Button>
  15. </div>
  16. <Modal
  17. v-model="modalSettings"
  18. title="Advanced Settings"
  19. width="660"
  20. :loading="loading"
  21. @on-ok="save"
  22. @on-cancel="cancel">
  23. <Form :model="formSettings" label-position="left" :label-width="260">
  24. <FormItem label="LDAP/E-Directory Authentication">
  25. <Checkbox v-model="formSettings.authentication">Enable</Checkbox>
  26. </FormItem>
  27. <FormItem label="Server Address">
  28. <Input v-model="formSettings.address" style="width: 300px;"/>
  29. </FormItem>
  30. <FormItem label="Port">
  31. <Input v-model="formSettings.port" style="width: 300px;"/>
  32. </FormItem>
  33. <FormItem label="Bind DN">
  34. <Input v-model="formSettings.bindDn" style="width: 300px;"/>
  35. </FormItem>
  36. <FormItem label="Password">
  37. <Input v-model="formSettings.password" style="width: 300px;"/>
  38. </FormItem>
  39. <FormItem label="Search Base">
  40. <Input v-model="formSettings.searchBase" style="width: 300px;"/>
  41. </FormItem>
  42. </Form>
  43. </Modal>
  44. </div>
  45. </template>
  46. <script>
  47. export default {
  48. name: "LDAP",
  49. data () {
  50. return {
  51. columnsDirectory: [
  52. {
  53. "title": "Role Group ID",
  54. "key": "ID",
  55. "sortable": true
  56. },
  57. {
  58. "title": "Group Name",
  59. "key": "Name",
  60. "sortable": true
  61. },
  62. {
  63. "title": "Group Search Base",
  64. "key": "Base",
  65. "sortable": true
  66. },
  67. {
  68. "title": "Group Privilege",
  69. "key": "Privilege",
  70. "sortable": true
  71. }
  72. ],
  73. dataDirectory: [
  74. {
  75. ID: 1,
  76. Name: 'Group Name',
  77. Base: 'Group Search Base',
  78. Privilege: 'Group Privilege'
  79. },
  80. {
  81. ID: 2,
  82. Name: 'Group Name',
  83. Base: 'Group Search Base',
  84. Privilege: 'Group Privilege'
  85. }
  86. ],
  87. modalSettings: false,
  88. loading: true,
  89. formSettings: {
  90. authentication: true,
  91. address: '',
  92. password: '',
  93. port: '',
  94. bindDn: '',
  95. searchBase: '',
  96. }
  97. }
  98. },
  99. methods: {
  100. save() {
  101. setTimeout(() => {
  102. this.modalSettings = false;
  103. }, 2000);
  104. },
  105. cancel() {
  106. }
  107. }
  108. }
  109. </script>
  110. <style scoped>
  111. </style>