diff options
Diffstat (limited to 'app/views')
107 files changed, 0 insertions, 3165 deletions
diff --git a/app/views/admin/index/index.html.erb b/app/views/admin/index/index.html.erb deleted file mode 100644 index 2313d16..0000000 --- a/app/views/admin/index/index.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -<h1>GLSAMaker Administration</h1> - -<ul> - <li><%= link_to 'User Management', admin_users_path %></li> - <li><%= link_to 'Template Management', admin_templates_path %></li> -</ul>
\ No newline at end of file diff --git a/app/views/admin/templates/_form.html.erb b/app/views/admin/templates/_form.html.erb deleted file mode 100644 index 9984673..0000000 --- a/app/views/admin/templates/_form.html.erb +++ /dev/null @@ -1,35 +0,0 @@ -<%= form_for([:admin, @template]) do |f| %> - <% if @template.errors.any? %> - <div id="error_explanation"> - <h2><%= pluralize(@template.errors.count, "error") %> prohibited this template from being saved:</h2> - - <ul> - <% @template.errors.full_messages.each do |msg| %> - <li><%= msg %></li> - <% end %> - </ul> - </div> - <% end %> - - <table> - <tr> - <th><%= f.label :name %></th> - <td><%= f.text_field :name %></td> - </tr> - <tr> - <th><%= f.label :text %></th> - <td><%= f.text_area :text, :rows => 10 %></td> - </tr> - <tr> - <th><%= f.label :target, 'Target Field' %></th> - <td><%= select('template', 'target', target_list) %></td> - </tr> - <tr> - <th><%= f.label :enabled %></th> - <td><%= f.check_box :enabled %></td> - </tr> - </table> - <div class="actions"> - <%= f.submit %> - </div> -<% end %> diff --git a/app/views/admin/templates/edit.html.erb b/app/views/admin/templates/edit.html.erb deleted file mode 100644 index 3c72272..0000000 --- a/app/views/admin/templates/edit.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -<div class="box w40em"> - <h2>Edit user</h2> - - <%= render 'form' %> -</div> - -<%= link_to 'Show', @admin_template %> | -<%= link_to 'Back', admin_templates_path %>
\ No newline at end of file diff --git a/app/views/admin/templates/index.html.erb b/app/views/admin/templates/index.html.erb deleted file mode 100644 index 32edfbb..0000000 --- a/app/views/admin/templates/index.html.erb +++ /dev/null @@ -1,23 +0,0 @@ -<h1>Templates</h1> - -<table class="glsamaker-table"> - <tr> - <th>Name</th> - <th>Text</th> - <th>Field</th> - <th>Enabled</th> - </tr> - -<% @templates.each do |admin_template| %> - <tr> - <td><%= link_to admin_template.name, admin_template_path(admin_template) %></td> - <td><tt><%= admin_template.text %></tt></td> - <td><%= admin_template.target %></td> - <td><%= admin_template.enabled %></td> - </tr> -<% end %> -</table> - -<br /> - -<%= link_to 'New Template', new_admin_template_path %> diff --git a/app/views/admin/templates/new.html.erb b/app/views/admin/templates/new.html.erb deleted file mode 100644 index 78e25fb..0000000 --- a/app/views/admin/templates/new.html.erb +++ /dev/null @@ -1,7 +0,0 @@ -<div class="box w40em"> - <h2>New Template</h2> - - <%= render 'form' %> -</div> - -<%= link_to 'Back', admin_templates_path %>
\ No newline at end of file diff --git a/app/views/admin/templates/show.html.erb b/app/views/admin/templates/show.html.erb deleted file mode 100644 index e406071..0000000 --- a/app/views/admin/templates/show.html.erb +++ /dev/null @@ -1,26 +0,0 @@ -<div class="box"> - <h2><%= @template.name %></h2> - - <table> - <tr> - <th>Name:</th> - <td><%= @template.name %></td> - </tr> - <tr> - <th>Text:</th> - <td><pre><%= @template.text %></pre></td> - </tr> - <tr> - <th>Field:</th> - <td><%= @template.target.titleize %></td> - </tr> - <tr> - <th>Enabled:</th> - <td><%= @template.enabled %></td> - </tr> - </table> -</div> - -<%= link_to 'Edit', edit_admin_template_path(@template) %> | -<%= link_to 'Delete', admin_template_path(@template), :confirm => 'Are you sure?', :method => :delete %> | -<%= link_to 'Back', admin_templates_path %>
\ No newline at end of file diff --git a/app/views/admin/users/_user.html.erb b/app/views/admin/users/_user.html.erb deleted file mode 100644 index 3461591..0000000 --- a/app/views/admin/users/_user.html.erb +++ /dev/null @@ -1,9 +0,0 @@ -<tr class="<%= cycle 'even', 'odd' %>"> - <td><%= user.id %></td> - <td><strong><%= user.login %></strong></td> - <td><%= link_to user.name, admin_user_path(user) %></td> - <td><%= user.email %></td> - <td><%= access_string user.access %></td> - <td><%= user.disabled %></td> - <td><%= user.jefe %></td> -</tr> diff --git a/app/views/admin/users/create.html.erb b/app/views/admin/users/create.html.erb deleted file mode 100644 index 34cd1ba..0000000 --- a/app/views/admin/users/create.html.erb +++ /dev/null @@ -1,2 +0,0 @@ -<h1>Admin::User#create</h1> -<p>Find me in app/views/admin/user/create.html.erb</p> diff --git a/app/views/admin/users/destroy.html.erb b/app/views/admin/users/destroy.html.erb deleted file mode 100644 index d77622c..0000000 --- a/app/views/admin/users/destroy.html.erb +++ /dev/null @@ -1,2 +0,0 @@ -<h1>Admin::User#destroy</h1> -<p>Find me in app/views/admin/user/destroy.html.erb</p> diff --git a/app/views/admin/users/edit.html.erb b/app/views/admin/users/edit.html.erb deleted file mode 100644 index aa5c7b5..0000000 --- a/app/views/admin/users/edit.html.erb +++ /dev/null @@ -1,50 +0,0 @@ -<div class="box w40em"> - <h2>Edit user</h2> - <%= form_for([:admin, @user]) do |f| %> - <% if @user.errors.any? %> - <div id="errorExplanation" class="errorExplanation"> - <h2><%= pluralize(@user.errors.count, "error") %> prohibited this record from being saved:</h2> - <ul> - <% @user.errors.full_messages.each do |msg| %> - <li><%= msg %></li> - <% end %> - </ul> - </div> - <% end %> - - <table> - <tr> - <th>ID</th> - <td><%= @user.id %></td> - </tr> - <tr> - <th>Login</th> - <td><%= f.text_field :login %></td> - </tr> - <tr> - <th>Name</th> - <td><%= f.text_field :name %></td> - </tr> - <tr> - <th>Email</th> - <td><%= f.text_field :email %></td> - </tr> - <tr> - <th>Access Level</th> - <td><%= select('user', 'access', access_list) %></td> - </tr> - <tr> - <th>Disabled flag</th> - <td><%= f.check_box :disabled %></td> - </tr> - <tr> - <th>Admin flag</th> - <td><%= f.check_box :jefe %></td> - </tr> -</table> -<p> -<%= f.submit 'Update' %> -</p> -</div> -<% end %> -<%= link_to 'Back', admin_user_path(@user) %>
\ No newline at end of file diff --git a/app/views/admin/users/index.html.erb b/app/views/admin/users/index.html.erb deleted file mode 100644 index 97bfed7..0000000 --- a/app/views/admin/users/index.html.erb +++ /dev/null @@ -1,19 +0,0 @@ -<h1>Users</h1> - -<table class="glsamaker-table"> -<tr align="left"> - <th>ID</th> - <th>Login</th> - <th>Name</th> - <th>Email</th> - <th>Access Level</th> - <th>Disabled</th> - <th>Administrator</th> -</tr> - -<%= render :partial => "user", :collection => @users, :as => :user %> -</table> - -<p> - <%= link_to 'New User', new_admin_user_path(@user) %> -</p>
\ No newline at end of file diff --git a/app/views/admin/users/new.html.erb b/app/views/admin/users/new.html.erb deleted file mode 100644 index 276cc61..0000000 --- a/app/views/admin/users/new.html.erb +++ /dev/null @@ -1,47 +0,0 @@ -<div class="box w40em"> - <h2>New user</h2> - - <%= form_for([:admin, @user]) do |f| %> - <% if @user.errors.any? %> - <div id="errorExplanation" class="errorExplanation"> - <h2><%= pluralize(@user.errors.count, "error") %> prohibited this record from being saved:</h2> - <ul> - <% @user.errors.full_messages.each do |msg| %> - <li><%= msg %></li> - <% end %> - </ul> - </div> - <% end %> - - <table> - <tr> - <th>Login</th> - <td><%= f.text_field :login %></td> - </tr> - <tr> - <th>Name</th> - <td><%= f.text_field :name %></td> - </tr> - <tr> - <th>Email</th> - <td><%= f.text_field :email %></td> - </tr> - <tr> - <th>Access Level</th> - <td><%= select('user', 'access', access_list) %></td> - </tr> - <tr> - <th>Disabled flag</th> - <td><%= f.check_box :disabled %></td> - </tr> - <tr> - <th>Admin flag</th> - <td><%= f.check_box :jefe %></td> - </tr> -</table> -<p> -<%= f.submit 'Update' %> -</p> -</div> -<% end %> -<%= link_to 'Back', admin_users_path %>
\ No newline at end of file diff --git a/app/views/admin/users/show.html.erb b/app/views/admin/users/show.html.erb deleted file mode 100644 index c009610..0000000 --- a/app/views/admin/users/show.html.erb +++ /dev/null @@ -1,34 +0,0 @@ -<div class="box w40em"> - <h2><%= @user.login %></h2> - - <table> - <tr> - <th>ID</th> - <td><%= @user.id %></td> - </tr> - <tr> - <th>Name</th> - <td><%= @user.name %></td> - </tr> - <tr> - <th>Email</th> - <td><%= mail_to @user.email %></td> - </tr> - <tr> - <th>Access Level</th> - <td><%= access_string @user.access %></td> - </tr> - <tr> - <th>Disabled flag</th> - <td><%= @user.disabled %></td> - </tr> - <tr> - <th>Admin flag</th> - <td><%= @user.jefe %></td> - </tr> -</table> -</div> - -<%= link_to 'Edit', edit_admin_user_path(@user) %> | -<%= link_to 'Delete', admin_user_path(@user), :confirm => 'Are you sure?', :method => :delete %> | -<%= link_to 'Back', admin_users_path %>
\ No newline at end of file diff --git a/app/views/admin/users/update.html.erb b/app/views/admin/users/update.html.erb deleted file mode 100644 index 90396aa..0000000 --- a/app/views/admin/users/update.html.erb +++ /dev/null @@ -1,2 +0,0 @@ -<h1>Admin::User#update</h1> -<p>Find me in app/views/admin/user/update.html.erb</p> diff --git a/app/views/bug/bug.html.erb b/app/views/bug/bug.html.erb deleted file mode 100644 index 67f709b..0000000 --- a/app/views/bug/bug.html.erb +++ /dev/null @@ -1,58 +0,0 @@ -<% if @bug == nil %> - -<h2 style="margin-top: 0;"><%= error_msg("Invalid Bug ID") %></h2> -<p>There is no such bug on Gentoo's Bugzilla.</p> - -<% elsif (@bug.is_a? String and @bug == "down") %> - -<h2 style="margin-top: 0;"><%= error_msg("Bugzilla is unreachable") %></h2> -<p>Sorry, but the Gentoo Bugzilla is unreachable at the moment.</p> - -<% elsif @bug.restricted %> - -<h2 style="margin-top: 0;"><%= image_tag('icons/restricted.png') %> This bug is restricted</h2> - -<p>Currently, GLSAMaker cannot process restricted bugs. :(</p> -<p>Try to <a href="<%= @bug.url %>" class="button" target="_blank"><%= image_tag 'icons/bug.png' %> <strong>Open bug <%= @bug.bug_id %> in Bugzilla</strong></a> instead.</p> - -<% else %> - -<h2 style="margin-top: 0;"><%= @bug.summary %></h2> - -<div style="margin-bottom: 1.5em;"> - <a href="<%= @bug.url %>" class="button" target="_blank"><%= image_tag 'icons/bug.png' %> <strong>Open bug <%= @bug.bug_id %> in Bugzilla</strong></a> - <a href="javascript:///" onclick="Modalbox.show('<%= bughistory_url(:id => @bug.bug_id) %>');" class="button"><%= image_tag 'icons/pending.png' %>> <strong>Show History</strong></a> -</div> - -<div style="float: right; width: 49%;"> - Status/Resolution: <strong><%= @bug.status %> <%= @bug.resolution %></strong><br /> - Status Whiteboard: <strong style="color: #3E3550;"><%= @bug.status_whiteboard %></strong><br /> - <% arches = @bug.arch_cc %> Arches (<%= arches.size %>): <% arches = @bug.arch_cc %><strong><%= arches.map {|a| a.gsub("@gentoo.org", "") }.join(", ") %></strong><br /><br /> - - CC: <small><%= (@bug.cc - arches).map {|a| a.gsub("@gentoo.org", "@g.o")}.join(", ") %></small> -</div> - -<div style="width: 50%"> - Assigned to: <strong><%= @bug.assigned_to %></strong><br /> - Reported: <strong><%= @bug.reporter %></strong> <small><%= @bug.created_at %></small><br /><br /> - - Depends on: <strong><% @bug.depends.each do |d| %><a href="javascript://" onclick="buginfo('<%= d %>');"><%= d %></a> <% end %></strong><br /> - Blocks: <strong><% @bug.blocks.each do |d| %><a href="javascript://" onclick="buginfo('<%= d %>');"><%= d %></a> <% end %></strong><br /> -</div> -<br style="clear: both;" /> - -<h3>Comments</h3> -<ol class="comments" style="height: 300px; overflow-y: scroll; padding-right: 1em;"> -<% commentID = 1 ; @bug.comments.each do |comment| %> - <li id="comment-<%= commentID %>"> - <p style="background-color: #D3CFE5; padding: 3px; color: #3E3550;"> - <span style="float: right; font-size: 80%;"><a href="<%= @bug.url %>#c<%= commentID %>" target="_blank">→ Bugzilla</a></span> - <strong><%= comment.author %></strong> - <small>at <%= comment.date %></small> - </p> - <p><code><%= simple_format_without_paragraph(linkify_comment(comment.text)).html_safe %></code></p> - </li> -<% commentID +=1 ; end %> -</ol> - -<% end %>
\ No newline at end of file diff --git a/app/views/bug/history.html.erb b/app/views/bug/history.html.erb deleted file mode 100644 index 24cf004..0000000 --- a/app/views/bug/history.html.erb +++ /dev/null @@ -1,43 +0,0 @@ -<% if @bug == nil %> - -<h2 style="margin-top: 0;"><%= error_msg("Invalid Bug ID") %></h2> -<p>There is no such bug on Gentoo's Bugzilla.</p> - -<% elsif (@bug.is_a? String and @bug == "down") %> - -<h2 style="margin-top: 0;"><%= error_msg("Bugzilla is unreachable") %></h2> -<p>Sorry, but the Gentoo Bugzilla is unreachable at the moment.</p> - -<% elsif @bug.restricted %> - -<h2 style="margin-top: 0;"><%= image_tag('icons/restricted.png') %> This bug is restricted</h2> - -<p>Currently, GLSAMaker cannot process restricted bugs. :(</p> -<p>Try to <a href="<%= @bug.url %>" class="button" target="_blank"><%= image_tag 'icons/bug.png' %> <strong>Open bug <%= @bug.bug_id %> in Bugzilla</strong></a> instead.</p> - -<% else %> - - -<h2 style="margin-top: 0;"><%= @bug.summary %></h2> -<div style="margin-top: 1.5em;"> - <a href="<%= @bug.url %>" class="button" target="_blank"><%= image_tag 'icons/bug.png' %> <strong>Open bug <%= @bug.bug_id %> in Bugzilla</strong></a> - <a href="javascript:///" onclick="Modalbox.show('<%= bug_url(:id => @bug.bug_id) %>');" class="button"><%= image_tag 'icons/larr.png' %> <strong>Back to overview</strong></a> -</div> - -<h3>History</h3> -<ol class="comments" style="height: 300px; overflow-y: scroll; padding-right: 1em;"> -<% @bug.history.changes.each do |change| %> - <li> - <p style="background-color: #D3CFE5; padding: 3px; color: #3E3550;"> - <strong><%= h(change.user) %></strong> <small>at <%= change.time %></small> - </p> - <p> - <% change.changes.each do |where, what| %> - <strong><%= where.to_s.capitalize %>:</strong> <code><%= what[0] %> → <%= what[1] %></code><br /> - <% end %> - </p> - </li> -<% end %> -</ol> - -<% end %>
\ No newline at end of file diff --git a/app/views/bugs/create.html.erb b/app/views/bugs/create.html.erb deleted file mode 100644 index aa3490b..0000000 --- a/app/views/bugs/create.html.erb +++ /dev/null @@ -1,2 +0,0 @@ -<h1>Bugs#create</h1> -<p>Find me in app/views/bugs/create.html.erb</p> diff --git a/app/views/bugs/create.js.erb b/app/views/bugs/create.js.erb deleted file mode 100644 index 13a466b..0000000 --- a/app/views/bugs/create.js.erb +++ /dev/null @@ -1,6 +0,0 @@ -<% if @error == nil %> -Element.insert('bugtable', { bottom: '<%= escape_javascript(@bugs_text).html_safe %>'}); -Modalbox.hide(); -<% else %> -alert('<%= escape_javascript(@error).html_safe %>'); -<% end %>
\ No newline at end of file diff --git a/app/views/bugs/destroy.html.erb b/app/views/bugs/destroy.html.erb deleted file mode 100644 index b08c545..0000000 --- a/app/views/bugs/destroy.html.erb +++ /dev/null @@ -1,2 +0,0 @@ -<h1>Bugs#destroy</h1> -<p>Find me in app/views/bugs/destroy.html.erb</p> diff --git a/app/views/bugs/new.html.erb b/app/views/bugs/new.html.erb deleted file mode 100644 index 63ca3c8..0000000 --- a/app/views/bugs/new.html.erb +++ /dev/null @@ -1,34 +0,0 @@ -<% if @glsa.nil? %> -<p>No or invalid GLSA ID specified.</p> -<% else %> -<%= form_tag(glsa_bugs_path(@glsa, @bug), :remote => true) do -%> -<%# form_remote_tag( - :url => { :controller => :glsa, :action => :addbugsave, :id => @glsa_id.to_s }, - :update => {:success => 'bugtable'}, - :position => :bottom, - :before => '$("addbugsubmit").value="Loading...";', - :after => '$("addbugsubmit").value="Add bugs";', - :success => 'Modalbox.hide();', - :failure => 'alert(request.responseText);') do -%> -<p><label for="addbugs"> - <%= image_tag 'icons/bug.png' %> - Please enter the relevant bug ID(s), separate more than one bug with a comma:</label> -</p> - -<p><input type="text" name="addbugs" id="addbugs" class="hugetext nice"/></p> -<script language="javascript"> -new Form.Element.Observer('addbugs', 4, function(element, value) { - new Ajax.Request("<%= url_for :controller => 'tools', :action => 'bugs_ajax_info' %>", { - method: 'get', - parameters: { bugs: $('addbugs').getValue() }, - onComplete : function(transport) { - $('ajaxbugs').update(transport.responseJSON.buginfo); - Modalbox.resizeToContent(); - } - }); -}); -</script> -<div id="ajaxbugs"></div> -<p style="text-align: right;"><input type="submit" class="button" value="Add bugs" id="addbugsubmit" /></p> -<% end -%> -<% end %>
\ No newline at end of file diff --git a/app/views/bugs/show.html.erb b/app/views/bugs/show.html.erb deleted file mode 100644 index 736728a..0000000 --- a/app/views/bugs/show.html.erb +++ /dev/null @@ -1,2 +0,0 @@ -<h1>Bugs#show</h1> -<p>Find me in app/views/bugs/show.html.erb</p> diff --git a/app/views/comments/create.js.erb b/app/views/comments/create.js.erb deleted file mode 100644 index 482b6ff..0000000 --- a/app/views/comments/create.js.erb +++ /dev/null @@ -1,10 +0,0 @@ -<% if @error == nil %> -Element.insert('commentslist', { bottom: '<%= escape_javascript(@comment_text).html_safe %>'}); -Modalbox.hide(); -<% else %> -<% if @error.is_a? ActiveModel::Errors %> -alert('<%= escape_javascript(@error.full_messages.join "\n").html_safe %>'); -<% else %> -alert('<%= escape_javascript(@error).html_safe %>'); -<% end %> -<% end %>
\ No newline at end of file diff --git a/app/views/comments/destroy.html.erb b/app/views/comments/destroy.html.erb deleted file mode 100644 index 9dcdf77..0000000 --- a/app/views/comments/destroy.html.erb +++ /dev/null @@ -1,2 +0,0 @@ -<h1>Comment#destroy</h1> -<p>Find me in app/views/comment/destroy.html.erb</p> diff --git a/app/views/comments/new.html.erb b/app/views/comments/new.html.erb deleted file mode 100644 index 87d836f..0000000 --- a/app/views/comments/new.html.erb +++ /dev/null @@ -1,25 +0,0 @@ -<% if @glsa.nil? %> -<p>No or invalid GLSA ID specified.</p> -<% else %> -<%= form_tag(glsa_comments_path(@glsa, @comment), :remote => true, :class => "popupform") do -%> - <%= fields_for :newcomment do |f| %> - <p> - <%= f.text_area :text, :class => "nice", :rows => 4 %> - </p> - - <p style="text-align: right;"> - <% if current_user.access >= 2 and not @glsa.is_owner? current_user %> - <span class="left"> - Rating: - <%= f.radio_button :rating, "approval" %><label for="newcomment_rating_approval"><%= image_tag 'icons/approval.png', :alt => 'Approval', :title => 'Approval' %></label> - <%= f.radio_button :rating, "rejection" %><label for="newcomment_rating_rejection"><%= image_tag 'icons/rejection.png', :alt => 'Rejection', :title => 'Rejection' %></label> - <%= f.radio_button :rating, "neutral", :checked => true %><label for="newcomment_rating_neutral"><%= image_tag 'icons/comment.png', :alt => 'Neutral', :title => 'Neutral' %></label> - </span> - <% else %> - <%= f.hidden_field :rating, :value => 'neutral' %> - <% end %> - <% end %> - <input type="submit" class="button" value="Add comment" id="addcommentsubmit" /> - </p> -<% end -%> -<% end %>
\ No newline at end of file diff --git a/app/views/comments/show.html.erb b/app/views/comments/show.html.erb deleted file mode 100644 index b66469d..0000000 --- a/app/views/comments/show.html.erb +++ /dev/null @@ -1,2 +0,0 @@ -<h1>Comment#show</h1> -<p>Find me in app/views/comment/show.html.erb</p> diff --git a/app/views/cve/_assigning.js.erb b/app/views/cve/_assigning.js.erb deleted file mode 100644 index 6a25248..0000000 --- a/app/views/cve/_assigning.js.erb +++ /dev/null @@ -1,94 +0,0 @@ -/** Assigning **/ -uki( - { view: 'Popup', rect: '650 400', anchors: 'left top', id: 'assign-popup', hideOnClick: false, relativeTo: uki('#popup'), childViews: [ - { view: 'Label', rect: '10 10 630 20', anchors: 'top', text: '', id: 'cve-assign-title' }, - { view: 'ScrollPane', rect: '10 30 635 320', anchors: 'top left right bottom', id: 'cve-assign-scroll', scrollableV: true, scrollableH: false, childViews: [ - { view: 'Label', rect: '10 20 600 200', anchors: 'top', text: '', id: 'cve-assign-text', textSelectable: true, multiline: true}, - ] }, - { view: 'Button', rect: '495 365 70 24', anchors: 'bottom right', id: 'cve-assign-cancel', text: 'Cancel' }, - { view: 'Button', rect: '570 365 70 24', anchors: 'bottom right', id: 'cve-assign-go', text: 'Assign' } - ] - } -); - -uki('#assign-bug-nr').keypress( - function(e) { - if (e.charCode == 13) { - uki('#cve-assign').click(); - } - } -); - -uki("#cve-assign").click( - function() { - var sel = uki('Table').selectedRows(); - - if (sel.length < 1) { - alert("Please select at least one CVE."); - return false; - } - - var popup = uki('#assign-popup'); - var bugnr = uki('#assign-bug-nr').value(); - - if (!(bugnr == parseInt(bugnr)) || bugnr.length == 0) { - alert("Please enter a numeric bug #."); - return false; - } - - cve_assign_data = new Array(); - for (var i = 0; i < sel.length; i++) { - cve_assign_data.push(sel[i][0]); - } - - new Ajax.Request('/cve/assign_preview', { - parameters: { cves: cve_assign_data.join(','), bug: bugnr }, - onSuccess: function(response) { - uki('#cve-assign-text').html(response.responseText); - uki('#cve-assign-text').resizeToContents('height'); - - uki('#cve-assign-title').html("<strong>The following changes will be made to bug " + bugnr + ":</strong>"); - popup.show(); - uki('#cve-assign-go').disabled(false); - uki('#cve-assign-go').focus(); - }, - onFailure: function(response) { - alert("Could not process your request:\n\n" + response.responseText); - return false; - } - }); - } -); - -uki('#cve-assign-cancel').click( - function() { - uki('#assign-popup').hide(); - } -); - -uki('#cve-assign-go').click( - function() { - uki('#cve-assign-go').disabled(true); - var bugnr = uki('#assign-bug-nr').value(); - - if (cve_assign_data < 1) { - alert("Error. Internal CVE list empty."); - uki('#assign-popup').hide(); - return; - } - - new Ajax.Request('/cve/assign', { - parameters: { cves: cve_assign_data.join(','), bug: bugnr, comment: $('add_comment').checked, summary: $('change_summary').checked }, - onSuccess: function(response) { - uki('#assign-popup').hide(); - uki('#assign-bug-nr').value(''); - reloadTable(); - }, - onFailure: function(response) { - alert("Could not process your request:\n\n" + response.responseText); - uki('#cve-assign-go').disabled(false); - } - }); - } -); -/** Assigning end **/ diff --git a/app/views/cve/_filing.js.erb b/app/views/cve/_filing.js.erb deleted file mode 100644 index dc80767..0000000 --- a/app/views/cve/_filing.js.erb +++ /dev/null @@ -1,170 +0,0 @@ -/** Filing **/ -uki( - { view: 'Popup', rect: '500 300', anchors: 'left top', id: 'file-1-popup', hideOnClick: false, relativeTo: uki('#popup'), childViews: [ - { view: 'Label', rect: '10 10 480 20', anchors: 'top', text: 'Select a package to file this bug against:', id: 'cve-file-1-title' }, - { view: 'ScrollableList', rect: '10 35 480 170', anchors: 'top left right bottom', id: 'cve-file-1-list' }, - { view: 'Label', rect: '10 210 480 20', anchors: 'top', text: 'Or manually enter a package atom:', id: 'cve-file-1-title2' }, - { view: 'TextField', rect: '10 235 480 22', anchors: 'left top right', placeholder: 'package atom', id: 'cve-file-1-atom' }, - { view: 'Button', rect: '345 265 70 24', anchors: 'bottom right', id: 'cve-file-1-cancel', text: 'Cancel' }, - { view: 'Button', rect: '420 265 70 24', anchors: 'bottom right', id: 'cve-file-1-go', text: 'Next' } - ] - } -); - -uki( - { view: 'Popup', rect: '650 400', anchors: 'left top', id: 'file-2-popup', hideOnClick: false, relativeTo: uki('#popup'), childViews: [ - { view: 'Label', rect: '10 10 630 20', anchors: 'top', text: 'Enter the information for filing the bug:', id: 'cve-file-2-title' }, - { view: 'ScrollPane', rect: '10 30 635 320', anchors: 'top left right bottom', id: 'cve-file-2-scroll', scrollableV: true, scrollableH: false, childViews: [ - { view: 'Label', rect: '10 10 600 400', anchors: 'top', text: '', id: 'cve-file-2-text', textSelectable: true, multiline: true}, - ] }, - { view: 'Button', rect: '495 365 70 24', anchors: 'bottom right', id: 'cve-file-2-cancel', text: 'Cancel' }, - { view: 'Button', rect: '570 365 70 24', anchors: 'bottom right', id: 'cve-file-2-go', text: 'File bug' } - ] - } -); - -uki("#cve-file").click( - function() { - var sel = uki('Table').selectedRows(); - - if (sel.length < 1) { - alert("Please select at least one CVE."); - return false; - } - - // TODO: Avoid DoS'ing the package search by limiting the # of package to search for - - var popup = uki('#file-1-popup'); - - // yes, this wants to be a global var - cve_file_data = new Array(); - for (var i = 0; i < sel.length; i++) { - cve_file_data.push(sel[i][0]); - } - - new Ajax.Request('/cve/bug_package', { - parameters: { cves: cve_file_data.join(',')}, - onSuccess: function(response) { - uki('#cve-file-1-list').data(response.responseJSON['package_hints']); - uki('#cve-file-1-atom').value(''); - uki('#cve-file-1-atom').focus(); - disableMainView(); - popup.show(); - }, - onFailure: function(response) { - alert("Could not process your request:\n\n" + response.responseText); - return false; - } - }); - } -); - -uki('#cve-file-1-cancel').click( - function() { - uki('#file-1-popup').hide(); - enableMainView(); - } -); - -uki('#cve-file-1-go').click( - function() { - var package_name = ""; - - if (uki('#cve-file-1-list').selectedIndex() > 0 && uki('#cve-file-1-atom').value() != '') { - alert('Either select a package or enter something'); - return false; - } - - if (uki('#cve-file-1-list').selectedIndex() < 0) { - package_name = uki('#cve-file-1-atom').value(); - } else { - package_name = uki('#cve-file-1-list').selectedRow(); - } - - if (package_name == undefined || package_name == "") { - alert("Please select a package."); - return false; - } - - if (cve_file_data < 1) { - alert("Error. Internal CVE list empty."); - uki('#file-1-popup').hide(); - return; - } - - new Ajax.Request('/cve/bug_preview', { - parameters: { package: package_name, cves: cve_file_data.join(',') }, - onSuccess: function(response) { - uki('#cve-file-2-text').html(response.responseText); - uki('#cve-file-2-text').resizeToContents('height'); - - uki('#file-1-popup').hide(); - uki('#file-2-popup').show(); - $('bug_title').focus(); - }, - onFailure: function(response) { - alert("Could not process your request:\n\n" + response.responseText); - return false; - } - }); - } -); - -uki('#cve-file-2-cancel').click( - function() { - uki('#file-2-popup').hide(); - } -); - -uki('#cve-file-2-go').click( - function() { - if (cve_file_data < 1) { - alert("Error. Internal CVE list empty."); - uki('#file-2-popup').hide(); - return; - } - - if ($('wb_1').value == '--') { - alert('Please select a whiteboard setting. If unsure use "??" instead.'); - $('wb_1').focus(); - return; - } - - if (!($('add_comment').checked || $('add_cves').checked)) { - alert("Adding the CVE description is strongly suggested!\n\nIf you do not want to add it, then you need at least to add a comment."); - $('comment').focus(); - return; - } - - uki('#cve-file-2-go').disabled(true); - - var params = { - bug_title: $('bug_title').value, - bug_type: $('type_1').checked, - cc_maint: $('cc_maint').checked, - cc_custom: $('custom_cc').value, - wb_1: $('wb_1').value, - wb_2: $('wb_2').value, - wb_ext: $('wb_ext').value, - add_comment: $('add_comment').checked, - comment: $('comment').value, - add_cves: $('add_cves').checked, - package: $('package').value, - cves: cve_file_data.join(',') - }; - - new Ajax.Request('/cve/bug', { - parameters: params, - onSuccess: function(response) { - uki('#file-2-popup').hide(); - uki('#cve-file-2-go').disabled(false); - reloadTable(); - }, - onFailure: function(response) { - alert("Could not process your request:\n\n" + response.responseText); - uki('#cve-file-2-go').disabled(false); - } - }); - } -); -/** Filing end **/ diff --git a/app/views/cve/_invalidate.js.erb b/app/views/cve/_invalidate.js.erb deleted file mode 100644 index 6cb031d..0000000 --- a/app/views/cve/_invalidate.js.erb +++ /dev/null @@ -1,71 +0,0 @@ -/** Invalidating **/ -uki( - { view: 'Popup', rect: '500 300', anchors: 'left top', id: 'inva-popup', hideOnClick: false, relativeTo: uki('#popup'), childViews: [ - { view: 'Label', rect: '10 10 480 20', anchors: 'top', html: '<strong>The following CVEs will be marked as INVALID:</strong>', id: 'cve-inva-title'}, - { view: 'ScrollableList', rect: '10 35 480 190', anchors: 'top left right bottom', id: 'cve-inva-list' }, - { view: 'TextField', rect: '10 235 480 22', anchors: 'left top right', id: 'inva-comment' }, - { view: 'Button', rect: '345 265 70 24', anchors: 'bottom right', id: 'cve-inva-cancel', text: 'Cancel' }, - { view: 'Button', rect: '420 265 70 24', anchors: 'bottom right', id: 'cve-inva-go', text: 'Commit' } - ] - } -); - -uki("#cve-mark-invalid").click( - function() { - var sel = uki('Table').selectedRows(); - - if (sel.length < 1) { - alert("Please select at least one CVE."); - return false; - } - - var data = new Array(); - cve_inva_data = new Array(); - - for (var i = 0; i < sel.length; i++) { - data.push("(" + sel[i][1] + ") " + sel[i][2]); - cve_inva_data.push(sel[i][0]); - } - - uki('#cve-inva-list').data(data); - - uki('#inva-comment').value(''); - uki('#inva-popup').show(); - - uki('#cve-inva-go').focus(); - } -); - -uki('#cve-inva-go').click( - function() { - if (cve_inva_data < 1) { - alert("Error. Internal CVE list empty."); - return; - uki('#inva-popup').hide(); - } - - if (uki('#inva-comment').value() == "") { - alert("You need to provide a reason."); - uki('#inva-comment').focus(); - return; - } - - new Ajax.Request('/cve/invalid', { - parameters: { cves: cve_inva_data.join(','), reason: uki('#inva-comment').value() }, - onSuccess: function(response) { - uki('#inva-popup').hide(); - reloadTable(); - }, - onFailure: function(response) { - alert("Could not process your request:\n\n" + response.responseText); - } - }); - } -); - -uki('#cve-inva-cancel').click( - function() { - uki('#inva-popup').hide(); - } -); -/** Invalidating end **/
\ No newline at end of file diff --git a/app/views/cve/_key_events.js.erb b/app/views/cve/_key_events.js.erb deleted file mode 100644 index 9bdf740..0000000 --- a/app/views/cve/_key_events.js.erb +++ /dev/null @@ -1,71 +0,0 @@ -/** Keyboard events **/ -document.onkeyup = function(e){ - var keycode; - - if (e == null) { // ie - keycode = event.keyCode; - } else { // mozilla - keycode = e.which; - } - - if (keycode == 27) { - if (uki('#nfu-popup').visible()) - uki('#nfu-popup').hide(); - if (uki('#assign-popup').visible()) - uki('#assign-popup').hide(); - if (uki('#file-1-popup').visible()) - uki('#file-1-popup').hide(); - if (uki('#file-2-popup').visible()) - uki('#file-2-popup').hide(); - - enableMainView(); - uki('Table').focus(); - } else if (keycode == 13 && e.ctrlKey) { - if (uki('#nfu-popup').visible()) - uki('#cve-nfu-go').click(); - if (uki('#assign-popup').visible()) - uki('#cve-assign-go').click(); - if (uki('#file-1-popup').visible()) - uki('#cve-file-1-go').click(); - if (uki('#file-2-popup').visible()) - uki('#cve-file-2-go').click(); - } -}; - -uki('Table').keyup( - function(e) { - var c = e.keyCode; - //alert(c); - - if (c == 110 || c == 78) { // n;N - uki('#cve-mark-nfu').click(); - return; - } - - if (c == 108 || c == 76) { // l;L - uki('#cve-mark-later').click(); - return; - } - - if (c == 105 || c == 73) { // i;I - uki('#cve-mark-invalid').click(); - return; - } - - if (c == 97 || c == 65 || c == 51) { // a;A;# - uki('#assign-bug-nr').focus(); - return; - } - - if (c == 102 || c == 70 || c == 98 || c == 66) { // f;F;b;B - uki('#cve-file').click(); - return; - } - - if (c == 13) { // enter key - uki('#cve-details').click(); - return; - } - } -); -/** Keyboard events end **/
\ No newline at end of file diff --git a/app/views/cve/_later.js.erb b/app/views/cve/_later.js.erb deleted file mode 100644 index 0be1726..0000000 --- a/app/views/cve/_later.js.erb +++ /dev/null @@ -1,65 +0,0 @@ -/** Latering **/ -uki( - { view: 'Popup', rect: '500 300', anchors: 'left top', id: 'later-popup', hideOnClick: false, relativeTo: uki('#popup'), childViews: [ - { view: 'Label', rect: '10 10 480 20', anchors: 'top', html: '<strong>The following CVEs will be marked as LATER:</strong>', id: 'cve-later-title'}, - { view: 'ScrollableList', rect: '10 35 480 190', anchors: 'top left right bottom', id: 'cve-later-list' }, - { view: 'TextField', rect: '10 235 480 22', anchors: 'left top right', placeholder: 'Add a (public) comment', id: 'later-comment' }, - { view: 'Button', rect: '345 265 70 24', anchors: 'bottom right', id: 'cve-later-cancel', text: 'Cancel' }, - { view: 'Button', rect: '420 265 70 24', anchors: 'bottom right', id: 'cve-later-go', text: 'Commit' } - ] - } -); - -uki("#cve-mark-later").click( - function() { - var sel = uki('Table').selectedRows(); - - if (sel.length < 1) { - alert("Please select at least one CVE."); - return false; - } - - var data = new Array(); - cve_later_data = new Array(); - - for (var i = 0; i < sel.length; i++) { - data.push("(" + sel[i][1] + ") " + sel[i][2]); - cve_later_data.push(sel[i][0]); - } - - uki('#cve-later-list').data(data); - - uki('#later-comment').value(''); - uki('#later-popup').show(); - - uki('#cve-later-go').focus(); - } -); - -uki('#cve-later-go').click( - function() { - if (cve_later_data < 1) { - alert("Error. Internal CVE list empty."); - return; - uki('#later-popup').hide(); - } - - new Ajax.Request('/cve/later', { - parameters: { cves: cve_later_data.join(','), reason: uki('#later-comment').value() }, - onSuccess: function(response) { - uki('#later-popup').hide(); - reloadTable(); - }, - onFailure: function(response) { - alert("Could not process your request:\n\n" + response.responseText); - } - }); - } -); - -uki('#cve-later-cancel').click( - function() { - uki('#later-popup').hide(); - } -); -/** Latering end **/
\ No newline at end of file diff --git a/app/views/cve/_new.js.erb b/app/views/cve/_new.js.erb deleted file mode 100644 index 7f8c49b..0000000 --- a/app/views/cve/_new.js.erb +++ /dev/null @@ -1,75 +0,0 @@ -/** New CVE **/ -uki( - { view: 'Popup', rect: '650 300', anchors: 'left top', id: 'new-popup', hideOnClick: false, relativeTo: uki('#popup'), childViews: [ - { view: 'Label', rect: '10 10 630 20', anchors: 'top', text: '', id: 'cve-new-title' }, - { view: 'ScrollPane', rect: '10 30 635 220', anchors: 'top left right bottom', id: 'cve-new-scroll', scrollableV: true, scrollableH: false, childViews: [ - { view: 'Label', rect: '10 20 600 100', anchors: 'top', text: '', id: 'cve-new-text', textSelectable: true, multiline: true }, - ] }, - { view: 'Button', rect: '495 265 70 24', anchors: 'bottom right', id: 'cve-new-cancel', text: 'Cancel' }, - { view: 'Button', rect: '570 265 70 24', anchors: 'bottom right', id: 'cve-new-go', text: 'Create' } - ] - } -); - -uki("#cve-new").click( - function() { - var popup = uki('#new-popup'); - - new Ajax.Request('/cve/new_preview', { - onSuccess: function(response) { - uki('#cve-new-text').html(response.responseText); - uki('#cve-new-text').resizeToContents('height'); - - uki('#cve-new-title').html("<strong>Please provide the following CVE information:</strong>"); - popup.show(); - uki('#cve-new-go').disabled(false); - uki('#cve-new-go').focus(); - }, - onFailure: function(response) { - alert("Could not process your request:\n\n" + response.response.Text); - return false; - } - }); - } -); - -uki('#cve-new-cancel').click( - function() { - uki('#new-popup').hide(); - enableMainView(); - } -); - -uki('#cve-new-go').click( - function() { - if ($('cve_id').value.length < 13) { - alert("Please enter a valid 13 digit CVE identifier."); - return false; - } - if ($('summary').value.length < 1) { - alert("Please enter a CVE summary."); - return false; - } - - uki('#cve-new-go').disabled(true); - var params = { - cve_id: $('cve_id').value, - summary: $('summary').value - }; - - new Ajax.Request('new', { - parameters: params, - onSuccess: function(message) { - uki('#new-popup').hide(); - uki('#cve-new-go').disabled(false); - reloadTable(); - }, - onFailure: function(request, textStatus, errorThrown) { - var message = (request.status == 403) ? request.responseText : "Filing the CVE failed. Is this a duplicate?"; - alert(message); - uki('#cve-new-go').disabled(false); - } - }); - } -); -/** New CVE end **/ diff --git a/app/views/cve/_nfu.js.erb b/app/views/cve/_nfu.js.erb deleted file mode 100644 index b73723f..0000000 --- a/app/views/cve/_nfu.js.erb +++ /dev/null @@ -1,65 +0,0 @@ -/** NFU **/ -uki( - { view: 'Popup', rect: '500 300', anchors: 'left top', id: 'nfu-popup', hideOnClick: false, relativeTo: uki('#popup'), childViews: [ - { view: 'Label', rect: '10 10 480 20', anchors: 'top', html: '<strong>The following CVEs will be marked as NFU:</strong>', id: 'cve-nfu-title'}, - { view: 'ScrollableList', rect: '10 35 480 190', anchors: 'top left right bottom', id: 'cve-nfu-list' }, - { view: 'TextField', rect: '10 235 480 22', anchors: 'left top right', placeholder: 'Add a (public) comment', id: 'nfu-comment' }, - { view: 'Button', rect: '345 265 70 24', anchors: 'bottom right', id: 'cve-nfu-cancel', text: 'Cancel' }, - { view: 'Button', rect: '420 265 70 24', anchors: 'bottom right', id: 'cve-nfu-go', text: 'Commit' } - ] - } -); - -uki("#cve-mark-nfu").click( - function() { - var sel = uki('Table').selectedRows(); - - if (sel.length < 1) { - alert("Please select at least one CVE."); - return false; - } - - var data = new Array(); - cve_nfu_data = new Array(); - - for (var i = 0; i < sel.length; i++) { - data.push("(" + sel[i][1] + ") " + sel[i][2]); - cve_nfu_data.push(sel[i][0]); - } - - uki('#cve-nfu-list').data(data); - - uki('#nfu-comment').value(''); - uki('#nfu-popup').show(); - - uki('#cve-nfu-go').focus(); - } -); - -uki('#cve-nfu-go').click( - function() { - if (cve_nfu_data < 1) { - alert("Error. Internal CVE list empty."); - return; - uki('#nfu-popup').hide(); - } - - new Ajax.Request('/cve/nfu', { - parameters: { cves: cve_nfu_data.join(','), reason: uki('#nfu-comment').value() }, - onSuccess: function(response) { - uki('#nfu-popup').hide(); - reloadTable(); - }, - onFailure: function(response) { - alert("Could not process your request:\n\n" + response.responseText); - } - }); - } -); - -uki('#cve-nfu-cancel').click( - function() { - uki('#nfu-popup').hide(); - } -); -/** NFU end **/
\ No newline at end of file diff --git a/app/views/cve/_toolbar.js.erb b/app/views/cve/_toolbar.js.erb deleted file mode 100644 index 2616bf6..0000000 --- a/app/views/cve/_toolbar.js.erb +++ /dev/null @@ -1,54 +0,0 @@ -/** Toolbar begin **/ -function toolbar() { - var years = [{ value: 0, text: 'ALL' }, { value: 2010, text: '2010' }, { value: 2009, text: '2009' }, { value: 2009, text: '2009' }, - { value: 2008, text: '2008' }, { value: 2007, text: '2007' }, { value: 2006, text: '2006' }, { value: 2005, text: '2005' }, - { value: 2004, text: '2004' }]; - - return [ - { view: 'Image', rect: '0 0 220 57', anchors: 'left top', src: '<%= asset_path 'cvetool-logo.png' %>', id: 'logo' }, - // view settings - { view: 'Image', rect: '5 57 16 16', anchors: 'left top', src: '<%= asset_path 'icons/switch.png' %>' }, - { view: 'Label', rect: '25 54 100 24', anchors: 'left top right', text: 'View settings' }, - { view: 'uki.more.view.ToggleButton', rect: '5 80 36 22', anchors: 'top', text: 'NEW', id: 'toggle-new', checked: true }, - { view: 'uki.more.view.ToggleButton', rect: '43 80 36 22', anchors: 'top', text: 'ASS', id: 'toggle-assigned' }, - { view: 'uki.more.view.ToggleButton', rect: '82 80 36 22', anchors: 'top', text: 'LAT', id: 'toggle-later' }, - { view: 'uki.more.view.ToggleButton', rect: '121 80 36 22', anchors: 'top', text: 'NFU', id: 'toggle-nfu' }, - { view: 'uki.more.view.ToggleButton', rect: '159 80 36 22', anchors: 'top', text: 'INV', id: 'toggle-invalid' }, - - // searching and filtering - { view: 'TextField', rect: '5 105 135 22', anchors: 'left top right', placeholder: 'quicksearch', id: 'quicksearch' }, - { view: 'Button', rect: '145 105 50 22', anchors: 'top right', text: 'Filter…', id: 'filter', disabled: true }, - - { view: 'Label', rect: '100 85 10 10', anchors: 'left top right', text: '', id: 'popup'}, - // assign - { view: 'Image', rect: '5 140 16 16', anchors: 'left top', src: '<%= asset_path 'icons/bug_add.png' %>' }, - { view: 'Label', rect: '25 137 188 24', anchors: 'left top right', text: 'Assign selected CVEs to bug' }, - { view: 'TextField', rect: '5 165 135 22', anchors: 'left top right', placeholder: 'bug', id: 'assign-bug-nr' }, - { view: 'Button', rect: '145 164 50 24', anchors: 'top right', text: 'Assign', id: 'cve-assign' }, - // file-new-bug - { view: 'Image', rect: '5 200 16 16', anchors: 'left top', src: '<%= asset_path 'icons/bug_new.png' %>' }, - { view: 'Label', rect: '25 198 188 24', anchors: 'left top right', text: 'New bug from selected CVEs' }, - { view: 'Button', rect: '5 225 188 24', anchors: 'left top right', text: 'File a new bug', id: 'cve-file' }, - // mark-as - { view: 'Image', rect: '5 265 16 16', anchors: 'left top', src: '<%= asset_path 'icons/stamp.png' %>' }, - { view: 'Label', rect: '25 262 188 24', anchors: 'left top right', text: 'Mark selected CVEs as…' }, - { view: 'Button', rect: '5 290 60 24', anchors: 'left top' , text: 'NFU', id: 'cve-mark-nfu' }, - { view: 'Button', rect: '70 290 60 24', anchors: 'left top', text: 'LATER', id: 'cve-mark-later' }, - { view: 'Button', rect: '135 290 60 24', anchors: 'left top', text: 'INVALID', id: 'cve-mark-invalid' }, - // add-a-note - { view: 'Image', rect: '5 330 16 16', anchors: 'left top', src: '<%= asset_path 'icons/note.png' %>' }, - { view: 'Label', rect: '25 327 188 24', anchors: 'left top right', text: 'Add a note to selected CVEs' }, - { view: 'MultilineTextField', rect: '5 350 189 50', anchors: 'left top right', placeholder: 'Note', id: 'cve-note-text' }, - { view: 'Button', rect: '135 405 60 24', anchors: 'right top', text: 'Add note', id: 'cve-add-note' }, - // mark-as - { view: 'Image', rect: '5 445 16 16', anchors: 'left top', src: '<%= asset_path 'icons/info.png' %>' }, - { view: 'Button', rect: '25 442 170 24', anchors: 'left top' , text: 'Info about selected CVEs', id: 'cve-details' }, - // New CVE - { view: 'Button', rect: '5 475 190 24', anchors: 'left top right', text: 'Add a new CVE', id: 'cve-new' }, - - // bottom stuff - { view: 'Button', rect: '5 940 190 24', anchors: 'left bottom right', text: 'Reload table', id: 'reload-table' }, - { view: 'Button', rect: '5 970 190 24', anchors: 'left bottom right', text: 'Back to GLSAMaker', id: 'close' } - ]; -} -/** Toolbar end **/ diff --git a/app/views/cve/_ui_misc.js.erb b/app/views/cve/_ui_misc.js.erb deleted file mode 100644 index 135f653..0000000 --- a/app/views/cve/_ui_misc.js.erb +++ /dev/null @@ -1,115 +0,0 @@ -/** UI misc **/ -uki("#reload-table").click( - function() { reloadTable(); } -); - -uki("#cve-details").click( - function() { - var sel = uki('Table').selectedRows(); - - if (sel.length > 15) { - alert("I'm not opening more than 15 windows..."); - return false; - } - - for(var i = 0; i < sel.length; i++) { - cvepopup(sel[i][1]); - } - } -); - -uki("#close").click( - function() { - window.location = "/"; - } -); - -uki('Table').bind('dblclick', function() { - cvepopup(uki('Table').selectedRow()[1]); -}); - -// View settings -uki("#toggle-new").click( - function() { - if (this.checked()) - view |= 1; - else - view ^= 1; - - reloadTable(); - } -); - -uki("#toggle-assigned").click( - function() { - if (this.checked()) - view |= 2; - else - view ^= 2; - - reloadTable(); - } -); - -uki("#toggle-later").click( - function() { - if (this.checked()) - view |= 4; - else - view ^= 4; - - reloadTable(); - } -); - -uki("#toggle-nfu").click( - function() { - if (this.checked()) - view |= 8; - else - view ^= 8; - - reloadTable(); - } -); - -uki("#toggle-invalid").click( - function() { - if (this.checked()) - view |= 16; - else - view ^= 16; - - reloadTable(); - } -); - -uki("#cve-add-note").click( - function() { - var sel = uki('Table').selectedRows(); - - if (sel.length < 1) { - alert("Please select at least one CVE."); - return false; - } - - var data = new Array(); - - for (var i = 0; i < sel.length; i++) { - data.push(sel[i][0]); - } - - new Ajax.Request('/cve/note', { - parameters: { cves: data.join(','), note: uki('#cve-note-text').value() }, - onSuccess: function(response) { - uki('#cve-note-text').value(''); - reloadTable(); - }, - onFailure: function(response) { - alert("Could not process your request:\n\n" + response.responseText); - } - }); - } -); - -/** UI misc end **/
\ No newline at end of file diff --git a/app/views/cve/actions.html.erb b/app/views/cve/actions.html.erb deleted file mode 100644 index 139bcab..0000000 --- a/app/views/cve/actions.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -<h2 style="margin-top: 0;">Actions</h2> - -<button onclick="new Ajax.Request('/cve/mark_new/', {parameters: { cve_id: cve_id }, onSuccess: function(response) { window.location.reload(); }, onFailure: function(response) { alert('Could not process your request:\n\n' + response.responseText); }});">Mark as NEW</button> - -<p>For all other actions, please use the table view.</p>
\ No newline at end of file diff --git a/app/views/cve/assign_preview.html.erb b/app/views/cve/assign_preview.html.erb deleted file mode 100644 index 3fff283..0000000 --- a/app/views/cve/assign_preview.html.erb +++ /dev/null @@ -1,17 +0,0 @@ -<strong> - <input type="checkbox" id="change_summary" value="1" checked="checked" /> - <label for="change_summary">Change summary</label> -</strong> - -<p><tt><%= @summary %></tt></p> -<p><small>was:</small><br /> - <tt><%= @bug.summary %></tt> -</p> - -<br /> -<strong> - <input type="checkbox" id="add_comment" value="1" checked="checked" /> - <label for="add_comment">Add comment</label> -</strong> - -<p><pre><%= @cve_txt %></pre></p>
\ No newline at end of file diff --git a/app/views/cve/bug_preview.html.erb b/app/views/cve/bug_preview.html.erb deleted file mode 100644 index 74d172f..0000000 --- a/app/views/cve/bug_preview.html.erb +++ /dev/null @@ -1,81 +0,0 @@ -<form> -<label for="bug_title"><strong>Bug title:</strong></label><br /> -<input type="text" id="bug_title" value="<%= @package %>: Unspecified vulnerability (<%= bugs_unify_cvenames(@cve_ids) %>)" style="width: 100%; font-size: 115%;" /> -<br /><br /> -<strong>File in:</strong> -<input type="radio" name="bug_type" id="type_1" value="vuln" checked="checked" /> -<label for="type_1">Vulnerabilities</label> -<input type="radio" name="bug_type" id="type_2" value="kernel" /> -<label for="type_2">Kernel</label> -<br /><br /> - -<input type="checkbox" id="cc_maint" value="1" checked="checked" /> -<label for="cc_maint"><strong>CC the maintainers:</strong></label> <%= @maintainers.join ', ' %> -<br /><br /> -<label for="custom_cc"><strong>Add other people to CC:</strong> (comma separated)</label><br /> -<input type="text" id="custom_cc" style="width: 100%" /> -<br /><br /> - -<strong>Whiteboard:</strong><br /> -<select id="wb_1"> - <option>--</option> - <option>A0</option> - <option>A1</option> - <option>A2</option> - <option>A3</option> - <option>A4</option> - <option>A?</option> - <option>B0</option> - <option>B1</option> - <option>B2</option> - <option>B3</option> - <option>B4</option> - <option>B?</option> - <option>C0</option> - <option>C1</option> - <option>C2</option> - <option>C3</option> - <option>C4</option> - <option>C?</option> - <option>~0</option> - <option>~1</option> - <option>~2</option> - <option>~3</option> - <option>~4</option> - <option>~?</option> - <option>?0</option> - <option>?1</option> - <option>?2</option> - <option>?3</option> - <option>?4</option> - <option>??</option> -</select> - -<select id="wb_2"> - <option>[ebuild cve]</option> - <option>[upstream cve]</option> - <option>[upstream/ebuild cve]</option> - <option>[stable cve]</option> - <option>[stable? cve]</option> - <option>[cleanup cve]</option> - <option>[?]</option> -</select> - -<input type="text" id="wb_ext" /> - -<br /><br /> -<input type="checkbox" id="add_comment" value="1" /> -<label for="add_comment"><strong>Add a comment:</strong> (appears after the CVE descriptions)</label> - -<textarea id="comment" rows="5" style="width: 100%;" onchange="$('add_comment').checked = true;"></textarea> - -<br /><br /> -<strong> - <input type="checkbox" id="add_cves" value="1" checked="checked" /> - <label for="add_cves">Add CVE descriptions:</label> -</strong> - -<p><pre><%= @cve_txt %></pre></p> - -<input type="hidden" name="package" id="package" value="<%= @package %>" /> -</form>
\ No newline at end of file diff --git a/app/views/cve/changes.html.erb b/app/views/cve/changes.html.erb deleted file mode 100644 index 00de2a7..0000000 --- a/app/views/cve/changes.html.erb +++ /dev/null @@ -1,10 +0,0 @@ -<h2 style="margin-top: 0;">Changes</h2> - -<ul> -<% @cve.cve_changes.each do |change| %> - <li> - <strong><%= change.action %>:</strong> <%= change.object %><br /> - <em>—<%= change.user.login %></em> @ <%= change.created_at.rfc2822 %> - </li> -<% end %> -</ul>
\ No newline at end of file diff --git a/app/views/cve/comments.html.erb b/app/views/cve/comments.html.erb deleted file mode 100644 index 36311bf..0000000 --- a/app/views/cve/comments.html.erb +++ /dev/null @@ -1,10 +0,0 @@ -<h2 style="margin-top: 0;">Comments</h2> - -<ul> -<% @cve.comments.each do |comment| %> - <li> - <%= simple_format_without_paragraph(comment.comment) %><br /> - <em>—<%= comment.user.login %></em> @ <%= comment.created_at.rfc2822 %> - </li> -<% end %> -</ul>
\ No newline at end of file diff --git a/app/views/cve/general_info.html.erb b/app/views/cve/general_info.html.erb deleted file mode 100644 index 5179ce9..0000000 --- a/app/views/cve/general_info.html.erb +++ /dev/null @@ -1,11 +0,0 @@ -<h2 style="margin-top: 0;">Info</h2> - -<h3>Assigned bugs</h3> - -<ul> -<% @cve.assignments.each do |ass| %> - <li> - <a href="https://<%= GLSAMAKER_BUGZIE_HOST %>/<%= ass.bug %>" target="_blank"><%= ass.bug %></a> - </li> -<% end %> -</ul> diff --git a/app/views/cve/index.html.erb b/app/views/cve/index.html.erb deleted file mode 100644 index e69de29..0000000 --- a/app/views/cve/index.html.erb +++ /dev/null diff --git a/app/views/cve/info.html.erb b/app/views/cve/info.html.erb deleted file mode 100644 index 33a9383..0000000 --- a/app/views/cve/info.html.erb +++ /dev/null @@ -1,140 +0,0 @@ -<% if @cve == nil %> - -<h2 style="margin-top: 0;"><%= error_msg("Invalid CVE ID") %></h2> -<p>There is no such CVE.</p> - -<% else %> -<script language="JavaScript" type="text/javascript"> -cve_id = "<%= escape_javascript @cve.cve_id %>"; - -// page layout -uki({ view: 'VSplitPane', rect: '500 600', anchors: 'left top right bottom', topMin: 120, handlePosition: 120, - topChildViews: [ - { view: 'Box', rect: '0 0 500 30', anchors: 'top right left', background: 'cssBox(background:#D3CFE5;border-bottom:1px solid #999)', childViews: [ - { view: 'Label', rect: '5 5 400 20', html: "<h2 style='margin: 0;'><%= @cve.colorize.html_safe %> <small>(<%= @cve.state %>)</small></h2>", anchors: 'top left'}, - { view: 'Button', rect: '440 4 50 20', text: 'Close', anchors: 'top right', id: 'close' } - ] }, - { view: 'Label', rect: '5 35 490 50', anchors: 'left top right', html: '<%= escape_javascript(simple_format_without_paragraph(@cve.summary)).gsub(/\n/, '') %>', textSelectable: true, multiline: true} - ], - bottomPane: { background: '#FFF', childViews: [ - { view: 'ScrollPane', rect: '0 0 500 445', anchors: 'top left right bottom', id: 'info-scroll', scrollableV: true, scrollableH: false, childViews: [ - { view: 'Label', rect: '5 5 495 445', anchors: 'top left right bottom', html: '', id: 'content', textSelectable: true, multiline: true}, - ] }, - - { view: 'Box', rect: '0 445 500 28', anchors: 'left bottom right', background: 'cssBox(background:#CCC;border-top:1px solid #999;padding:1px;)', childViews: [ - { view: 'Button', rect: '5 4 40 20', text: 'Info', anchors: 'bottom left', id: 'info' }, - { view: 'Button', rect: '50 4 80 20', text: 'References', anchors: 'bottom left', id: 'references' }, - { view: 'Button', rect: '135 4 70 20', text: 'Packages', anchors: 'bottom left', id: 'packages' }, - { view: 'Button', rect: '210 4 80 20', text: 'Comments', anchors: 'bottom left', id: 'comments' }, - { view: 'Button', rect: '295 4 60 20', text: 'Changes', anchors: 'bottom left', id: 'changes' }, - <% if current_user.access >= 2 %>{ view: 'Button', rect: '430 4 60 20', text: 'Actions', anchors: 'bottom right', id: 'actions' },<% end %> - ] } - ]} -}).attachTo(window, '500 600'); - -uki('#close').click( - function() { - window.close(); - } -); - -uki('#info').click( - function() { - new Ajax.Request('/cve/general_info', { - parameters: { cve_id: cve_id }, - onSuccess: function(response) { - uki('#content').html(response.responseText); - uki('#content').resizeToContents('height'); - }, - onFailure: function(response) { - alert("Could not process your request:\n\n" + response.responseText); - return false; - } - }); - } -); - -uki('#info').click(); - -uki('#references').click( - function() { - new Ajax.Request('/cve/references', { - parameters: { cve_id: cve_id }, - onSuccess: function(response) { - uki('#content').html(response.responseText); - uki('#content').resizeToContents('height'); - }, - onFailure: function(response) { - alert("Could not process your request:\n\n" + response.responseText); - return false; - } - }); - } -); - -uki('#packages').click( - function() { - new Ajax.Request('/cve/packages', { - parameters: { cve_id: cve_id }, - onSuccess: function(response) { - uki('#content').html(response.responseText); - uki('#content').resizeToContents('height'); - }, - onFailure: function(response) { - alert("Could not process your request:\n\n" + response.responseText); - return false; - } - }); - } -); - -uki('#comments').click( - function() { - new Ajax.Request('/cve/comments', { - parameters: { cve_id: cve_id }, - onSuccess: function(response) { - uki('#content').html(response.responseText); - uki('#content').resizeToContents('height'); - }, - onFailure: function(response) { - alert("Could not process your request:\n\n" + response.responseText); - return false; - } - }); - } -); - -uki('#changes').click( - function() { - new Ajax.Request('/cve/changes', { - parameters: { cve_id: cve_id }, - onSuccess: function(response) { - uki('#content').html(response.responseText); - uki('#content').resizeToContents('height'); - }, - onFailure: function(response) { - alert("Could not process your request:\n\n" + response.responseText); - return false; - } - }); - } -); - -uki('#actions').click( - function() { - new Ajax.Request('/cve/actions', { - parameters: { cve_id: cve_id }, - onSuccess: function(response) { - uki('#content').html(response.responseText); - uki('#content').resizeToContents('height'); - }, - onFailure: function(response) { - alert("Could not process your request:\n\n" + response.responseText); - return false; - } - }); - } -); -</script> - -<% end %> diff --git a/app/views/cve/info.json.jbuilder b/app/views/cve/info.json.jbuilder deleted file mode 100644 index 31408a0..0000000 --- a/app/views/cve/info.json.jbuilder +++ /dev/null @@ -1,5 +0,0 @@ -json.extract! @cve, :id, :cve_id, :summary, :cvss, :state, :published_at - -json.references @cve.references, :source, :title, :uri - -json.bugs @cve.assignments.map { |a| a.bug } diff --git a/app/views/cve/list.html.erb b/app/views/cve/list.html.erb deleted file mode 100644 index 9a5fad6..0000000 --- a/app/views/cve/list.html.erb +++ /dev/null @@ -1,135 +0,0 @@ -<h1>CVE List</h1> - -<script language="JavaScript" type="text/javascript"> - -var view = 1; // NEW by default - -// formatter for highlighted strings -var hlt = ''; -function formatHlted (t) { - return hlt ? (t || '').replace(hlt, '<strong>' + hlt + '</strong>') : t; -} - -<%= render :partial => 'toolbar.js' %> - -uki( - { view: 'HSplitPane', rect: '1000 1000', anchors: 'left top right bottom', handleWidth: 1, handlePosition: 199, leftMin: 199, rightMin: 400, - leftPane: { background: '#D3CFE5', childViews: toolbar() }, - rightChildViews: [ - { view: 'Table', rect: '0 0 800 1000', minSize: '0 200', anchors: 'left top right bottom', columns: [ - { view: 'table.NumberColumn', label: 'ID', width: 50 }, - { view: 'table.CustomColumn', label: 'CVE ID', width: 125, formatter: formatHlted, sort: 'DESC' }, - { view: 'table.CustomColumn', label: 'Summary', resizable: true, minWidth: 300, width: (window.innerWidth - 200 - 50 - 125 - 80 - 15), formatter: formatHlted }, - { view: 'table.CustomColumn', label: 'State', width: 80, formatter: formatHlted }, - ], multiselect: true, style: {fontSize: '12px', lineHeight: '12px'} } - ] - } -).attachTo(window, '1000 1000'); - -uki( - { view: 'Popup', rect: '100 20', id: 'loading', anchors: '', relativeTo: uki('#logo'), hideOnClick: false, childViews: [ - { view: 'Label', rect: '20 2 98 18', anchors: 'top', text: 'LOADING...', textAlign: 'center', id: 'loading-text'}, - ] - } -).show(); - -<%= render :partial => 'key_events.js' %> - -<%= render :partial => 'ui_misc.js' %> - -<%= render :partial => 'filing.js' %> - -<%= render :partial => 'assigning.js' %> - -<%= render :partial => 'new.js' %> - -<%= render :partial => 'nfu.js' %> - -<%= render :partial => 'later.js' %> - -<%= render :partial => 'invalidate.js' %> - -// searchable model -window.DummyModel = uki.newClass(Searchable, new function() { - this.init = function(data) { - this.items = data; - uki.each(this.items, function(i, row) { - row.searchIndex = escapeHTML(row[1].toLowerCase()) + ' ' + row[2].toLowerCase(); - }) - }; - - this.matchRow = function(row, iterator) { - return row.searchIndex.indexOf(iterator.query) > -1; - }; -}); - -// dinamicly load library json -initCVETable = function(data) { - uki('#loading').visible(false); - var model = new DummyModel(data), - lastQuery = '', - table = uki('Table'); - - model.bind('search.foundInChunk', function(chunk) { - table.data(table.data().concat(chunk)).layout(); - }); - - table.find('Header').bind('columnClick', function(e) { - var header = this; - - if (e.column.sort() == 'ASC') e.column.sort('DESC'); - else e.column.sort('ASC'); - - header.redrawColumn(e.columnIndex); - uki.each(header.columns(), function(i, col) { - if (col != e.column && col.sort()) { - col.sort(''); - header.redrawColumn(i); - } - }); - model.items = e.column.sortData(model.items); - table.data(model.items); - }); - - table.data(model.items); - - uki('#quicksearch').unbind('keyup click'); - - uki('#quicksearch').bind('keyup click', function() { - if (this.value().toLowerCase() == lastQuery) return; - lastQuery = this.value().toLowerCase(); - if (lastQuery.match(/\S/)) { - hlt = lastQuery; - table.data([]); - model.search(lastQuery); - } else { - hlt = ''; - table.data(model.items); - } - }); - document.body.className += ''; -}; - -function reloadTable() { - uki('#loading').visible(true); - new Ajax.Request('/cve/list.json', { - parameters: { view_map: view, year: uki('#year-select').value() }, - onSuccess: function(response) { - initCVETable(response.responseJSON); - }, - onFailure: function(response) { - alert("Could not load CVE data."); - uki('#loading').text("Loading CVE data failed. Please try again later."); - } - }); - uki('#quicksearch').click(); -} - -function disableMainView() { -} - -function enableMainView() { -} - -reloadTable(); -</script> diff --git a/app/views/cve/new_preview.html.erb b/app/views/cve/new_preview.html.erb deleted file mode 100644 index 4841c3f..0000000 --- a/app/views/cve/new_preview.html.erb +++ /dev/null @@ -1,7 +0,0 @@ -<form> -<label for="cve_num"><strong>CVE Identifier:</strong></label><br /> -<input type="text" id="cve_id" value="CVE-" style="width: 20%; font-size: 115%;" /> -<br /><br /> -<label for="summary"><strong>CVE Summary:</strong></label><br /> -<textarea id="summary" rows="5" style="width: 100%;"></textarea> -<end> diff --git a/app/views/cve/packages.html.erb b/app/views/cve/packages.html.erb deleted file mode 100644 index 85d37a5..0000000 --- a/app/views/cve/packages.html.erb +++ /dev/null @@ -1,22 +0,0 @@ -<h2 style="margin-top: 0;">Possibly affected Ebuilds</h2> - -<ul> -<% @package_hints.each do |package| %> - <li> - <strong><tt><%= package %></tt></strong><br /> - <%= Glsamaker::Portage.get_metadata(package)[:description] %><br /> - [<a href="http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/<%= package %>" target="_blank">sources.g.o</a>] - [<a href="https://<%= GLSAMAKER_BUGZIE_HOST %>/buglist.cgi?quicksearch=<%= package %>" target="_blank">bugs.g.o</a>] - [<a href="https://<%= GLSAMAKER_BUGZIE_HOST %>/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=<%= package %>&product=Gentoo+Security&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=IN_PROGRESS&bug_status=REOPENED&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=" target="_blank">Secbug history</a>] - </li> -<% end %> -</ul> - -<h2 style="margin-top: 0;">Raw CPE data</h2> -<ul> -<% @cve.cpes.each do |cpe| %> - <li> - <tt><%= cpe.cpe %></tt> - </li> -<% end %> -</ul> diff --git a/app/views/cve/references.html.erb b/app/views/cve/references.html.erb deleted file mode 100644 index df59e94..0000000 --- a/app/views/cve/references.html.erb +++ /dev/null @@ -1,10 +0,0 @@ -<h2 style="margin-top: 0;">References</h2> - -<ul> -<% @cve.references.each do |ref| %> - <li> - (<%= ref.source %>) <strong><%= ref.title %></strong><br /> - <a href="<%= ref.uri %>" target="_blank"><%= ref.uri %></a> - </li> -<% end %> -</ul>
\ No newline at end of file diff --git a/app/views/glsa/_approval_row.erb b/app/views/glsa/_approval_row.erb deleted file mode 100644 index 1949db0..0000000 --- a/app/views/glsa/_approval_row.erb +++ /dev/null @@ -1,5 +0,0 @@ -<tr> - <td><%= is_approval_icon(comment.rating == 'approval') %></td> - <td><%= comment.user.name %> (<%= comment.user.login %>)</td> - <td><%= comment.created_at %></td> -</tr>
\ No newline at end of file diff --git a/app/views/glsa/_close_msg.txt.erb b/app/views/glsa/_close_msg.txt.erb deleted file mode 100644 index a07f975..0000000 --- a/app/views/glsa/_close_msg.txt.erb +++ /dev/null @@ -1,3 +0,0 @@ -This issue was resolved and addressed in - GLSA <%= @glsa.glsa_id %> at <%= @glsa.to_url %> -by GLSA coordinator <%= current_user.to_s %>. diff --git a/app/views/glsa/_comment.html.erb b/app/views/glsa/_comment.html.erb deleted file mode 100644 index 059f4a0..0000000 --- a/app/views/glsa/_comment.html.erb +++ /dev/null @@ -1,27 +0,0 @@ -<li class="comment <%= @css_class || cycle("odd-bright", "") %>"> - <input type="hidden" name="commentread-<%= comment.id %>" id="commentread-<%= comment.id %>" value="<%= comment.read ? "true" : "false" %>" /> - <span class="comment-toolbox"> - <%= link_to_function(comment.read ? image_tag("icons/flag-green.png", :title => 'done') : image_tag("icons/flag.png", :title => 'todo'), - "toggleCommentRead(#{comment.id})", - :title => 'Toggle read status', - :id => "commentflag-#{comment.id}") %> - </span> - <div class="comment-header"> - <%= case comment.rating - when "approval" - image_tag('icons/approval.png', :title => 'Approval') - when "rejection" - image_tag('icons/rejection.png', :title => 'Rejection') - else - image_tag('icons/comment.png', :title => 'Neutral') - end -%> - </div> - - <div class="comment-text"><%= Kramdown::Document.new(h(comment.text)).to_html.html_safe %></div> - <div class="comment-author"> - <span class="comment-number">#<strong><%= @comment_number ||= 1 %></strong></span> - —<strong><%= comment.user.name %></strong>, <%= comment.created_at %> - </div> -</li> - -<% @comment_number += 1 -%>
\ No newline at end of file diff --git a/app/views/glsa/_comments.html.erb b/app/views/glsa/_comments.html.erb deleted file mode 100644 index 65cac94..0000000 --- a/app/views/glsa/_comments.html.erb +++ /dev/null @@ -1,11 +0,0 @@ - <div class="box" id="comments" style="margin-bottom: 4em;"> - <%= box_title('Comments', :icon => 'icons/comment.png', - :toolbar => [ - {:title => 'Add comment', :uri => "javascript:addCommentDialog(#{@glsa.id})", :icon => 'icons/plus.png'}, - {:title => 'Dock right', :uri => "javascript:GLSAMaker.misc.ui.dock($('comments'))", :icon => 'icons/dock-right.png'} - ] - ) %> - <ul id="commentslist"> - <%= render :partial => "comment", :collection => @glsa.comments.order("created_at ASC") %> - </ul> - </div> diff --git a/app/views/glsa/_edit_bug_row.html.erb b/app/views/glsa/_edit_bug_row.html.erb deleted file mode 100644 index 4fcee0e..0000000 --- a/app/views/glsa/_edit_bug_row.html.erb +++ /dev/null @@ -1,13 +0,0 @@ -<tr id="bug-<%= bug.bug_id %>"> - <input type="hidden" name="glsa[bugs][]" value="<%= bug.bug_id %>" /> - <td><%= bugready_icon(bug.bug_ready?) %></td> - <td> - <a href="javascript:///" onclick="buginfo(<%= bug.bug_id %>);"><strong><%= bug.bug_id %></strong></a> <small><a href="<%= bug.bug_url %>">[BZ]</a></small></td> - <td><%= truncate(bug.title, :length => 60) %></td> - <td> - <%= link_to_function( - image_tag('icons/minus.png', :alt => 'Mark as deleted'), - "GLSAMaker.editing.bugs.del(#{bug.bug_id});" - ) %> - </td> -</tr> diff --git a/app/views/glsa/_email_headers.txt.erb b/app/views/glsa/_email_headers.txt.erb deleted file mode 100644 index 3a750e6..0000000 --- a/app/views/glsa/_email_headers.txt.erb +++ /dev/null @@ -1,3 +0,0 @@ -To: gentoo-announce@lists.gentoo.org -Subject: [ GLSA <%= @glsa.glsa_id %> ] <%= @rev.title %> - diff --git a/app/views/glsa/_glsa.xml.builder b/app/views/glsa/_glsa.xml.builder deleted file mode 100644 index 9eeee69..0000000 --- a/app/views/glsa/_glsa.xml.builder +++ /dev/null @@ -1,74 +0,0 @@ -xml.instruct! -xml.declare! :DOCTYPE, :glsa, :SYSTEM, "http://www.gentoo.org/dtd/glsa.dtd" - -xml.glsa :id => glsa.glsa_id do - xml.title rev.title - xml.synopsis rev.synopsis - xml.product({:type => "ebuild"}, rev.product) - xml.announced glsa.release_date.strftime '%Y-%m-%d' - xml.revised({:count => "#{rev.release_revision || 'draft'}"}, glsa.revised_date.strftime('%Y-%m-%d')) - - rev.bugs.each do |bug| - xml.bug bug.bug_id - end - - xml.access rev.release_access - logger.debug rev.packages_by_atom.inspect - xml.affected do - rev.packages_by_atom.each_pair do |package, atoms| - xml.package({:name => package, :auto => (atoms['unaffected'] || []).select {|a| !a.automatic}.length == 0 ? 'yes' : 'no', - :arch => (atoms['vulnerable'].nil? || atoms['vulnerable'].length == 0) ? '*' : atoms['vulnerable'].first.arch}) do - (atoms['unaffected'] || []).each do |a| - if a.slot != '*' - xml.unaffected({:range => a.xml_comp, :slot => a.slot}, a.version) - else - xml.unaffected({:range => a.xml_comp}, a.version) - end - end - (atoms['vulnerable'] || []).each do |a| - if a.slot != '*' - xml.vulnerable({:range => a.xml_comp, :slot => a.slot}, a.version) - else - xml.vulnerable({:range => a.xml_comp}, a.version) - end - end - end - end - end - - xml.background do - xml << xml_format(rev.background || "") - end - - xml.description do - xml << xml_format(rev.description || "") - end - - xml.impact({:type => rev.severity}) do - xml << xml_format(rev.impact || "") - end - - xml.workaround do - xml << xml_format(rev.workaround || "") - end - - xml.resolution do - xml << xml_format(rev.resolution || "") - end - - xml.references do - rev.references.each do |ref| - xml.uri({:link => ref.url}, ref.title) - end - end - - xml.metadata({:tag => 'requester', :timestamp => glsa.created_at.iso8601}, glsa.requester.login) - - if glsa.submitter - xml.metadata({:tag => 'submitter', :timestamp => rev.created_at.iso8601}, glsa.submitter.login) - end - - if glsa.bugreadymaker - xml.metadata({:tag => 'bugReady', :timestamp => Time.now.iso8601}, glsa.bugreadymaker.login) - end -end diff --git a/app/views/glsa/_glsa_row.html.erb b/app/views/glsa/_glsa_row.html.erb deleted file mode 100644 index 5c12adf..0000000 --- a/app/views/glsa/_glsa_row.html.erb +++ /dev/null @@ -1,31 +0,0 @@ -<% if current_user.can_access? glsa %> -<tr class="<%= 'restricted' if glsa.restricted %> <%= cycle 'even', 'odd' %>"> - <td> - <%= status_icon glsa.status %> - <strong><tt><%= glsa.glsa_id %></tt></strong> - </td> - <td> - <%= bugready_icon glsa.last_revision.bug_ready? %> - <%= approval_icon glsa.approval_status %> - <%= workflow_icon(glsa.workflow_status(current_user)) %> - <%= restricted_icon glsa.restricted %> - </td> - <% if view == :requests %> - <td><strong><%= link_to(glsa.last_revision.title, {:controller => 'glsa', :action => 'edit', :id => glsa}, {:title => "Draft this GLSA"}) %></strong></td> - <td><%= glsa.created_at %>, <%= glsa.requester.name %> (<em><%= glsa.requester.login %></em>)</td> - <% else %> - <td><strong><%= link_to(glsa.last_revision.title, {:controller => 'glsa', :action => 'show', :id => glsa}, {:title => "Show this GLSA"}) %></strong></td> - <td><%= glsa.created_at %>, <%= glsa.submitter.name %> (<em><%= glsa.submitter.login %></em>)</td> - <% end %> - <!--<td> - <% if glsa.last_revision; glsa.last_revision.bugs.each do |b| %> - <%= link_to_function b.bug_id, "buginfo('#{b.bug_id}')" %> - <% end ; end %> - </td>--> - <% if current_user.is_el_jefe? %> - <td> - <%= link_to(image_tag('icons/delete.png'), glsa_path(glsa), :confirm => "Are you sure you want to delete this draft?", :method => :delete) %> - </td> - <% end %> -</tr> -<% end %>
\ No newline at end of file diff --git a/app/views/glsa/_package.html.erb b/app/views/glsa/_package.html.erb deleted file mode 100644 index 5e3d115..0000000 --- a/app/views/glsa/_package.html.erb +++ /dev/null @@ -1,16 +0,0 @@ -<% comps = %w{ >= > *>= *> <= < *<= *< = } -%> -<tr class="entry <%= 'invalid' if package.invalid? %>"> -<%= fields_for "glsa[package][]", package do |pf| %> - <td><%= pf.text_field :atom, :class => :nice, :index => nil %></td> - <td class="odd"><%= pf.select :comp, comps, {}, :index => nil %></td> - <td class="odd"><%= pf.text_field :version, :class => :nice, :size => 10, :index => nil %></td> - <td class="odd"><%= pf.text_field :slot, :class => :nice, :size => 5, :index => nil %></td> - <td><%= pf.text_field :arch, :class => :nice, :size => 7, :index => nil %></td> - <td class="odd"><%= pf.select :automatic, [["yes", true], ["no", false]], {}, :index => nil %></td> - <td><%= link_to_function( - image_tag('icons/package-remove.png', :alt => 'Remove package'), - "GLSAMaker.editing.packages.del(this)", - :title => 'Remove package') %> - <%= pf.hidden_field :my_type, :index => nil %></td> -<% end %> -</tr> diff --git a/app/views/glsa/_reference.html.erb b/app/views/glsa/_reference.html.erb deleted file mode 100644 index 8726060..0000000 --- a/app/views/glsa/_reference.html.erb +++ /dev/null @@ -1,10 +0,0 @@ -<tr class="entry"> -<%= fields_for "glsa[reference][]", reference do |rf| %> - <td><%= rf.text_field :title, :class => :nice, :size => 18, :index => nil %></td> - <td><%= rf.text_field :url, :class => :nice, :index => nil %></td> - <td><%= link_to_function( - image_tag('icons/reference-remove.png', :alt => 'Remove reference'), - "GLSAMaker.editing.references.del(this)", - :title => 'Remove reference') %></td> -<% end %> -</tr> diff --git a/app/views/glsa/_show_bug_row.html.erb b/app/views/glsa/_show_bug_row.html.erb deleted file mode 100644 index 7eaad0c..0000000 --- a/app/views/glsa/_show_bug_row.html.erb +++ /dev/null @@ -1,7 +0,0 @@ -<tr id="bug-<%= bug.bug_id %>"> - <td><%= bugready_icon(bug.bug_ready?) %></td> - <td> - <a href="javascript:///" onclick="buginfo(<%= bug.bug_id %>);"><strong><%= bug.bug_id %></strong></a> - <small><a href="<%= bug.bug_url %>">[BZ]</a></small></td> - <td><%= truncate(bug.title, :length => 60) %></td> -</tr>
\ No newline at end of file diff --git a/app/views/glsa/_show_package_row.txt.erb b/app/views/glsa/_show_package_row.txt.erb deleted file mode 100644 index 1ec0f95..0000000 --- a/app/views/glsa/_show_package_row.txt.erb +++ /dev/null @@ -1,49 +0,0 @@ -<%= (@packages_count += 1).to_s.rjust(3) + " " -%> -<%= if package.length <= 23 - package.ljust(23) - else - package + "\n" + ' ' * 28 - end -%> -<%= - -vulnerable_versions = (items['vulnerable'].sort_by { |p| p.version.to_i } if items.has_key? 'vulnerable') || [] -unaffected_versions = (items['unaffected'].sort_by { |p| p.version.to_i } if items.has_key? 'unaffected') || [] - -versions = [] - -print_vulnerable = (unaffected_versions.size == 0 ? true : false) -@print_vulnerable = true if print_vulnerable - -while vulnerable_versions.size > 0 or unaffected_versions.size > 0 - v = (vulnerable_versions.shift if vulnerable_versions.size > 0) || nil - print_slot = (v and v.slot != '*' ? true : false) - if print_slot - line = (v ? "#{v.comp} #{v.version}:#{v.slot}" : "").center(20) - else - line = (v ? "#{v.comp} #{v.version}" : "").center(20) - end - - if v and v.arch != '*' - @arches[@packages_count] ||= [] - @arches[@packages_count] += v.arch.split(' ') - end - - if print_vulnerable - line += "Vulnerable!".rjust(22) - print_vulnerable = false - else - v = (unaffected_versions.shift if unaffected_versions.size > 0) || nil - print_slot = (v and v.slot != '*' ? true : false) - if print_slot - line += (v ? "#{v.comp} #{v.version}:#{v.slot} #{v.automatic ? "" : (@print_noauto = true && "*")}" : "").rjust(22) - else - line += (v ? "#{v.comp} #{v.version} #{v.automatic ? "" : (@print_noauto = true && "*")}" : "").rjust(22) - end - end - versions << line -end - -versions.join("\n" + ' ' * 28).html_safe - --%> - diff --git a/app/views/glsa/_show_reference.txt.erb b/app/views/glsa/_show_reference.txt.erb deleted file mode 100644 index c29db6a..0000000 --- a/app/views/glsa/_show_reference.txt.erb +++ /dev/null @@ -1,2 +0,0 @@ -<%= prefixed_item("[ " + (@reference_number += 1).to_s.rjust(@max_digits_of_references) + " ]", reference.title) %> -<%= prefixed_item(" " * (@max_digits_of_references + 4), reference.url) %> diff --git a/app/views/glsa/_status_legend.html.erb b/app/views/glsa/_status_legend.html.erb deleted file mode 100644 index 070ac5d..0000000 --- a/app/views/glsa/_status_legend.html.erb +++ /dev/null @@ -1,38 +0,0 @@ -<div class="legend box"> - <h2>Legend</h2> - <span class="column"> - <strong>Status</strong><br /> - <%= status_icon "request" %> Request<br /> - <%= status_icon "draft" %> Draft<br /> - <%= status_icon "release" %> Sent GLSA<br /><br /> - </span> - - <span class="column"> - <strong>Bugs</strong><br /> - <%= bugready_icon true %> All bugs ready<br /> - <%= bugready_icon false %> Not ready<br /><br /><br /> - </span> - - <span class="column"> - <strong>Approval</strong><br /> - <%= approval_icon :approved %> Approved<br /> - <%= approval_icon :comments_pending %> Comments pending<br /> - <%= approval_icon :commented %> Commented<br /> - <%= approval_icon :none %> None - </span> - - <span class="column"> - <strong>Workflow</strong><br /> - <%= workflow_icon :own %> Own draft<br /> - <%= workflow_icon :todo %> TODO items pending<br /> - <%= workflow_icon :commented %> You have commented<br /> - <%= workflow_icon :approved %> You have approved - </span> - - <span class="column last"> - <strong>Embargo</strong><br /> - <%= restricted_icon false %> public<br /> - <%= restricted_icon true %> confidential - </span> - <br class="clear" /> -</div>
\ No newline at end of file diff --git a/app/views/glsa/_template_popups.html.erb b/app/views/glsa/_template_popups.html.erb deleted file mode 100644 index 8abedfc..0000000 --- a/app/views/glsa/_template_popups.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -<% GLSAMAKER_TEMPLATE_TARGETS.each do |target| %> -<div id="templates-<%= target %>" style="display: none;" class="popup"> - <%= form_tag({:controller => 'tools', :action => 'template'}, :remote => true) do -%> - <%= hidden_field('template', 'target', :value => target) %> - <%= select('template', 'id', (@templates[target] || []).collect {|template| [template.name, template.id]}) %><%= image_submit_tag 'icons/next.png', :style => 'margin-top: .3em; vertical-align: top;' %> - <% end -%> -</div> -<% end %>
\ No newline at end of file diff --git a/app/views/glsa/archive.html.erb b/app/views/glsa/archive.html.erb deleted file mode 100644 index b8980be..0000000 --- a/app/views/glsa/archive.html.erb +++ /dev/null @@ -1,26 +0,0 @@ -<h1> - <span class="floatright"> - <%= form_tag(archive_glsas_path, :remote => true) do -%> - <%= image_tag 'icons/calendar-select-month.png' %> - <%= date_select('view', 'month', :discard_day => true, :order => [:month, :year], :start_year => 2003, :end_year => Time.now.year + 1) %> - <%= image_submit_tag 'icons/next.png' %> - <% end -%> - </span> - Released GLSAs <span id="date">in <%= Date::MONTHNAMES[@month] %> <%= @year %></span> -</h1> - -<table class="glsamaker-table"> -<tr align="left"> - <th>ID</th> - <th>State</th> - <th>Title</th> - <th>Last changed at/by</th> - <!--<th>Bug IDs</th>--> - <% if current_user.is_el_jefe? %><th>Admin</th><% end %> -</tr> -<tbody id="list"> -<%= render :partial => "glsa_row", :collection => @glsas, :as => :glsa, :locals => { :view => :drafts } %> -</tbody> -</table> - -<%= render :partial => "status_legend" %> diff --git a/app/views/glsa/archive.js.erb b/app/views/glsa/archive.js.erb deleted file mode 100644 index 182e202..0000000 --- a/app/views/glsa/archive.js.erb +++ /dev/null @@ -1,2 +0,0 @@ -Element.update('date', 'in <%= escape_javascript(Date::MONTHNAMES[@month] + " " + @year.to_s) %>'); -Element.update('list', '<%= escape_javascript(@table.html_safe) %>');
\ No newline at end of file diff --git a/app/views/glsa/comment.html.erb b/app/views/glsa/comment.html.erb deleted file mode 100644 index 0faa416..0000000 --- a/app/views/glsa/comment.html.erb +++ /dev/null @@ -1,2 +0,0 @@ -<h1>Glsa#comment</h1> -<p>Find me in app/views/glsa/comment.html.erb</p> diff --git a/app/views/glsa/create.html.erb b/app/views/glsa/create.html.erb deleted file mode 100644 index b347c52..0000000 --- a/app/views/glsa/create.html.erb +++ /dev/null @@ -1,2 +0,0 @@ -<h1>Glsa#create</h1> -<p>Find me in app/views/glsa/create.html.erb</p> diff --git a/app/views/glsa/destroy.html.erb b/app/views/glsa/destroy.html.erb deleted file mode 100644 index e49b31d..0000000 --- a/app/views/glsa/destroy.html.erb +++ /dev/null @@ -1,2 +0,0 @@ -<h1>Glsa#destroy</h1> -<p>Find me in app/views/glsa/destroy.html.erb</p> diff --git a/app/views/glsa/diff.html.erb b/app/views/glsa/diff.html.erb deleted file mode 100644 index 1280084..0000000 --- a/app/views/glsa/diff.html.erb +++ /dev/null @@ -1,19 +0,0 @@ -<h1>Comparing revisions <%= params[:old] %> and <%= params[:new] %></h1> - -<div class="box buttons"> - <span class="floatright"> - <%= link_to "#{image_tag 'icons/draft.png'} Back".html_safe, {:controller => 'glsa', :action => 'show', :id => @glsa}, {:class => 'button'} %> - </span> - <%= form_tag(:action => :diff, :id => @glsa.id) do %> - <%= submit_tag 'Compare' %> revisions - <%= select_tag :old, - options_from_collection_for_select(@glsa.revisions, :revid, :revid) %> (old) - and - <%= select_tag :new, - options_from_collection_for_select(@glsa.revisions, :revid, :revid) %> (new). - <% end %> -</div> - -<pre> -<%= @diff %> -</pre>
\ No newline at end of file diff --git a/app/views/glsa/drafts.html.erb b/app/views/glsa/drafts.html.erb deleted file mode 100644 index e727bd2..0000000 --- a/app/views/glsa/drafts.html.erb +++ /dev/null @@ -1,16 +0,0 @@ -<h1>Pooled GLSA drafts</h1> - -<table class="glsamaker-table"> -<tr align="left"> - <th>ID</th> - <th>State</th> - <th>Title</th> - <th>Submitted at/by</th> - <!--<th>Bug IDs</th>--> - <% if current_user.is_el_jefe? %><th>Admin</th><% end %> -</tr> - -<%= render :partial => "glsa_row", :collection => @glsas, :as => :glsa, :locals => { :view => :drafts } %> -</table> - -<%= render :partial => "status_legend" %>
\ No newline at end of file diff --git a/app/views/glsa/edit.html.erb b/app/views/glsa/edit.html.erb deleted file mode 100644 index 000d1be..0000000 --- a/app/views/glsa/edit.html.erb +++ /dev/null @@ -1,177 +0,0 @@ -<h1> - Edit GLSA <code><%= @glsa.glsa_id %></code> -</h1> - -<%= form_for @glsa do |f| -%> -<div style="float: right; width: 44%;"> - <div class="box"> - <%= box_title('Permissions', :icon => 'icons/permission.png') %> - <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"> - <%= box_title('Metadata', :icon => 'icons/metadata.png') %> - <p style="float: left; width: 50%;"><label for="access"><%= image_tag 'icons/access.png' %> Access:</label> - <select name="glsa[access]" id="access"> - <%= options_for_select [['local', 'local'], ['remote', 'remote'], ['local, remote', 'both']], lastrev_content(@glsa, 'access') %> - </select> - </p> - <p><label for="severity"><%= image_tag 'icons/severity.png' %> Severity:</label> - <select name="glsa[severity]" id="severity"> - <%= options_for_select %w{ low normal high }, lastrev_content(@glsa, 'severity') %> - </select> - </p> - <p><label for="keyword"><%= image_tag 'icons/keyword.png' %> GLSA Keyword:</label> - <%= text_field_tag "glsa[product]", lastrev_content(@glsa, 'product'), :class => "nice" %> - </p> - </div> - - <div class="box"> - <%= box_title('Background', :icon => 'icons/background.png', :label => 'background') %> - <p> - <textarea name="glsa[background]" id="background" class="nice" rows="3"><%= lastrev_content(@glsa, 'background') %></textarea> - </p> - </div> - - <div class="box"> - <%= box_title('Bugs', :icon => 'icons/bug.png', - :toolbar => [{:uri => "javascript:GLSAMaker.editing.bugs.add_dialog(#{@glsa.id})", :title => 'Add bug', :icon => 'icons/plus.png'}]) %> - <table id="bugtable"> - <%= render :partial => "edit_bug_row", :collection => @bugs, :as => :bug %> - </table> - </div> - - <%= render :partial => "comments" %> - - <div style="text-align: right;"> - <input type="submit" class="button" style="font-size: 150%;" value="Save →" /> - </div> -</div> - -<div id="left"> - <div class="box"> - <%= box_title('Title', :icon => 'icons/title.png', - :toolbar => [{:title => 'Add template', :uri => "javascript:GLSAMaker.editing.templates.dropdown(this, 'title');", :icon => 'icons/template.png'}]) %> - <p><textarea name="glsa[title]" id="title" class="largetext nice" rows="1"><%= lastrev_content(@glsa, 'title') %></textarea></p> - </div> - - <div class="box"> - <%= box_title('Synopsis', :icon => 'icons/synopsis.png', :label => 'synopsis', - :toolbar => [ - {:title => 'Add template', :uri => "javascript:GLSAMaker.editing.templates.dropdown(this, 'synopsis');", :icon => 'icons/template.png'} - ] - ) %> - <p><textarea name="glsa[synopsis]" id="synopsis" class="nice" rows="1"><%= lastrev_content(@glsa, 'synopsis') %></textarea></p> - </div> - - <div class="box"> - <%= box_title('Packages', :icon => 'icons/package.png') %> - - <table class="padcells swap centercells" id="packages_table_vulnerable"> - <tr> - <th><%= image_tag 'icons/atom.png' %> Atom</th> - <th class="odd" colspan="2">Version</th> - <th title="* or slot">Slot</th> - <th title="* or space-separated list of arches"><%= image_tag 'icons/arch.png' %> Arch</th> - <th class="odd"><%= image_tag 'icons/auto.png' %> Auto</th> - </tr> - - <tr> - <td><%= image_tag 'icons/affected.png' %> Vulnerable - (<%= add_vulnerable_package_link(image_tag('icons/package-add.png')) %>)</td> - </tr> - <%= render :partial => 'package', :collection => @vulnerable_packages %> - </table> - - <table class="padcells swap centercells" id="packages_table_unaffected"> - <tr> - <td><%= image_tag 'icons/unaffected.png' %> Unaffected - (<%= add_unaffected_package_link(image_tag('icons/package-add.png')) %>)</td> - </tr> - <%= render :partial => 'package', :collection => @unaffected_packages %> - - </table> - </div> - - <div class="box" id="desc-box"> - <%= box_title('Description', :icon => 'icons/document.png', :label => 'description', - :toolbar => [ - {:title => 'Add template', :uri => "javascript:GLSAMaker.editing.templates.dropdown(this, 'description');", :icon => 'icons/template.png'}, - {:title => 'Set default description', :uri => "javascript:generateDescription()", :icon => 'icons/document-go.png'}, - :sep, - {:title => 'Fewer lines', :uri => "javascript:lines('description', -5)", :icon => 'icons/zoom_out.png'}, - {:title => 'Reset lines', :uri => "javascript:$('description').rows = 15", :icon => 'icons/zoom_100.png'}, - {:title => 'More lines', :uri => "javascript:lines('description', 5)", :icon => 'icons/zoom_in.png'} - ] - ) %> - <p><textarea name="glsa[description]" id="description" class="nice" rows="15"><%= lastrev_content(@glsa, 'description') %></textarea></p> - </div> - - <div class="box"> - <%= box_title('Impact', :icon => 'icons/impact.png', :label => 'impact', - :toolbar => [ - {:title => 'Add template', :uri => "javascript:GLSAMaker.editing.templates.dropdown(this, 'impact');", :icon => 'icons/template.png'}, - :sep, - {:title => 'Fewer lines', :uri => "javascript:lines('impact', -5)", :icon => 'icons/zoom_out.png'}, - {:title => 'Reset lines', :uri => "javascript:$('impact').rows = 15", :icon => 'icons/zoom_100.png'}, - {:title => 'More lines', :uri => "javascript:lines('impact', 5)", :icon => 'icons/zoom_in.png'} - ] - ) %> - <p><textarea name="glsa[impact]" id="impact" class="nice" rows="5"><%= lastrev_content(@glsa, 'impact') %></textarea></p> - </div> - - <div class="box"> - <%= box_title('Workaround', :icon => 'icons/workaround.png', :label => 'workaround', - :toolbar => [ - {:title => 'Add template', :uri => "javascript:GLSAMaker.editing.templates.dropdown(this, 'workaround');", :icon => 'icons/template.png'}, - {:title => 'No known workaround', :uri => "javascript:$('workaround').value = 'There is no known workaround at this time.'", :icon => 'icons/workaround-no.png'} - ] - ) %> - <p><textarea name="glsa[workaround]" id="workaround" class="nice" rows="2"><%= lastrev_content(@glsa, 'workaround') %></textarea></p> - </div> - - <div class="box"> - <%= box_title('Resolution', :icon => 'icons/resolution.png', :label => 'resolution', - :toolbar => [ - {:title => 'Add template', :uri => "javascript:GLSAMaker.editing.templates.dropdown(this, 'resolution');", :icon => 'icons/template.png'}, - {:title => 'Set default resolution', :uri => "javascript:generateResolution()", :icon => 'icons/resolution-go.png'} - ] - ) %> - <p><textarea name="glsa[resolution]" id="resolution" class="nice" rows="5"><%= lastrev_content(@glsa, 'resolution') %></textarea></p> - </div> - - <div class="box"> - <%= box_title('References', :icon => 'icons/reference.png', - :toolbar => [ - {:title => 'Add reference', :uri => "javascript:Element.insert('references_table', { bottom: '#{escape_javascript(render(:partial => 'reference', :object => Reference.new))}' })", :icon => 'icons/reference-add.png'} - ] - ) %> - <table class="padcells swap centercells" id="references_table"> - <tr> - <th><%= image_tag 'icons/atom.png' %> Title</th> - <th><%= image_tag 'icons/reference.png' %> URL</th> - <th></th> - </tr> - - <%= render :partial => 'reference', :collection => @references %> - </table> - </div> - -</div> - -<%- end -%> - -<%= template_popups %> - -<script language="JavaScript" type="text/javascript"> - GLSAMaker.editing.templates.observeClick($('title')); - GLSAMaker.editing.templates.observeClick($('synopsis')); - GLSAMaker.editing.templates.observeClick($('description')); - GLSAMaker.editing.templates.observeClick($('impact')); - GLSAMaker.editing.templates.observeClick($('workaround')); - GLSAMaker.editing.templates.observeClick($('resolution')); -</script> diff --git a/app/views/glsa/finalize_release.html.erb b/app/views/glsa/finalize_release.html.erb deleted file mode 100644 index 57bf2c6..0000000 --- a/app/views/glsa/finalize_release.html.erb +++ /dev/null @@ -1,29 +0,0 @@ -<h1>Release finished</h1> - -<div class="box w40em"> - <h2>Release information</h2> - - <table> - <tr> - <td>Official ID</td> - <td><strong>GLSA <%= @glsa.glsa_id %></strong></td> - </tr> - <tr> - <td>Title</td> - <td><strong><%= @glsa.last_revision.title %></strong></td> - </tr> - </table> -</div> - -<div class="box w40em"> - <h2>Closed bugs</h2> - - <table> - <% @glsa.last_revision.bugs.each do |bug| %> - <tr> - <td><%= bug.bug_id %></td> - <td><%= bug.title %></td> - </tr> - <% end %> - </table> -</div>
\ No newline at end of file diff --git a/app/views/glsa/import_references.html.erb b/app/views/glsa/import_references.html.erb deleted file mode 100644 index 63a0d30..0000000 --- a/app/views/glsa/import_references.html.erb +++ /dev/null @@ -1,16 +0,0 @@ -<p>Please select the references to import:</p> - -<%= form_tag(:go => '1') do -%> -<div style="height: 500px; overflow-y: scroll; overflow-x: hidden;"> - <table> - <% @cves.each do |cve| %> - <tr> - <td><input type="checkbox" value="1" name="import[cve][<%= cve.cve_id %>]" checked="checked" /></td> - <td><%= render :partial => '/tools/cve', :object => cve %></td> - </tr> - <% end %> - </table> -</div> - -<p style="text-align: right;"><input type="submit" class="button" value="Import selected references" id="importsubmit" /></p> -<% end -%>
\ No newline at end of file diff --git a/app/views/glsa/new-draft.html.erb b/app/views/glsa/new-draft.html.erb deleted file mode 100644 index 1c69b66..0000000 --- a/app/views/glsa/new-draft.html.erb +++ /dev/null @@ -1 +0,0 @@ -<h1>New draft...</h1>
\ No newline at end of file diff --git a/app/views/glsa/new-request.html.erb b/app/views/glsa/new-request.html.erb deleted file mode 100644 index 1b0c845..0000000 --- a/app/views/glsa/new-request.html.erb +++ /dev/null @@ -1,60 +0,0 @@ -<h1>New GLSA request</h1> - -<%= form_tag(:action => "create") do %> -<div class="box w40em"> - <input type="hidden" name="what" value="request" /> - <%= box_title('Bugs', :icon => 'icons/bug.png') %> - <p><label for="bugs">Please enter the relevant bug ID(s), separate more than one bug with a comma:</label></p> - - <p><input type="text" name="bugs" id="bugs" class="hugetext nice" value="<%= params[:bugs] %>"/></p> - <script language="javascript"> - $("bugs").observe('change', function(event) { - new Ajax.Request("<%= url_for :controller => 'tools', :action => 'bugs_ajax_info' %>", { - method: 'get', - parameters: { bugs: $('bugs').getValue() }, - onSuccess : function(transport) { - $('ajaxbugs').update(transport.responseJSON.buginfo); - $('suggesteddescr').update(transport.responseJSON.title); - } - }); - }); - </script> - <div id="ajaxbugs"></div> -</div> -<br /> -<div class="box w40em"> - <%= box_title('Title', :icon => 'icons/edit.png') %> - <p><label for="title">Either take the suggested title or enter a new custom one:</label></p> - <div id="suggesteddescr"></div> - <p><textarea name="title" id="title" class="largetext nice" rows="2"><%= params[:title] %></textarea></p> -</div> -<br /> -<!--<div class="box w40em"> - <%= box_title('Comment ' << content_tag('small', '(optional)'), :icon => 'icons/comment.png', :escape => false) %> - <p><label for="comment">If you want to add a comment, enter it here:</label></p> - <p><textarea name="comment" id="comment" class="nice" rows="4"><%= params[:comment] %></textarea></p> -</div> -<br />--> -<div class="box w40em"> - <%= box_title('References', :icon => 'icons/reference.png') %> - <p> - <input type="checkbox" name="import_references" id="import_references" value="1" checked="checked" /> - <label for="import_references">Import all references from linked bugs</label> - </p> -</div> -<br /> -<%- if current_user.access >= 1 -%> -<div class="box w40em"> - <%= box_title('Permissions', :icon => 'icons/permission.png') %> - <p><label for="access">Mark this request as</label>: - <select name="access" id="access"> - <%= options_for_select %w{ public confidential }, params[:access] || "public" %> - </select> - </p> -</div> -<br /> -<%- end -%> -<div style="width: 40em; text-align: right; display: inline-block;"> - <input type="submit" class="button" value="File request »"/> -</div> -<% end -%>
\ No newline at end of file diff --git a/app/views/glsa/new.html.erb b/app/views/glsa/new.html.erb deleted file mode 100644 index d7bb6a2..0000000 --- a/app/views/glsa/new.html.erb +++ /dev/null @@ -1,11 +0,0 @@ -<h1>New…</h1> - -<div class="buttons" style="padding: 1em; display: inline-block;"> -<p>File a request for others to draft…</p> -<p style="margin-bottom: 5em;"><a href="/glsa/new/request" class="button" style="padding: .4em; margin: .5em; font-size: 150%"> - <img src="/images/icons/glsa_request.png" alt="Requests" style="vertical-align: middle;" /> File a new request</a></p> - -<p>… or start drafting right away:</p> - <p><a href="/glsa/new/draft" class="button" style="padding: .4em; margin: .5em; font-size: 150%"> - <img src="/images/icons/glsa_draft.png" alt="Draft" style="vertical-align: middle;" /> File a new draft</a></p> -</div>
\ No newline at end of file diff --git a/app/views/glsa/prepare_release.html.erb b/app/views/glsa/prepare_release.html.erb deleted file mode 100644 index 3a2d5dc..0000000 --- a/app/views/glsa/prepare_release.html.erb +++ /dev/null @@ -1,112 +0,0 @@ -<h1>Prepare release</h1> - -<div class="box w40em"> - <h2>Advisory information</h2> - - <table> - <% if @glsa.status == 'draft' %> - <tr> - <td>Current ID</td> - <td><strong>GLSA <%= @glsa.glsa_id %></strong></td> - </tr> - <tr> - <td>Final ID</td> - <td><strong>GLSA <%= Glsa.next_id %> (preliminary)</strong></td> - </tr> - <% elsif @glsa.status == 'release' %> - <tr> - <td>Release ID</td> - <td><strong>GLSA <%= @glsa.glsa_id %></strong> (this will be a re-release)</td> - </tr> - <% end %> - <tr> - <td>Advisory title</td> - <td><strong><%= @rev.title %></strong></td> - </tr> - </table> -</div> - -<div class="box w40em"> - <h2> - <span class="toolbar"> - <%= check_icon(@rev.bug_ready?) %> - </span> - <%= image_tag 'icons/bug.png' %> Bug Status - </h2> - <table class="list"> - <%= render :partial => "show_bug_row", :collection => @rev.bugs, :as => :bug %> - </table> - - <% if not @rev.bug_ready? %> - <div class="error"> - <p> - <strong>You cannot release this draft unless all bugs are in a bug ready state.</strong><br /> - Visit Bugzilla and check the status of each bug marked with a <%= bugready_icon(false) %>, and set it to <tt>[glsa]</tt> if every arch is done. - Then, refresh the bug caches. - </p> - <div class="actions"> - <%= button_to "Refresh bug caches and retry", { :action => 'update_cache', :id => @glsa.id, :redirect => request.url }, :method => 'get' %> - </div> - </div> - <% end %> -</div> - -<div class="box w40em"> - <h2> - <span class="toolbar"> - <%= check_icon((@glsa.is_approved? or @comments_override)) %> - </span> - <%= image_tag 'icons/comment.png' %> Review Status - (<%= @glsa.approvals.length %> <%= image_tag 'icons/approval.png' %>, <%= @glsa.rejections.length %> <%= image_tag 'icons/rejection.png' %>) - </h2> - <table class="list"> - <%= render :partial => "approval_row", :collection => @glsa.approvals, :as => :comment %> - <%= render :partial => "approval_row", :collection => @glsa.rejections, :as => :comment %> - </table> - - <% if not (@glsa.is_approved? or @comments_override) %> - <div class="error"> - <p> - <strong>You cannot release this draft unless it has at least two approvals.</strong><br /> - Ask other Security members to review your draft. (Team leads can override this check.) - Then, refresh this page. - </p> - <% if current_user.is_el_jefe? %> - <div class="actions"> - <%= button_to "Override this check (team leads only)", prepare_release_glsa_path(@glsa, :override_approvals => 1) %> - </div> - <% end %> - </div> - <% elsif @comments_override %> - <p> - <strong>Approval override used.</strong> - </p> - <% end %> -</div> - -<div class="box w40em"> - <h2> - <%= image_tag 'icons/sent.png', :alt => 'release' %> Release - </h2> - <% if @rev.bug_ready? and (@glsa.is_approved? or @comments_override) %> - <p> - All checks passed. You can release this advisory now. - </p> - <%= form_tag(release_glsa_path(@glsa)) do %> - <table> - <tr> - <td><%= check_box_tag 'email' %></td> - <td><label for='email'>Send me the final version via email.</label></td> - </tr> - </table> - <div class='box-actions'> - <%= submit_tag 'Release >', :class => 'largetext' %> - </div> - <% end %> - <% else %> - <p> - At least one check failed. Please see the red boxes above.<br /> - You cannot release this draft at the moment. - </p> - <% end %> -</div>
\ No newline at end of file diff --git a/app/views/glsa/release.html.erb b/app/views/glsa/release.html.erb deleted file mode 100644 index eede6d2..0000000 --- a/app/views/glsa/release.html.erb +++ /dev/null @@ -1,31 +0,0 @@ -<h1>GLSA released</h1> - -<div class="box w40em"> - <h2>Release information</h2> - - <table> - <tr> - <td>Official ID</td> - <td><strong>GLSA <%= @glsa.glsa_id %></strong></td> - </tr> - <tr> - <td>Title</td> - <td><strong><%= @rev.title %></strong></td> - </tr> - </table> -</div> - -<div class="box w40em"> - <h2>Next steps</h2> - - <p> - Now, download the advisory XML and publish it in Git.<br /> - Then you can send the advisory email and close the relevant bugs in Bugzilla. - </p> - - <div class='box-actions'> - <button onclick="document.location = '<%= escape_javascript(download_glsa_path(@glsa, :format => 'xml')) %>'">Download XML</button> - <button onclick="window.open('<%= escape_javascript(download_glsa_path(@glsa, :format => 'txt')) %>'); return false;">Show text</button> - <%= button_to "Close bugs", finalize_release_glsa_path(@glsa, :close_bugs => '1'), :method => :post %> - </div> -</div> diff --git a/app/views/glsa/requests.html.erb b/app/views/glsa/requests.html.erb deleted file mode 100644 index 05b02fd..0000000 --- a/app/views/glsa/requests.html.erb +++ /dev/null @@ -1,16 +0,0 @@ -<h1>Pooled GLSA requests</h1> - -<table class="glsamaker-table"> -<tr align="left"> - <th>ID</th> - <th>State</th> - <th>Title</th> - <th>Requested at/by</th> - <!--<th>Bug IDs</th>--> - <% if current_user.is_el_jefe? %><th>Admin</th><% end %> -</tr> - -<%= render :partial => "glsa_row", :collection => @glsas, :as => :glsa, :locals => { :view => :requests } %> -</table> - -<%= render :partial => "status_legend" %>
\ No newline at end of file diff --git a/app/views/glsa/show.html.erb b/app/views/glsa/show.html.erb deleted file mode 100644 index 1da1a94..0000000 --- a/app/views/glsa/show.html.erb +++ /dev/null @@ -1,158 +0,0 @@ -<h1> - <%= sanitize(spelling(@rev.title), :tags => %w[span]) %> - <% if @glsa.restricted? %><span class="red">(CONFIDENTIAL)</span><% end %> -</h1> - -<div class="box buttons"> - <span class="floatright"> - Show revision: - <%= select_tag :revid, - options_from_collection_for_select(@glsa.revisions, :revid, :to_s, @rev.revid), - :onchange => "document.location = '#{url_for :controller=> :glsa, :action => :show, :id => @glsa}?rev_id=' + this.value" %> - </span> - <%= link_to "#{image_tag 'icons/edit.png'} Edit this draft".html_safe, edit_glsa_path(@glsa), {:class => 'button'} %> - <%= link_to "#{image_tag 'icons/xml.png'} View as XML".html_safe, glsa_path(@glsa, :format => 'xml'), {:class => 'button'} %> - <%= link_to "#{image_tag 'icons/txt.png'} View as Text".html_safe, glsa_path(@glsa, :format => 'txt'), {:class => 'button'} %> - <%= link_to_function "#{image_tag 'icons/reference.png'} Import references".html_safe, "GLSAMaker.editing.references.import_dialog(#{@glsa.id})", {:class => 'button'} %> - <%= link_to "#{image_tag 'icons/diff.png'} Compare revisions".html_safe, diff_glsa_path(@glsa, :old => @glsa.last_revision.revid - 1, :new => @glsa.last_revision.revid), {:class => 'button'} %> - <%= link_to "#{image_tag 'icons/sent.png'} Release advisory".html_safe, prepare_release_glsa_path(@glsa), {:class => 'button'} if current_user.access >= 2 %> - <%= link_to "#{image_tag 'icons/delete.png'} Delete".html_safe, glsa_path(@glsa), :method => :delete, :confirm => "Do you really want to delete this item?", :class => 'button' if current_user.is_el_jefe? %> - <%= link_to "#{image_tag 'icons/bug.png'} Close bugs".html_safe, finalize_release_glsa_path(@glsa, :close_bugs => '1'), :method => :post, :class => 'button' if @glsa.status == 'release' %> -</div> - -<div style="float: right; width: 40%;"> - <div class="box pmargin"> - <h2> - GLSA <%= status_icon @glsa.status %> <tt><%= @glsa.glsa_id %>:r<%= @rev.revid %></tt> - <%= bugready_icon @rev.bug_ready? %> - <%= approval_icon @glsa.approval_status %> - <%= workflow_icon(@glsa.workflow_status(current_user)) %> - <%= restricted_icon @glsa.restricted %> - </h2><br /> - <% if @glsa.is_approved? and @glsa.last_revision.bug_ready? %> - <p><%= image_tag 'icons/ok.png' %> This draft is <strong>ready for sending</strong>.</p> - <% else %> - <p><%= image_tag 'icons/pending.png' %> This draft is <strong>not ready for sending.</strong></p> - <% end %> - <p> - <span style="float: right; font-size: 90%;"><%= @glsa.created_at.to_s %></span> - Requester: <strong><%= @glsa.requester.to_s %></strong> - </p> - <% if @glsa.submitter %> - <p> - <span style="float: right; font-size: 90%;"><%= @glsa.updated_at.to_s %></span> - Submitter: <strong><%= @glsa.submitter.to_s %></strong> - </p> - <% end %> - <p> - <span style="float: right; font-size: 90%;"><%= @glsa.updated_at.to_s %></span> - Editor: <strong><%= @rev.user.to_s %></strong> - </p> - </div> - - <div class="box"> - <%= box_title("Bugs (#{@rev.bugs.count})", :icon => 'icons/bug.png', - :toolbar => [{:title => 'Update all cached metadata', :icon => 'icons/refresh.png', :uri => "/glsa/update_cache/#{@glsa.id}"}]) - %> - <table id="bugtable"> - <%= render :partial => "show_bug_row", :collection => @rev.bugs, :as => :bug %> - </table> - </div> - - <%= render :partial => "comments" %> -</div> - -<table class="glsamaker-table code-preserve-ws nopadding" style="width: 59%;"> - <tr> - <th>Field</th> - <th>Content</th> - </tr> - <tr> - <th class="left"><%= image_tag 'icons/access.png' %> Access</th> - <td> - <%= @rev.access %> - </td> - </tr> - <tr class="odd"> - <th class="left"><%= image_tag 'icons/severity.png' %> Severity</th> - <td> - <%= @rev.severity %> - </td> - </tr> - <tr> - <th class="left"><%= image_tag 'icons/synopsis.png' %> Synopsis</th> - <td> - <%= field_content(@rev.synopsis) %> - </td> - </tr> - <tr class="odd"> - <th class="left"><%= image_tag 'icons/unaffected.png' %> Unaffected packages</th> - <td> - <ul> - <% @rev.packages.each do |pkg| ; next unless pkg.my_type == "unaffected" %> - <li><%= pkg.comp %><strong><%= pkg.atom %></strong>-<%= pkg.version %>:<%= pkg.slot %> on <%= pkg.arch %> (auto: <%= pkg.automatic %>)</li> - <% end %> - </ul> - </td> - </tr> - <tr> - <th class="left"><%= image_tag 'icons/affected.png' %> Vulnerable packages</th> - <td> - <ul> - <% @rev.packages.each do |pkg| ; next unless pkg.my_type == "vulnerable" %> - <li><%= pkg.comp %><strong><%= pkg.atom %></strong>-<%= pkg.version %>:<%= pkg.slot %> on <%= pkg.arch %> (auto: <%= pkg.automatic %>)</li> - <% end %> - </ul> - </td> - </tr> - <tr class="odd"> - <th class="left"><%= image_tag 'icons/background.png' %> Background</th> - <td> - <%= field_content(@rev.background) %> - </td> - </tr> - <tr> - <th class="left"><%= image_tag 'icons/document.png' %> Description</th> - <td> - <%= field_content(@rev.description) %> - </td> - </tr> - <tr class="odd"> - <th class="left"><%= image_tag 'icons/impact.png' %> Impact</th> - <td> - <%= field_content(@rev.impact) %> - </td> - </tr> - <tr> - <th class="left"><%= image_tag 'icons/workaround.png' %> Workaround</th> - <td> - <%= field_content(@rev.workaround) %> - </td> - </tr> - <tr class="odd"> - <th class="left"><%= image_tag 'icons/resolution.png' %> Resolution</th> - <td> - <%= field_content(@rev.resolution) %> - </td> - </tr> - <tr> - <th class="left"><%= image_tag 'icons/reference.png' %> References</th> - <td> - <ul> - <% @rev.references.each do |r| %> - <li><%= link_to r.title, r.url -%> - <% if r.title.start_with? 'CVE' %> <br /> - <% if (cve = Cve.where(:cve_id => r.title).first) != nil %> - <small><%= cve.summary %></small> - <% else %> - <small class="red">CVE not found in CVETool database. <strong>Double-check manually!</strong></small> - <% end %> - <% end %> - </li> - <% end %> - </ul> - </td> - </tr> -</table> - -<br style="break: both;" /> diff --git a/app/views/glsa/show.txt.erb b/app/views/glsa/show.txt.erb deleted file mode 100644 index 91e570e..0000000 --- a/app/views/glsa/show.txt.erb +++ /dev/null @@ -1,116 +0,0 @@ -<%- @packages = @rev.packages_by_atom - @packages_count = 0 - @tf = ::Text::Format.new - @arches = {} -%> -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Gentoo Linux Security Advisory GLSA <%= @glsa.glsa_id %> -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - https://security.gentoo.org/ -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%= prefixed_item(" Severity:", @rev.severity.capitalize.html_safe) %> -<%= prefixed_item(" Title:", @rev.title.html_safe) %> -<%= prefixed_item(" Date:", @glsa.release_date.strftime('%B %d, %Y')) %> -<%= prefixed_item(" Bugs:", @rev.bugs.map {|b| "\##{b.bug_id}" }.join(', ')) %> -<%= prefixed_item(" ID:", @glsa.glsa_id) %> - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Synopsis -======== - -<%= adv_wrap(@rev.synopsis).html_safe %> - -Background -========== - -<%= adv_wrap(@rev.background).html_safe %> - -Affected packages -================= - - ------------------------------------------------------------------- - Package / Vulnerable / Unaffected - ------------------------------------------------------------------- -<%- @packages.each do |package, items| -%> -<%= render :partial => "show_package_row", :locals => {:items => items, :package => package} -%> -<%- end -%> -<% if @print_vulnerable -%> - ------------------------------------------------------------------- - NOTE: Certain packages are still vulnerable. Users should migrate - to another package if one is available or wait for the - existing packages to be marked stable by their - architecture maintainers. -<% end -%> -<% if @print_noauto -%> - ------------------------------------------------------------------- - NOTE: Packages marked with asterisks require manual intervention! -<% end -%> -<% if @packages_count > 1 -%> - ------------------------------------------------------------------- - <%= @packages_count %> affected packages -<% end -%> -<% if @arches != {} -%> - ------------------------------------------------------------------- - <% @arches.each_pair do |num, arches| -%> - # Package <%= num %> only applies to users of these architectures: - <%= arches.sort.join ", " %> - <% end -%> -<% end -%> - -Description -=========== - -<%= adv_wrap(@rev.description).html_safe %> - -Impact -====== - -<%= adv_wrap(@rev.impact).html_safe %> - -Workaround -========== - -<%= adv_wrap(@rev.workaround).html_safe %> - -Resolution -========== - -<%= adv_wrap(@rev.resolution, true).html_safe %> - -References -========== - -<% @reference_number = 0 - @max_digits_of_references = @rev.references.size.to_s.size - - -%> -<%= render :partial => "show_reference", :as => :reference, :collection => @rev.references -%> - -Availability -============ - -This GLSA and any updates to it are available for viewing at -the Gentoo Security Website: - - https://security.gentoo.org/glsa/<%= @glsa.glsa_id %> - -Concerns? -========= - -Security is a primary focus of Gentoo Linux and ensuring the -confidentiality and security of our users' machines is of utmost -importance to us. Any security concerns should be addressed to -security@gentoo.org or alternatively, you may file a bug at -https://bugs.gentoo.org. - -License -======= - -Copyright <%= Time.now.year %> Gentoo Foundation, Inc; referenced text -belongs to its owner(s). - -The contents of this document are licensed under the -Creative Commons - Attribution / Share Alike license. - -https://creativecommons.org/licenses/by-sa/2.5 diff --git a/app/views/glsa/show.xml.erb b/app/views/glsa/show.xml.erb deleted file mode 100644 index 58ece79..0000000 --- a/app/views/glsa/show.xml.erb +++ /dev/null @@ -1 +0,0 @@ -<%= Glsamaker::XML.indent(render(:partial => 'glsa', :locals => {:glsa => @glsa, :rev => @rev}), {:indent => 2, :maxcols => 80}).html_safe %>
\ No newline at end of file diff --git a/app/views/glsa/update.html.erb b/app/views/glsa/update.html.erb deleted file mode 100644 index 0a886cd..0000000 --- a/app/views/glsa/update.html.erb +++ /dev/null @@ -1,2 +0,0 @@ -<h1>Glsa#update</h1> -<p>Find me in app/views/glsa/update.html.erb</p> diff --git a/app/views/glsa_mailer/approval.text.erb b/app/views/glsa_mailer/approval.text.erb deleted file mode 100644 index 939e07c..0000000 --- a/app/views/glsa_mailer/approval.text.erb +++ /dev/null @@ -1,23 +0,0 @@ -Your draft is now approved. - -Approval overview ------------------ -<% @glsa.approvals.each do |approval| -%> -<%= approval.created_at.rfc2822 %> by <%= approval.user.to_s %> -<% end -%> - -<% if @glsa.rejections.count > 0 -%> -Rejection overview ------------------- -<% @glsa.rejections.each do |rejection| -%> -<%= rejection.created_at.rfc2822 %> by <%= rejection.user.to_s %> -<% end -%> -<% end -%> - -You should check whether all bugs linked in the draft are in a bug ready state. -Then, you can release the advisory at <%= prepare_release_glsa_url(@glsa) %> - -Thanks for your work! - --- -This email notification is brought to you by GLSAMaker 2.
\ No newline at end of file diff --git a/app/views/glsa_mailer/comment.text.erb b/app/views/glsa_mailer/comment.text.erb deleted file mode 100644 index 901eede..0000000 --- a/app/views/glsa_mailer/comment.text.erb +++ /dev/null @@ -1,8 +0,0 @@ -Your draft received a comment (<%= @comment.rating %>) from <%= @commentator.to_s %> @ <%= @comment.created_at.rfc2822 %>: - -<%= glsa_url(@glsa) %> - -<%= @comment.text %> - --- -This email notification is brought to you by GLSAMaker 2.
\ No newline at end of file diff --git a/app/views/glsa_mailer/edit.text.erb b/app/views/glsa_mailer/edit.text.erb deleted file mode 100644 index cf45a06..0000000 --- a/app/views/glsa_mailer/edit.text.erb +++ /dev/null @@ -1,8 +0,0 @@ -The draft was edited by <%= @editor.to_s %> @ <%= @glsa.last_revision.created_at.rfc2822 %>: - -<%= glsa_url(@glsa) %> - -<%= @diff.html_safe %> - --- -This email notification is brought to you by GLSAMaker 2.
\ No newline at end of file diff --git a/app/views/glsa_mailer/new_request.text.erb b/app/views/glsa_mailer/new_request.text.erb deleted file mode 100644 index dadb8d0..0000000 --- a/app/views/glsa_mailer/new_request.text.erb +++ /dev/null @@ -1,13 +0,0 @@ -A new request was filed by <%= @requestor.to_s %> @ <%= @glsa.last_revision.created_at.rfc2822 %>: - -<%= @glsa.last_revision.title %> -<%= "-" * @glsa.last_revision.title.length %> - -<%= glsa_url(@glsa) %> - -Bugs: -<% @glsa.last_revision.bugs.each do |bug| %> - * <%= bug.bug_id %><%= " (#{bug.title})" if bug.title %> -<% end %> --- -This email notification is brought to you by GLSAMaker 2.
\ No newline at end of file diff --git a/app/views/glsa_mailer/text.text.erb b/app/views/glsa_mailer/text.text.erb deleted file mode 100644 index 8279bb9..0000000 --- a/app/views/glsa_mailer/text.text.erb +++ /dev/null @@ -1,4 +0,0 @@ -<%= @text %> -<% if @footer %> --- -This email notification is brought to you by GLSAMaker 2.<% end %>
\ No newline at end of file diff --git a/app/views/index/about.html.erb b/app/views/index/about.html.erb deleted file mode 100644 index bf2cbcc..0000000 --- a/app/views/index/about.html.erb +++ /dev/null @@ -1,29 +0,0 @@ -<div style="text-align: center"><%= image_tag('biglogo.png', :alt => "GLSAMaker 2 Logo'") %></div> - -<div class="box2"> - <h2 style="margin: 0;"><%= image_tag('icons/user.png') %> Brought to you by…</h2> -<ul> - <li><a href="mailto:a3li@gentoo.org">Alex Legler</a></li> - <li><a href="mailto:py@gentoo.org">Pierre-Yves Rofes</a></li> - <li><a href="mailto:keytoaster@gentoo.org">Tobias Heinlein</a></li> -</ul> -</div> - -<div class="box2"> -<h2 style="margin: 0;"><%= image_tag('icons/reference.png') %> License</h2> -<p>Copyright © 2009–15 Alex Legler</p> -<p>Copyright © 2009 Pierre-Yves Rofes</p> -<p>Copyright © 2010 Tobias Heinlein</p> -<p>GLSAMaker 2 is free software: you can redistribute it and/or modify it under the terms of the <strong>GNU Affero General Public License</strong> - as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.</p> -</div> - -<div class="box2"> - <h2 style="margin: 0;"><%= image_tag('icons/comment.png') %> Acknowledgements</h2> - -<p>The CVETool uses the <a href="http://ukijs.org/">UKI</a> Javascript UI Toolkit by Vladimir Kolesnikov. Licensed under the MIT License.</p> -<p>GLSAMaker2 uses the <a href="http://www.famfamfam.com/lab/icons/silk">"Silk" iconset</a> by Mark James. Licensed under the CC Attribution 3.0 License.</p> -<p>GLSAMaker2 uses the <a href="http://www.pinvoke.com/">"Fugue" iconset</a> by Yusuke Kamiyamane. Licensed under the CC Attribution 3.0 License.</p> -<p>The header uses portions of <a href="http://www.redmine.org">Redmine</a>. © Jean-Philippe Lang. Licensed under the GPL.</p> - -</div> diff --git a/app/views/index/error-access.html.erb b/app/views/index/error-access.html.erb deleted file mode 100644 index f183064..0000000 --- a/app/views/index/error-access.html.erb +++ /dev/null @@ -1,7 +0,0 @@ -<h1>Access Denied</h1> - -<p><strong>You do not have sufficient permissions to perform this action.</strong></p> -<p>The administrator has been notified.</p> -<br /><br /><br /> -<p>You can get in touch with the administrative contact at -<em><%= GLSAMAKER_ADMIN_EMAIL %></em></p>
\ No newline at end of file diff --git a/app/views/index/error-disabled.html.erb b/app/views/index/error-disabled.html.erb deleted file mode 100644 index 53a8f44..0000000 --- a/app/views/index/error-disabled.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -<h1>Access Denied</h1> - -<p><strong>Your account has been disabled.</strong></p> -<p>You can get in touch with the administrative contact at -<em><%= GLSAMAKER_ADMIN_EMAIL %></em></p> diff --git a/app/views/index/error-system.html.erb b/app/views/index/error-system.html.erb deleted file mode 100644 index e6fafa2..0000000 --- a/app/views/index/error-system.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -<h1>Fatal error</h1> - -<p><strong>Couldn't get user authentication data.</strong></p> -<p><small>Ruby on Rails is running in the <em>production</em> environment.<br /> -In this environment, GLSAMaker receives the name of the logged in user via the -REMOTE_USER or HTTP_AUTHORIZATION variables which <strong>both are empty.</strong></small></p> -<p>Please get in touch with the administrative contact -(<%= GLSAMAKER_ADMIN_EMAIL %>) to fix this issue.</p>
\ No newline at end of file diff --git a/app/views/index/error-user.html.erb b/app/views/index/error-user.html.erb deleted file mode 100644 index 54c8032..0000000 --- a/app/views/index/error-user.html.erb +++ /dev/null @@ -1,7 +0,0 @@ -<h1>Welcome to GLSAMaker!</h1> - -<p>This is most likely your first visit.</p> -<p>While your user name and password were entered into the HTTP authentication database, -your account was not yet populated to the internal GLSAMaker database.</p> -<p>Either retry in a few minutes or get in touch with the administrative contact -(<%= GLSAMAKER_ADMIN_EMAIL %>) to fix this issue.</p>
\ No newline at end of file diff --git a/app/views/index/index.html.erb b/app/views/index/index.html.erb deleted file mode 100644 index dd0a2b0..0000000 --- a/app/views/index/index.html.erb +++ /dev/null @@ -1,18 +0,0 @@ -<h1>Welcome to GLSAMaker2!</h1> - -<div class="box"> - <h2>My last 10 drafts</h2> - - <table class="glsamaker-table"> - <tr align="left"> - <th>ID</th> - <th>State</th> - <th>Title</th> - <th>Submitted at/by</th> - <!--<th>Bug IDs</th>--> - <% if current_user.is_el_jefe? %><th>Admin</th><% end %> - </tr> - - <%= render :partial => "glsa/glsa_row", :collection => @my_drafts, :as => :glsa, :locals => { :view => :drafts } %> - </table> -</div>
\ No newline at end of file diff --git a/app/views/index/profile.html.erb b/app/views/index/profile.html.erb deleted file mode 100644 index d346647..0000000 --- a/app/views/index/profile.html.erb +++ /dev/null @@ -1,34 +0,0 @@ -<h1>My Profile</h1> - -<% form_tag :action => 'update' do |f| -%> -<h2>Email preferences</h2> - -<table> - <tr> - <th></th> - <th style="text-align: left;">Send me an Email when...</th> - </th> - <tr class="odd"> - <td><input type="checkbox" value="1" name="preferences[new_req]" id="new_req" <%= 'checked="checked"' if @prefs[:mail] and @prefs[:mail][:new_req] %>/></td> - <td><label for="new_req"> when a <strong>new request</strong> is filed</label></td> - </tr> - <tr class="even"> - <td><input type="checkbox" value="1" name="preferences[edit]" id="edit" <%= 'checked="checked"' if @prefs[:mail] and @prefs[:mail][:edit] %>/></td> - <td><label for="edit"> when a draft was <strong>edited</strong></label></td> - </tr> - <tr class="odd"> - <td><input type="checkbox" value="1" name="preferences[own_comment]" id="own_comment" <%= 'checked="checked"' if @prefs[:mail] and @prefs[:mail][:own_comment] %>/></td> - <td><label for="own_comment"> when a <strong>draft I have submitted</strong> has recieved a <strong>comment</strong></label></td> - </tr> - <tr class="even"> - <td><input type="checkbox" value="1" name="preferences[own_ready]" id="own_ready" <%= 'checked="checked"' if @prefs[:mail] and @prefs[:mail][:own_ready] %>/></td> - <td><label for="own_ready"> when a draft <strong>I have submitted</strong> is <strong>ready for sending</strong></label></td> - </tr> - <tr class="odd"> - <td><input type="checkbox" value="1" name="preferences[not_me]" id="not_me" <%= 'checked="checked"' if @prefs[:mail] and @prefs[:mail][:not_me] %>/></td> - <td><label for="not_me"> <strong>BUT NOT</strong> If I have done it (overrides all of the above)</label></td> - </tr> -</table> - -<p><input type="submit" value="Save" /></p> -<% end %>
\ No newline at end of file diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb deleted file mode 100644 index 4120f34..0000000 --- a/app/views/layouts/application.html.erb +++ /dev/null @@ -1,96 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" - "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> -<head> - <title><% if @pageTitle%><%= @pageTitle %> — <% end %>GLSAMaker 2</title> - <%= stylesheet_link_tag "application" %> - <%= javascript_include_tag "application" %> - <%= csrf_meta_tags %> -</head> -<body id="<%= @pageID if @pageID %>"> - <div id="top-menu"> - <div class="floatright"> - <ul> - <!--<li><a href="/my/account" class="my-account">My account</a></li>--> - </ul> - </div> - <div id="loggedas">Logged in as <a href="#"><%= current_user.login %> (<%= current_user.name %>)</a></div> - <ul> - <li><a href="/" class="home">Home</a></li> - <% if current_user.is_el_jefe? %><li><a href="/admin" class="administration">Administration</a></li><% end %> - <!--<li><a href="#" class="help">Help</a></li>--> - </ul> - </div> - - <div id="menu"> - <img src="<%= asset_path 'logo.png' %>" alt="Home" class="logo" usemap="#m_logo" /> - <map name="m_logo" id="m_logo"> - <area shape="rect" coords="95,0,252,42" href="#" alt="Home" /> - </map> - <div id="search"> - <%= form_tag(search_path, :method => 'get') do -%> - <label for="q">Search:</label> - <input accesskey="f" class="small" id="q" name="q" size="20" type="text" value="<%= params[:q] %>" /> - - <select name="at"> - <option value="everywhere" selected="selected">Everywhere</option> - <!--<optgroup label="Advisories"> - <option value="glsa">All GLSAs</option> - <option value="glsa-requests">Requests</option> - <option value="glsa-drafts">Drafts</option> - <option value="glsa-archive">Archive</option> - </optgroup> - <optgroup label="Vulnerability Intelligence"> - <option value="cve">CVEs</option> - <option value="cve-assigned">Assigned CVEs</option> - <option value="cve-new">New CVEs</option> - </optgroup>--> - </select> - <% end -%> - </div> - <ul> - <li><%= link_to "New…", new_glsa_path, :class => 'new' %></li> - <li style="margin-right: 2em;"> </li> - <li><%= link_to "Requests", requests_glsas_path, :class => 'requests' %></li> - <li><%= link_to "Drafts", drafts_glsas_path, :class => 'drafts' %></li> - <li><%= link_to "Archive", archive_glsas_path, :class => 'archive' %></li> - - <% if current_user.access >= 2 %> - <li style="margin-right: 2em;"> </li> - <li><a href="/cve/list" class="cve">CVETool</a></li> - <% if Module.constants.include? "Secunia" %> - <li style="margin-right: 2em;"> </li> - <li><a href="/" class="secunia">Secunia Advisories</a></li> - <% end %> - <% end %> - </ul> - </div> - - <%- if flash[:notice] or flash[:error] -%> - <div id="flash" class="<%= flash[:error] ? "error" : "notice" %>"> - <%= link_to_function(image_tag('icons/close.png'), {:style => 'float: right;', :alt => 'Hide the notification'}) do |page| - page[:flash].drop_out - end %> - <%- if flash[:error] -%> - <%= image_tag 'icons/error.png', :style => 'vertical-align: middle' %> - <%- else -%> - <%= image_tag 'icons/info.png', :style => 'vertical-align: middle' %> - <%- end -%> - <%= flash[:error] ? flash[:error] : flash[:notice] %> - </div> - <%- end -%> - <div id="content"> -<%= yield %> - </div> - <div id="footer"> - <span><strong>GLSAMaker <%= `git describe --tags` %></strong></span> - <span><strong>CVE Data current as of: <%= last_import_start ? last_import_start : 'unknown' %></strong></span> - <span><%= link_to "About…".html_safe, :controller => 'index', :action => 'about' %></span> - - <span class="floatright"><strong>Administrative contact: <a href="mailto:<%= GLSAMAKER_ADMIN_EMAIL%>"><%= GLSAMAKER_ADMIN_EMAIL%></a></strong></span> - </div> - <br class="clear" /> -</body> -</html> diff --git a/app/views/layouts/cve.html.erb b/app/views/layouts/cve.html.erb deleted file mode 100644 index 14f7922..0000000 --- a/app/views/layouts/cve.html.erb +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" - "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> -<head> - <title><%= @pageTitle + " — "if @pageTitle%> GLSAMaker 2 — CVETool</title> - <%= javascript_include_tag 'jsui' %> - <%= stylesheet_link_tag "cve" %> - - <style type="text/css">body, html { margin: 0; padding: 0; overflow:hidden; };</style> -</head> -<body id="<%= @pageID if @pageID %>"> - <%= yield %> -</body> -</html>
\ No newline at end of file diff --git a/app/views/layouts/none.html.erb b/app/views/layouts/none.html.erb deleted file mode 100644 index cd9bb66..0000000 --- a/app/views/layouts/none.html.erb +++ /dev/null @@ -1 +0,0 @@ -<%= yield %>
\ No newline at end of file diff --git a/app/views/layouts/notice.html.erb b/app/views/layouts/notice.html.erb deleted file mode 100644 index 38b9b33..0000000 --- a/app/views/layouts/notice.html.erb +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" - "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> -<head> - <title><% if @pageTitle%><%= @pageTitle %> — <% end %>GLSAMaker 2</title> - <%= stylesheet_link_tag "login" %> - <%= csrf_meta_tags %> -</head> -<body> -<div id="outer"> - <div id="middle"> - <div id="inner"> - <div id="login-form"> - <div> - <%= yield %> - </div> - </div> - </div> - </div> -</div> -</body> -</html>
\ No newline at end of file diff --git a/app/views/search/_cve_row.html.erb b/app/views/search/_cve_row.html.erb deleted file mode 100644 index 71a5eee..0000000 --- a/app/views/search/_cve_row.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -<tr> - <td class="nowrap"><%= link_to_function cve.colorize(:cve_id).html_safe, "cvepopup('#{cve.cve_id}')" %></td> - <td><%= cve.state %></td> - <td><%= sanitize(cve.excerpts.summary, :tags => %w[span], :attributes => %w[class]) %></td> - <td><%= cve.cvss %></td> -</tr>
\ No newline at end of file diff --git a/app/views/search/_cves.html.erb b/app/views/search/_cves.html.erb deleted file mode 100644 index e3f66ab..0000000 --- a/app/views/search/_cves.html.erb +++ /dev/null @@ -1,13 +0,0 @@ -<div class="box"> - <h2>CVEs</h2> - - <table class="glsamaker-table"> - <tr align="left"> - <th>ID</th> - <th>State</th> - <th>Summary</th> - <th>CVSS Score</th> - </tr> - <%= render :partial => "cve_row", :collection => results, :as => :cve %> - </table> -</div>
\ No newline at end of file diff --git a/app/views/search/_glsas.html.erb b/app/views/search/_glsas.html.erb deleted file mode 100644 index 28855b0..0000000 --- a/app/views/search/_glsas.html.erb +++ /dev/null @@ -1,14 +0,0 @@ -<div class="box"> - <h2>GLSAs</h2> - - <table class="glsamaker-table"> - <tr align="left"> - <th>ID</th> - <th>State</th> - <th>Title</th> - <th>Last changed at/by</th> - <% if current_user.is_el_jefe? %><th>Admin</th><% end %> - </tr> - <%= render :partial => "/glsa/glsa_row", :collection => results, :as => :glsa, :locals => { :view => :requests } %> - </table> -</div>
\ No newline at end of file diff --git a/app/views/search/results.html.erb b/app/views/search/results.html.erb deleted file mode 100644 index c8c6cb2..0000000 --- a/app/views/search/results.html.erb +++ /dev/null @@ -1,19 +0,0 @@ -<h1>Search results for "<%= params[:q] %>"</h1> - -<%- if @error -%> -<%= error_msg("The search daemon is currently not available. Please contact " + GLSAMAKER_ADMIN_EMAIL) %> -<%- else -%> - - <%- if @results.include? 'Glsa' -%> -<%= render :partial => "glsas", :locals => {:results => @results['Glsa']} %> -<%- end -%> - -<%- if @results.include? 'Cve' -%> -<%= render :partial => "cves", :locals => {:results => @results['Cve']} %> -<%- end -%> - -<%- if @results.empty? -%> -<%= image_tag 'icons/error.png' %> No results found. :( -<%- end -%> - -<%- end -%>
\ No newline at end of file diff --git a/app/views/tools/_cve.html.erb b/app/views/tools/_cve.html.erb deleted file mode 100644 index 25ccde7..0000000 --- a/app/views/tools/_cve.html.erb +++ /dev/null @@ -1,4 +0,0 @@ -<p> - <strong><a href="/cve/info/<%= cve.cve_id %>" target="_blank"><%= cve.cve_id%></a>:</strong> - <%= cve.summary%> -</p>
\ No newline at end of file diff --git a/app/views/tools/ajaxbugs.html.erb b/app/views/tools/ajaxbugs.html.erb deleted file mode 100644 index 493c4d9..0000000 --- a/app/views/tools/ajaxbugs.html.erb +++ /dev/null @@ -1,10 +0,0 @@ -<ul class="ajaxbugs"> - <% @bugs.each do |bug| %> - <% if bug.is_a?(String) %> - <li class="ajaxbugs-error"><%= bug %></li> - <% else %> - <li><%= link_to_function bug.bug_id, "buginfo('#{bug.bug_id}')" %>: - <%= truncate(bug.summary, :length => 50) %></li> - <% end %> - <% end %> -</ul>
\ No newline at end of file diff --git a/app/views/tools/ajaxdescr.html.erb b/app/views/tools/ajaxdescr.html.erb deleted file mode 100644 index d63bcc7..0000000 --- a/app/views/tools/ajaxdescr.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -<a href="javascript:///" onclick="$('title').value = $('suggesd').firstChild.data; $('suggesteddescr').innerHTML = '';" title="Use suggested description"> -<img src="/assets/icons/paste.png" style="float: right; margin: .5em;" /> -<span id="suggesd"><%= @text %></span> </a>
\ No newline at end of file diff --git a/app/views/tools/background.html.erb b/app/views/tools/background.html.erb deleted file mode 100644 index 4136f3b..0000000 --- a/app/views/tools/background.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -<p>Using <code><%= params[:id] %></code>.</p> - -<%= Glsamaker::Portage.get_description(params[:id]) %>
\ No newline at end of file diff --git a/app/views/tools/template.js.erb b/app/views/tools/template.js.erb deleted file mode 100644 index 77fabdb..0000000 --- a/app/views/tools/template.js.erb +++ /dev/null @@ -1,7 +0,0 @@ -<% if @error.nil? -%> -GLSAMaker.editing.templates.close($('templates-<%= @target %>')); -var target = $('<%= @target %>'); -target.setValue(target.getValue() + "<%= escape_javascript(@template.text).html_safe %>"); -<% else -%> -alert("<%= escape_javascript(@error) %>"); -<% end -%> |