summaryrefslogtreecommitdiffstats
path: root/install/static/host.js
diff options
context:
space:
mode:
authorAdam Young <ayoung@redhat.com>2010-08-23 22:32:23 -0400
committerAdam Young <ayoung@redhat.com>2010-08-26 13:15:00 -0400
commit49584d6efc6a10fa0b76ce81b2638d424f2208a8 (patch)
tree08c87c7d7bd2ee0fef6e5045948a977a5c61cdc9 /install/static/host.js
parent02479babb9cd5fdd0673175fde22e40f3a1b10b4 (diff)
downloadfreeipa-49584d6efc6a10fa0b76ce81b2638d424f2208a8.tar.gz
freeipa-49584d6efc6a10fa0b76ce81b2638d424f2208a8.tar.xz
freeipa-49584d6efc6a10fa0b76ce81b2638d424f2208a8.zip
hashchange
We now catch the hashchange event and use that to drive most of the site. To trigger page transitions, modify location.hash. Params start with # not ?. Removed user-group.inc. converted tabs to spaces trivial imlementation of add and details for netgroup and hostgroup lots of bug fixes based on routing problems and the refactorings.
Diffstat (limited to 'install/static/host.js')
-rw-r--r--install/static/host.js50
1 files changed, 22 insertions, 28 deletions
diff --git a/install/static/host.js b/install/static/host.js
index b6881d836..b249c9b5e 100644
--- a/install/static/host.js
+++ b/install/static/host.js
@@ -1,38 +1,32 @@
function setupHost(facet){
if (facet == "details"){
- setupHostDetails();
+ hostDetailsForm.setup();
+ }else if (facet == "add"){
+ hostBuilder.setup();
}else{
- setupHostSearch();
+ hostSearchForm.setup();
}
}
-function setupHostDetails(){
- var detailsForm = new DetailsForm();
-}
-
-function setupHostSearch(){
+var hostAddProperties = [{title: 'Domain Name', id: 'pkey', type: 'text'}];
+var hostBuilder = new EntityBuilder("host",hostAddProperties);
- 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);
+var host_details_list = [['host', 'Host Details', [
+ ['fqdn', 'Fully Qualified Domain Name'],
+ ['krbprincipalname', 'Kerberos Principal'],
+ ['serverhostname', 'Server Host Name']
+]]];
+
+var hostDetailsForm = new DetailsForm("host",host_details_list,"fqdn","sampledata/hostshow.json") ;
- $("#query").unbind();
- $("#query").click(function(){
- sampleData = "sampledata/hostlist.json";
- executeSearch(hostSearchForm);
- });
- $("#new").unbind();
- $("#new").click( function() {
- alert("New Host...");
- });
-
-}
+var hostDetailsColumns = [
+ {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", hostDetailsColumns,"sampledata/hostlist.json");