<commit_before>.content
  .inner
    - if form_for != "edit"
      %div.group.form
        %label.label Name
        = text_field :id => "node_name", :name => "name", :class => "text_field", :value => params.has_key?(:name) ? h(params[:name]) : @node.name 
        %span.description The name of the Node 

    %div.group.form
      %table.sortable
        %tr
          %td 
            %label.label Available Roles
          %td
            %label.label Run List 
        %tr
          %td
            %div.sortable
              %ul#node_available_roles.connectedSortable
                - @available_roles.each do |role|
                  %li{ :id => "role[#{role}]", :class => 'ui-state-highlight' }= h role 
          %td{:rowspan => 3}
            %div.sortable.run-list
              %ul#for_node.connectedSortable
                - @run_list.each do |entry|
                  %li{ :id => h(entry.to_s), :class => entry.type == 'role' ? 'ui-state-highlight' : 'ui-state-default' }= h entry.name 
          %td.help
            %span.description
              Drag recipes from the list of Available Recipes section on the left, and drop them
              in the "Recipes for this node" section on the right.  Then sort the recipes for this node list to the order you would like to see the recipes applied.
        %tr
          %td
            %label.label Available Recipes
        %tr
          %td
            %div.sortable
              %ul#node_available_recipes.connectedSortable
                - @available_recipes.each do |recipe|
                  %li{ :id => "recipe[#{recipe}]",:title => recipe, :class => 'ui-state-default' }= h recipe


    %div.group.form{:style => "position:relative;"}
      %label.label Attributes 
      = partial 'layout/jsonedit', :json =>@node.normal_attrs.to_json<commit_msg>Fix highlighting of roles in the node edit form.<commit_after>.content
  .inner
    - if form_for != "edit"
      %div.group.form
        %label.label Name
        = text_field :id => "node_name", :name => "name", :class => "text_field", :value => params.has_key?(:name) ? h(params[:name]) : @node.name 
        %span.description The name of the Node 

    %div.group.form
      %table.sortable
        %tr
          %td 
            %label.label Available Roles
          %td
            %label.label Run List 
        %tr
          %td
            %div.sortable
              %ul#node_available_roles.connectedSortable
                - @available_roles.each do |role|
                  %li{ :id => "role[#{role}]", :class => 'ui-state-highlight' }= h role 
          %td{:rowspan => 3}
            %div.sortable.run-list
              %ul#for_node.connectedSortable
                - @run_list.each do |entry|
                  %li{ :id => h(entry.to_s), :class => entry.type == :role ? 'ui-state-highlight' : 'ui-state-default' }= h entry.name 
          %td.help
            %span.description
              Drag recipes from the list of Available Recipes section on the left, and drop them
              in the "Recipes for this node" section on the right.  Then sort the recipes for this node list to the order you would like to see the recipes applied.
        %tr
          %td
            %label.label Available Recipes
        %tr
          %td
            %div.sortable
              %ul#node_available_recipes.connectedSortable
                - @available_recipes.each do |recipe|
                  %li{ :id => "recipe[#{recipe}]",:title => recipe, :class => 'ui-state-default' }= h recipe


    %div.group.form{:style => "position:relative;"}
      %label.label Attributes 
      = partial 'layout/jsonedit', :json =>@node.normal_attrs.to_json
{'fraction_non_alphanumeric': 0.12119565217391304, 'fraction_numerical': 0.0005434782608695652, 'mean_word_length': 1.8142201834862386, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3493758', 'n_tokens_mistral': 1105, 'n_tokens_neox': 1069, 'n_words': 289}