summaryrefslogtreecommitdiffstats
path: root/install/static/host.js
diff options
context:
space:
mode:
authorPavel Zuna <pzuna@redhat.com>2010-09-16 10:28:07 -0400
committerAdam Young <ayoung@redhat.com>2010-09-17 19:42:40 -0400
commit1bb412239d0735af11c3939bfe437cb8b49c7004 (patch)
treea48dc9331164616c2d2ba655f03634604e08fda0 /install/static/host.js
parent4f37775db75eb59496ce0e6fe11230ea3bd21e8b (diff)
downloadfreeipa-1bb412239d0735af11c3939bfe437cb8b49c7004.tar.gz
freeipa-1bb412239d0735af11c3939bfe437cb8b49c7004.tar.xz
freeipa-1bb412239d0735af11c3939bfe437cb8b49c7004.zip
Big webUI patch.
Quick summary: - use jQuery UI and jQuery BBQ libraries - code restructuring The patch has so many changes they can't be listed here. Many parts of the code have been rewritten from scrach. See freeipa-devel mailing list: webUI code restructuring [wall of text, diagrams, ... you've been warned!] 2010-09-07
Diffstat (limited to 'install/static/host.js')
-rw-r--r--install/static/host.js67
1 files changed, 38 insertions, 29 deletions
diff --git a/install/static/host.js b/install/static/host.js
index dba4f35e7..f59c1a3c0 100644
--- a/install/static/host.js
+++ b/install/static/host.js
@@ -1,34 +1,43 @@
-function setupHost(facet){
- if (facet == "details"){
- hostDetailsForm.setup();
- }else if (facet == "add"){
- hostBuilder.setup();
- }else{
- hostSearchForm.setup();
- }
-}
+/* 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
+ */
-var hostAddProperties = [{title: 'Domain Name', id: 'pkey', type: 'text'}];
-var hostBuilder = new EntityBuilder("host",hostAddProperties);
+/* REQUIRES: ipa.js, details.js, search.js, add.js, entity.js */
+ipa_entity_set_search_definition('host', [
+ ['fqdn', 'Name', null],
+ ['description', 'Description', null],
+ ['enrolled', 'Enrolled?', null],
+ ['manages', 'Manages?', null]
+]);
-var host_details_list = [['host', 'Host Details', [
- ['fqdn', 'Fully Qualified Domain Name'],
- ['krbprincipalname', 'Kerberos Principal'],
- ['serverhostname', 'Server Host Name']
-]]];
+ipa_entity_set_add_definition('host', [
+ 'dialog-add-host', 'Add New Host', [
+ ['fqdn', 'Name', null]
+ ]
+]);
-var hostFacets = ["details","hostgroup", "hostgroupmembership"];
+ipa_entity_set_details_definition('host', [
+ ['host', 'Host Details', [
+ ['fqdn', 'Fully Qualified Domain Name', null],
+ ['krbprincipalname', 'Kerberos Principal', null],
+ ['serverhostname', 'Server Host Name', null]
+ ]]
+]);
-var hostDetailsForm = new DetailsForm("host",host_details_list,"fqdn",
- hostFacets ) ;
-
-var hostSearchColumns = [
- {title:"Host",column:"fqdn",render: function(current,cell){
- renderPkeyColumn(hostDetailsForm,current,cell);
- }},
- {title:"Comment", column: "description", render: renderSimpleColumn},
- {title:"Enrolled?", render: renderUnknownColumn},
- {title:"Manages?", render: renderUnknownColumn}
-];
-var hostSearchForm = new SearchForm("host", "find", hostSearchColumns);