-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathidentity-managers.html
229 lines (229 loc) · 13.2 KB
/
identity-managers.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<!DOCTYPE html>
<html class="vs-user-directories" lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:include="webroot/frags/layout/head.htm :: header">
<script src="/dist/js/lib/jquery.min.js"></script>
<script src="/dist/js/lib/thymus.min.js" id="thymus"
data-thx-base-path="." data-thx-frag-extension=".htm"
data-thx-head-frag="th:include=webroot/frags/layout/head.htm :: header"
data-thx-preload-js="/dist/js/loader.js"
data-thx-onfrags="fragsListener();" data-thx-onfrag="fragListener()"></script>
</head>
<body>
<div id="portal" class="wrapper" v-bind:class="pageClass">
<div th:replace="webroot/frags/layout/navs.htm :: navs"></div>
<main class="page-wrapper">
<user-directories inline-template v-on:set-state="setState" v-on:set-page="setPage" v-bind:root-state="rootState" v-if="!$root.isLoading">
<div class="columns">
<section class="column column-main column-main-fixed">
<div class="column-main-fixed-overlay" v-if="rootState == 'add' || rootState == 'edit'" v-on:click="$emit('set-state', 'init'); cancelDirectory();"></div>
<div class="nicescroll--bar">
<table class="table table-hover table-bordered table-edge">
<tr>
<th class="td-bool" v-bind:class="sort.order" v-on:click="sortList(sort, 'isactive', Boolean)">Status</th>
<th class="td-name" v-bind:class="sort.order" v-on:click="sortList(sort, 'directoryname', String)">Name</th>
<th class="td-name" v-bind:class="sort.order" v-on:click="sortList(sort, 'directorytypeid', String)">Type</th>
<th class="td-bool" v-bind:class="sort.order" v-on:click="sortList(sort, 'directorypriorityorder', Number)">Order</th>
<th class="td-bool" v-on:click="sortList(sort, 'istemplate', Boolean)">istemplate</th>
<th class="td-datetime" v-bind:class="sort.order" v-on:click="sortList(sort, 'lastsyncronizedat', Date)">Syncronization</th>
<th class="td-datetime-x" v-bind:class="sort.order" v-on:click="sortList(sort, 'created', Date)">Created / Updated / Deleted</th>
<th class="td-action-1"></th>
<th class="td-action-1"></th>
</tr>
<tr v-for="(directory, index) in sortBy(sort, directoryList)" v-bind:key="directory.uuid" v-bind:class="{'active': isSelected(index), 'tr-deleted': directory.isdeleted}">
<td class="txt-c">
<i class="fas fa-times-circle" title="Not Active" v-if="!directory.isactive"></i>
<i class="fas fa-check-circle txt-green" title="Active" v-if="directory.isactive"></i>
</td>
<td>{{directory.directoryname}} <small class="d-block">{{directory.description}}</small></td>
<td>{{getTypeName(directory.directorytypeid)}}</td>
<td>{{directory.directorypriorityorder}}</td>
<td>{{directory.istemplate}}</td>
<td>
<div class="d-flex align-items-center">
<div class="d-block small">
{{directory.lastsyncronizedat | formatDateTime}}
</div>
<strong class="ml-auto">{{directory.lastsyncronizationduration}}</strong>
</div>
</td>
<td>
<div>
<strong class="small">CREATED:</strong>
<small>{{directory.created | formatDateTime}}</small>
</div>
<div>
<strong class="small">UPDATED:</strong>
<small>{{directory.updated | formatDateTime}}</small>
</div>
<div v-if="directory.isdeleted">
<strong class="small">DELETED:</strong>
<small>{{directory.deleted | formatDateTime}}</small>
</div>
</td>
<td class="td-action-1">
<a v-if="!directory.isdeleted" class="btn btn-xl txt-link btn-square" title="EDIT DIRECTORY" v-on:click="$emit('set-state', 'edit'); selectDirectory(directory, index);"><i class="fas fa-edit"></i></a>
</td>
<td class="td-action-1">
<a v-if="!directory.isdeleted" class="btn btn-xl txt-link txt-grey btn-square" title="DELETE DIRECTORY" v-on:click="deleteDirectory(directory, index)"><i class="fas fa-trash-alt"></i></a>
</td>
</tr>
</table>
</div>
</section>
<aside class="column column-aside add-column">
<div class="clearfix brd-b column-header column-min-button">
<h5 class="column-header-title" >
<span v-if="rootState == 'add'">Add New Identity Manager</span>
<span v-if="rootState == 'edit'">Edit Identity Manager</span>
</h5>
</div>
<div class="column-content">
<div class="nicescroll-bar">
<div class="p-3">
<div class="form-group" v-bind:class="{ 'has-error': errors.has('directoryname') }">
<label for="directoryname">Name:</label>
<input type="text" name="directoryname" id="directoryname" v-model="directory.directoryname" v-validate="'required|min:2|alpha_spaces'" class="form-control">
<em v-bind:class="{ 'show': errors.has('directoryname') }">{{ errors.first('directoryname') }}</em>
</div>
<div class="form-group" v-bind:class="{ 'has-error': errors.has('directorydescription') }">
<label for="directorydescription">Decription:</label>
<textarea type="text" name="directorydescription" id="directorydescription" v-model="directory.description" v-validate="'required'" class="form-control"></textarea>
<em v-bind:class="{ 'show': errors.has('directorydescription') }">{{ errors.first('directorydescription') }}</em>
</div>
<div class="form-group" v-bind:class="{ 'has-error': errors.has('order') }">
<label for="order">Priority Order:</label>
<input type="number" name="order" id="order" v-model.number="directory.directorypriorityorder" class="form-control">
<em v-bind:class="{ 'show': errors.has('order') }">{{ errors.first('order') }}</em>
</div>
<div class="fow">
<div class="fol-6 form-group ">
<label class="d-block">Is Active?</label>
<span class="switch switch-green">
<input type="checkbox" name="isactive" id="isactive" v-model="directory.isactive">
<label for="isactive"></label>
</span>
</div>
<div class="fol-6 form-group txt-r">
<label class="d-block">Template</label>
<span class="switch switch-primary">
<input type="checkbox" name="istemplate" id="istemplate" v-model="directory.istemplate" checked>
<label for="istemplate"></label>
</span>
</div>
</div>
<div class="form-group " v-bind:class="{ 'has-error': errors.has('orgid') }">
<label>Organization</label>
<select class="form-control" name="orgid" id="orgid" v-model="directory.organizationid" v-validate="'required'">
<option v-for="(org,index) in orgOptions" :value="org.uuid" :class="{'op-deleted': org.isdeleted}" :disabled="org.isdeleted">{{org.name}}</option>
</select>
<em v-bind:class="{ 'show': errors.has('orgid') }">{{ errors.first('orgid') }}</em>
</div>
<div class="form-group " v-bind:class="{ 'has-error': errors.has('type') }">
<label>Directory Type</label>
<select class="form-control" name="type" id="type" v-model="directory.directorytypeid" v-validate="'required'" v-on:change="getTemplate($event.target.value, true)">
<option v-for="(type,index) in directoryTypes" :value="type.uuid">{{type.typename}}</option>
</select>
<em v-bind:class="{ 'show': errors.has('type') }">{{ errors.first('type') }}</em>
</div>
<div class="form-group" v-bind:class="{ 'has-error': errors.has('attributes') }">
<label for="attributes" class="txt-muted">Attributes:</label>
<textarea type="text" name="attributes" id="attributes" v-model="stringifyAttribute" v-validate="'required'" class="form-control" :readonly="!$root.abyssSandbox"></textarea>
<em v-bind:class="{ 'show': errors.has('attributes') }">{{ errors.first('attributes') }}</em>
</div>
<div class="form-group d-flex justify-content-between">
<button type="button" class="btn btn-secondary btn-rounded" v-on:click="$emit('set-state', 'init'); cancelDirectory()">CANCEL</button>
<button type="button" class="btn btn-primary btn-rounded" v-if="rootState == 'add'" v-on:click="directoryAction('add')">ADD</button>
<button type="button" class="btn btn-primary btn-rounded" v-if="rootState == 'edit'" v-on:click="directoryAction('edit')">SAVE</button>
</div>
</div>
</div>
</div>
</aside>
<aside class="column column-aside manage-column" v-if="template">
<div class="clearfix brd-b column-header column-min-button">
<h5 class="column-header-title">Configure Directory</h5>
</div>
<div class="column-content">
<div class="nicescroll-bar">
<div class="p-3">
<div v-for="(cv, ck, ci) in template.components.schemas">
<div v-for="(pv, pk, pi) in cv.properties">
<schema-template-form :v="pv" :k="pk" :i="pi" :req="cv.required" :attr="directory.directoryattributes"></schema-template-form>
</div>
</div>
</div>
</div>
</div>
</aside>
<aside class="column column-aside manage-column column-minimize">
<div class="clearfix brd-b column-header column-min-button">
<h5 class="column-header-title">Identity Manager Types</h5>
</div>
<div class="column-content">
<div class="nicescroll-bar">
<directory-types v-for="(t,index) in directoryTypes" :key="t.uuid" :t="t" :index="index" :orgoptions="orgOptions" inline-template>
<article class="field-controls field-color-grey field-level-1" :class="{'is-deleted': t.isdeleted}">
<div class="field-sum">
<a class="field-link nav-caret d-flex align-items-center" data-toggle="collapse" v-bind:data-target="'#t'+index" v-bind:aria-controls="'t'+index">
<i class="fas fa-times-circle txt-muted mr-2" title="Not Active" v-if="!t.isactive"></i>
<i class="fas fa-check-circle txt-green mr-2" title="Active" v-if="t.isactive"></i>
<strong class="fnt-bold">{{t.typename}}</strong>
</a>
<div class="ficon-actions dropdown dropdown-hover" v-if="!t.isdeleted">
<button type="button" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false"><i class="fas fa-ellipsis-h"></i></button>
<ul class="dropdown-menu dropdown-menu-right" role="menu">
<li><a title="Add Identity Manager Type" v-on:click="addType()"><i class="fas fa-lg fa-plus"></i> Add IM Type</a></li>
<li><a title="Remove Identity Manager Type" v-on:click="deleteType(t, index)"><i class="fa fa-trash-alt"></i> Remove IM Type</a></li>
</ul>
</div>
</div>
<fieldset v-bind:id="'t'+index" class="collapse field-acc" :disabled="t.isdeleted">
<div class="form-group" v-bind:class="{ 'has-error': errors.has('name') }">
<label>Name</label>
<input class="form-control" name="name" v-model="t.typename" v-validate="'required'">
<em v-bind:class="{ 'show': errors.has('name') }">{{ errors.first('name') }}</em>
</div>
<div class="form-group">
<label>Description</label>
<textarea class="form-control" name="description" v-model="t.description"></textarea>
</div>
<div class="form-group" v-bind:class="{ 'has-error': errors.has('organization') }">
<label>Organization</label>
<select class="form-control" name="organization" v-model="t.organizationid" v-validate="'required'">
<option v-for="(org,index) in orgoptions" :value="org.uuid" :class="{'op-deleted': org.isdeleted}" :disabled="org.isdeleted">{{org.name}}</option>
</select>
<em v-bind:class="{ 'show': errors.has('organization') }">{{ errors.first('organization') }}</em>
</div>
<div class="form-group form-inline">
<label class="d-block">Is Active?</label>
<span class="switch switch-green ml-auto">
<input type="checkbox" name="isactive" :id="'isactive'+t.uuid" v-model="t.isactive">
<label :for="'isactive'+t.uuid"></label>
</span>
</div>
<div class="form-group" v-bind:class="{ 'has-error': errors.has('template') }">
<label for="template">Template:</label>
<textarea type="text" name="template" id="template" v-model.lazy="stringifyTemplate" v-validate="'required'" class="form-control"></textarea>
<em v-bind:class="{ 'show': errors.has('template') }">{{ errors.first('template') }}</em>
</div>
<div class="form-group d-flex justify-content-center">
<button type="button" class="btn btn-secondary btn-rounded mr-auto" v-if="!t.uuid" v-on:click="cancelAddType(t)">CANCEL</button>
<button type="button" class="btn btn-primary btn-rounded" v-if="!t.uuid" v-on:click="saveAddType(t)">ADD</button>
<button type="button" class="btn btn-primary btn-rounded" v-if="t.uuid" v-on:click="saveType(t)">SAVE</button>
</div>
</fieldset>
</article>
</directory-types>
</div>
</div>
</aside>
<div class="btn-float-br btn-float-under">
<button class="btn btn-xl btn-green btn-circle" v-on:click="$emit('set-state', 'add', 'init')" title="ADD NEW DIRECTORY "><i class="fas fa-plus"></i></button>
</div>
</div>
</user-directories>
</main>
</div>
<script id="reqVue" data-module="user-directories" data-main="/dist/js/main" src="/dist/js/lib/require.min.js"></script>
</body>
</html>