Skip to content

Commit df6cd63

Browse files
author
Nuo Yan
committed
fixing run list in the webui
1 parent c090a7a commit df6cd63

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

‎chef-server-webui/app/views/nodes/_form.html.haml‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
%div.sortable.run-list
2424
%ul#for_node.connectedSortable
2525
- @run_list.each do |entry|
26-
- type, name, fname = @run_list.parse_entry(entry)
27-
%li{ :id => h(fname), :class => type == 'role' ? 'ui-state-highlight' : 'ui-state-default' }= h name
26+
%li{ :id => h(entry.to_s), :class => entry.type == 'role' ? 'ui-state-highlight' : 'ui-state-default' }= h entry.name
2827
%td.help
2928
%span.description
3029
Drag recipes from the list of Available Recipes section on the left, and drop them
@@ -37,7 +36,7 @@
3736
%div.sortable
3837
%ul#node_available_recipes.connectedSortable
3938
- @available_recipes.each do |recipe|
40-
%li{ :id => "recipe[#{recipe}]", :class => 'ui-state-default' }= h recipe
39+
%li{ :id => "recipe[#{File.basename(recipe, ".rb")}]", :class => 'ui-state-default' }= h File.basename(recipe, ".rb")
4140

4241

4342
%div.group.form{:style => "position:relative;"}

‎chef-server-webui/app/views/roles/_form.html.haml‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
%td
1717
%label.label Available Roles
1818
%td
19-
%label.label Run List
19+
%label.label Run List
2020
%tr
2121
%td
2222
%div.sortable
@@ -27,8 +27,7 @@
2727
%div.sortable.run-list
2828
%ul#for_role.connectedSortable
2929
- @run_list.each do |entry|
30-
- type, name, fname = @run_list.parse_entry(entry)
31-
%li{ :id => h(fname), :class => type == 'role' ? 'ui-state-highlight' : 'ui-state-default' }= h name
30+
%li{ :id => h(entry.to_s), :class => entry.type == 'role' ? 'ui-state-highlight' : 'ui-state-default' }= h entry.name
3231
%td.help
3332
%span.description
3433
Drag recipes from the list of Available Recipes section on the left, and drop them
@@ -41,7 +40,7 @@
4140
%div.sortable
4241
%ul#node_available_recipes.connectedSortable
4342
- @available_recipes.each do |recipe|
44-
%li{ :id => "recipe[#{recipe}]", :class => 'ui-state-default' }= h recipe
43+
%li{ :id => "recipe[#{File.basename(recipe, ".rb")}]", :class => 'ui-state-default' }= h File.basename(recipe, ".rb")
4544

4645
%div.group.form{:style => "position:relative;"}
4746
%label.label Default and Override Attributes

0 commit comments

Comments
 (0)