From f9ff041c5cd5ac11af2edb59cb7a707582193df6 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 2 Aug 2010 14:36:33 -0400 Subject: Revert WebUI changes Reverted with: % git diff --binary HEAD..d4adbc8052faf18fb31e7b1865037aa107067d4b > revert.patch % git apply revert.patch % git commit -a --- .gitignore | 8 - install/Makefile.am | 1 - install/conf/ipa.conf | 15 - install/configure.ac | 1 - install/po/test_lang | 0 install/share/wsgi.py | 27 - install/static/Image:Header_background.png | 146 - install/static/Mainnav-background.png | Bin 136 -> 0 bytes install/static/Mainnav-offtab.png | Bin 145 -> 0 bytes install/static/Mainnav-ontab.png | Bin 142 -> 0 bytes install/static/Mainnav-seperatorbars.png | Bin 122 -> 0 bytes install/static/Makefile.am | 43 - install/static/Subnav-background.png | Bin 140 -> 0 bytes install/static/Subnav-offbutton.png | Bin 145 -> 0 bytes install/static/Subnav-onbutton.png | Bin 173 -> 0 bytes install/static/but-reset.png | Bin 1368 -> 0 bytes install/static/but-selected.png | Bin 401 -> 0 bytes install/static/but-unselected.png | Bin 423 -> 0 bytes install/static/but-update.png | Bin 1649 -> 0 bytes install/static/details.js | 559 --- install/static/gray-fade-line.png | Bin 2826 -> 0 bytes install/static/group-details.inc | 32 - install/static/group.js | 41 - install/static/groupmeta.js | 253 -- install/static/header.png | Bin 2847 -> 0 bytes install/static/header_background.png | Bin 170 -> 0 bytes install/static/header_logo.png | Bin 13311 -> 0 bytes install/static/host.js | 46 - install/static/hostgroup.js | 43 - install/static/index.xhtml | 69 - install/static/ipa.css | 271 -- install/static/ipa.js | 128 - install/static/ipa_logo_180x50.png | Bin 12071 -> 0 bytes install/static/ipalogo.png | Bin 12071 -> 0 bytes install/static/jquery.cookie.js | 96 - install/static/jquery.js | 6240 -------------------------- install/static/json2.js | 482 -- install/static/minus-disabled.png | Bin 521 -> 0 bytes install/static/minus-enabled.png | Bin 522 -> 0 bytes install/static/minus-hover.png | Bin 379 -> 0 bytes install/static/navigation.js | 160 - install/static/netgroup.js | 41 - install/static/pageparams.js | 15 - install/static/plus-disabled.png | Bin 560 -> 0 bytes install/static/plus-enabled.png | Bin 561 -> 0 bytes install/static/plus-hover.png | Bin 409 -> 0 bytes install/static/sampledata/develop.js | 3 - install/static/sampledata/grouplist.json | 75 - install/static/sampledata/groupshow.json | 38 - install/static/sampledata/hostgrouplist.json | 33 - install/static/sampledata/hostlist.json | 45 - install/static/sampledata/hostshow.json | 56 - install/static/sampledata/netgrouplist.json | 56 - install/static/sampledata/userlist.json | 246 - install/static/sampledata/usershow.json | 71 - install/static/sampledata/whoami.json | 7 - install/static/search.js | 127 - install/static/user-add.inc | 25 - install/static/user-details.inc | 267 -- install/static/user-groups.inc | 49 - install/static/user.html | 112 - install/static/user.js | 268 -- install/static/usermeta.js | 415 -- ipa.spec.in | 6 - ipalib/constants.py | 1 - ipalib/frontend.py | 2 +- ipalib/parameters.py | 20 +- ipalib/plugins/baseldap.py | 82 +- ipalib/plugins/whoami.py | 41 - ipalib/util.py | 9 +- setup.py | 3 - tests/test_ipalib/test_text.py | 4 +- 72 files changed, 29 insertions(+), 10749 deletions(-) delete mode 100644 install/po/test_lang delete mode 100644 install/static/Image:Header_background.png delete mode 100644 install/static/Mainnav-background.png delete mode 100644 install/static/Mainnav-offtab.png delete mode 100644 install/static/Mainnav-ontab.png delete mode 100644 install/static/Mainnav-seperatorbars.png delete mode 100644 install/static/Makefile.am delete mode 100644 install/static/Subnav-background.png delete mode 100644 install/static/Subnav-offbutton.png delete mode 100644 install/static/Subnav-onbutton.png delete mode 100644 install/static/but-reset.png delete mode 100644 install/static/but-selected.png delete mode 100644 install/static/but-unselected.png delete mode 100644 install/static/but-update.png delete mode 100644 install/static/details.js delete mode 100644 install/static/gray-fade-line.png delete mode 100644 install/static/group-details.inc delete mode 100644 install/static/group.js delete mode 100644 install/static/groupmeta.js delete mode 100644 install/static/header.png delete mode 100644 install/static/header_background.png delete mode 100644 install/static/header_logo.png delete mode 100644 install/static/host.js delete mode 100644 install/static/hostgroup.js delete mode 100644 install/static/index.xhtml delete mode 100644 install/static/ipa.css delete mode 100644 install/static/ipa.js delete mode 100644 install/static/ipa_logo_180x50.png delete mode 100644 install/static/ipalogo.png delete mode 100644 install/static/jquery.cookie.js delete mode 100644 install/static/jquery.js delete mode 100644 install/static/json2.js delete mode 100644 install/static/minus-disabled.png delete mode 100644 install/static/minus-enabled.png delete mode 100644 install/static/minus-hover.png delete mode 100644 install/static/navigation.js delete mode 100644 install/static/netgroup.js delete mode 100644 install/static/pageparams.js delete mode 100644 install/static/plus-disabled.png delete mode 100644 install/static/plus-enabled.png delete mode 100644 install/static/plus-hover.png delete mode 100644 install/static/sampledata/develop.js delete mode 100644 install/static/sampledata/grouplist.json delete mode 100644 install/static/sampledata/groupshow.json delete mode 100644 install/static/sampledata/hostgrouplist.json delete mode 100644 install/static/sampledata/hostlist.json delete mode 100644 install/static/sampledata/hostshow.json delete mode 100644 install/static/sampledata/netgrouplist.json delete mode 100644 install/static/sampledata/userlist.json delete mode 100644 install/static/sampledata/usershow.json delete mode 100644 install/static/sampledata/whoami.json delete mode 100644 install/static/search.js delete mode 100644 install/static/user-add.inc delete mode 100644 install/static/user-details.inc delete mode 100644 install/static/user-groups.inc delete mode 100644 install/static/user.html delete mode 100644 install/static/user.js delete mode 100644 install/static/usermeta.js delete mode 100644 ipalib/plugins/whoami.py diff --git a/.gitignore b/.gitignore index 08a1d85f5..7ed6c41dd 100644 --- a/.gitignore +++ b/.gitignore @@ -2,11 +2,3 @@ .bzr freeipa2-dev-doc build -RELEASE -daemons/ipa-version.h -ipa-client/ipa-client.spec -ipa-client/version.m4 -ipa.spec -ipapython/setup.py -ipapython/version.py -version.m4 diff --git a/install/Makefile.am b/install/Makefile.am index 80f04bd74..1b97afa5b 100644 --- a/install/Makefile.am +++ b/install/Makefile.am @@ -9,7 +9,6 @@ SUBDIRS = \ html \ migration \ share \ - static \ tools \ updates \ po \ diff --git a/install/conf/ipa.conf b/install/conf/ipa.conf index 85b37b834..dba47c5a4 100644 --- a/install/conf/ipa.conf +++ b/install/conf/ipa.conf @@ -5,12 +5,6 @@ ProxyRequests Off - -#We use xhtml, a file format that the browser validates -DirectoryIndex index.xhtml - - - # ipa-rewrite.conf is loaded separately # This is required so the auto-configuration works with Firefox 2+ @@ -84,15 +78,6 @@ Alias /ipa/crl "/var/lib/pki-ca/publish" -# Static data files (maily webUI stuff like images) -Alias /ipa/static "/usr/share/ipa/static" - - SetHandler None - AllowOverride None - Allow from all - - - # WebUI assets Alias /ipa-assets/ "/var/cache/ipa/assets/" diff --git a/install/configure.ac b/install/configure.ac index 3d0c1db02..eb2d3cd13 100644 --- a/install/configure.ac +++ b/install/configure.ac @@ -72,7 +72,6 @@ AC_CONFIG_FILES([ html/Makefile migration/Makefile share/Makefile - static/Makefile tools/Makefile tools/man/Makefile updates/Makefile diff --git a/install/po/test_lang b/install/po/test_lang deleted file mode 100644 index e69de29bb..000000000 diff --git a/install/share/wsgi.py b/install/share/wsgi.py index 2e0cd8f6b..f6b99a2dc 100644 --- a/install/share/wsgi.py +++ b/install/share/wsgi.py @@ -1,35 +1,8 @@ -# Authors: -# Pavel Zuna -# -# 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; version 2 only -# -# 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, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ WSGI appliction for IPA server. """ -import json -import urlparse -from genshi.template import TemplateLoader, MarkupTemplate, TemplateNotFound - from ipalib import api -from ipalib.util import json_serialize -from ipalib.request import context, destroy_context -from ipaserver.rpcserver import not_found - - api.bootstrap(context='server', debug=True, log=None) try: api.finalize() diff --git a/install/static/Image:Header_background.png b/install/static/Image:Header_background.png deleted file mode 100644 index 0100aaa6d..000000000 --- a/install/static/Image:Header_background.png +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - Image:Header background.png - Free IPA - - - - - - - - - - - - - - - - FreeIPA - - -
- -
-
- - -
-
Navigation
- -
-
-
banners
- Contribute to FreeIPA! -
- -
- - - -
-

From Free IPA

-
- - - -
-

Header_background.png (1KB, MIME type: image/png) -

-
- - - -

File history

-

Legend: (cur) = this is the current file, (del) = delete -this old version, (rev) = revert to this old version. -
Click on date to see the file uploaded on that date.

- -
-

The following pages link to this file:

- - - -
-
-
-
-
-
-
- - -
- -
- - - - - - -
ViewsFileDiscussionEditHistory
-
- -
- - - -
Personal tools: Log in / create account
-
- - - - - - - - diff --git a/install/static/Mainnav-background.png b/install/static/Mainnav-background.png deleted file mode 100644 index c3fdab317..000000000 Binary files a/install/static/Mainnav-background.png and /dev/null differ diff --git a/install/static/Mainnav-offtab.png b/install/static/Mainnav-offtab.png deleted file mode 100644 index cf6debc50..000000000 Binary files a/install/static/Mainnav-offtab.png and /dev/null differ diff --git a/install/static/Mainnav-ontab.png b/install/static/Mainnav-ontab.png deleted file mode 100644 index 2589fddb1..000000000 Binary files a/install/static/Mainnav-ontab.png and /dev/null differ diff --git a/install/static/Mainnav-seperatorbars.png b/install/static/Mainnav-seperatorbars.png deleted file mode 100644 index 9d1a9d414..000000000 Binary files a/install/static/Mainnav-seperatorbars.png and /dev/null differ diff --git a/install/static/Makefile.am b/install/static/Makefile.am deleted file mode 100644 index 762587179..000000000 --- a/install/static/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -NULL = - -appdir = $(IPA_DATA_DIR)/static -app_DATA = \ - but-reset.png \ - but-update.png \ - but-selected.png \ - but-unselected.png \ - ipa_logo_180x50.png \ - ipa.js \ - ipa.css \ - jquery.js \ - group.js \ - group-details.inc \ - host.js \ - hostgroup.js \ - index.xhtml \ - jquery.cookie.js \ - navigation.js \ - netgroup.js \ - pageparams.js \ - search.js \ - details.js \ - user.js \ - user-add.inc \ - user-details.inc \ - ipalogo.png \ - gray-fade-line.png \ - Mainnav-background.png \ - Mainnav-offtab.png \ - Mainnav-ontab.png \ - Subnav-background.png \ - Subnav-offbutton.png \ - Subnav-onbutton.png \ - $(NULL) - -EXTRA_DIST = \ - $(app_DATA) \ - $(NULL) - -MAINTAINERCLEANFILES = \ - *~ \ - Makefile.in diff --git a/install/static/Subnav-background.png b/install/static/Subnav-background.png deleted file mode 100644 index 00afe1e97..000000000 Binary files a/install/static/Subnav-background.png and /dev/null differ diff --git a/install/static/Subnav-offbutton.png b/install/static/Subnav-offbutton.png deleted file mode 100644 index 859e5f5ee..000000000 Binary files a/install/static/Subnav-offbutton.png and /dev/null differ diff --git a/install/static/Subnav-onbutton.png b/install/static/Subnav-onbutton.png deleted file mode 100644 index 2cee0a70b..000000000 Binary files a/install/static/Subnav-onbutton.png and /dev/null differ diff --git a/install/static/but-reset.png b/install/static/but-reset.png deleted file mode 100644 index c2c4db1ed..000000000 Binary files a/install/static/but-reset.png and /dev/null differ diff --git a/install/static/but-selected.png b/install/static/but-selected.png deleted file mode 100644 index 9a42053a7..000000000 Binary files a/install/static/but-selected.png and /dev/null differ diff --git a/install/static/but-unselected.png b/install/static/but-unselected.png deleted file mode 100644 index ba9ed3327..000000000 Binary files a/install/static/but-unselected.png and /dev/null differ diff --git a/install/static/but-update.png b/install/static/but-update.png deleted file mode 100644 index 719b651b3..000000000 Binary files a/install/static/but-update.png and /dev/null differ diff --git a/install/static/details.js b/install/static/details.js deleted file mode 100644 index 385945c5d..000000000 --- a/install/static/details.js +++ /dev/null @@ -1,559 +0,0 @@ -/* Authors: - * Pavel Zuna - * - * 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; version 2 only - * - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -/* IPA Object Details - populating definiton lists from entry data */ - -/* REQUIRES: ipa.js */ - -var IPA_DETAILS_POPULATE = 1; -var IPA_DETAILS_UPDATE = 2; - -/* name of IPA object, that we're populating the lists for */ -var _ipa_obj_name = ''; - -/* initialize the IPA Object Details library */ -function ipa_details_init(obj_name, url) -{ - ipa_init(url); - _ipa_obj_name = obj_name; -} - -var _ipa_load_on_win_callback = null; -var _ipa_load_on_fail_callback = null; - -var ipa_details_cache = null; - -function ipa_details_load(pkey, on_win, on_fail) -{ - if (!pkey) - return; - - _ipa_load_on_win_callback = on_win; - _ipa_load_on_fail_callback = on_fail; - - ipa_cmd( - 'show', [pkey], {all: true}, _ipa_load_on_win, _ipa_load_on_fail, - _ipa_obj_name - ); -} - -function _ipa_load_on_win(data, text_status, xhr) -{ - if (_ipa_load_on_win_callback) - _ipa_load_on_win_callback(data, text_status, xhr); - - if (data['error']) - return; - - var result = data.result.result; - - ipa_details_cache = $.extend(true, {}, result); - ipa_details_display(result); -} - -function _ipa_load_on_fail(xhr, text_status, error_thrown) -{ - if (_ipa_load_on_fail_callback) - _ipa_load_on_fail_callback(xhr, text_status, error_thrown); -} - -var _ipa_update_on_win_callback = null; -var _ipa_update_on_fail_callback = null; - -function ipa_details_update(pkey, on_win, on_fail) -{ - if (!pkey) - return; - - var modlist = {'all': true, 'setattr': [], 'addattr': []}; - var attrs_wo_option = {}; - - $('.entryattrs input').each(function () { - var jobj = $(this); - - var dt = jobj.parent().prevAll('dt').slice(0, 1); - if (!dt) - return; - - var attr = dt.attr('title'); - if (!attr) - return; - - if (attr.indexOf('call_') == 0) { - var func = window[attr.substr(5)]; - if (!func) - return; - func(dt, modlist, IPA_DETAILS_UPDATE); - return; - } - - var param_info = ipa_get_param_info(attr); - if (param_info) { - modlist[attr] = jobj.val(); - return; - } - - if (!attrs_wo_option[attr]) - attrs_wo_option[attr] = []; - attrs_wo_option[attr].push(jobj.val()); - }); - - $('.entryattrs dt').each(function () { - var jobj = $(this); - - var attr = jobj.attr('title'); - if (!attr || attr.indexOf('call_') == 0) - return; - - var next = jobj.next('dd'); - if ((!next.length) || (!next.children('input').length)) - attrs_wo_option[attr] = ['']; - }); - - for (attr in attrs_wo_option) { - var values = attrs_wo_option[attr]; - modlist['setattr'].push(attr + '=' + values[0]); - for (var i = 1; i < values.length; ++i) - modlist['addattr'].push(attr + '=' + values[i]); - } - - _ipa_update_on_win_callback = on_win; - _ipa_update_on_fail_callback = on_fail; - - ipa_cmd( - 'mod', [pkey], modlist, _ipa_update_on_win, _ipa_update_on_fail, - _ipa_obj_name - ); -} - -function _ipa_update_on_win(data, text_status, xhr) -{ - if (_ipa_update_on_win_callback) - _ipa_update_on_win_callback(data, text_status, xhr); - - if (data['error']) - return; - - var result = data.result.result; - ipa_details_cache = $.extend(true, {}, result); - ipa_details_display(result); -} - -function _ipa_update_on_fail(xhr, text_status, error_thrown) -{ - if (_ipa_update_on_fail_callback) - _ipa_update_on_fail_callback(xhr, text_status, error_thrown); -} - -function ipa_details_create(dls) -{ - for (var i = 0; i < def_lists.length; ++i) { - var d = dls[i]; - ipa_generate_dl($('hr').last(), d[0], d[1], d[2]); - } -} - -var _ipa_h2_template = '

− I

'; -var _ipa_dl_template = '
'; -var _ipa_dt_template = '
N:
'; - -function ipa_generate_dl(jobj, id, name, dts) -{ - if (!dts) - return; - - jobj.after(_ipa_h2_template.replace('I', name)); - jobj = jobj.next(); - jobj.after(_ipa_dl_template.replace('I', id)); - jobj = jobj.next(); - jobj.after('
'); - - for (var i = 0; i < dts.length; ++i) { - var label = ''; - if (dts[i][0].indexOf('call_') != 0) { - var param_info = ipa_get_param_info(dts[i][0]); - if (param_info) - label = param_info['label']; - } - if ((!label) && (dts[i].length > 1)) - label = dts[i][1]; - jobj.append( - _ipa_dt_template.replace('T', dts[i][0]).replace('N', label) - ); - } -} - -/* HTML templates for ipa_details_display() */ -var _ipa_a_add_template = - 'Add'; - -/* populate definition lists with the class 'entryattrs' with entry attributes - * - * The list has to be specially crafted for this function to work properly: - *
tags should have the 'title' attribute set to an LDAP attribute name - * OR to a javascript function name prefixed with 'call_', which will be given - * the
object and entry_attrs as arguments. - * Example: - *
- *
First Name:
- *
Some Attribute:
- *
- * - * arguments: - * entry_attrs - 'result' field as returned by ipa *-show commnads - * (basically an associative array with attr:value pairs) */ -function ipa_details_display(entry_attrs) -{ - /* remove all
tags i.e. all attribute values */ - $('.entryattrs dd').remove(); - - /* go through all
tags and pair them with newly created
s */ - $('.entryattrs dt').each(function () { - var jobj = $(this); - - var attr = jobj.attr('title'); - if (attr.indexOf('call_') == 0) { - /* title contains callback instead of attribute name */ - var func = window[attr.substr(5)]; - if (func) - func(jobj, entry_attrs, IPA_DETAILS_POPULATE); - else - jobj.after(_ipa_dd_first_template.replace('I', '-')); - } else { - /* title contains attribute name - default behaviour */ - var value = entry_attrs[attr]; - if (value) { - ipa_insert_first_dd(jobj, ipa_create_input(attr, value[0])); - for (var i = 1; i < value.length; ++i) { - jobj = jobj.next(); - ipa_insert_other_dd(jobj, ipa_create_input(attr, value[i])); - } - } else { - ipa_insert_first_dd(jobj, _ipa_a_add_template.replace('A', attr)); - } - } - }); -} - -var _ipa_dd_first_template = '
I
'; - -function ipa_insert_first_dd(jobj, content) -{ - jobj.after(_ipa_dd_first_template.replace('I', content)); -} - -var _ipa_dd_other_template = '
I
'; - -function ipa_insert_other_dd(jobj, content) -{ - jobj.after(_ipa_dd_other_template.replace('I', content)); -} - - -/* mapping of parameter types to handlers used to create inputs */ -var _ipa_param_type_2_handler_map = { - 'Str': _ipa_create_text_input, - 'Int': _ipa_create_text_input, - 'Bool': _ipa_create_text_input, -}; - -/* create an HTML element for displaying/editing an attribute - * arguments: - * attr - LDAP attribute name - * value - the attributes value */ -function ipa_create_input(attr, value) -{ - var param_info = ipa_get_param_info(attr); - if (!param_info) { - /* no information about the param is available, default to text input */ - return ( - _ipa_create_text_input(attr, value, null) + - _ipa_create_remove_link(attr, null) - ); - } - - /* check if the param value can be modified */ - if (param_info['primary_key'] || ('no_update' in param_info['flags'])) - return (value.toString()); - - /* call handler by param class */ - var handler = _ipa_param_type_2_handler_map[param_info['class']]; - if (handler) { - return ( - handler(attr, value, param_info) + - _ipa_create_remove_link(attr, param_info) - ); - } - - /* no handler for this type? don't allow modification */ - return (value.toString()); -} - -/* HTML template for _ipa_create_remove_link() */ -var _ipa_a_remove_template = - 'Remove'; - -/* creates a Remove link for deleting attribute values */ -function _ipa_create_remove_link(attr, param_info) -{ - if (!param_info) - return (_ipa_a_remove_template.replace('A', attr)); - - /* check if the param is required or of the Password type - * if it is, then we don't want people to be able to remove it */ - if ((param_info['required']) || (param_info['class'] == 'Password')) - return (''); - - return (_ipa_a_remove_template.replace('A', attr)); -} - -/* HTML template for _ipa_create_text_input() */ -var _ipa_input_text_template = - ''; - -/* creates a input box for editing a string attribute */ -function _ipa_create_text_input(attr, value, param_info) -{ - return ( - _ipa_input_text_template.replace('A', attr).replace( - 'V', value.toString() - ) - ); -} - -function ipa_details_reset() -{ - if (ipa_details_cache) - ipa_details_display(ipa_details_cache); -} - -/* Event handlers */ - -function _ipa_add_on_click(obj) -{ - var jobj = $(obj); - var par = jobj.parent(); - par.append(ipa_create_input(jobj.attr('title'), '')); - jobj.next('input').focus(); - jobj.remove(); - return (false); -} - -function _ipa_remove_on_click(obj) -{ - var jobj = $(obj); - var attr = jobj.attr('title'); - var par = jobj.parent(); - - var next = par.next('dd'); - if (next.length) { - if (par.hasClass('first')) { - next.addClass('first'); - next.removeClass('other'); - } - par.remove(); - } else { - par.empty(); - par.append(_ipa_a_add_template.replace('A', attr)); - } - - return (false); -} - -var qs = ipa_parse_qs(); - -/* "Top-level" code */ - -function load_object(body,obj) -{ - if (!qs['pkey']) - return; - ipa_details_init(obj); - $('#butreset').click(reset_on_click); - $('#butupdate').click(update_on_click); - ipa_details_load(qs['pkey'], on_win); - $('h1').text('Managing user: ' + qs['pkey']); - -} - -function on_win(data, textStatus, xhr) -{ - if (data['error']) - alert(data['error']['message']); -} - -function reset_on_click() -{ - if (ipa_details_cache) - ipa_details_display(ipa_details_cache); - return (false); -} - -function update_on_click() -{ - ipa_details_update(qs['pkey'], on_win); - return (false); -} - -/* H2 expand/collapse */ - -function _h2_on_click(obj) -{ - var jobj = $(obj); - var txt = jobj.text().replace(/^\s*/, ''); - if (txt.charCodeAt(0) == 8722) { - obj.dl = jobj.next().detach(); - jobj.text('+' + txt.substr(1)); - } else { - if (obj.dl) - obj.dl.insertAfter(obj); - jobj.text( - String.fromCharCode(8722) + txt.substr(1) - ); - } -} - -/* Account status Toggle button */ - -function toggle_on_click(obj) -{ - var jobj = $(obj); - var val = jobj.attr('title'); - if (val == 'Active') { - ipa_cmd( - 'lock', [qs['pkey']], {}, on_lock_win, on_fail, - PluginData['name'] - ); - } else { - ipa_cmd( - 'unlock', [qs['pkey']], {}, on_lock_win, on_fail, - PluginData['name'] - ); - } - return (false); -} - -function on_lock_win(data, textStatus, xhr) -{ - if (data['error']) { - alert(data['error']['message']); - return; - } - - var jobj = $('a[title=Active]'); - if (jobj.length) { - if (ipa_details_cache) { - var memberof = ipa_details_cache['memberof']; - if (memberof) { - memberof.push( - 'cn=inactivated,cn=account inactivation' - ); - } else { - memberof = ['cn=inactivated,cn=account inactivation']; - } - ipa_details_cache['memberof'] = memberof; - a_status(jobj.parent().prev(), ipa_details_cache); - jobj.parent().remove() - } - return; - } - - var jobj = $('a[title=Inactive]'); - if (jobj.length) { - if (ipa_details_cache) { - var memberof = ipa_details_cache['memberof']; - if (memberof) { - for (var i = 0; i < memberof.length; ++i) { - if (memberof[i].indexOf('cn=inactivated,cn=account inactivation') != -1) { - memberof.splice(i, 1); - break; - } - } - } else { - memberof = []; - } - ipa_details_cache['memberof'] = memberof; - a_status(jobj.parent().prev(), ipa_details_cache); - jobj.parent().remove(); - } - return; - } -} - -/* ATTRIBUTE CALLBACKS */ - -var toggle_temp = 'S Toggle'; -function a_status(jobj, result, mode) -{ - if (mode != IPA_DETAILS_POPULATE) - return; - - var memberof = result['memberof']; - if (memberof) { - for (var i = 0; i < memberof.length; ++i) { - if (memberof[i].indexOf('cn=inactivated,cn=account inactivation') != -1) { - var t = toggle_temp.replace(/S/g, 'Inactive'); - ipa_insert_first_dd(jobj, t); - return; - } - } - } - ipa_insert_first_dd(jobj, toggle_temp.replace(/S/g, 'Inactive')); -} - -var pwd_temp = 'Reset Password'; -function a_password(jobj, result, mode) -{ - if (mode == IPA_DETAILS_POPULATE) - ipa_insert_first_dd(jobj, pwd_temp.replace('A', 'userpassword')); -} - -var select_temp = ''; -var option_temp = ''; -var states = [ - 'AL', 'AK', 'AS', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'DC', 'FM', - 'FL', 'GA', 'GU', 'HI', 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', - 'ME', 'MH', 'MD', 'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV', - 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'MP', 'OH', 'OK', 'OR', 'PW', - 'PA', 'PR', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VI', 'VA', - 'WA', 'WV', 'WI', 'WY', '', -]; -function a_st(jobj, result, mode) -{ - if (mode != IPA_DETAILS_POPULATE) - return; - - var next = jobj.next(); - next.css('clear', 'none'); - next.css('width', '70px'); - - ipa_insert_first_dd(jobj, select_temp); - - var sel = jobj.next().children().first(); - for (var i = 0; i < states.length; ++i) - sel.append(option_temp.replace(/V/g, states[i])); - - var st = result['st']; - if (st) - sel.val(st); - else - sel.val(''); -} - diff --git a/install/static/gray-fade-line.png b/install/static/gray-fade-line.png deleted file mode 100644 index 896cfca0e..000000000 Binary files a/install/static/gray-fade-line.png and /dev/null differ diff --git a/install/static/group-details.inc b/install/static/group-details.inc deleted file mode 100644 index 445042b8d..000000000 --- a/install/static/group-details.inc +++ /dev/null @@ -1,32 +0,0 @@ - -

Managing group:

-
- Reset - Update -
-
    -
  • View:
  • -
  • - - Personal Details -
  • -
  • - - Memberships -
  • -
-
- -

− Group Details

-
-
Group Name:
-
Description:
-
GID
-
-
- - diff --git a/install/static/group.js b/install/static/group.js deleted file mode 100644 index c7db10f47..000000000 --- a/install/static/group.js +++ /dev/null @@ -1,41 +0,0 @@ -function setupGroup(facet){ - if (facet == "details"){ - setupGroupDetails(); - }else{ - setupGroupSearch(); - } -} - -function setupGroupDetails(){ - - $('#search').css("visibility","hidden"); - $('#content').css("visibility","visible"); - $('#content').load("group-details.inc"); - - sampleData = "sampledata/groupshow.json"; -} - -function setupGroupSearch(){ - - var columns = [ - {title:"Group Name", column:"cn",render: function(current,cell){ - renderDetailColumn(current,cell,current[this.column],"group"); - }}, - {title:"GID", column:"gidnumber",render: renderSimpleColumn}, - {title:"Description", column:"description",render: renderSimpleColumn} - ]; - - var groupSearchForm = new SearchForm("group", "find", columns); - - $("#query").unbind(); - $("#query").click(function(){ - sampleData = "sampledata/grouplist.json"; - executeSearch(groupSearchForm); - }); - $("#new").unbind(); - $("#new").click( function() { - alert("New Group..."); - }); - - -} diff --git a/install/static/groupmeta.js b/install/static/groupmeta.js deleted file mode 100644 index ae8e64a78..000000000 --- a/install/static/groupmeta.js +++ /dev/null @@ -1,253 +0,0 @@ - -var PluginData = { - "primary_key": "cn", - "default_attributes": [ - "cn", - "description", - "gidnumber", - "member", - "memberof" - ], - "object_name_plural": "groups", - "container_dn": "cn=groups,cn=accounts", - "object_class_config": "ipagroupobjectclasses", - "hidden_attributes": [ - "objectclass", - "aci" - ], - "uuid_attribute": "ipauniqueid", - "label": "User Groups", - "methods": [ - "add", - "add_member", - "del", - "find", - "mod", - "remove_member", - "show" - ], - "object_name": "group", - "takes_params": [ - { - "exclude": null, - "minlength": null, - "include": null, - "cli_name": "name", - "primary_key": true, - "name": "cn", - "default": null, - "doc": "Group name", - "required": true, - "flags": [], - "label": "Group name", - "autofill": false, - "multivalue": false, - "pattern": null, - "type": "unicode", - "attribute": false, - "query": false, - "cli_short_name": null, - "length": null, - "class": "Str", - "maxlength": null - }, - { - "exclude": null, - "minlength": null, - "include": null, - "cli_name": "desc", - "primary_key": false, - "name": "description", - "default": null, - "doc": "Group description", - "required": true, - "flags": [], - "label": "Description", - "autofill": false, - "multivalue": false, - "pattern": null, - "type": "unicode", - "attribute": false, - "query": false, - "cli_short_name": null, - "length": null, - "class": "Str", - "maxlength": null - }, - { - "exclude": null, - "include": null, - "cli_name": "gid", - "primary_key": false, - "minvalue": null, - "doc": "GID (use this option to set it manually)", - "required": false, - "flags": [], - "label": "GID", - "default": null, - "autofill": false, - "multivalue": false, - "attribute": false, - "query": false, - "maxvalue": null, - "cli_short_name": null, - "type": "int", - "class": "Int", - "name": "gidnumber" - }, - { - "exclude": null, - "minlength": null, - "include": null, - "cli_name": "member_group", - "primary_key": false, - "name": "member_group", - "default": null, - "doc": "Member groups", - "required": false, - "flags": [ - "no_update", - "no_create", - "no_search" - ], - "label": "Member groups", - "autofill": false, - "multivalue": false, - "pattern": null, - "type": "unicode", - "attribute": false, - "query": false, - "cli_short_name": null, - "length": null, - "class": "Str", - "maxlength": null - }, - { - "exclude": null, - "minlength": null, - "include": null, - "cli_name": "member_user", - "primary_key": false, - "name": "member_user", - "default": null, - "doc": "Member users", - "required": false, - "flags": [ - "no_update", - "no_create", - "no_search" - ], - "label": "Member users", - "autofill": false, - "multivalue": false, - "pattern": null, - "type": "unicode", - "attribute": false, - "query": false, - "cli_short_name": null, - "length": null, - "class": "Str", - "maxlength": null - }, - { - "exclude": null, - "minlength": null, - "include": null, - "cli_name": "member", - "primary_key": false, - "name": "member", - "default": null, - "doc": "Failed members", - "required": false, - "flags": [ - "no_update", - "no_create", - "no_search" - ], - "label": "Failed members", - "autofill": false, - "multivalue": false, - "pattern": null, - "type": "unicode", - "attribute": false, - "query": false, - "cli_short_name": null, - "length": null, - "class": "Str", - "maxlength": null - }, - { - "exclude": null, - "minlength": null, - "include": null, - "cli_name": "user", - "primary_key": false, - "name": "user", - "default": null, - "doc": "Users", - "required": false, - "flags": [ - "no_update", - "no_create", - "no_search" - ], - "label": "Users", - "autofill": false, - "multivalue": false, - "pattern": null, - "type": "unicode", - "attribute": false, - "query": false, - "cli_short_name": null, - "length": null, - "class": "Str", - "maxlength": null - }, - { - "exclude": null, - "minlength": null, - "include": null, - "cli_name": "group", - "primary_key": false, - "name": "group", - "default": null, - "doc": "Groups", - "required": false, - "flags": [ - "no_update", - "no_create", - "no_search" - ], - "label": "Groups", - "autofill": false, - "multivalue": false, - "pattern": null, - "type": "unicode", - "attribute": false, - "query": false, - "cli_short_name": null, - "length": null, - "class": "Str", - "maxlength": null - } - ], - "attribute_members": { - "member": [ - "user", - "group" - ], - "memberof": [ - "group", - "netgroup", - "rolegroup", - "taskgroup" - ] - }, - "parent_object": "", - "object_class": [ - "ipausergroup" - ], - "name": "group" -} - -ipa_objs['group'] = PluginData; diff --git a/install/static/header.png b/install/static/header.png deleted file mode 100644 index 01e562db6..000000000 Binary files a/install/static/header.png and /dev/null differ diff --git a/install/static/header_background.png b/install/static/header_background.png deleted file mode 100644 index 07cc1e477..000000000 Binary files a/install/static/header_background.png and /dev/null differ diff --git a/install/static/header_logo.png b/install/static/header_logo.png deleted file mode 100644 index 2b8e65361..000000000 Binary files a/install/static/header_logo.png and /dev/null differ diff --git a/install/static/host.js b/install/static/host.js deleted file mode 100644 index ae672b85b..000000000 --- a/install/static/host.js +++ /dev/null @@ -1,46 +0,0 @@ -function setupHost(facet){ - if (facet == "details"){ - setupHostDetails(); - }else{ - setupHostSearch(); - } -} - - - - -function setupHostDetails(){ - var detailsForm = new DetailsForm(); -} - - -function setupHostSearch(){ - - sampleData = "sampledata/hostlist.json"; - var columns = [ - {title:"Host",column:"fqdn",render: function(current,cell){ - renderDetailColumn(current,cell,current[this.column],"group"); - }}, - {title:"Comment", column: "description", render: renderSimpleColumn}, - {title:"Enrolled?", render: renderUnknownColumn}, - {title:"Manages?", render: renderUnknownColumn} - ]; - - - var hostSearchForm = new SearchForm("host", "find", columns); - - $("#query").unbind(); - $("#query").click(function(){ - sampleData = "sampledata/hostlist.json"; - executeSearch(hostSearchForm); - }); - - $("#new").unbind(); - $("#new").click( function() { - alert("New Host..."); - }); - - -} - - \ No newline at end of file diff --git a/install/static/hostgroup.js b/install/static/hostgroup.js deleted file mode 100644 index b6cb413fa..000000000 --- a/install/static/hostgroup.js +++ /dev/null @@ -1,43 +0,0 @@ -function setupHostgroup(facet){ - if (facet == "details"){ - setupHostgroupDetails(); - }else{ - setupHostgroupSearch(); - } -} - - - - -function setupHostgroupDetails(){ - var detailsForm = new DetailsForm(); -} - - -function setupHostgroupSearch(){ - - - var columns = [ - {title:"Hostgroup",column:"cn",render: function(current,cell){ - renderDetailColumn(current,cell,current[this.column],"hostgroup"); - }}, - {title:"Description", column:"description",render: renderSimpleColumn}]; - - var hostgroupSearchForm = new SearchForm("hostgroup", "find", columns); - - - $("#query").unbind(); - - $("#query").click(function(){ - sampleData = "sampledata/hostgrouplist.json"; - executeSearch(hostgroupSearchForm); - }); - $("#new").unbind(); - $("#new").click( function() { - alert("New Hostgroup..."); - }); - - -} - - \ No newline at end of file diff --git a/install/static/index.xhtml b/install/static/index.xhtml deleted file mode 100644 index c6404fadb..000000000 --- a/install/static/index.xhtml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - IPA: Identity Policy Audit - - - - - - - -
- - - Logged in as hardcoded@FREEIP.ORG - -
- -