Permalink
Browse files

Submodule the web-app-theme

  • Loading branch information...
1 parent 047bf52 commit 67009d2787ca47ce0b6d48ff9ae4524406a3246c @fujin fujin committed Apr 11, 2009
Showing with 40 additions and 2,337 deletions.
  1. +3 −0 .gitmodules
  2. +2 −5 chef-server-slice/app/controllers/nodes.rb
  3. +4 −5 chef-server-slice/app/views/layout/chef_server_slice.html.haml
  4. +4 −2 chef-server-slice/app/views/nodes/index.html.haml
  5. +2 −7 chef-server-slice/app/views/nodes/show.html.haml
  6. +3 −1 chef-server-slice/app/views/openid_register/index.html.haml
  7. +3 −2 chef-server-slice/app/views/status/index.html.haml
  8. +1 −0 chef-server-slice/public/images/add.png
  9. +1 −0 chef-server-slice/public/images/delete.png
  10. +10 −0 chef-server-slice/public/javascripts/chef.js
  11. +1 −0 chef-server-slice/public/javascripts/editor.js
  12. +1 −0 chef-server-slice/public/javascripts/jquery.timers.js
  13. +1 −0 chef-server-slice/public/javascripts/json2.js
  14. +0 −341 chef-server-slice/public/stylesheets/base.css
  15. +1 −0 chef-server-slice/public/stylesheets/base.css
  16. +1 −0 chef-server-slice/public/stylesheets/editor.css
  17. +1 −0 chef-server-slice/public/stylesheets/themes
  18. +0 −290 chef-server-slice/public/stylesheets/themes/bec-green/style.css
  19. +0 −301 chef-server-slice/public/stylesheets/themes/bec/style.css
  20. +0 −280 chef-server-slice/public/stylesheets/themes/blue/style.css
  21. +0 −267 chef-server-slice/public/stylesheets/themes/default/style.css
  22. +0 −272 chef-server-slice/public/stylesheets/themes/kathleene/style.css
  23. +0 −263 chef-server-slice/public/stylesheets/themes/orange/style.css
  24. +0 −301 chef-server-slice/public/stylesheets/themes/reidb-greenish/style.css
  25. +1 −0 chef-server-slice/public/web-app-theme
View
@@ -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
@@ -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
@@ -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
@@ -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."
@@ -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)
@@ -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?")
|
@@ -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
@@ -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();
});
Oops, something went wrong.

0 comments on commit 67009d2

Please sign in to comment.