mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 07:33:27 -06:00
Range Web UI
Range web UI was implemented. It consist of: * new menu item - 'ranges' in 'IPA Server' tab * new search page * new details page https://fedorahosted.org/freeipa/ticket/2894
This commit is contained in:
parent
af4d534428
commit
2d63e28c78
@ -54,8 +54,9 @@ app_DATA = \
|
||||
overpass_regular-web.ttf \
|
||||
overpass_regular-web.woff \
|
||||
policy.js \
|
||||
reset_password.js \
|
||||
reset_password.html \
|
||||
range.js \
|
||||
reset_password.js \
|
||||
reset_password.html \
|
||||
rule.js \
|
||||
search.js \
|
||||
selinux.js \
|
||||
|
@ -350,7 +350,7 @@ IPA.field = function(spec) {
|
||||
|
||||
if (that.widget) {
|
||||
if (that.label) that.widget.label = that.label;
|
||||
if (that.title) that.widget.title = that.title;
|
||||
if (that.tooltip) that.widget.tooltip = that.tooltip;
|
||||
if (that.measurement_unit) that.widget.measurement_unit = that.measurement_unit;
|
||||
that.widget.undo = that.undo;
|
||||
that.widget.writable = that.writable;
|
||||
|
@ -53,6 +53,7 @@
|
||||
<script type="text/javascript" src="aci.js"></script>
|
||||
<script type="text/javascript" src="entitle.js"></script>
|
||||
<script type="text/javascript" src="trust.js"></script>
|
||||
<script type="text/javascript" src="range.js"></script>
|
||||
|
||||
<script type="text/javascript" src="ext/extension.js"></script>
|
||||
<script type="text/javascript" src="webui.js"></script>
|
||||
|
@ -157,6 +157,7 @@
|
||||
+process dns.js
|
||||
+process automount.js
|
||||
+process automember.js
|
||||
+process range.js
|
||||
+process trust.js
|
||||
+process webui.js
|
||||
+process login.js
|
||||
|
162
install/ui/range.js
Normal file
162
install/ui/range.js
Normal file
@ -0,0 +1,162 @@
|
||||
/*jsl:import ipa.js */
|
||||
|
||||
/* Authors:
|
||||
* Petr Vobornik <pvoborni@redhat.com>
|
||||
*
|
||||
* Copyright (C) 2010 Red Hat
|
||||
* see file 'COPYING' for use and warranty information
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* REQUIRES: ipa.js, details.js, search.js, add.js, facet.js, entity.js */
|
||||
|
||||
IPA.range = {};
|
||||
|
||||
IPA.range.entity = function(spec) {
|
||||
|
||||
var that = IPA.entity(spec);
|
||||
|
||||
that.init = function() {
|
||||
that.entity_init();
|
||||
|
||||
that.builder.search_facet({
|
||||
columns: [
|
||||
'cn',
|
||||
'ipabaseid',
|
||||
'ipaidrangesize',
|
||||
'iparangetype'
|
||||
]
|
||||
}).
|
||||
details_facet({
|
||||
sections: [
|
||||
{
|
||||
name: 'details',
|
||||
fields: [
|
||||
'cn',
|
||||
'iparangetype',
|
||||
{
|
||||
name: 'ipabaseid',
|
||||
label: IPA.messages.objects.range.ipabaseid,
|
||||
tooltip: IPA.get_entity_param('range', 'ipabaseid').label
|
||||
},
|
||||
{
|
||||
name: 'ipaidrangesize',
|
||||
label: IPA.messages.objects.range.ipaidrangesize,
|
||||
tooltip: IPA.get_entity_param('range', 'ipaidrangesize').label
|
||||
},
|
||||
{
|
||||
name: 'ipabaserid',
|
||||
label: IPA.messages.objects.range.ipabaserid,
|
||||
tooltip: IPA.get_entity_param('range', 'ipabaserid').label
|
||||
},
|
||||
{
|
||||
name: 'ipasecondarybaserid',
|
||||
label: IPA.messages.objects.range.ipasecondarybaserid,
|
||||
tooltip: IPA.get_entity_param('range', 'ipasecondarybaserid').label
|
||||
},
|
||||
{
|
||||
name: 'ipanttrusteddomainsid',
|
||||
label: IPA.messages.objects.range.ipanttrusteddomainsid,
|
||||
tooltip: IPA.get_entity_param('range', 'ipanttrusteddomainsid').label
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}).
|
||||
adder_dialog({
|
||||
fields: [
|
||||
{
|
||||
name: 'cn',
|
||||
widget: 'range.cn'
|
||||
},
|
||||
{
|
||||
name: 'ipabaseid',
|
||||
label: IPA.messages.objects.range.ipabaseid,
|
||||
tooltip: IPA.get_entity_param('range', 'ipabaseid').label,
|
||||
widget: 'range.ipabaseid'
|
||||
},
|
||||
{
|
||||
name: 'ipaidrangesize',
|
||||
label: IPA.messages.objects.range.ipaidrangesize,
|
||||
tooltip: IPA.get_entity_param('range', 'ipaidrangesize').label,
|
||||
widget: 'range.ipaidrangesize'
|
||||
},
|
||||
{
|
||||
name: 'ipabaserid',
|
||||
label: IPA.messages.objects.range.ipabaserid,
|
||||
tooltip: IPA.get_entity_param('range', 'ipabaserid').label,
|
||||
widget: 'range.ipabaserid'
|
||||
},
|
||||
{
|
||||
name: 'ipasecondarybaserid',
|
||||
label: IPA.messages.objects.range.ipasecondarybaserid,
|
||||
tooltip: IPA.get_entity_param('range', 'ipasecondarybaserid').label,
|
||||
widget: 'type.ipasecondarybaserid'
|
||||
},
|
||||
{
|
||||
name: 'ipanttrusteddomainsid',
|
||||
label: IPA.messages.objects.range.ipanttrusteddomainsid,
|
||||
tooltip: IPA.get_entity_param('range', 'ipanttrusteddomainsid').label,
|
||||
widget: 'type.ipanttrusteddomainsid'
|
||||
}
|
||||
],
|
||||
widgets: [
|
||||
{
|
||||
type: 'details_table_section_nc',
|
||||
name: 'range',
|
||||
widgets: [
|
||||
'cn',
|
||||
'ipabaseid',
|
||||
'ipaidrangesize',
|
||||
'ipabaserid'
|
||||
]
|
||||
},
|
||||
{
|
||||
type: 'multiple_choice_section',
|
||||
name: 'type',
|
||||
label: IPA.messages.objects.range.type,
|
||||
choices: [
|
||||
{
|
||||
name: 'local',
|
||||
label: IPA.messages.objects.range.type_local,
|
||||
fields: ['ipasecondarybaserid'],
|
||||
required: ['ipasecondarybaserid'],
|
||||
enabled: true
|
||||
},
|
||||
{
|
||||
name: 'ad',
|
||||
label: IPA.messages.objects.range.type_ad,
|
||||
fields: ['ipanttrusteddomainsid'],
|
||||
required: ['ipanttrusteddomainsid']
|
||||
}
|
||||
],
|
||||
widgets: [
|
||||
'ipasecondarybaserid',
|
||||
'ipanttrusteddomainsid'
|
||||
]
|
||||
}
|
||||
],
|
||||
policies: [
|
||||
IPA.multiple_choice_section_policy({
|
||||
widget: 'type'
|
||||
})
|
||||
]
|
||||
});
|
||||
};
|
||||
|
||||
return that;
|
||||
};
|
||||
|
||||
IPA.register('range', IPA.range.entity);
|
@ -361,6 +361,17 @@
|
||||
"pwpolicy": {
|
||||
"identity": "Password Policy"
|
||||
},
|
||||
"range": {
|
||||
"details": "Range Settings",
|
||||
"ipabaseid": "Base ID",
|
||||
"ipabaserid": "Primary RID base",
|
||||
"ipaidrangesize": "Range size",
|
||||
"ipanttrusteddomainsid": "Domain SID",
|
||||
"ipasecondarybaserid": "Secondary RID base",
|
||||
"type": "Range type",
|
||||
"type_ad": "Active Directory domain",
|
||||
"type_local": "Local domain"
|
||||
},
|
||||
"role": {
|
||||
"identity": "Role Settings"
|
||||
},
|
||||
|
34
install/ui/test/data/range_add.json
Normal file
34
install/ui/test/data/range_add.json
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"error": null,
|
||||
"id": null,
|
||||
"result": {
|
||||
"result": {
|
||||
"cn": [
|
||||
"DEV.EXAMPLE.COM_id_range"
|
||||
],
|
||||
"dn": "cn=foo_range,cn=ranges,cn=etc,dc=idm,dc=lab,dc=bos,dc=redhat,dc=com",
|
||||
"ipabaseid": [
|
||||
"107400000"
|
||||
],
|
||||
"ipabaserid": [
|
||||
"1000"
|
||||
],
|
||||
"ipaidrangesize": [
|
||||
"200000"
|
||||
],
|
||||
"iparangetype": [
|
||||
"local domain range"
|
||||
],
|
||||
"ipasecondarybaserid": [
|
||||
"100000000"
|
||||
],
|
||||
"objectclass": [
|
||||
"top",
|
||||
"ipaIDrange",
|
||||
"ipaDomainIDRange"
|
||||
]
|
||||
},
|
||||
"summary": "Added ID range \"DEV.EXAMPLE.COM_id_range\"",
|
||||
"value": "DEV.EXAMPLE.COM_id_range"
|
||||
}
|
||||
}
|
32
install/ui/test/data/range_find.json
Normal file
32
install/ui/test/data/range_find.json
Normal file
@ -0,0 +1,32 @@
|
||||
{
|
||||
"error": null,
|
||||
"id": null,
|
||||
"result": {
|
||||
"count": 1,
|
||||
"result": [
|
||||
{
|
||||
"cn": [
|
||||
"DEV.EXAMPLE.COM_id_range"
|
||||
],
|
||||
"dn": "cn=example.com_id_range,cn=ranges,cn=etc,dc=dev,dc=example,dc=com",
|
||||
"ipabaseid": [
|
||||
"107400000"
|
||||
],
|
||||
"ipabaserid": [
|
||||
"1001"
|
||||
],
|
||||
"ipaidrangesize": [
|
||||
"200000"
|
||||
],
|
||||
"iparangetype": [
|
||||
"local domain range"
|
||||
],
|
||||
"ipasecondarybaserid": [
|
||||
"100000000"
|
||||
]
|
||||
}
|
||||
],
|
||||
"summary": "1 range matched",
|
||||
"truncated": false
|
||||
}
|
||||
}
|
17
install/ui/test/data/range_find_pkeys.json
Normal file
17
install/ui/test/data/range_find_pkeys.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"error": null,
|
||||
"id": null,
|
||||
"result": {
|
||||
"count": 1,
|
||||
"result": [
|
||||
{
|
||||
"cn": [
|
||||
"DEV.EXAMPLE.COM_id_range"
|
||||
],
|
||||
"dn": "cn=example.com_id_range,cn=ranges,cn=etc,dc=dev,dc=example,dc=com"
|
||||
}
|
||||
],
|
||||
"summary": "1 range matched",
|
||||
"truncated": false
|
||||
}
|
||||
}
|
40
install/ui/test/data/range_get_records.json
Normal file
40
install/ui/test/data/range_get_records.json
Normal file
@ -0,0 +1,40 @@
|
||||
{
|
||||
"error": null,
|
||||
"id": null,
|
||||
"result": {
|
||||
"count": 1,
|
||||
"results": [
|
||||
{
|
||||
"error": null,
|
||||
"result": {
|
||||
"cn": [
|
||||
"DEV.EXAMPLE.COM_id_range"
|
||||
],
|
||||
"dn": "cn=example.com_id_range,cn=ranges,cn=etc,dc=dev,dc=example,dc=com",
|
||||
"ipabaseid": [
|
||||
"107400000"
|
||||
],
|
||||
"ipabaserid": [
|
||||
"1001"
|
||||
],
|
||||
"ipaidrangesize": [
|
||||
"200000"
|
||||
],
|
||||
"iparangetype": [
|
||||
"local domain range"
|
||||
],
|
||||
"ipasecondarybaserid": [
|
||||
"100000000"
|
||||
],
|
||||
"objectclass": [
|
||||
"top",
|
||||
"ipaIDrange",
|
||||
"ipaDomainIDRange"
|
||||
]
|
||||
},
|
||||
"summary": null,
|
||||
"value": "DEV.EXAMPLE.COM_id_range"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
43
install/ui/test/data/range_mod.json
Normal file
43
install/ui/test/data/range_mod.json
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
"error": null,
|
||||
"id": null,
|
||||
"result": {
|
||||
"result": {
|
||||
"attributelevelrights": {
|
||||
"aci": "rscwo",
|
||||
"cn": "rscwo",
|
||||
"ipabaseid": "rscwo",
|
||||
"ipabaserid": "rscwo",
|
||||
"ipaidrangesize": "rscwo",
|
||||
"ipasecondarybaserid": "rscwo",
|
||||
"nsaccountlock": "rscwo",
|
||||
"objectclass": "rscwo"
|
||||
},
|
||||
"cn": [
|
||||
"DEV.EXAMPLE.COM_id_range"
|
||||
],
|
||||
"ipabaseid": [
|
||||
"107400000"
|
||||
],
|
||||
"ipabaserid": [
|
||||
"1001"
|
||||
],
|
||||
"ipaidrangesize": [
|
||||
"200000"
|
||||
],
|
||||
"iparangetype": [
|
||||
"local domain range"
|
||||
],
|
||||
"ipasecondarybaserid": [
|
||||
"100000000"
|
||||
],
|
||||
"objectclass": [
|
||||
"top",
|
||||
"ipaIDrange",
|
||||
"ipaDomainIDRange"
|
||||
]
|
||||
},
|
||||
"summary": "Modified ID range \"DEV.EXAMPLE.COM_id_range\"",
|
||||
"value": "DEV.EXAMPLE.COM_id_range"
|
||||
}
|
||||
}
|
44
install/ui/test/data/range_show.json
Normal file
44
install/ui/test/data/range_show.json
Normal file
@ -0,0 +1,44 @@
|
||||
{
|
||||
"error": null,
|
||||
"id": null,
|
||||
"result": {
|
||||
"result": {
|
||||
"attributelevelrights": {
|
||||
"aci": "rscwo",
|
||||
"cn": "rscwo",
|
||||
"ipabaseid": "rscwo",
|
||||
"ipabaserid": "rscwo",
|
||||
"ipaidrangesize": "rscwo",
|
||||
"ipasecondarybaserid": "rscwo",
|
||||
"nsaccountlock": "rscwo",
|
||||
"objectclass": "rscwo"
|
||||
},
|
||||
"cn": [
|
||||
"DEV.EXAMPLE.COM_id_range"
|
||||
],
|
||||
"dn": "cn=example.com_id_range,cn=ranges,cn=etc,dc=dev,dc=example,dc=com",
|
||||
"ipabaseid": [
|
||||
"107400000"
|
||||
],
|
||||
"ipabaserid": [
|
||||
"1000"
|
||||
],
|
||||
"ipaidrangesize": [
|
||||
"200000"
|
||||
],
|
||||
"iparangetype": [
|
||||
"local domain range"
|
||||
],
|
||||
"ipasecondarybaserid": [
|
||||
"100000000"
|
||||
],
|
||||
"objectclass": [
|
||||
"top",
|
||||
"ipaIDrange",
|
||||
"ipaDomainIDRange"
|
||||
]
|
||||
},
|
||||
"summary": null,
|
||||
"value": "DEV.EXAMPLE.COM_id_range"
|
||||
}
|
||||
}
|
@ -84,6 +84,7 @@ IPA.admin_navigation = function(spec) {
|
||||
]},
|
||||
{entity: 'selfservice'},
|
||||
{entity: 'delegation'},
|
||||
{entity: 'range'},
|
||||
{entity: 'trust'},
|
||||
{entity: 'config'}
|
||||
]}];
|
||||
|
@ -499,6 +499,17 @@ class i18n_messages(Command):
|
||||
"pwpolicy": {
|
||||
"identity": _("Password Policy"),
|
||||
},
|
||||
"range": {
|
||||
"details": _("Range Settings"),
|
||||
"ipabaseid": _("Base ID"),
|
||||
"ipabaserid": _("Primary RID base"),
|
||||
"ipaidrangesize": _("Range size"),
|
||||
"ipanttrusteddomainsid": _("Domain SID"),
|
||||
"ipasecondarybaserid": _("Secondary RID base"),
|
||||
"type": _("Range type"),
|
||||
"type_ad": _("Active Directory domain"),
|
||||
"type_local": _("Local domain"),
|
||||
},
|
||||
"role": {
|
||||
"identity": _("Role Settings"),
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user