summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/cve/info.html.erb')
-rw-r--r--app/views/cve/info.html.erb140
1 files changed, 0 insertions, 140 deletions
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 %>