<commit_before><h1>
<!--  <span class="greytext floatright smalltext">
    &larr; Previous revision | <strong>Revision <%= @glsa.last_revision.revid %></strong> | Next revision &rarr;
  </span>-->
  Edit GLSA <code><%= h @glsa.glsa_id %></code>
</h1>

<% @sev_tab = [{"sev" => "low"}, {"sev" => "normal"}, {"sev" => "high"}] %>

<% form_tag :action => 'update', :id => @glsa do |f| -%>
<div style="float: right; width: 44%;">
  <div class="box">
    <h2><img src="/images/icons/permission.png" alt="permission" /> Permissions</h2>
    <p><label for="permissions">This GLSA is</label>:
      <select name="glsa[restricted]" id="permissions">
        <%= options_for_select %w{ public confidential }, @glsa.restricted ? "confidential" : "public" %>
      </select>
    </p>
  </div>
  
  <div class="box">
    <h2><img src="/images/icons/metadata.png" alt="metadata" /> <label for="title">Metadata</label></h2>
    <p style="float: left; width: 50%;"><label for="access"><img src="/images/icons/access.png" alt="access" /> Access:</label>
      <select name="glsa[access]" id="access">
        <%= options_for_select [['local', 'local'], ['remote', 'remote'], ['local, remote', 'both']], @rev.access %>
      </select>
    </p>
    <p><label for="severity"><img src="/images/icons/severity.png" alt="severity" /> Severity:</label>
      <select name="glsa[severity]" id="severity">
        <%= options_for_select %w{ low normal high }, @rev.severity %>
      </select>
    </p>
    <p><label for="keyword"><img src="/images/icons/keyword.png" alt="keyword" /> GLSA Keyword:</label>
     
      <%= text_field_tag "glsa[product]", @rev.product, :class => "nice" %></p>
  </div>

  <div class="box">
    <h2>
      <span class="toolbar">
        <a href="javascript://" onclick="backgroundDialog();" title="Get background">
          <img src="/images/icons/background-go.png" alt="Get background" />
        </a>
      </span>
      <label for="background"><img src="/images/icons/background.png" alt="background" /> Background</label>
    </h2>  
    <p><textarea name="glsa[background]" id="background" class="nice" rows="3"><%= h lastrev_content(@glsa, 'background') %></textarea></p>
  </div>

  <div class="box">
    <h2>
      <span class="toolbar">
        <a href="javascript://" onclick="addBugDialog(<%= @glsa.id %>);" title="Add bug">
          <img src="/images/icons/plus.png" alt="Add bug" />
        </a>
      </span>
      <img src="/images/icons/bug.png" alt="bug" /> Bugs
    </h2>
    <table id="bugtable">
      <%= render :partial => "edit_bug_row", :collection => @rev.bugs, :as => :bug %>
    </table>
  </div>

  <%= render :partial => "comments" %>
  
  <div style="text-align: right;">
    <input type="submit" class="button" style="font-size: 150%;" value="Save &rarr;" />
  </div>
</div>

<div id="left">
  <div class="box">
    <h2><img src="/images/icons/title.png" alt="title" /> <label for="title">Title</label></h2>
    <p><textarea name="glsa[title]" id="title" class="largetext nice" rows="1"><%= h lastrev_content(@glsa, 'title') %></textarea></p>
  </div>
  
  <div class="box">
    <h2><img src="/images/icons/synopsis.png" alt="synopsis" /> <label for="synopsis">Synopsis</label></h2>
    <p><textarea name="glsa[synopsis]" id="synopsis" class="nice" rows="1"><%= h lastrev_content(@glsa, 'synopsis') %></textarea></p>
  </div>
  
  <div class="box">
    <h2>
      <img src="/images/icons/package.png" alt="Packages" />
      Packages
    </h2>

    <table class="padcells swap centercells" id="packages_table_vulnerable">
      <tr>
        <th><img src="/images/icons/atom.png" alt="atom" /> Atom</th>
        <th class="odd" colspan="2">Version</th>
        <th><img src="/images/icons/arch.png" alt="arch" /> Arch</th>
        <th class="odd"><img src="/images/icons/auto.png" alt="auto" /> Auto</th>
      </tr>
      
	  <tr>
	  	<td><img src="/images/icons/affected.png" alt="vulnerable" /> Vulnerable
        (<%= add_vulnerable_package_link '<img src="/images/icons/package-add.png" alt="Add package" />' %>)</td>	
	  </tr>
	  <%= render :partial => 'package', :collection => @rev.vulnerable_packages %>
	</table>
	
	<table class="padcells swap centercells" id="packages_table_unaffected">
      <tr>
      	<td><img src="/images/icons/unaffected.png" alt="unaffected" /> Unaffected
		(<%= add_unaffected_package_link '<img src="/images/icons/package-add.png" alt="Add package" />' %>)</td>
	  </tr>
	  <%= render :partial => 'package', :collection => @rev.unaffected_packages %>
	  
    </table>        
  </div>
  
  <div class="box" id="desc-box">
    <h2>
      <span class="toolbar">
        <%= link_to_function image_tag('icons/document-go.png',
                                        :alt => 'Set default description'), 
                              "generateDescription()",
                              :title => 'Set Quick GLSA default description' %>
        <img src="/images/separator.png" />
        <a href="javascript:///" onclick="lines('description', -5);" title="Fewer lines">
          <img src="/images/icons/zoom_out.png" alt="Fewer lines" />
        </a>
        <a href="javascript:///" onclick="$('description').rows = 15;" title="Reset lines">
          <img src="/images/icons/zoom_100.png" alt="Reset lines" />
        </a>
        <a href="javascript:///" onclick="lines('description', 5);" title="More lines">
          <img src="/images/icons/zoom_in.png" alt="More lines" />
        </a>
      </span>
      <img src="/images/icons/document.png" alt="description" />
      <label for="description">Description</label>
    </h2>
    <p><textarea name="glsa[description]" id="description" class="nice" rows="15"><%= h lastrev_content(@glsa, 'description') %></textarea></p>
  </div>

  <div class="box">
    <h2>
      <span class="toolbar">
        <a href="javascript:///" onclick="lines('impact', -2);" title="Fewer lines"><commit_msg>Cleanup and format fixes<commit_after><h1>
  Edit GLSA <code><%= h @glsa.glsa_id %></code>
</h1>

<% @sev_tab = [{"sev" => "low"}, {"sev" => "normal"}, {"sev" => "high"}] %>

<% form_tag :action => 'update', :id => @glsa do |f| -%>
<div style="float: right; width: 44%;">
  <div class="box">
    <h2><img src="/images/icons/permission.png" alt="permission" /> Permissions</h2>
    <p><label for="permissions">This GLSA is</label>:
      <select name="glsa[restricted]" id="permissions">
        <%= options_for_select %w{ public confidential }, @glsa.restricted ? "confidential" : "public" %>
      </select>
    </p>
  </div>

  <div class="box">
    <h2><img src="/images/icons/metadata.png" alt="metadata" /> <label for="title">Metadata</label></h2>
    <p style="float: left; width: 50%;"><label for="access"><img src="/images/icons/access.png" alt="access" /> Access:</label>
      <select name="glsa[access]" id="access">
        <%= options_for_select [['local', 'local'], ['remote', 'remote'], ['local, remote', 'both']], @rev.access %>
      </select>
    </p>
    <p><label for="severity"><img src="/images/icons/severity.png" alt="severity" /> Severity:</label>
      <select name="glsa[severity]" id="severity">
        <%= options_for_select %w{ low normal high }, @rev.severity %>
      </select>
    </p>
    <p><label for="keyword"><img src="/images/icons/keyword.png" alt="keyword" /> GLSA Keyword:</label>
      <%= text_field_tag "glsa[product]", @rev.product, :class => "nice" %>
    </p>
  </div>

  <div class="box">
    <h2>
      <span class="toolbar">
        <a href="javascript://" onclick="backgroundDialog();" title="Get background">
          <img src="/images/icons/background-go.png" alt="Get background" />
        </a>
      </span>
      <label for="background"><img src="/images/icons/background.png" alt="background" /> Background</label>
    </h2>
    <p>
      <textarea name="glsa[background]" id="background" class="nice" rows="3"><%= h lastrev_content(@glsa, 'background') %></textarea>
    </p>
  </div>

  <div class="box">
    <h2>
      <span class="toolbar">
        <a href="javascript://" onclick="addBugDialog(<%= @glsa.id %>);" title="Add bug">
          <img src="/images/icons/plus.png" alt="Add bug" />
        </a>
      </span>
      <img src="/images/icons/bug.png" alt="bug" /> Bugs
    </h2>
    <table id="bugtable">
      <%= render :partial => "edit_bug_row", :collection => @rev.bugs, :as => :bug %>
    </table>
  </div>

  <%= render :partial => "comments" %>

  <div style="text-align: right;">
    <input type="submit" class="button" style="font-size: 150%;" value="Save &rarr;" />
  </div>
</div>

<div id="left">
  <div class="box">
    <h2><img src="/images/icons/title.png" alt="title" /> <label for="title">Title</label></h2>
    <p><textarea name="glsa[title]" id="title" class="largetext nice" rows="1"><%= h lastrev_content(@glsa, 'title') %></textarea></p>
  </div>

  <div class="box">
    <h2><img src="/images/icons/synopsis.png" alt="synopsis" /> <label for="synopsis">Synopsis</label></h2>
    <p><textarea name="glsa[synopsis]" id="synopsis" class="nice" rows="1"><%= h lastrev_content(@glsa, 'synopsis') %></textarea></p>
  </div>

  <div class="box">
    <h2>
      <img src="/images/icons/package.png" alt="Packages" />
      Packages
    </h2>

    <table class="padcells swap centercells" id="packages_table_vulnerable">
      <tr>
        <th><img src="/images/icons/atom.png" alt="atom" /> Atom</th>
        <th class="odd" colspan="2">Version</th>
        <th><img src="/images/icons/arch.png" alt="arch" /> Arch</th>
        <th class="odd"><img src="/images/icons/auto.png" alt="auto" /> Auto</th>
      </tr>

      <tr>
        <td><img src="/images/icons/affected.png" alt="vulnerable" /> Vulnerable
        (<%= add_vulnerable_package_link '<img src="/images/icons/package-add.png" alt="Add package" />' %>)</td>	
      </tr>
      <%= render :partial => 'package', :collection => @rev.vulnerable_packages %>
    </table>

    <table class="padcells swap centercells" id="packages_table_unaffected">
      <tr>
        <td><img src="/images/icons/unaffected.png" alt="unaffected" /> Unaffected
            (<%= add_unaffected_package_link '<img src="/images/icons/package-add.png" alt="Add package" />' %>)</td>
      </tr>
      <%= render :partial => 'package', :collection => @rev.unaffected_packages %>

    </table>
  </div>

  <div class="box" id="desc-box">
    <h2>
      <span class="toolbar">
        <%= link_to_function image_tag('icons/document-go.png',
                                        :alt => 'Set default description'), 
                              "generateDescription()",
                              :title => 'Set Quick GLSA default description' %>
        <img src="/images/separator.png" />
        <a href="javascript:///" onclick="lines('description', -5);" title="Fewer lines">
          <img src="/images/icons/zoom_out.png" alt="Fewer lines" />
        </a>
        <a href="javascript:///" onclick="$('description').rows = 15;" title="Reset lines">
          <img src="/images/icons/zoom_100.png" alt="Reset lines" />
        </a>
        <a href="javascript:///" onclick="lines('description', 5);" title="More lines">
          <img src="/images/icons/zoom_in.png" alt="More lines" />
        </a>
      </span>
      <img src="/images/icons/document.png" alt="description" />
      <label for="description">Description</label>
    </h2>
    <p><textarea name="glsa[description]" id="description" class="nice" rows="15"><%= h lastrev_content(@glsa, 'description') %></textarea></p>
  </div>

  <div class="box">
    <h2>
      <span class="toolbar">
        <a href="javascript:///" onclick="lines('impact', -2);" title="Fewer lines">
{'fraction_non_alphanumeric': 0.2214426285616497, 'fraction_numerical': 0.006845212629417301, 'mean_word_length': 3.1623931623931623, 'pattern_counts': {'":': 0, '<': 363, '<?xml version=': 0, '>': 395, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '490712', 'n_tokens_mistral': 4103, 'n_tokens_neox': 3859, 'n_words': 780}