diff options
| author | Adam Young <ayoung@redhat.com> | 2010-07-29 22:00:15 -0400 |
|---|---|---|
| committer | Adam Young <ayoung@redhat.com> | 2010-07-29 22:00:15 -0400 |
| commit | 47d4fcdd8178ec4b8403efa4f80eaa009c32d78b (patch) | |
| tree | 098387a311374ce8251aee30b4dd3583fbecd58f | |
| parent | d8e75ea502100cffc462f3e4af46a691e15f31e4 (diff) | |
| download | freeipa-47d4fcdd8178ec4b8403efa4f80eaa009c32d78b.tar.gz freeipa-47d4fcdd8178ec4b8403efa4f80eaa009c32d78b.tar.xz freeipa-47d4fcdd8178ec4b8403efa4f80eaa009c32d78b.zip | |
Removed the install/webui directory.
| -rw-r--r-- | install/Makefile.am | 1 | ||||
| -rw-r--r-- | install/configure.ac | 1 | ||||
| -rw-r--r-- | install/po/test_lang | 0 | ||||
| -rw-r--r-- | install/webui/Makefile.am | 18 | ||||
| -rw-r--r-- | install/webui/edit.html | 175 | ||||
| -rw-r--r-- | install/webui/list.html | 72 | ||||
| -rw-r--r-- | install/webui/plugindata.py | 33 | ||||
| -rw-r--r-- | install/webui/user.html | 299 | ||||
| -rw-r--r-- | install/webui/whoami.html | 19 | ||||
| -rw-r--r-- | ipa.spec.in | 4 |
10 files changed, 0 insertions, 622 deletions
diff --git a/install/Makefile.am b/install/Makefile.am index 4be97a426..80f04bd74 100644 --- a/install/Makefile.am +++ b/install/Makefile.am @@ -13,7 +13,6 @@ SUBDIRS = \ tools \ updates \ po \ - webui \ $(NULL) install-exec-local: diff --git a/install/configure.ac b/install/configure.ac index 8db0e6098..3d0c1db02 100644 --- a/install/configure.ac +++ b/install/configure.ac @@ -77,7 +77,6 @@ AC_CONFIG_FILES([ tools/man/Makefile updates/Makefile po/Makefile - webui/Makefile ]) AC_OUTPUT diff --git a/install/po/test_lang b/install/po/test_lang new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/install/po/test_lang diff --git a/install/webui/Makefile.am b/install/webui/Makefile.am deleted file mode 100644 index dfc64cc87..000000000 --- a/install/webui/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -NULL = - -appdir = $(IPA_DATA_DIR)/webui -app_DATA = \ - edit.html \ - list.html \ - plugindata.py \ - user.html \ - whoami.html \ - $(NULL) - -EXTRA_DIST = \ - $(app_DATA) \ - $(NULL) - -MAINTAINERCLEANFILES = \ - *~ \ - Makefile.in diff --git a/install/webui/edit.html b/install/webui/edit.html deleted file mode 100644 index d021c8bc5..000000000 --- a/install/webui/edit.html +++ /dev/null @@ -1,175 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" - "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - -<?python - import json - from ipalib import api - from ipalib.util import json_serialize - - if not vars().has_key('obj_name') or obj_name not in api.Object: - obj_name = 'user' - - json_plugin_data = 'var PluginData = %s' % json.dumps( - api.Object[obj_name], indent=4, default=json_serialize - ) -?> - -<html xmlns="http://www.w3c.org/1999/xhtml" lang="en" xml:lang="en" - xmlns:py="http://genshi.edgewall.org/"> - -<head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>jQuery test page for IPA</title> - <script src="/ipa/static/jquery.js" type="text/javascript"> </script> - <script src="/ipa/static/ipa.js" type="text/javascript"> </script> - <script py:content="json_plugin_data" type="text/javascript"> </script> - - <script type="text/javascript"> - //<![CDATA[ - var elPStatus = null; - var pkeyLabel = null; - var qs = ipa_parse_qs(); - - function load_objects(body) - { - elPStatus = $('#status'); - - var params = PluginData['takes_params']; - for (var i = 0; i < params.length; ++i) { - if (params[i]['name'] == PluginData['primary_key']) { - pkeyLabel = params[i]['label']; - break; - } - } - - if (!pkeyLabel) { - elPStatus.text('Objects with no primary key are unsupported.'); - return; - } - - if (!qs['pkey']) { - elPStatus.text('No primary key specified.'); - return; - } - - $('#label').text(pkeyLabel + ': ' + qs['pkey']); - - ipa_init(); - ipa_cmd( - 'show', [qs['pkey']], {all: true}, on_win, on_fail, - PluginData['name'] - ); - - elPStatus.text('Loading...'); - } - - function on_win(data, textStatus, xhr) - { - var button = $('#submitbut'); - var ul_member = $('#member'); - var ul_memberof = $('#memberof'); - - var result = data.result.result; - var params = PluginData['takes_params']; - for (var i = 0; i < params.length; ++i) { - var name = params[i]['name']; - var label = params[i]['label']; - var value = result[name]; - - if (params[i]['primary_key']) { - continue; - } else if (name.indexOf('member_') == 0) { - if (!value) - continue; - - ul_member.append( - '<li>' + label + ': ' + value.join(', ') + '</li>' - ); - } else if (name.indexOf('memberof_') == 0) { - if (!value) - continue; - - ul_memberof.append( - '<li>' + label + ': ' + value.join(', ') + '</li>' - ); - } else { - var type = params[i]['class']; - if (!value) - value = ''; - - $('<label>' + label + '</label>').insertBefore(button); - if (params[i]['flags'].indexOf('no_update') != -1) { - $('<p>' + value + '</p>').insertBefore(button); - } else if (type == 'Str') { - $('<input name="' + name + '" type="text" value="' + value + '" /><br />').insertBefore(button); - } else if (type == 'Int') { - $('<input name="' + name + '" type="text" value="' + value + '" /><br />').insertBefore(button); - } else if (type == 'Password') { - $('<input name="' + name + '" type="password" value="' + value + '" /><br />').insertBefore(button); - } else { - $('<p>' + value + '</p>').insertBefore(button); - } - } - } - - elPStatus.detach(); - } - - function on_fail(xhr, textStatus, errorThrown) - { - elPStatus.insertAfter('#label'); - elPStatus.text(textStatus); - } - - function on_submit(obj) - { - var params = PluginData['takes_params']; - var modlist = {}; - var empty = true; - - for (var i = 0; i < params.length; ++i) { - var name = params[i]['name']; - var el = $('input[name=' + name + ']'); - if (el && el.val()) { - modlist[name] = el.val(); - empty = false; - } - } - - elPStatus.insertAfter('#label'); - elPStatus.text('Saving...'); - - if (!empty) { - ipa_cmd( - 'mod', [qs['pkey']], modlist, on_win2, on_fail, - PluginData['name'] - ); - } - - return (false); - } - - function on_win2(data, textStatus, xhr) - { - elPStatus.detach(); - } - //]]> - </script> -</head> - -<body onload="load_objects(this)"> - <p id="label"></p> - <p id="status"></p> - <p>Member:</p> - <ul id="member"><li></li></ul> - <p>Member of:</p> - <ul id="memberof"><li></li></ul> - <form id="objedit" onsubmit="return (on_submit(this))"> - <input id="submitbut" name="submit" value="Save" type="submit" /> - </form> -</body> - -</html> - - diff --git a/install/webui/list.html b/install/webui/list.html deleted file mode 100644 index f7e7646d9..000000000 --- a/install/webui/list.html +++ /dev/null @@ -1,72 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" - "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - -<?python - import json - from ipalib import api - from ipalib.util import json_serialize - - if not vars().has_key('obj_name') or obj_name not in api.Object: - obj_name='user' - - json_plugin_data = 'var PluginData = %s' % json.dumps( - api.Object[obj_name], indent=4, default=json_serialize - ) -?> - -<html xmlns="http://www.w3c.org/1999/xhtml" lang="en" xml:lang="en" - xmlns:py="http://genshi.edgewall.org/"> - -<head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>jQuery test page for IPA</title> - <script src="/ipa/static/jquery.js" type="text/javascript"> </script> - <script src="/ipa/static/ipa.js" type="text/javascript"> </script> - <script py:content="json_plugin_data" type="text/javascript"> </script> - - <script type="text/javascript"> - //<![CDATA[ - var elPStatus = null; - - function load_objects(body) - { - elPStatus = $('#status'); - - $('#label').text(PluginData['label']); - - ipa_init(); - ipa_cmd('find', [], {}, on_win, on_fail, PluginData['name']); - - elPStatus.text('Loading...'); - } - - function on_win(data, textStatus, xhr) - { - var ul = $('#objlist'); - - var result = data.result.result; - for (var i = 0; i < result.length; ++i) { - ul.append('<li>' + result[i][PluginData['primary_key']] + '</li>'); - } - - elPStatus.detach(); - } - - function on_fail(xhr, textStatus, errorThrown) - { - elPStatus.text(textStatus); - } - //]]> - </script> -</head> - -<body onload="load_objects(this)"> - <p id="label"></p> - <p id="status"></p> - <ul id="objlist"> - </ul> -</body> - -</html> - diff --git a/install/webui/plugindata.py b/install/webui/plugindata.py deleted file mode 100644 index 39c7d7355..000000000 --- a/install/webui/plugindata.py +++ /dev/null @@ -1,33 +0,0 @@ -# Authors: -# Pavel Zuna <pzuna@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; 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 -""" -Export plugin meta data in JSON format. -""" - -import json - -from ipalib import api -from ipalib.util import json_serialize - - -def get_plugin_data(obj_name): - return json.dumps( - api.Object[obj_name], indent=4, default=json_serialize - ) - diff --git a/install/webui/user.html b/install/webui/user.html deleted file mode 100644 index 54b4f17b4..000000000 --- a/install/webui/user.html +++ /dev/null @@ -1,299 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" - "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - -<html xmlns="http://www.w3c.org/1999/xhtml" lang="en" xml:lang="en" - xmlns:py="http://genshi.edgewall.org/"> - -<head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>jQuery test page for IPA</title> - - <link href="static/ipa.css" rel="stylesheet" type="text/css" /> - - <script src="static/jquery.js" type="text/javascript"> </script> - <script src="static/ipa.js" type="text/javascript"> </script> - <script src="static/user.js" type="text/javascript"> </script> - - <script py:for="obj_name in obj.split(',')" type="text/javascript"> - ipa_objs['${obj_name}'] = ${get_plugin_data(obj_name)}; - </script> - - <script src="static/details.js" type="text/javascript"> </script> - - <script type="text/javascript"> - //<![CDATA[ - var qs = ipa_parse_qs(); - - var def_lists = [ - ['identity', 'Identity Details', [ - ['title', 'Title'], - ['givenname', 'First Name'], - ['sn', 'Last Name'], - ['cn', 'Full Name'], - ['displayname', 'Dispaly Name'], - ['initials', 'Initials'] - ] - ], - ['account', 'Account Details', [ - ['call_a_status', 'Account Status'], - ['uid', 'Login'], - ['call_a_password', 'Password'], - ['uidnumber', 'UID'], - ['gidnumber', 'GID'], - ['homedirectory', 'homedirectory'] - ] - ], - ['contact', 'Contact Details', [ - ['mail', 'E-mail Address'], - ['call_a_numbers', 'Numbers'] - ] - ], - ['address', 'Mailing Address', [ - ['street', 'Address'], - ['location', 'City'], - ['call_a_st', 'State'], - ['postalcode', 'ZIP'] - ] - ], - ['employee', 'Employee Information', [ - ['ou', 'Org. Unit'], - ['call_a_manager', 'Manager'] - ] - ], - ['misc', 'Misc. Information', [ - ['carlicense', 'Car License'] - ] - ] - ]; - - /* "Top-level" code */ - - function load_object(body) - { - ipa_details_init('user'); - ipa_details_create(def_lists); - - $('#butreset').click(reset_on_click); - $('#butupdate').click(update_on_click); - - if (qs['principal']) { - ipa_cmd( - 'find', [], {'krbprincipalname': qs['principal']}, - on_win_find, null, 'user' - ); - return; - } - - if (!qs['pkey']) - return; - - 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 on_win_find(data, textStatus, xhr) - { - if (data['error']) { - alert(data['error']['message']); - return; - } - - var result = data.result.result; - if (result.length == 1) { - var entry_attrs = result[0]; - qs['pkey'] = entry_attrs['uid'][0]; - - ipa_details_load(qs['pkey'], on_win); - $('h1').text('Managing user: ' + qs['pkey']); - } - } - - function reset_on_click() - { - ipa_details_reset(); - return (false); - } - - function update_on_click() - { - ipa_details_update(qs['pkey'], on_win); - return (false); - } - - /* 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, - ipa_objs['user']['name'] - ); - } else { - ipa_cmd( - 'unlock', [qs['pkey']], {}, on_lock_win, on_fail, - ipa_objs['user']['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 <a href="jslink" onclick="return (toggle_on_click(this))" title="S">Toggle</a>'; - 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 = '<a href="jslink" onclick="return (resetpwd_on_click(this))" title="A">Reset Password</a>'; - function a_password(jobj, result, mode) - { - if (mode == IPA_DETAILS_POPULATE) - ipa_insert_first_dd(jobj, pwd_temp.replace('A', 'userpassword')); - } - - var select_temp = '<select title="st"></select>'; - var option_temp = '<option value="V">V</option>'; - 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(''); - } - //]]> - </script> -</head> - -<body onload="load_object(this)"> -<div id="view"> - <div id="header"> - <div id="logo"> - <a href="#"> - <img src="static/ipa_logo_180x50.png" /> - </a> - </div> - <div id="loggedinas"> - Logged in as <a href="user?obj=user&principal=${context.principal}" py:content="context.principal"> </a> - </div> - </div> - - <div id="content"> - <h1>Managing user:</h1> - <div id="buttons"> - <a href="dummy"><img id="butreset" src="static/but-reset.png" alt="Reset" /></a> - <a href="dummy"><img id="butupdate" src="static/but-update.png" alt="Update" /></a> - </div> - <ul id="viewtype"> - <li id="viewcaption">View:</li> - <li> - <img src="static/but-selected.png" alt="" /> - Personal Details - </li> - <li> - <img src="static/but-unselected.png" alt="" /> - <a href="memberof?pkey=${pkey}">Memberships</a> - </li> - </ul> - <hr /> - <div id="backtotop"> - <a href="#viewtype">Back to Top</a> - </div> - </div> -</div> -</body> - -</html> - diff --git a/install/webui/whoami.html b/install/webui/whoami.html deleted file mode 100644 index b429fc9a9..000000000 --- a/install/webui/whoami.html +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" - "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - -<html xmlns="http://www.w3c.org/1999/xhtml" lang="en" xml:lang="en" - xmlns:py="http://genshi.edgewall.org/"> - -<head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>User Information</title> - -</head> - -<body> - ${context.principal} -</body> - -</html> - diff --git a/ipa.spec.in b/ipa.spec.in index 0ab41ce73..885056bc0 100644 --- a/ipa.spec.in +++ b/ipa.spec.in @@ -395,12 +395,8 @@ fi %{_usr}/share/ipa/static/*.png %{_usr}/share/ipa/static/*.css %{_usr}/share/ipa/static/*.js -%dir %{_usr}/share/ipa/webui -%{_usr}/share/ipa/webui/*.html %dir %{_usr}/share/ipa/static %{_usr}/share/ipa/static/* -%dir %{_usr}/share/ipa/webui -%{_usr}/share/ipa/webui/* %dir %{_sysconfdir}/ipa %dir %{_sysconfdir}/ipa/html %config(noreplace) %{_sysconfdir}/ipa/html/ssbrowser.html |
