summaryrefslogtreecommitdiffstats
path: root/install/static/host.js
diff options
context:
space:
mode:
Diffstat (limited to 'install/static/host.js')
-rw-r--r--install/static/host.js38
1 files changed, 38 insertions, 0 deletions
diff --git a/install/static/host.js b/install/static/host.js
new file mode 100644
index 000000000..b6881d836
--- /dev/null
+++ b/install/static/host.js
@@ -0,0 +1,38 @@
+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...");
+ });
+
+}