From 2742001ed0deaa4c23d5709d5244804bf29d0543 Mon Sep 17 00:00:00 2001 From: Adam Young Date: Fri, 20 Aug 2010 11:16:36 -0400 Subject: Revert "Started pulling the details functionality into the details form object. DOing this in hosts for now to avoid conflicts on details.js" This reverts commit 37d302d6830ee73d6dada132210711d7c0c3b8be. THis commit was pushed accidentally, and not ready to be pushed. --- install/static/host.js | 53 ++++++++------------------------------------------ 1 file changed, 8 insertions(+), 45 deletions(-) (limited to 'install/static/host.js') diff --git a/install/static/host.js b/install/static/host.js index 3ea609b1..b6881d83 100644 --- a/install/static/host.js +++ b/install/static/host.js @@ -6,65 +6,27 @@ function setupHost(facet){ } } -function setupHostDetails(host){ - hostDetailsForm.setup(host); -} - - -var host_details_list = - [['identity', 'Host Details', [ - ['fqdn', 'Fully Qualified Domain Name'], - ['"krbprincipalname', 'Kerberos Principal'], - ['serverhostname', 'Host Name']]]]; - - -function DetailsForm(obj, details_list, pkeyCol, sampleData ){ - - this.obj = obj; - this.details_list = details_list; - this.sampleData = sampleData; - this.pkeyCol = pkeyCol; - - this.setup= function(key){ - window.location.hash="#tab="+this.obj+"user&facet=details&pkey="+key; - - //re initialize global parse of parameters - qs = ipa_parse_qs(); - - showDetails(); - $('h1').text(":RESET:key"); - - ipa_details_init(this.obj); - ipa_details_create(this.details_list, $('#details')); - ipa_details_load(key, on_win, null, this.sampleData); - } - -} - -var hostDetailsForm = new DetailsForm("host",host_details_list,"fqdn","sampledata/hostgroup.json") ; - -function renderDetailColumn(form,current,cell){ - $("",{ - href:"#tab="+this.obj+"&facet=details&pkey="+current.fqdn, - html: "" +current[form.pkeyCol], - click: function(){ form.setup(current[form.pkeyCol])}, - }).appendTo(cell); +function setupHostDetails(){ + var detailsForm = new DetailsForm(); } function setupHostSearch(){ + + sampleData = "sampledata/hostlist.json"; var columns = [ {title:"Host",column:"fqdn",render: function(current,cell){ - renderDetailColumn(hostDetailsForm, 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, "sampledata/hostlist.json"); + var hostSearchForm = new SearchForm("host", "find", columns); $("#query").unbind(); $("#query").click(function(){ + sampleData = "sampledata/hostlist.json"; executeSearch(hostSearchForm); }); @@ -72,4 +34,5 @@ function setupHostSearch(){ $("#new").click( function() { alert("New Host..."); }); + } -- cgit