Skip to content

Commit

Permalink
Submodule the web-app-theme
Browse files Browse the repository at this point in the history
  • Loading branch information
AJ Christensen committed Apr 11, 2009
1 parent 047bf52 commit 67009d2
Show file tree
Hide file tree
Showing 24 changed files with 40 additions and 2,337 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "chef-server-slice/public/javascripts/jsoneditor"]
path = chef-server-slice/public/javascripts/jsoneditor
url = git://github.com/iterationlabs/jsoneditor.git
[submodule "chef-server-slice/public/web-app-theme"]
path = chef-server-slice/public/web-app-theme
url = git://github.com/pilu/web-app-theme.git
7 changes: 2 additions & 5 deletions chef-server-slice/app/controllers/nodes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,8 @@ def show
rescue Net::HTTPServerException => e
raise NotFound, "Cannot load node #{params[:id]}"
end
if request.xhr?
render JSON.pretty_generate(@node), :layout => false
else
display @node
end

display @node
end

def create
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
%head
%meta{ "http-equiv" => "content-type", :content => "text/html; charset=utf-8" }
%title Chef Server
= css_include_tag "base", "themes/blue/style", "chef", "/facebox/facebox.css"
= js_include_tag "jquery-1.3.1.min", "jquery.jeditable.mini", "jquery.livequery", "jquery.localscroll", "jquery.scrollTo", "jquery.editinline"
= js_include_tag "chef"
= js_include_tag "/facebox/facebox.js"
= css_include_tag "base", "themes/djime-cerulean/style", "chef", "/facebox/facebox.css", "editor"
= js_include_tag "jquery-1.3.1.min", "jquery.jeditable.mini", "jquery.livequery", "jquery.localscroll", "jquery.scrollTo", "jquery.timers", "json2.js"
= js_include_tag "chef", "editor", "/facebox/facebox.js"
%body
#container
#header
Expand Down
6 changes: 4 additions & 2 deletions chef-server-slice/app/views/nodes/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
%table.table
%tr
%th.first Node Name
%th &nbsp
%th Control
%th.last &nbsp
- if @node_list.empty?
%tr
%td= "You appear to have no nodes - try connecting one, or validating an existing #{link_to('registration', slice_url(:registrations))}"
%td{:colspan => 4}= "You appear to have no nodes - try connecting one, or validating an existing #{link_to('registration', slice_url(:registrations))}"
- else
- @node_list.each_with_index do |node, index|
%tr{:class => "#{index % 2 == 1 ? 'odd' : 'even'}"}
%td= link_to node, slice_url(:node, { :id => node.gsub(/\./, "_" ) } )
%td{:colspan => 2}= link_to node, slice_url(:node, { :id => node.gsub(/\./, "_" ) } )
%td= link_to "Delete", slice_url(:node, { :id => node.gsub(/\./, "_") }), :method => "delete", :confirm => "Are you sure? There is no undo."
9 changes: 2 additions & 7 deletions chef-server-slice/app/views/nodes/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,5 @@
.content
%h2.title= "Node #{h @node.name}"
.inner
%div{ :id => 'node', :class => "#{session[:level] == :admin ? 'edit_area' : 'non_edit_area'}", :to_update => @node.name}
%h2 Recipes
%ol
= recipe_list(@node)
%h2 Attributes
%ol
= attribute_list(@node)
%textarea#attrib_json_edit= JSON.pretty_generate(@node.attribute)
%textarea#recipe_json_edit= JSON.pretty_generate(@node.recipes)
4 changes: 3 additions & 1 deletion chef-server-slice/app/views/openid_register/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
%table.table
%tr
%th.first Registration Name
%th &nbsp
%th Control
%th.last  
- @registered_nodes.sort{ |a,b| a.name.to_s <=> b.name.to_s }.each_with_index do |node, index|
%tr{:class => "#{index % 2 == 1 ? 'odd' : 'even'}"}
%td= link_to(node.name, slice_url(:registration, { :id => node.name }))
%td{:colspan => 2}= link_to(node.name, slice_url(:registration, { :id => node.name }))
%td
= link_to((node.validated ? "Invalidate" : "Validate"), slice_url(:validate_registration, { :id => node.name}), :method => "post", :confirm => "Are you sure you want to toggle this registrations validation?")
|
Expand Down
5 changes: 3 additions & 2 deletions chef-server-slice/app/views/status/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@
%table.table
%tr
%th.first Node Name
%th &nbsp
%th State
%th.last &nbsp
- if @node_list.empty?
%tr
%td= "You appear to have no nodes - try connecting one, or validating an existing #{link_to('registration', slice_url(:registrations))}"
%td{:colspan => 4}= "You appear to have no nodes - try connecting one, or validating an existing #{link_to('registration', slice_url(:registrations))}"
- else
- @node_list.each_with_index do |node, index|
%tr{:class => "#{index % 2 == 1 ? 'odd' : 'even'}"}
%td= node
%td{:colspan => 2}= node
%td
= get_info(node)
%br
Expand Down
1 change: 1 addition & 0 deletions chef-server-slice/public/images/add.png
1 change: 1 addition & 0 deletions chef-server-slice/public/images/delete.png
10 changes: 10 additions & 0 deletions chef-server-slice/public/javascripts/chef.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,14 @@ $(document).ready(function(){

// global facebox callback
$('a[rel*=facebox]').facebox();

JSONEditor.prototype.ADD_IMG = '/images/add.png';
JSONEditor.prototype.DELETE_IMG = '/images/delete.png';
var attrib_editor = new JSONEditor($("#attrib_json_edit"), 400, 300);
attrib_editor.doTruncation(true);
attrib_editor.showFunctionButtons();

var recipe_editor = new JSONEditor($("#recipe_json_edit"), 400, 300);
recipe_editor.doTruncation(true);
recipe_editor.showFunctionButtons();
});
1 change: 1 addition & 0 deletions chef-server-slice/public/javascripts/editor.js
1 change: 1 addition & 0 deletions chef-server-slice/public/javascripts/jquery.timers.js
1 change: 1 addition & 0 deletions chef-server-slice/public/javascripts/json2.js
Loading

0 comments on commit 67009d2

Please sign in to comment.