chef-server-webui 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +201 -0
- data/README.rdoc +135 -0
- data/Rakefile +62 -0
- data/app/controllers/application.rb +281 -0
- data/app/controllers/clients.rb +120 -0
- data/app/controllers/cookbook_attributes.rb +41 -0
- data/app/controllers/cookbook_definitions.rb +41 -0
- data/app/controllers/cookbook_files.rb +39 -0
- data/app/controllers/cookbook_libraries.rb +41 -0
- data/app/controllers/cookbook_recipes.rb +40 -0
- data/app/controllers/cookbook_templates.rb +57 -0
- data/app/controllers/cookbooks.rb +78 -0
- data/app/controllers/databag_items.rb +102 -0
- data/app/controllers/databags.rb +83 -0
- data/app/controllers/exceptions.rb +19 -0
- data/app/controllers/main.rb +7 -0
- data/app/controllers/nodes.rb +138 -0
- data/app/controllers/openid_consumer.rb +154 -0
- data/app/controllers/roles.rb +144 -0
- data/app/controllers/search.rb +62 -0
- data/app/controllers/search_entries.rb +64 -0
- data/app/controllers/status.rb +39 -0
- data/app/controllers/users.rb +186 -0
- data/app/helpers/application_helper.rb +171 -0
- data/app/helpers/cookbook_attributes_helper.rb +7 -0
- data/app/helpers/cookbook_definitions_helper.rb +8 -0
- data/app/helpers/cookbook_files_helper.rb +8 -0
- data/app/helpers/cookbook_libraries_helper.rb +7 -0
- data/app/helpers/cookbook_recipes_helper.rb +8 -0
- data/app/helpers/cookbook_templates_helper.rb +8 -0
- data/app/helpers/exceptions_helper.rb +6 -0
- data/app/helpers/global_helpers.rb +35 -0
- data/app/helpers/nodes_helper.rb +41 -0
- data/app/helpers/openid_consumer_helper.rb +8 -0
- data/app/helpers/openid_register_helper.rb +8 -0
- data/app/helpers/openid_server_helper.rb +6 -0
- data/app/helpers/openid_server_helpers.rb +29 -0
- data/app/helpers/roles_helper.rb +5 -0
- data/app/helpers/search_entries_helper.rb +8 -0
- data/app/helpers/search_helper.rb +38 -0
- data/app/helpers/status_helper.rb +26 -0
- data/app/views/clients/_form.html.haml +22 -0
- data/app/views/clients/_navigation.html.haml +9 -0
- data/app/views/clients/edit.html.haml +6 -0
- data/app/views/clients/index.html.haml +21 -0
- data/app/views/clients/new.html.haml +6 -0
- data/app/views/clients/show.html.haml +20 -0
- data/app/views/cookbooks/index.html.haml +10 -0
- data/app/views/cookbooks/show.html.haml +40 -0
- data/app/views/databag_items/_form.html.haml +14 -0
- data/app/views/databag_items/_navigation.html.haml +9 -0
- data/app/views/databag_items/edit.html.haml +6 -0
- data/app/views/databag_items/index.html.haml +0 -0
- data/app/views/databag_items/new.html.haml +6 -0
- data/app/views/databag_items/show.html.haml +9 -0
- data/app/views/databags/_form.html.haml +12 -0
- data/app/views/databags/_item_navigation.html.haml +8 -0
- data/app/views/databags/_navigation.html.haml +9 -0
- data/app/views/databags/edit.html.haml +6 -0
- data/app/views/databags/index.html.haml +19 -0
- data/app/views/databags/new.html.haml +6 -0
- data/app/views/databags/show.html.haml +19 -0
- data/app/views/exceptions/bad_request.json.erb +1 -0
- data/app/views/exceptions/internal_server_error.html.erb +216 -0
- data/app/views/exceptions/not_acceptable.html.erb +63 -0
- data/app/views/exceptions/not_found.html.erb +47 -0
- data/app/views/exceptions/standard_error.html.erb +217 -0
- data/app/views/layout/_jsonedit.html.haml +82 -0
- data/app/views/layout/chef_server_webui.html.haml +56 -0
- data/app/views/layout/login.html.haml +36 -0
- data/app/views/main/index.html.erb +1 -0
- data/app/views/nodes/_action.html.haml +13 -0
- data/app/views/nodes/_form.html.haml +53 -0
- data/app/views/nodes/_navigation.html.haml +9 -0
- data/app/views/nodes/_resource.html.haml +22 -0
- data/app/views/nodes/edit.html.haml +7 -0
- data/app/views/nodes/index.html.haml +25 -0
- data/app/views/nodes/new.html.haml +6 -0
- data/app/views/nodes/show.html.haml +60 -0
- data/app/views/openid_consumer/index.html.haml +28 -0
- data/app/views/openid_consumer/start.html.haml +4 -0
- data/app/views/openid_login/index.html.haml +5 -0
- data/app/views/openid_register/index.html.haml +19 -0
- data/app/views/openid_register/show.html.haml +7 -0
- data/app/views/roles/_form.html.haml +53 -0
- data/app/views/roles/_navigation.html.haml +9 -0
- data/app/views/roles/edit.html.haml +6 -0
- data/app/views/roles/index.html.haml +21 -0
- data/app/views/roles/new.html.haml +6 -0
- data/app/views/roles/show.html.haml +54 -0
- data/app/views/search/_search_form.html.haml +6 -0
- data/app/views/search/index.html.haml +8 -0
- data/app/views/search/show.html.haml +13 -0
- data/app/views/search_entries/index.html.haml +8 -0
- data/app/views/search_entries/show.html.haml +7 -0
- data/app/views/status/index.html.haml +90 -0
- data/app/views/users/_form.html.haml +39 -0
- data/app/views/users/_navigation.html.haml +9 -0
- data/app/views/users/edit.html.haml +6 -0
- data/app/views/users/index.html.haml +20 -0
- data/app/views/users/login.html.haml +16 -0
- data/app/views/users/new.html.haml +27 -0
- data/app/views/users/show.html.haml +13 -0
- data/app/views/users/start.html.haml +4 -0
- data/config.ru +84 -0
- data/config/init.rb +49 -0
- data/config/router.rb +6 -0
- data/lib/chef-server-webui.rb +155 -0
- data/lib/chef-server-webui/merbtasks.rb +103 -0
- data/lib/chef-server-webui/slicetasks.rb +20 -0
- data/lib/chef-server-webui/spectasks.rb +53 -0
- data/public/facebox/README.txt +4 -0
- data/public/facebox/b.png +0 -0
- data/public/facebox/bl.png +0 -0
- data/public/facebox/br.png +0 -0
- data/public/facebox/closelabel.gif +0 -0
- data/public/facebox/facebox.css +95 -0
- data/public/facebox/facebox.js +319 -0
- data/public/facebox/loading.gif +0 -0
- data/public/facebox/tl.png +0 -0
- data/public/facebox/tr.png +0 -0
- data/public/images/avatar.png +0 -0
- data/public/images/black_big.png +0 -0
- data/public/images/indicator.gif +0 -0
- data/public/images/jsonedit/add2.png +0 -0
- data/public/images/jsonedit/build-button.png +0 -0
- data/public/images/jsonedit/bullet.gif +0 -0
- data/public/images/jsonedit/bullet_orange.png +0 -0
- data/public/images/jsonedit/cross.png +0 -0
- data/public/images/jsonedit/delete.png +0 -0
- data/public/images/jsonedit/deleted.png +0 -0
- data/public/images/jsonedit/json.jpg +0 -0
- data/public/images/jsonedit/label.gif +0 -0
- data/public/images/jsonedit/minus.gif +0 -0
- data/public/images/jsonedit/pixel.gif +0 -0
- data/public/images/jsonedit/plus.gif +0 -0
- data/public/images/jsonedit/saved.png +0 -0
- data/public/images/jsonedit/table_refresh.png +0 -0
- data/public/images/jsonedit/value.gif +0 -0
- data/public/images/merb.jpg +0 -0
- data/public/images/toggle-collapse-dark.png +0 -0
- data/public/images/toggle-collapse-light.png +0 -0
- data/public/images/toggle-collapse.gif +0 -0
- data/public/images/toggle-expand-dark.png +0 -0
- data/public/images/toggle-expand-light.png +0 -0
- data/public/images/toggle-expand.gif +0 -0
- data/public/images/treeBuilderImages/Thumbs.db +0 -0
- data/public/images/treeBuilderImages/doc.gif +0 -0
- data/public/images/treeBuilderImages/docNode.gif +0 -0
- data/public/images/treeBuilderImages/docNodeLast.gif +0 -0
- data/public/images/treeBuilderImages/docNodeLastFirst.gif +0 -0
- data/public/images/treeBuilderImages/folder.gif +0 -0
- data/public/images/treeBuilderImages/folderNode.gif +0 -0
- data/public/images/treeBuilderImages/folderNodeFirst.gif +0 -0
- data/public/images/treeBuilderImages/folderNodeLast.gif +0 -0
- data/public/images/treeBuilderImages/folderNodeLastFirst.gif +0 -0
- data/public/images/treeBuilderImages/folderNodeOpen.gif +0 -0
- data/public/images/treeBuilderImages/folderNodeOpenFirst.gif +0 -0
- data/public/images/treeBuilderImages/folderNodeOpenLast.gif +0 -0
- data/public/images/treeBuilderImages/folderNodeOpenLastFirst.gif +0 -0
- data/public/images/treeBuilderImages/folderOpen.gif +0 -0
- data/public/images/treeBuilderImages/vertLine.gif +0 -0
- data/public/javascripts/chef.js +160 -0
- data/public/javascripts/jquery-1.3.2.min.js +19 -0
- data/public/javascripts/jquery-ui-1.7.1.custom.min.js +65 -0
- data/public/javascripts/jquery.editinline.js +108 -0
- data/public/javascripts/jquery.jeditable.mini.js +30 -0
- data/public/javascripts/jquery.livequery.js +250 -0
- data/public/javascripts/jquery.localscroll.js +104 -0
- data/public/javascripts/jquery.scrollTo.js +150 -0
- data/public/javascripts/jquery.tools.min.js +17 -0
- data/public/javascripts/jquery.treeTable.min.js +165 -0
- data/public/javascripts/json.js +153 -0
- data/public/javascripts/jsonedit_main.js +675 -0
- data/public/javascripts/yetii-min.js +1 -0
- data/public/stylesheets/base.css +336 -0
- data/public/stylesheets/chef.css +157 -0
- data/public/stylesheets/images/ui-bg_diagonals-small_0_aaaaaa_40x40.png +0 -0
- data/public/stylesheets/images/ui-bg_diagonals-thick_15_444444_40x40.png +0 -0
- data/public/stylesheets/images/ui-bg_glass_100_f0f0f0_1x400.png +0 -0
- data/public/stylesheets/images/ui-bg_glass_50_99c2ff_1x400.png +0 -0
- data/public/stylesheets/images/ui-bg_glass_55_fbf5d0_1x400.png +0 -0
- data/public/stylesheets/images/ui-bg_glass_80_e6e6e6_1x400.png +0 -0
- data/public/stylesheets/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/public/stylesheets/images/ui-bg_highlight-hard_100_f9f9f9_1x100.png +0 -0
- data/public/stylesheets/images/ui-bg_highlight-soft_100_e7eef3_1x100.png +0 -0
- data/public/stylesheets/images/ui-icons_222222_256x240.png +0 -0
- data/public/stylesheets/images/ui-icons_2694e8_256x240.png +0 -0
- data/public/stylesheets/images/ui-icons_2e83ff_256x240.png +0 -0
- data/public/stylesheets/images/ui-icons_72a7cf_256x240.png +0 -0
- data/public/stylesheets/images/ui-icons_888888_256x240.png +0 -0
- data/public/stylesheets/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/public/stylesheets/images/ui-icons_ffffff_256x240.png +0 -0
- data/public/stylesheets/jquery-ui-1.7.1.custom.css +404 -0
- data/public/stylesheets/jquery.treeTable.css +43 -0
- data/public/stylesheets/jsonedit_main.css +280 -0
- data/public/stylesheets/themes/bec-green/style.css +290 -0
- data/public/stylesheets/themes/bec/style.css +301 -0
- data/public/stylesheets/themes/blue/style.css +280 -0
- data/public/stylesheets/themes/default/style.css +267 -0
- data/public/stylesheets/themes/djime-cerulean/style.css +298 -0
- data/public/stylesheets/themes/kathleene/style.css +272 -0
- data/public/stylesheets/themes/orange/style.css +263 -0
- data/public/stylesheets/themes/reidb-greenish/style.css +301 -0
- data/stubs/app/controllers/application.rb +2 -0
- data/stubs/app/controllers/main.rb +2 -0
- metadata +399 -0
@@ -0,0 +1,22 @@
|
|
1
|
+
.content
|
2
|
+
.inner
|
3
|
+
- if form_for != "edit"
|
4
|
+
%div.group.form
|
5
|
+
%label.label Name
|
6
|
+
= text_field :id => "client_name", :name => "name", :class => "text_field", :value => params.has_key?(:name) ? h(params[:name]) : @client.name
|
7
|
+
%span.description The name of the Client
|
8
|
+
|
9
|
+
- if form_for == "edit"
|
10
|
+
%div.group.form
|
11
|
+
%label.label Private Key
|
12
|
+
= check_box :name => "regen_private_key", :label => "Regenerate Private Key (Existing one will no longer work!)", :value => "1"
|
13
|
+
%br
|
14
|
+
|
15
|
+
%div.group.form
|
16
|
+
%label.label Admin
|
17
|
+
= check_box :id => "client_admin", :name => "admin", :value => "true", :label => "Whether or not the Client is an admin", :checked => @client.admin
|
18
|
+
|
19
|
+
= form(:action => form_url, :method => :post, :id => form_id, :class => 'form') do
|
20
|
+
%div.group
|
21
|
+
.actions-bar
|
22
|
+
.actions= submit submit_name, :id => submit_id, :class => 'button'
|
@@ -0,0 +1,9 @@
|
|
1
|
+
.secondary-navigation
|
2
|
+
%ul
|
3
|
+
%li{ :class => "first #{active == 'index' ? "active" : ''}"}= link_to('List', slice_url(:clients))
|
4
|
+
%li{ :class => (active == 'create' ? "active" : '')}= link_to('Create', slice_url(:new_client))
|
5
|
+
- if active != 'create' && active != 'index'
|
6
|
+
%li{ :class => (active == 'show' ? "active" : '')}= link_to('Show', slice_url(:client, @client.name))
|
7
|
+
%li{ :class => (active == 'edit' ? "active" : '')}= link_to('Edit', slice_url(:edit_client, @client.name))
|
8
|
+
%li= link_to('Delete', slice_url(:client, @client.name), :method => "delete", :confirm => "Really delete Role #{@client.name}? There is no undo.")
|
9
|
+
.clear
|
@@ -0,0 +1,6 @@
|
|
1
|
+
.block#block-tables
|
2
|
+
.content
|
3
|
+
%h2.title= "Client: #{h @client.name}"
|
4
|
+
.inner
|
5
|
+
= partial('navigation', :active => 'edit')
|
6
|
+
= partial('form', :header => "Edit Client #{@client.name}", :form_id => 'edit_client', :submit_name => "Save Client", :submit_id => "edit_client_button", :form_for => 'edit', :form_url => slice_url(:client, @client.name) )
|
@@ -0,0 +1,21 @@
|
|
1
|
+
.block#block-tables
|
2
|
+
.content
|
3
|
+
%h2.title Clients
|
4
|
+
.inner
|
5
|
+
= partial('navigation', :active => 'index')
|
6
|
+
.content
|
7
|
+
.inner
|
8
|
+
%table.table
|
9
|
+
%tr
|
10
|
+
%th.first{:colspan => 2} Name
|
11
|
+
%th
|
12
|
+
%th.last
|
13
|
+
- even = false;
|
14
|
+
- @clients_list.each do |client|
|
15
|
+
%tr{ :class => even ? "even" : "odd" }
|
16
|
+
%td{:colspan => 2}= link_to(client[0], slice_url(:client, client[0]))
|
17
|
+
%td
|
18
|
+
= link_to('Edit', slice_url(:edit_client, client[0]))
|
19
|
+
|
|
20
|
+
= link_to('Delete', slice_url(:client, client[0]), :method => "delete", :confirm => "Really delete Role #{client[0]}? there is no undo.")
|
21
|
+
- even ? even = false: even = true
|
@@ -0,0 +1,6 @@
|
|
1
|
+
.block#block-tables
|
2
|
+
.content
|
3
|
+
%h2.title= "Client"
|
4
|
+
.inner
|
5
|
+
= partial('navigation', :active => 'create')
|
6
|
+
= partial('form', :header => "Create new Client", :form_id => 'create_client', :submit_name => "Create Client", :submit_id => "create_client_button", :form_for => 'create', :form_url => slice_url(:clients))
|
@@ -0,0 +1,20 @@
|
|
1
|
+
.block#block-tables
|
2
|
+
.content
|
3
|
+
%h2.title= "Client: #{h @client.name}"
|
4
|
+
.inner
|
5
|
+
= partial("navigation", :active => "show")
|
6
|
+
.content
|
7
|
+
.inner
|
8
|
+
.left
|
9
|
+
%h3 Admin
|
10
|
+
= @client.admin
|
11
|
+
.left
|
12
|
+
%h3 Public Key
|
13
|
+
%pre= convert_newline_to_br(@client.public_key)
|
14
|
+
-unless @private_key.nil?
|
15
|
+
.left
|
16
|
+
%h3 Private Key (Will not show again, Please copy!)
|
17
|
+
%h4.bold Please copy and save as the client's validation key (e.g. client.pem)
|
18
|
+
%pre= convert_newline_to_br(@private_key)
|
19
|
+
|
20
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
.block#block-tables
|
2
|
+
.content
|
3
|
+
%h2.title Cookbooks
|
4
|
+
.inner
|
5
|
+
%table.table
|
6
|
+
%tr
|
7
|
+
%th.first Cookbook Name
|
8
|
+
- @cl.sort.each_with_index do |cookbook, index|
|
9
|
+
%tr{:class => "#{index % 2 == 1 ? 'odd' : 'even'}"}
|
10
|
+
%td= link_to cookbook[0], slice_url(:cookbook, { :id => cookbook[0] })
|
@@ -0,0 +1,40 @@
|
|
1
|
+
.block#block-text
|
2
|
+
.content
|
3
|
+
%h2.title= "Cookbook: #{h @cookbook["name"]}"
|
4
|
+
.inner
|
5
|
+
.accordion
|
6
|
+
- unless @cookbook["libraries"].empty?
|
7
|
+
%h2.head= link_to "Library Files", "#"
|
8
|
+
.files
|
9
|
+
- @cookbook["libraries"].each do |f|
|
10
|
+
.code
|
11
|
+
%h4.head= link_to File.basename(f["name"]), "#"
|
12
|
+
%pre.ruby= syntax_highlight(get_file(f["uri"]))
|
13
|
+
- unless @cookbook["attributes"].empty?
|
14
|
+
%h2.head= link_to "Attribute Files", "#"
|
15
|
+
.files
|
16
|
+
- @cookbook["attributes"].each do |f|
|
17
|
+
.code
|
18
|
+
%h4.head= link_to File.basename(f["name"]), "#"
|
19
|
+
%pre.ruby= syntax_highlight(get_file(f["uri"]))
|
20
|
+
- unless @cookbook["definitions"].empty?
|
21
|
+
%h2.head= link_to "Definition Files", "#"
|
22
|
+
.files
|
23
|
+
- @cookbook["definitions"].each do |f|
|
24
|
+
.code
|
25
|
+
%h4.head= link_to File.basename(f["name"]), "#"
|
26
|
+
%pre.ruby= syntax_highlight(get_file(f["uri"]))
|
27
|
+
- unless @cookbook["recipes"].empty?
|
28
|
+
%h2.head= link_to "Recipe Files", "#"
|
29
|
+
.files
|
30
|
+
- @cookbook["recipes"].each do |f|
|
31
|
+
.code
|
32
|
+
%h4.head= link_to File.basename(f["name"]), "#"
|
33
|
+
%pre.ruby= syntax_highlight(get_file(f["uri"]))
|
34
|
+
- unless @cookbook["templates"].empty?
|
35
|
+
%h2.head= link_to "Template Files", "#"
|
36
|
+
.files
|
37
|
+
- @cookbook["templates"].each do |f|
|
38
|
+
.code
|
39
|
+
%h4.head= link_to File.basename(f["name"]), "#"
|
40
|
+
%pre.ruby= syntax_highlight(get_file(f["uri"]))
|
@@ -0,0 +1,14 @@
|
|
1
|
+
.content
|
2
|
+
.inner
|
3
|
+
%div.group.form
|
4
|
+
%label.label Data
|
5
|
+
%div.group.form{:style => "position:relative;"}
|
6
|
+
%label.label Attributes
|
7
|
+
= partial '../layout/jsonedit', :json =>@default_data.to_json
|
8
|
+
|
9
|
+
|
10
|
+
= form(:action => form_url, :method => :post, :id => form_id, :class => 'form') do
|
11
|
+
%div.group
|
12
|
+
.actions-bar
|
13
|
+
.actions= submit submit_name, :id => submit_id, :class => 'button'
|
14
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
.secondary-navigation
|
2
|
+
%ul
|
3
|
+
%li{ :class => "first #{active == 'index' ? "active" : ''}"}= link_to('List', slice_url(:databag_databag_items, :databag_id=>@databag_name))
|
4
|
+
%li{ :class => (active == 'create' ? "active" : '')}= link_to('Create', slice_url(:new_databag_databag_item, :databag_id => @databag_name))
|
5
|
+
- if active != 'create' && active != 'index'
|
6
|
+
%li{ :class => (active == 'show' ? "active" : '')}= link_to('Show', slice_url(:databag_databag_item, :id => @databag_item_name, :databag_id=>@databag_name))
|
7
|
+
%li{ :class => (active == 'edit' ? "active" : '')}= link_to('Edit', slice_url(:edit_databag_databag_item, :id => @databag_item_name, :databag_id=>@databag_name))
|
8
|
+
%li= link_to('Delete', slice_url(:databag_databag_item, :id => @databag_item_name, :databag_id=>@databag_name), :method => "delete", :confirm => "Really delete Databag Item #{@databag_item_name}? There is no undo.")
|
9
|
+
.clear
|
@@ -0,0 +1,6 @@
|
|
1
|
+
.block#block-tables
|
2
|
+
.content
|
3
|
+
%h2.title= "Databag Item"
|
4
|
+
.inner
|
5
|
+
= partial('navigation', :active => 'edit')
|
6
|
+
= partial('form', :header => "Edit Databag Item", :form_id => 'edit_databag_item', :submit_name => "Edit Databag Item", :submit_id => "edit_databag_item_button", :form_for => 'edit', :form_url => slice_url(:databag_databag_item, :databag_id=>params[:databag_id], :id=>params[:id]))
|
File without changes
|
@@ -0,0 +1,6 @@
|
|
1
|
+
.block#block-tables
|
2
|
+
.content
|
3
|
+
%h2.title= "Databag Item"
|
4
|
+
.inner
|
5
|
+
= partial('navigation', :active => 'create')
|
6
|
+
= partial('form', :header => "Create new Databag Item", :form_id => 'create_databag_item', :submit_name => "Create Databag Item", :submit_id => "create_databag_item_button", :form_for => 'create', :form_url => slice_url(:databag_databag_items))
|
@@ -0,0 +1,12 @@
|
|
1
|
+
.content
|
2
|
+
.inner
|
3
|
+
%div.group.form
|
4
|
+
%label.label Name
|
5
|
+
= text_field :id => "databag_name", :name => "name", :class => "text_field", :value => params.has_key?(:id) ? h(params[:id]) : @databag.name
|
6
|
+
%span.description The name of the Databag
|
7
|
+
|
8
|
+
= form(:action => form_url, :method => :post, :id => form_id, :class => 'form') do
|
9
|
+
%div.group
|
10
|
+
.actions-bar
|
11
|
+
.actions= submit submit_name, :id => submit_id, :class => 'button'
|
12
|
+
|
@@ -0,0 +1,8 @@
|
|
1
|
+
.secondary-navigation
|
2
|
+
%ul
|
3
|
+
%li{ :class => "first #{active == 'index' ? "active" : ''}"}= link_to('List', slice_url(:databags))
|
4
|
+
%li{ :class => (active == 'create_item' ? "active" : '')}= link_to('Create Item', slice_url(:new_databag_databag_item, :databag_id => @databag_name))
|
5
|
+
- if active != 'create' && active != 'index'
|
6
|
+
%li{ :class => (active == 'show' ? "active" : '')}= link_to('Show', slice_url(:databag, :id => params[:id]))
|
7
|
+
%li= link_to('Delete', slice_url(:databag, :id => params[:id]), :method => "delete", :confirm => "Really delete Databag #{params[:id]}? There is no undo.")
|
8
|
+
.clear
|
@@ -0,0 +1,9 @@
|
|
1
|
+
.secondary-navigation
|
2
|
+
%ul
|
3
|
+
%li{ :class => "first #{active == 'index' ? "active" : ''}"}= link_to('List', slice_url(:databags))
|
4
|
+
%li{ :class => (active == 'create' ? "active" : '')}= link_to('Create', slice_url(:new_databag))
|
5
|
+
- if active != 'create' && active != 'index'
|
6
|
+
%li{ :class => (active == 'show' ? "active" : '')}= link_to('Show', slice_url(:databag, @databag_name))
|
7
|
+
%li{ :class => (active == 'edit' ? "active" : '')}= link_to('Edit', slice_url(:edit_databag, @databag_name))
|
8
|
+
%li= link_to('Delete', slice_url(:databag, @databag_name), :method => "delete", :confirm => "Really delete Databag #{@databag_name}? There is no undo.")
|
9
|
+
.clear
|
@@ -0,0 +1,6 @@
|
|
1
|
+
.block#block-tables
|
2
|
+
.content
|
3
|
+
%h2.title= "Databag: #{params[:id]}"
|
4
|
+
.inner
|
5
|
+
= partial('navigation', :active => 'edit')
|
6
|
+
= partial('form', :header => "Edit Databag", :form_id => 'edit_databag', :submit_name => "Edit Databag", :submit_id => "edit_databag_button", :form_for => 'edit', :form_url => slice_url(:databag, :databag_id=>params[:id]))
|
@@ -0,0 +1,19 @@
|
|
1
|
+
.block#block-tables
|
2
|
+
.content
|
3
|
+
%h2.title Databags
|
4
|
+
.inner
|
5
|
+
= partial('navigation', :active => 'index')
|
6
|
+
.content
|
7
|
+
.inner
|
8
|
+
%table.table
|
9
|
+
%tr
|
10
|
+
%th.first{:colspan => 2} Databag Name
|
11
|
+
%th
|
12
|
+
%th.last
|
13
|
+
- @databags.sort.each_with_index do |databag, index|
|
14
|
+
%tr{:class => "#{index % 2 == 1 ? 'odd' : 'even'}"}
|
15
|
+
%td{:colspan => 2}= link_to databag[0], slice_url(:databag, { :id => databag[0] })
|
16
|
+
%td
|
17
|
+
= link_to('Edit', slice_url(:databag, :id => databag[0]))
|
18
|
+
|
|
19
|
+
= link_to('Delete', slice_url(:databag, :id => databag[0]), :method => "delete", :confirm => "Really delete Databag #{databag[0]}? There is no undo.")
|
@@ -0,0 +1,6 @@
|
|
1
|
+
.block#block-tables
|
2
|
+
.content
|
3
|
+
%h2.title= "Databag"
|
4
|
+
.inner
|
5
|
+
= partial('navigation', :active => 'create')
|
6
|
+
= partial('form', :header => "Create new Databag", :form_id => 'create_databag', :submit_name => "Create Databag", :submit_id => "create_databag_button", :form_for => 'create', :form_url => slice_url(:databags))
|
@@ -0,0 +1,19 @@
|
|
1
|
+
.block#block-text
|
2
|
+
.content
|
3
|
+
%h2.title= "Databag: #{@databag_name}"
|
4
|
+
.inner
|
5
|
+
= partial('item_navigation', :active => 'show')
|
6
|
+
.content
|
7
|
+
.inner
|
8
|
+
%table.table
|
9
|
+
%tr
|
10
|
+
%th.first{:colspan => 2} Databag Items
|
11
|
+
%th
|
12
|
+
%th.last
|
13
|
+
- @databag.sort.each_with_index do |databag_item_uri, index|
|
14
|
+
%tr{:class => "#{index % 2 == 1 ? 'odd' : 'even'}"}
|
15
|
+
%td{:colspan => 2}= link_to databag_item_uri[0], slice_url(:databag_databag_item, :id => databag_item_uri[0], :databag_id => @databag_name)
|
16
|
+
%td
|
17
|
+
= link_to('Edit', slice_url(:edit_databag_databag_item, :id => databag_item_uri[0], :databag_id => @databag_name))
|
18
|
+
|
|
19
|
+
= link_to('Delete', slice_url(:databag_databag_item, :id => databag_item_uri[0], :databag_id => @databag_name), :method => "delete", :confirm => "Really delete Databag Item #{databag_item_uri[0]}? There is no undo.")
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= { :error => params[:exception], :code => 400 }.to_json %>
|
@@ -0,0 +1,216 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
4
|
+
<title><%= @exception_name %></title>
|
5
|
+
<style type="text/css" media="screen">
|
6
|
+
body {
|
7
|
+
font-family:arial;
|
8
|
+
font-size:11px;
|
9
|
+
}
|
10
|
+
h1 {
|
11
|
+
font-size:48px;
|
12
|
+
letter-spacing:-4px;
|
13
|
+
margin:0;
|
14
|
+
line-height:36px;
|
15
|
+
color:#333;
|
16
|
+
}
|
17
|
+
h1 sup {
|
18
|
+
font-size: 0.5em;
|
19
|
+
}
|
20
|
+
h1 sup.error_500, h1 sup.error_400 {
|
21
|
+
color:#990E05;
|
22
|
+
}
|
23
|
+
h1 sup.error_100, h1 sup.error_200 {
|
24
|
+
color:#00BF10;
|
25
|
+
}
|
26
|
+
h1 sup.error_300 {
|
27
|
+
/* pretty sure you cant 'see' status 300
|
28
|
+
errors but if you could I think they
|
29
|
+
would be blue */
|
30
|
+
color:#1B2099;
|
31
|
+
}
|
32
|
+
h2 {
|
33
|
+
font-size:36px;
|
34
|
+
letter-spacing:-3px;
|
35
|
+
margin:0;
|
36
|
+
line-height:28px;
|
37
|
+
color:#444;
|
38
|
+
}
|
39
|
+
a, a:visited {
|
40
|
+
color:#00BF10;
|
41
|
+
}
|
42
|
+
.internalError {
|
43
|
+
width:800px;
|
44
|
+
margin:50px auto;
|
45
|
+
}
|
46
|
+
.header {
|
47
|
+
border-bottom:10px solid #333;
|
48
|
+
margin-bottom:1px;
|
49
|
+
background-image: url("data:image/gif;base64,R0lGODlhAwADAIAAAP///8zMzCH5BAAAAAAALAAAAAADAAMAAAIEBHIJBQA7");
|
50
|
+
padding:20px;
|
51
|
+
}
|
52
|
+
table.trace {
|
53
|
+
width:100%;
|
54
|
+
font-family:courier, monospace;
|
55
|
+
letter-spacing:-1px;
|
56
|
+
border-collapse: collapse;
|
57
|
+
border-spacing:0;
|
58
|
+
}
|
59
|
+
table.trace tr td{
|
60
|
+
padding:0;
|
61
|
+
height:26px;
|
62
|
+
font-size:13px;
|
63
|
+
vertical-align:middle;
|
64
|
+
}
|
65
|
+
table.trace tr.file{
|
66
|
+
border-top:2px solid #fff;
|
67
|
+
background-color:#F3F3F3;
|
68
|
+
}
|
69
|
+
table.trace tr.source {
|
70
|
+
background-color:#F8F8F8;
|
71
|
+
display:none;
|
72
|
+
}
|
73
|
+
table.trace .open tr.source {
|
74
|
+
display:table-row;
|
75
|
+
}
|
76
|
+
table.trace tr.file td.expand {
|
77
|
+
width:23px;
|
78
|
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAXCAIAAABvSEP3AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAdVJREFUeNqMVL+TwUAYxaRIOlEhlZHGDAUzzOQ61+AqXMV1lJSU7q/QRqm8KFUcJTNn5qJkaPyoKKVz7y4mF8na5Kt29tt9+/Z97/u81+vVQ4r9frdarS6Xi7ETDIZisRjxMGPfmk4niNPpZE+xLAugbPaZ53nzvtfMBe/3+/3dbuehBrAKhZdUKkVAWa9Xsiybv0CPZDJZLr/qa5/BwgwRjYqOKIvFYjQa/aNommZh0Ww2K5UqzwfoQOPxaLPZ3FAmk0+7lplMpt1u53J5OpBOR0eZEE9wHJfP5zud93g88QhluwWbjW+5VOmKBgKBer3eaDTDYeGBQF8+x7rqIYoiPgixWJazpA6HA+MSxRArkUgMh0M409g8Ho8+9wYxxCqVSq1W26EDHGM2m4HOHQrEc38f/Yn7cLmlIRhBENzcx8cVRZnPZ/YUep2BWkjTIfA+PKVpZAXR5QxsjiqCKvGEqqp443w+0dvy17swqD0HB3S73V5PpkNg1qBqt8kwGCjmPkinM0QJbIoEa7U6UG6ToVgs4V9G2g0ESoP5Aoi7KYX5oCgf8IKbkvn9/mr1LRQKESamzgJy0g0tSZIuB3nuGqRU9Vv9C4sKkUhEkp4soxvxI8AAhWrrtXa3X8EAAAAASUVORK5CYII=);
|
79
|
+
background-position:top left;
|
80
|
+
background-repeat:no-repeat;
|
81
|
+
}
|
82
|
+
table.trace .open tr.file td.expand {
|
83
|
+
width:19px;
|
84
|
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAB1CAIAAAAqdO2mAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAXZJREFUeNrslK1ywkAUhcMOBomEOiSdqLxEBJX0NaijOsjyHGGmCGyQQYaiiiw4gktkcOmZbpsuuzQ/M5XnqJ2d3S/n3nM3rTzPLUP7/Tt0+pLcGQwG3W53OLyHzPMtjYL7q9UqSRLrD4E1Gj1orCvKYuFHUWTVkOM44/HjDcp8/lL4r6NerzeZPMm1KFw0QkDn83m5fP2lHA4fNQvRtNvtjsfDd0WzmSfb2e/fdTqdOvdh/HLJZLOn0+d2HJ+KRGzbdl23EpFlmed5cp2maRzHQq1lvQ5KMi6EUZBGfup6E1pTfd+vrGW7jbQ2C9hTt9BpqNyIWaAwAy6xg2eBz5iRC/NomiZhGN5sqmnkauo0BUGgVQoBjQ80oCACgNQdZHfTYBkF2mxCtWWAqunWpahxIDUt3QYUxIFQpJHyIWpXjinabKbbwItMHT+NyjchrP8QKaSQQgoppJBCCimkkEIKKaSQQgoppJBCCimkkEIKKaSo+hRgAEFD17X08O2NAAAAAElFTkSuQmCC);
|
85
|
+
background-position:top left;
|
86
|
+
background-repeat:no-repeat;
|
87
|
+
}
|
88
|
+
table.trace tr.source td.collapse {
|
89
|
+
width:19px;
|
90
|
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAB1CAIAAAAqdO2mAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAVxJREFUeNrs0zFygkAUBmBlUkgJHdABlQwVkVJKKUxBYWbkALTxMJwhltyDFkss03IF8pudIcwaDaDl/6pd2P327b7d+eHwMXs4lNkzggoVKlSoUKFChQoVKlSoUKFChQoVKlSoUKFChQqVEYqm6ft9+qiSJEkYho7jTlcw2fd9NOI4nq4gEdFwXXe1Cqco63VkWVbXRTqLhTpOwQRpF7quR1E0TgGhqvLKUFCyoQqG/rks3O6kZKW/eRFpevOCoGTXVTcMQ5EyxyDEkML1c5RzuZOICIyXqn7JBVez6282MWrx731HOv2qB8Hri2lamNk0DfpVVdV1Peodappmmua8bdvzuc7zfNprzrLMth1FnGh/X8MjCAIQv/cFz/+65PcDh7rbvYv2ZUfdj+PxsyzLgVl0hKwgTqeqKApx2LeOc7t98zyv/1FWOgvx9RPii23bmL9cetJ8Ed8CDAC6aFW8bCzFhwAAAABJRU5ErkJggg==);
|
91
|
+
background-position:bottom left;
|
92
|
+
background-repeat:no-repeat;
|
93
|
+
background-color:#6F706F;
|
94
|
+
}
|
95
|
+
table.trace tr td.path {
|
96
|
+
padding-left:10px;
|
97
|
+
}
|
98
|
+
table.trace tr td.code {
|
99
|
+
padding-left:35px;
|
100
|
+
white-space: pre;
|
101
|
+
line-height:9px;
|
102
|
+
padding-bottom:10px;
|
103
|
+
}
|
104
|
+
table.trace tr td.code em {
|
105
|
+
font-weight:bold;
|
106
|
+
color:#00BF10;
|
107
|
+
}
|
108
|
+
table.trace tr td.code a {
|
109
|
+
width: 20px;
|
110
|
+
float: left;
|
111
|
+
}
|
112
|
+
table.trace tr td.code .more {
|
113
|
+
color:#666;
|
114
|
+
}
|
115
|
+
table.trace tr td.line {
|
116
|
+
width:30px;
|
117
|
+
text-align:right;
|
118
|
+
padding-right:4px;
|
119
|
+
}
|
120
|
+
.footer {
|
121
|
+
margin-top:5px;
|
122
|
+
font-size:11px;
|
123
|
+
color:#444;
|
124
|
+
text-align:right;
|
125
|
+
}
|
126
|
+
</style>
|
127
|
+
</head>
|
128
|
+
<body>
|
129
|
+
<div class="internalError">
|
130
|
+
|
131
|
+
<div class="header">
|
132
|
+
<h1><%= @exception_name %> <sup class="error_<%= @exception.class::STATUS %>"><%= @exception.class::STATUS %></sup></h1>
|
133
|
+
<% if show_details = ::Merb::Config[:exception_details] -%>
|
134
|
+
<h2><%= @exception.message %></h2>
|
135
|
+
<% else -%>
|
136
|
+
<h2>Sorry about that...</h2>
|
137
|
+
<% end -%>
|
138
|
+
<h3>Parameters</h3>
|
139
|
+
<ul>
|
140
|
+
<% params[:original_params].each do |param, value| %>
|
141
|
+
<li><strong><%= param %>:</strong> <%= value.inspect %></li>
|
142
|
+
<% end %>
|
143
|
+
<%= "<li>None</li>" if params[:original_params].empty? %>
|
144
|
+
</ul>
|
145
|
+
|
146
|
+
<h3>Session</h3>
|
147
|
+
<ul>
|
148
|
+
<% params[:original_session].each do |param, value| %>
|
149
|
+
<li><strong><%= param %>:</strong> <%= value.inspect %></li>
|
150
|
+
<% end %>
|
151
|
+
<%= "<li>None</li>" if params[:original_session].empty? %>
|
152
|
+
</ul>
|
153
|
+
|
154
|
+
<h3>Cookies</h3>
|
155
|
+
<ul>
|
156
|
+
<% params[:original_cookies].each do |param, value| %>
|
157
|
+
<li><strong><%= param %>:</strong> <%= value.inspect %></li>
|
158
|
+
<% end %>
|
159
|
+
<%= "<li>None</li>" if params[:original_cookies].empty? %>
|
160
|
+
</ul>
|
161
|
+
</div>
|
162
|
+
|
163
|
+
<% if show_details %>
|
164
|
+
<table class="trace">
|
165
|
+
<% @exception.backtrace.each_with_index do |line, index| %>
|
166
|
+
<tbody class="close">
|
167
|
+
<tr class="file">
|
168
|
+
<td class="expand">
|
169
|
+
</td>
|
170
|
+
<td class="path">
|
171
|
+
<%= (line.match(/^([^:]+)/)[1] rescue 'unknown').sub(/\/((opt|usr)\/local\/lib\/(ruby\/)?(gems\/)?(1.8\/)?(gems\/)?|.+\/app\/)/, '') %>
|
172
|
+
<% unless line.match(/\.erb:/) %>
|
173
|
+
in "<strong><%= line.match(/:in `(.+)'$/)[1] rescue '?' %></strong>"
|
174
|
+
<% else %>
|
175
|
+
(<strong>ERB Template</strong>)
|
176
|
+
<% end %>
|
177
|
+
</td>
|
178
|
+
<td class="line">
|
179
|
+
<a href="txmt://open?url=file://<%=file = (line.match(/^([^:]+)/)[1] rescue 'unknown')%>&line=<%= lineno = line.match(/:([0-9]+):/)[1] rescue '?' %>"><%=lineno%></a>
|
180
|
+
</td>
|
181
|
+
</tr>
|
182
|
+
<tr class="source">
|
183
|
+
<td class="collapse">
|
184
|
+
</td>
|
185
|
+
<td class="code" colspan="2"><% (__caller_lines__(file, lineno, 5) rescue []).each do |llineno, lcode, lcurrent| %>
|
186
|
+
<a href="txmt://open?url=file://<%=file%>&line=<%=llineno%>"><%= llineno %></a><%='<em>' if llineno==lineno.to_i %><%= lcode.size > 90 ? CGI.escapeHTML(lcode[0..90])+'<span class="more">......</span>' : CGI.escapeHTML(lcode) %><%='</em>' if llineno==lineno.to_i %>
|
187
|
+
<% end %>
|
188
|
+
|
189
|
+
</td>
|
190
|
+
</tr>
|
191
|
+
</tbody>
|
192
|
+
<% end %>
|
193
|
+
</table>
|
194
|
+
<script type="text/javascript" charset="utf-8">
|
195
|
+
// swop the open & closed classes
|
196
|
+
els = document.getElementsByTagName('td');
|
197
|
+
for(i=0; i<els.length; i++){
|
198
|
+
if(els[i].className=='expand' || els[i].className=='collapse'){
|
199
|
+
els[i].onclick = function(e){
|
200
|
+
tbody = this.parentNode.parentNode;
|
201
|
+
if(tbody.className=='open'){
|
202
|
+
tbody.className='closed';
|
203
|
+
}else{
|
204
|
+
tbody.className='open';
|
205
|
+
}
|
206
|
+
}
|
207
|
+
}
|
208
|
+
}
|
209
|
+
</script>
|
210
|
+
<% end %>
|
211
|
+
<div class="footer">
|
212
|
+
lots of love, from <a href="#">merb</a>
|
213
|
+
</div>
|
214
|
+
</div>
|
215
|
+
</body>
|
216
|
+
</html>
|