diff options
author | Adam Jacob <adam@hjksolutions.com> | 2008-10-18 13:22:59 -0700 |
---|---|---|
committer | Adam Jacob <adam@hjksolutions.com> | 2008-10-18 13:22:59 -0700 |
commit | c029da5ea1088945a1f7a5fd743d680091a8c0e3 (patch) | |
tree | 11e272701cf8db24d4f7ff8f0db7ce0e8524a8f0 /chef-server | |
parent | 60fb39b696fb7d04fee548a78f5cb7793f1255d1 (diff) | |
download | chef-c029da5ea1088945a1f7a5fd743d680091a8c0e3.tar.gz |
Ajax edit-in-place works for nodes, so you don't need to use couchdb anymore
Removed my swear word laden comment
Diffstat (limited to 'chef-server')
-rw-r--r-- | chef-server/lib/controllers/nodes.rb | 2 | ||||
-rw-r--r-- | chef-server/lib/init.rb | 1 | ||||
-rw-r--r-- | chef-server/lib/public/javascript/chef.js | 2 | ||||
-rw-r--r-- | chef-server/lib/views/nodes/_node.html.haml | 17 | ||||
-rw-r--r-- | chef-server/lib/views/nodes/show.html.haml | 4 |
5 files changed, 12 insertions, 14 deletions
diff --git a/chef-server/lib/controllers/nodes.rb b/chef-server/lib/controllers/nodes.rb index 4c0bd8f2b5..65cb3007ee 100644 --- a/chef-server/lib/controllers/nodes.rb +++ b/chef-server/lib/controllers/nodes.rb @@ -64,7 +64,7 @@ class Nodes < Application @status = 202 @node.save if params[:ajax] - render partial("nodes/node", :node => @node) + partial("nodes/node", :node => @node) else display @node end diff --git a/chef-server/lib/init.rb b/chef-server/lib/init.rb index 4386361ca9..0377d4c5c0 100644 --- a/chef-server/lib/init.rb +++ b/chef-server/lib/init.rb @@ -170,7 +170,6 @@ Merb::Router.prepare do |r| match("/cookbooks/_attribute_files").to(:controller => "cookbooks", :action => "attribute_files") match("/cookbooks/_recipe_files").to(:controller => "cookbooks", :action => "recipe_files") match("/cookbooks/_definition_files").to(:controller => "cookbooks", :action => "definition_files") - Chef::Log.info("Seriously, what the fuck") match("/cookbooks/_library_files").to(:controller => "cookbooks", :action => "library_files") # r.match("/cookbooks/:cookbook_id/templates").to(:controller => "cookbook_templates", :action => "index") diff --git a/chef-server/lib/public/javascript/chef.js b/chef-server/lib/public/javascript/chef.js index e2e1a3c0f2..22d4c90ae5 100644 --- a/chef-server/lib/public/javascript/chef.js +++ b/chef-server/lib/public/javascript/chef.js @@ -22,7 +22,7 @@ $(document).ready(function() { cancel : 'Cancel', submit : 'Save', indicator : "<img src='/images/indicator.gif'>", - target : location.href + ".json?ajax=true", + target : location.href + "?ajax=true", loadtype : "GET", loadurl : location.href + ".json?ajax=true", tooltip : 'Click to edit...', diff --git a/chef-server/lib/views/nodes/_node.html.haml b/chef-server/lib/views/nodes/_node.html.haml index d20950fcb3..26419482e0 100644 --- a/chef-server/lib/views/nodes/_node.html.haml +++ b/chef-server/lib/views/nodes/_node.html.haml @@ -1,10 +1,7 @@ -.node - %h1 - = "Node #{h node.name}" - .edit_area#node{:to_update => node.name} - %h2 Recipes - %ol - = recipe_list(node) - %h2 Attributes - %ol - = attribute_list(node) +.edit_area#node{:to_update => node.name} + %h2 Recipes + %ol + = recipe_list(node) + %h2 Attributes + %ol + = attribute_list(node) diff --git a/chef-server/lib/views/nodes/show.html.haml b/chef-server/lib/views/nodes/show.html.haml index 94708af6d3..c633d7866b 100644 --- a/chef-server/lib/views/nodes/show.html.haml +++ b/chef-server/lib/views/nodes/show.html.haml @@ -1 +1,3 @@ -= partial(:node, :node => @node)
\ No newline at end of file +.node + %h1= "Node #{h @node.name}" + = partial(:node, :node => @node)
\ No newline at end of file |