chef-server-webui 0.8.16 → 0.9.0.a3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. data/Rakefile +14 -10
  2. data/app/controllers/application.rb +111 -128
  3. data/app/controllers/clients.rb +10 -10
  4. data/app/controllers/cookbook_attributes.rb +1 -1
  5. data/app/controllers/cookbook_definitions.rb +1 -1
  6. data/app/controllers/cookbook_files.rb +1 -1
  7. data/app/controllers/cookbook_libraries.rb +1 -1
  8. data/app/controllers/cookbook_recipes.rb +1 -1
  9. data/app/controllers/cookbook_templates.rb +1 -1
  10. data/app/controllers/cookbooks.rb +21 -3
  11. data/app/controllers/databag_items.rb +6 -6
  12. data/app/controllers/databags.rb +3 -3
  13. data/app/controllers/main.rb +1 -1
  14. data/app/controllers/nodes.rb +21 -21
  15. data/app/controllers/openid_consumer.rb +9 -9
  16. data/app/controllers/roles.rb +3 -3
  17. data/app/controllers/search.rb +1 -1
  18. data/app/controllers/search_entries.rb +1 -1
  19. data/app/controllers/status.rb +1 -1
  20. data/app/controllers/users.rb +7 -7
  21. data/app/helpers/application_helper.rb +1 -156
  22. data/app/helpers/global_helpers.rb +20 -16
  23. data/app/helpers/nodes_helper.rb +24 -22
  24. data/app/helpers/openid_server_helpers.rb +13 -10
  25. data/app/helpers/search_helper.rb +44 -38
  26. data/app/helpers/status_helper.rb +10 -3
  27. data/app/views/clients/_navigation.html.haml +5 -5
  28. data/app/views/clients/edit.html.haml +1 -1
  29. data/app/views/clients/index.html.haml +4 -4
  30. data/app/views/clients/new.html.haml +1 -1
  31. data/app/views/cookbooks/index.html.haml +1 -1
  32. data/app/views/cookbooks/show.html.haml +25 -16
  33. data/app/views/databag_items/_form.html.haml +1 -1
  34. data/app/views/databag_items/_navigation.html.haml +5 -5
  35. data/app/views/databag_items/edit.html.haml +1 -1
  36. data/app/views/databag_items/new.html.haml +1 -1
  37. data/app/views/databags/_item_navigation.html.haml +4 -4
  38. data/app/views/databags/_navigation.html.haml +5 -5
  39. data/app/views/databags/edit.html.haml +1 -1
  40. data/app/views/databags/index.html.haml +3 -3
  41. data/app/views/databags/new.html.haml +1 -1
  42. data/app/views/databags/show.html.haml +3 -3
  43. data/app/views/layout/{chef_server_webui.html.haml → application.html.haml} +11 -11
  44. data/app/views/layout/login.html.haml +1 -1
  45. data/app/views/nodes/_form.html.haml +1 -1
  46. data/app/views/nodes/_navigation.html.haml +5 -5
  47. data/app/views/nodes/edit.html.haml +1 -1
  48. data/app/views/nodes/index.html.haml +6 -6
  49. data/app/views/nodes/new.html.haml +1 -1
  50. data/app/views/nodes/show.html.haml +4 -5
  51. data/app/views/openid_consumer/index.html.haml +2 -2
  52. data/app/views/openid_register/index.html.haml +4 -4
  53. data/app/views/openid_register/show.html.haml +1 -1
  54. data/app/views/roles/_form.html.haml +1 -1
  55. data/app/views/roles/_navigation.html.haml +5 -5
  56. data/app/views/roles/edit.html.haml +1 -1
  57. data/app/views/roles/index.html.haml +4 -4
  58. data/app/views/roles/new.html.haml +1 -1
  59. data/app/views/roles/show.html.haml +3 -4
  60. data/app/views/search/_search_form.html.haml +1 -1
  61. data/app/views/search/index.html.haml +1 -1
  62. data/app/views/search/show.html.haml +1 -1
  63. data/app/views/status/index.html.haml +9 -12
  64. data/app/views/users/_form.html.haml +1 -1
  65. data/app/views/users/_navigation.html.haml +5 -5
  66. data/app/views/users/edit.html.haml +1 -1
  67. data/app/views/users/index.html.haml +3 -3
  68. data/app/views/users/login.html.haml +1 -1
  69. data/app/views/users/new.html.haml +1 -1
  70. data/bin/chef-server-webui +72 -0
  71. data/config.ru +10 -74
  72. data/config/init.rb +30 -11
  73. data/config/rack.rb +5 -0
  74. data/config/router.rb +62 -5
  75. data/lib/chef-server-webui.rb +2 -155
  76. data/lib/chef-server-webui/version.rb +3 -0
  77. data/public/javascripts/drop_down_menu.js +22 -0
  78. metadata +60 -48
  79. data/stubs/app/controllers/application.rb +0 -2
  80. data/stubs/app/controllers/main.rb +0 -2
data/config.ru CHANGED
@@ -1,84 +1,20 @@
1
1
  require 'rubygems'
2
2
  require 'merb-core'
3
+ require 'chef'
3
4
 
4
- Dir.chdir(::File.dirname(__FILE__))
5
+ #Chef::Config.from_file(File.join("/etc", "chef", "server.rb"))
6
+ Chef::Config.from_file(File.expand_path(File.dirname(__FILE__) + '/../features/data/config/server.rb'))
7
+
8
+ Merb::Config.setup(:merb_root => File.expand_path(File.dirname(__FILE__)),
9
+ :environment => 'production',
10
+ :fork_for_class_load => false)
5
11
 
6
- Merb::Config.setup(:merb_root => ::File.expand_path(::File.dirname(__FILE__)),
7
- :environment => ENV['RACK_ENV'] || "development",
8
- :fork_for_class_load => false,
9
- :init_file => ::File.dirname(__FILE__) / "config/init.rb")
10
12
  Merb.environment = Merb::Config[:environment]
11
13
  Merb.root = Merb::Config[:merb_root]
14
+ Merb::BootLoader.run
12
15
 
13
- # Uncomment if your app is mounted at a suburi
14
- #if prefix = ::Merb::Config[:path_prefix]
15
- # use Merb::Rack::PathPrefix, prefix
16
- #end
17
-
18
- # comment this out if you are running merb behind a load balancer
19
- # that serves static files
20
- # use Merb::Rack::Static, Merb.dir_for(:public)
21
- use Merb::Rack::Static, Merb.root+"/public"
22
-
23
- require 'merb-slices'
24
- slice_name = "chef-server-webui"
16
+ use Merb::Rack::Static, Merb.dir_for(:public)
25
17
 
26
- if ::File.exists?(slice_file = ::File.join(Merb.root, 'lib', "#{slice_name}.rb"))
27
- Merb::BootLoader.before_app_loads do
28
- $SLICE_MODULE = Merb::Slices.filename2module(slice_file)
29
- require slice_file
30
- end
31
- Merb::BootLoader.after_app_loads do
32
- # See Merb::Slices::ModuleMixin - $SLICE_MODULE is used as a flag
33
- Merb::Router.prepare do
34
- slice($SLICE_MODULE)
35
- slice_id = slice_name.gsub('-', '_').to_sym
36
- slice_routes = Merb::Slices.named_routes[slice_id] || {}
37
-
38
- # Setup a / root path matching route - try several defaults
39
- route = slice_routes[:home] || slice_routes[:index]
40
- if route
41
- params = route.params.inject({}) do |hsh,(k,v)|
42
- hsh[k] = v.gsub("\"", '') if k == :controller || k == :action
43
- hsh
44
- end
45
- match('/').to(params)
46
- else
47
- match('/').to(:controller => 'merb_slices', :action => 'index')
48
- end
49
- end
50
- end
51
- else
52
- puts "No slice found (expected: #{slice_name})"
53
- exit
54
- end
18
+ run Merb::Rack::Application.new
55
19
 
56
- class ::MerbSlices < Merb::Controller
57
-
58
- def index
59
- html = "<h1>#{slice.name}</h1><p>#{slice.description}</p>"
60
- html << "<h2>Routes</h2><ul>"
61
- sorted_names = slice.named_routes.keys.map { |k| [k.to_s, k] }.sort_by { |pair| pair.first }
62
- sorted_names.each do |_, name|
63
- if name != :default && (route = slice.named_routes[name])
64
- if name == :index
65
- html << %Q[<li><a href="#{url(route.name)}" title="visit #{name}">#{name}: #{route.inspect}</a></li>]
66
- else
67
- html << %Q[<li>#{name}: #{route.inspect}</li>]
68
- end
69
- end
70
- end
71
- html << "</ul>"
72
- html
73
- end
74
-
75
- private
76
-
77
- def slice
78
- @slice ||= Merb::Slices.slices.first
79
- end
80
-
81
- end
82
20
 
83
- Merb::BootLoader.run
84
- run Merb::Rack::Application.new
data/config/init.rb CHANGED
@@ -21,14 +21,20 @@
21
21
  # code and views.
22
22
  #
23
23
 
24
- $: << File.join(File.dirname(__FILE__), "..", "..", "chef", "lib")
24
+
25
+ require "merb-core"
26
+ require "merb-haml"
27
+ require "merb-assets"
28
+ require "merb-helpers"
29
+
30
+ require 'coderay'
31
+
25
32
  require 'chef'
33
+ require 'chef/solr'
34
+
35
+ require 'chef/role'
36
+ require 'chef/webui_user'
26
37
 
27
- merb_gems_version = " > 1.0"
28
- dependency "merb-haml", merb_gems_version
29
- dependency "merb-assets", merb_gems_version
30
- dependency "merb-helpers", merb_gems_version
31
- dependency "chef", :immediate=>true unless defined?(Chef)
32
38
 
33
39
  use_template_engine :haml
34
40
 
@@ -36,14 +42,27 @@ Merb::Config.use do |c|
36
42
  # BUGBUG [cb] For some reason, this next line
37
43
  # causes a merb slice to vomit around openid
38
44
  #c[:fork_for_class_load] = false
39
- c[:session_id_key] = '_chef_server_session_id'
40
- c[:session_secret_key] = Chef::Config.manage_secret_key
41
- c[:session_store] = 'cookie'
42
- c[:exception_details] = true
43
- c[:reload_classes] = true
45
+ c[:session_id_key] = '_chef_server_session_id'
46
+ c[:session_secret_key] = Chef::Config.manage_secret_key
47
+ c[:session_store] = 'cookie'
48
+ c[:exception_details] = true
49
+ c[:reload_classes] = true
50
+ c[:reload_templates] = true
51
+
44
52
  c[:log_level] = Chef::Config[:log_level]
45
53
  if Chef::Config[:log_location].kind_of?(String)
46
54
  c[:log_file] = Chef::Config[:log_location]
47
55
  end
48
56
  end
49
57
 
58
+ Chef::Config[:node_name] = Chef::Config[:web_ui_client_name]
59
+ Chef::Config[:client_key] = Chef::Config[:web_ui_key]
60
+
61
+ # Create the default admin user "admin" if no admin user exists
62
+ unless Chef::WebUIUser.admin_exist
63
+ user = Chef::WebUIUser.new
64
+ user.name = Chef::Config[:web_ui_admin_user_name]
65
+ user.set_password(Chef::Config[:web_ui_admin_default_password])
66
+ user.admin = true
67
+ user.save
68
+ end
data/config/rack.rb ADDED
@@ -0,0 +1,5 @@
1
+ use Rack::ContentLength
2
+ use Merb::Rack::Static, Merb.dir_for(:public)
3
+
4
+ # this is our main merb application
5
+ run Merb::Rack::Application.new
data/config/router.rb CHANGED
@@ -1,6 +1,63 @@
1
- # This file is here so slice can be testing as a stand alone application.
1
+ Merb::Router.prepare do
2
+ resources :nodes, :id => /[^\/]+/
3
+ resources :clients, :id => /[^\/]+/
4
+ resources :roles
2
5
 
3
- #Merb::Router.prepare do
4
- # resources :roles
5
- # ...
6
- #end
6
+ match("/status").to(:controller => "status", :action => "index").name(:status)
7
+
8
+ resources :searches, :path => "search", :controller => "search"
9
+ match("/search/:search_id/entries", :method => 'get').to(:controller => "search_entries", :action => "index")
10
+ match("/search/:search_id/entries", :method => 'post').to(:controller => "search_entries", :action => "create")
11
+ match("/search/:search_id/entries/:id", :method => 'get').to(:controller => "search_entries", :action => "show")
12
+ match("/search/:search_id/entries/:id", :method => 'put').to(:controller => "search_entries", :action => "create")
13
+ match("/search/:search_id/entries/:id", :method => 'post').to(:controller => "search_entries", :action => "update")
14
+ match("/search/:search_id/entries/:id", :method => 'delete').to(:controller => "search_entries", :action => "destroy")
15
+
16
+ match("/cookbooks/_attribute_files").to(:controller => "cookbooks", :action => "attribute_files")
17
+ match("/cookbooks/_recipe_files").to(:controller => "cookbooks", :action => "recipe_files")
18
+ match("/cookbooks/_definition_files").to(:controller => "cookbooks", :action => "definition_files")
19
+ match("/cookbooks/_library_files").to(:controller => "cookbooks", :action => "library_files")
20
+
21
+ match("/cookbooks/:cookbook_id/templates", :cookbook_id => /[\w\.]+/).to(:controller => "cookbook_templates", :action => "index")
22
+ match("/cookbooks/:cookbook_id/libraries", :cookbook_id => /[\w\.]+/).to(:controller => "cookbook_libraries", :action => "index")
23
+ match("/cookbooks/:cookbook_id/definitions", :cookbook_id => /[\w\.]+/).to(:controller => "cookbook_definitions", :action => "index")
24
+ match("/cookbooks/:cookbook_id/recipes", :cookbook_id => /[\w\.]+/).to(:controller => "cookbook_recipes", :action => "index")
25
+ match("/cookbooks/:cookbook_id/attributes", :cookbook_id => /[\w\.]+/).to(:controller => "cookbook_attributes", :action => "index")
26
+ match("/cookbooks/:cookbook_id/files", :cookbook_id => /[\w\.]+/).to(:controller => "cookbook_files", :action => "index")
27
+
28
+ match("/cookbooks/:cookbook_id/:cb_version", :cb_version => /[\w\.]+/, :method => 'get').to(:controller => "cookbooks", :action => "show").name(:show_specific_version_cookbook)
29
+ resources :cookbooks
30
+
31
+ resources :clients
32
+
33
+ match("/databags/:databag_id/databag_items", :method => 'get').to(:controller => "databags", :action => "show", :id=>":databag_id")
34
+
35
+ resources :databags do |s|
36
+ s.resources :databag_items
37
+ end
38
+
39
+ match('/openid/consumer').to(:controller => 'openid_consumer', :action => 'index').name(:openid_consumer)
40
+ match('/openid/consumer/start').to(:controller => 'openid_consumer', :action => 'start').name(:openid_consumer_start)
41
+ match('/openid/consumer/login').to(:controller => 'openid_consumer', :action => 'login').name(:openid_consumer_login)
42
+ match('/openid/consumer/complete').to(:controller => 'openid_consumer', :action => 'complete').name(:openid_consumer_complete)
43
+ match('/openid/consumer/logout').to(:controller => 'openid_consumer', :action => 'logout').name(:openid_consumer_logout)
44
+
45
+ match('/login').to(:controller=>'users', :action=>'login').name(:users_login)
46
+ match('/logout').to(:controller => 'users', :action => 'logout').name(:users_logout)
47
+
48
+ match('/users').to(:controller => 'users', :action => 'index').name(:users)
49
+ match('/users/create').to(:controller => 'users', :action => 'create').name(:users_create)
50
+ match('/users/start').to(:controller => 'users', :action => 'start').name(:users_start)
51
+
52
+ match('/users/login').to(:controller => 'users', :action => 'login').name(:users_login)
53
+ match('/users/login_exec').to(:controller => 'users', :action => 'login_exec').name(:users_login_exec)
54
+ match('/users/complete').to(:controller => 'users', :action => 'complete').name(:users_complete)
55
+ match('/users/logout').to(:controller => 'users', :action => 'logout').name(:users_logout)
56
+ match('/users/new').to(:controller => 'users', :action => 'new').name(:users_new)
57
+ match('/users/:user_id/edit').to(:controller => 'users', :action => 'edit').name(:users_edit)
58
+ match('/users/:user_id').to(:controller => 'users', :action => 'show').name(:users_show)
59
+ match('/users/:user_id/delete', :method => 'delete').to(:controller => 'users', :action => 'destroy').name(:users_delete)
60
+ match('/users/:user_id/update', :method => 'put').to(:controller => 'users', :action => 'update').name(:users_update)
61
+
62
+ match('/').to(:controller => 'nodes', :action =>'index').name(:top)
63
+ end
@@ -1,155 +1,2 @@
1
- if defined?(Merb::Plugins)
2
- $:.unshift File.dirname(__FILE__)
3
- $:.unshift File.join(File.dirname(__FILE__), "..", "..", "chef", "lib")
4
- $:.unshift File.join(File.dirname(__FILE__), "..", "..", "chef-solr", "lib")
5
-
6
- dependency 'merb-slices', :immediate => true
7
- dependency 'chef', :immediate=>true unless defined?(Chef)
8
- require 'chef/role'
9
- require 'chef/webui_user'
10
-
11
- require 'coderay'
12
-
13
- Merb::Plugins.add_rakefiles "chef-server-webui/merbtasks", "chef-server-webui/slicetasks", "chef-server-webui/spectasks"
14
-
15
-
16
- # Register the Slice for the current host application
17
- Merb::Slices::register(__FILE__)
18
-
19
- Merb.disable :json
20
-
21
- # Slice configuration - set this in a before_app_loads callback.
22
- # By default a Slice uses its own layout, so you can switch to
23
- # the main application layout or no layout at all if needed.
24
- #
25
- # Configuration options:
26
- # :layout - the layout to use; defaults to :chefserverslice
27
- # :mirror - which path component types to use on copy operations; defaults to all
28
- Merb::Slices::config[:chef_server_webui][:layout] ||= :chef_server_webui
29
-
30
-
31
- # All Slice code is expected to be namespaced inside a module
32
- module ChefServerWebui
33
- # Slice metadata
34
- self.description = "ChefServerWebui.. serving up some piping hot infrastructure!"
35
- self.version = Chef::VERSION
36
- self.author = "Opscode"
37
-
38
- # Stub classes loaded hook - runs before LoadClasses BootLoader
39
- # right after a slice's classes have been loaded internally.
40
- def self.loaded
41
- Chef::Config[:node_name] = Chef::Config[:web_ui_client_name]
42
- Chef::Config[:client_key] = Chef::Config[:web_ui_key]
43
- # Create the default admin user "admin" if no admin user exists
44
- unless Chef::WebUIUser.admin_exist
45
- user = Chef::WebUIUser.new
46
- user.name = Chef::Config[:web_ui_admin_user_name]
47
- user.set_password(Chef::Config[:web_ui_admin_default_password])
48
- user.admin = true
49
- user.save
50
- end
51
- end
52
-
53
- # Initialization hook - runs before AfterAppLoads BootLoader
54
- def self.init
55
- end
56
-
57
- # Activation hook - runs after AfterAppLoads BootLoader
58
- def self.activate
59
- end
60
-
61
- # Deactivation hook - triggered by Merb::Slices.deactivate(Chefserver)
62
- def self.deactivate
63
- end
64
-
65
- # Setup routes inside the host application
66
- #
67
- # @param scope<Merb::Router::Behaviour>
68
- # Routes will be added within this scope (namespace). In fact, any
69
- # router behaviour is a valid namespace, so you can attach
70
- # routes at any level of your router setup.
71
- #
72
- # @note prefix your named routes with :chefserverslice_
73
- # to avoid potential conflicts with global named routes.
74
- def self.setup_router(scope)
75
-
76
- scope.resources :nodes, :id => /[^\/]+/
77
- scope.resources :clients, :id => /[^\/]+/
78
- scope.resources :roles
79
-
80
- scope.match("/status").to(:controller => "status", :action => "index").name(:status)
81
-
82
- scope.resources :searches, :path => "search", :controller => "search"
83
- scope.match("/search/:search_id/entries", :method => 'get').to(:controller => "search_entries", :action => "index")
84
- scope.match("/search/:search_id/entries", :method => 'post').to(:controller => "search_entries", :action => "create")
85
- scope.match("/search/:search_id/entries/:id", :method => 'get').to(:controller => "search_entries", :action => "show")
86
- scope.match("/search/:search_id/entries/:id", :method => 'put').to(:controller => "search_entries", :action => "create")
87
- scope.match("/search/:search_id/entries/:id", :method => 'post').to(:controller => "search_entries", :action => "update")
88
- scope.match("/search/:search_id/entries/:id", :method => 'delete').to(:controller => "search_entries", :action => "destroy")
89
-
90
- scope.match("/cookbooks/_attribute_files").to(:controller => "cookbooks", :action => "attribute_files")
91
- scope.match("/cookbooks/_recipe_files").to(:controller => "cookbooks", :action => "recipe_files")
92
- scope.match("/cookbooks/_definition_files").to(:controller => "cookbooks", :action => "definition_files")
93
- scope.match("/cookbooks/_library_files").to(:controller => "cookbooks", :action => "library_files")
94
-
95
- scope.match("/cookbooks/:cookbook_id/templates", :cookbook_id => /[\w\.]+/).to(:controller => "cookbook_templates", :action => "index")
96
- scope.match("/cookbooks/:cookbook_id/libraries", :cookbook_id => /[\w\.]+/).to(:controller => "cookbook_libraries", :action => "index")
97
- scope.match("/cookbooks/:cookbook_id/definitions", :cookbook_id => /[\w\.]+/).to(:controller => "cookbook_definitions", :action => "index")
98
- scope.match("/cookbooks/:cookbook_id/recipes", :cookbook_id => /[\w\.]+/).to(:controller => "cookbook_recipes", :action => "index")
99
- scope.match("/cookbooks/:cookbook_id/attributes", :cookbook_id => /[\w\.]+/).to(:controller => "cookbook_attributes", :action => "index")
100
- scope.match("/cookbooks/:cookbook_id/files", :cookbook_id => /[\w\.]+/).to(:controller => "cookbook_files", :action => "index")
101
-
102
- scope.resources :cookbooks
103
- scope.resources :clients
104
-
105
- scope.match("/databags/:databag_id/databag_items", :method => 'get').to(:controller => "databags", :action => "show", :id=>":databag_id")
106
-
107
- scope.resources :databags do |s|
108
- s.resources :databag_items
109
- end
110
-
111
- scope.match('/openid/consumer').to(:controller => 'openid_consumer', :action => 'index').name(:openid_consumer)
112
- scope.match('/openid/consumer/start').to(:controller => 'openid_consumer', :action => 'start').name(:openid_consumer_start)
113
- scope.match('/openid/consumer/login').to(:controller => 'openid_consumer', :action => 'login').name(:openid_consumer_login)
114
- scope.match('/openid/consumer/complete').to(:controller => 'openid_consumer', :action => 'complete').name(:openid_consumer_complete)
115
- scope.match('/openid/consumer/logout').to(:controller => 'openid_consumer', :action => 'logout').name(:openid_consumer_logout)
116
-
117
- scope.match('/login').to(:controller=>'users', :action=>'login').name(:users_login)
118
- scope.match('/logout').to(:controller => 'users', :action => 'logout').name(:users_logout)
119
-
120
- scope.match('/users').to(:controller => 'users', :action => 'index').name(:users)
121
- scope.match('/users/create').to(:controller => 'users', :action => 'create').name(:users_create)
122
- scope.match('/users/start').to(:controller => 'users', :action => 'start').name(:users_start)
123
-
124
- scope.match('/users/login').to(:controller => 'users', :action => 'login').name(:users_login)
125
- scope.match('/users/login_exec').to(:controller => 'users', :action => 'login_exec').name(:users_login_exec)
126
- scope.match('/users/complete').to(:controller => 'users', :action => 'complete').name(:users_complete)
127
- scope.match('/users/logout').to(:controller => 'users', :action => 'logout').name(:users_logout)
128
- scope.match('/users/new').to(:controller => 'users', :action => 'new').name(:users_new)
129
- scope.match('/users/:user_id/edit').to(:controller => 'users', :action => 'edit').name(:users_edit)
130
- scope.match('/users/:user_id').to(:controller => 'users', :action => 'show').name(:users_show)
131
- scope.match('/users/:user_id/delete', :method => 'delete').to(:controller => 'users', :action => 'destroy').name(:users_delete)
132
- scope.match('/users/:user_id/update', :method => 'put').to(:controller => 'users', :action => 'update').name(:users_update)
133
-
134
- scope.match('/').to(:controller => 'nodes', :action =>'index').name(:top)
135
-
136
- # enable slice-level default routes by default
137
- # scope.default_routes
138
- end
139
-
140
- end
141
-
142
- # Setup the slice layout for ChefServerWebui
143
- #
144
- # Use ChefServerWebui.push_path and ChefServerWebui.push_app_path
145
- # to set paths to chefserver-level and app-level paths. Example:
146
- #
147
- # ChefServerWebui.push_path(:application, ChefServerWebui.root)
148
- # ChefServerWebui.push_app_path(:application, Merb.root / 'slices' / 'chefserverslice')
149
- # ...
150
- #
151
- # Any component path that hasn't been set will default to ChefServerWebui.root
152
- #
153
- # Or just call setup_default_structure! to setup a basic Merb MVC structure.
154
- ChefServerWebui.setup_default_structure!
155
- end
1
+ CHEF_SERVER_WEBUI_VERSION = "0.8.11"
2
+ CHEF_SERVER_WEBUI_ROOT = File.expand_path(File.dirname(__FILE__) + '/../')
@@ -0,0 +1,3 @@
1
+ module ChefServerWebui
2
+ VERSION = '0.9.0.a3'
3
+ end
@@ -0,0 +1,22 @@
1
+ // Javascript generated and modified from the tool on http://www.echoecho.com/tooldropdown.htm
2
+ function land(ref, target)
3
+ {
4
+ lowtarget=target.toLowerCase();
5
+ if (lowtarget=="_self") {window.location=loc;}
6
+ else {if (lowtarget=="_top") {top.location=loc;}
7
+ else {if (lowtarget=="_blank") {window.open(loc);}
8
+ else {if (lowtarget=="_parent") {parent.location=loc;}
9
+ else {parent.frames[target].location=loc;};
10
+ }}}
11
+ }
12
+ function jump(menu)
13
+ {
14
+ ref=menu.options[menu.selectedIndex].value;
15
+ splitc=ref.lastIndexOf("*");
16
+ target="";
17
+ if (splitc!=-1)
18
+ {loc=ref.substring(0,splitc);
19
+ target=ref.substring(splitc+1,1000);}
20
+ else {loc=ref; target="_self";};
21
+ if (ref != "") {land(loc,target);}
22
+ }
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-server-webui
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
4
+ prerelease: true
5
5
  segments:
6
6
  - 0
7
- - 8
8
- - 16
9
- version: 0.8.16
7
+ - 9
8
+ - 0
9
+ - a3
10
+ version: 0.9.0.a3
10
11
  platform: ruby
11
12
  authors:
12
13
  - Opscode
@@ -14,95 +15,97 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-05-11 00:00:00 -07:00
18
+ date: 2010-06-04 00:00:00 -07:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
22
+ name: merb-core
21
23
  requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
22
25
  requirements:
23
26
  - - ~>
24
27
  - !ruby/object:Gem::Version
25
28
  segments:
26
29
  - 1
27
30
  - 0
28
- - 0
29
- version: 1.0.0
30
- prerelease: false
31
+ version: "1.0"
31
32
  type: :runtime
32
- name: merb-core
33
+ prerelease: false
33
34
  version_requirements: *id001
34
35
  - !ruby/object:Gem::Dependency
36
+ name: merb-slices
35
37
  requirement: &id002 !ruby/object:Gem::Requirement
38
+ none: false
36
39
  requirements:
37
40
  - - ~>
38
41
  - !ruby/object:Gem::Version
39
42
  segments:
40
43
  - 1
41
44
  - 0
42
- - 0
43
- version: 1.0.0
44
- prerelease: false
45
+ version: "1.0"
45
46
  type: :runtime
46
- name: merb-slices
47
+ prerelease: false
47
48
  version_requirements: *id002
48
49
  - !ruby/object:Gem::Dependency
50
+ name: merb-assets
49
51
  requirement: &id003 !ruby/object:Gem::Requirement
52
+ none: false
50
53
  requirements:
51
54
  - - ~>
52
55
  - !ruby/object:Gem::Version
53
56
  segments:
54
57
  - 1
55
58
  - 0
56
- - 0
57
- version: 1.0.0
58
- prerelease: false
59
+ version: "1.0"
59
60
  type: :runtime
60
- name: merb-assets
61
+ prerelease: false
61
62
  version_requirements: *id003
62
63
  - !ruby/object:Gem::Dependency
64
+ name: merb-helpers
63
65
  requirement: &id004 !ruby/object:Gem::Requirement
66
+ none: false
64
67
  requirements:
65
68
  - - ~>
66
69
  - !ruby/object:Gem::Version
67
70
  segments:
68
71
  - 1
69
72
  - 0
70
- - 0
71
- version: 1.0.0
72
- prerelease: false
73
+ version: "1.0"
73
74
  type: :runtime
74
- name: merb-helpers
75
+ prerelease: false
75
76
  version_requirements: *id004
76
77
  - !ruby/object:Gem::Dependency
78
+ name: merb-haml
77
79
  requirement: &id005 !ruby/object:Gem::Requirement
80
+ none: false
78
81
  requirements:
79
82
  - - ~>
80
83
  - !ruby/object:Gem::Version
81
84
  segments:
82
85
  - 1
83
86
  - 0
84
- - 0
85
- version: 1.0.0
86
- prerelease: false
87
+ version: "1.0"
87
88
  type: :runtime
88
- name: merb-haml
89
+ prerelease: false
89
90
  version_requirements: *id005
90
91
  - !ruby/object:Gem::Dependency
92
+ name: merb-param-protection
91
93
  requirement: &id006 !ruby/object:Gem::Requirement
94
+ none: false
92
95
  requirements:
93
96
  - - ~>
94
97
  - !ruby/object:Gem::Version
95
98
  segments:
96
99
  - 1
97
100
  - 0
98
- - 0
99
- version: 1.0.0
100
- prerelease: false
101
+ version: "1.0"
101
102
  type: :runtime
102
- name: merb-param-protection
103
+ prerelease: false
103
104
  version_requirements: *id006
104
105
  - !ruby/object:Gem::Dependency
106
+ name: json
105
107
  requirement: &id007 !ruby/object:Gem::Requirement
108
+ none: false
106
109
  requirements:
107
110
  - - <=
108
111
  - !ruby/object:Gem::Version
@@ -111,62 +114,65 @@ dependencies:
111
114
  - 4
112
115
  - 2
113
116
  version: 1.4.2
114
- prerelease: false
115
117
  type: :runtime
116
- name: json
118
+ prerelease: false
117
119
  version_requirements: *id007
118
120
  - !ruby/object:Gem::Dependency
121
+ name: thin
119
122
  requirement: &id008 !ruby/object:Gem::Requirement
123
+ none: false
120
124
  requirements:
121
125
  - - ">="
122
126
  - !ruby/object:Gem::Version
123
127
  segments:
124
128
  - 0
125
129
  version: "0"
126
- prerelease: false
127
130
  type: :runtime
128
- name: thin
131
+ prerelease: false
129
132
  version_requirements: *id008
130
133
  - !ruby/object:Gem::Dependency
134
+ name: haml
131
135
  requirement: &id009 !ruby/object:Gem::Requirement
136
+ none: false
132
137
  requirements:
133
138
  - - ">="
134
139
  - !ruby/object:Gem::Version
135
140
  segments:
136
141
  - 0
137
142
  version: "0"
138
- prerelease: false
139
143
  type: :runtime
140
- name: haml
144
+ prerelease: false
141
145
  version_requirements: *id009
142
146
  - !ruby/object:Gem::Dependency
147
+ name: ruby-openid
143
148
  requirement: &id010 !ruby/object:Gem::Requirement
149
+ none: false
144
150
  requirements:
145
151
  - - ">="
146
152
  - !ruby/object:Gem::Version
147
153
  segments:
148
154
  - 0
149
155
  version: "0"
150
- prerelease: false
151
156
  type: :runtime
152
- name: ruby-openid
157
+ prerelease: false
153
158
  version_requirements: *id010
154
159
  - !ruby/object:Gem::Dependency
160
+ name: coderay
155
161
  requirement: &id011 !ruby/object:Gem::Requirement
162
+ none: false
156
163
  requirements:
157
164
  - - ">="
158
165
  - !ruby/object:Gem::Version
159
166
  segments:
160
167
  - 0
161
168
  version: "0"
162
- prerelease: false
163
169
  type: :runtime
164
- name: coderay
170
+ prerelease: false
165
171
  version_requirements: *id011
166
172
  description: A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.
167
173
  email: chef@opscode.com
168
- executables: []
169
-
174
+ executables:
175
+ - chef-server-webui
170
176
  extensions: []
171
177
 
172
178
  extra_rdoc_files:
@@ -177,11 +183,14 @@ files:
177
183
  - README.rdoc
178
184
  - Rakefile
179
185
  - config.ru
186
+ - bin/chef-server-webui
180
187
  - config/init.rb
188
+ - config/rack.rb
181
189
  - config/router.rb
182
190
  - lib/chef-server-webui/merbtasks.rb
183
191
  - lib/chef-server-webui/slicetasks.rb
184
192
  - lib/chef-server-webui/spectasks.rb
193
+ - lib/chef-server-webui/version.rb
185
194
  - lib/chef-server-webui.rb
186
195
  - app/controllers/application.rb
187
196
  - app/controllers/clients.rb
@@ -248,7 +257,7 @@ files:
248
257
  - app/views/exceptions/not_found.html.erb
249
258
  - app/views/exceptions/standard_error.html.erb
250
259
  - app/views/layout/_jsonedit.html.haml
251
- - app/views/layout/chef_server_webui.html.haml
260
+ - app/views/layout/application.html.haml
252
261
  - app/views/layout/login.html.haml
253
262
  - app/views/main/index.html.erb
254
263
  - app/views/nodes/_action.html.haml
@@ -336,6 +345,7 @@ files:
336
345
  - public/images/treeBuilderImages/Thumbs.db
337
346
  - public/images/treeBuilderImages/vertLine.gif
338
347
  - public/javascripts/chef.js
348
+ - public/javascripts/drop_down_menu.js
339
349
  - public/javascripts/jquery-1.3.2.min.js
340
350
  - public/javascripts/jquery-ui-1.7.1.custom.min.js
341
351
  - public/javascripts/jquery.editinline.js
@@ -377,8 +387,6 @@ files:
377
387
  - public/stylesheets/themes/kathleene/style.css
378
388
  - public/stylesheets/themes/orange/style.css
379
389
  - public/stylesheets/themes/reidb-greenish/style.css
380
- - stubs/app/controllers/application.rb
381
- - stubs/app/controllers/main.rb
382
390
  has_rdoc: true
383
391
  homepage: http://wiki.opscode.com/display/chef
384
392
  licenses: []
@@ -389,6 +397,7 @@ rdoc_options: []
389
397
  require_paths:
390
398
  - lib
391
399
  required_ruby_version: !ruby/object:Gem::Requirement
400
+ none: false
392
401
  requirements:
393
402
  - - ">="
394
403
  - !ruby/object:Gem::Version
@@ -396,16 +405,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
396
405
  - 0
397
406
  version: "0"
398
407
  required_rubygems_version: !ruby/object:Gem::Requirement
408
+ none: false
399
409
  requirements:
400
- - - ">="
410
+ - - ">"
401
411
  - !ruby/object:Gem::Version
402
412
  segments:
403
- - 0
404
- version: "0"
413
+ - 1
414
+ - 3
415
+ - 1
416
+ version: 1.3.1
405
417
  requirements: []
406
418
 
407
419
  rubyforge_project:
408
- rubygems_version: 1.3.6
420
+ rubygems_version: 1.3.7
409
421
  signing_key:
410
422
  specification_version: 3
411
423
  summary: A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.