diff options
Diffstat (limited to 'lib/srtgui/templates/cve.html')
-rw-r--r-- | lib/srtgui/templates/cve.html | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/lib/srtgui/templates/cve.html b/lib/srtgui/templates/cve.html index ecbcf39e..c3cfcac5 100644 --- a/lib/srtgui/templates/cve.html +++ b/lib/srtgui/templates/cve.html @@ -40,6 +40,7 @@ {% else %} <span style="padding-left:30px;"><button id="select-cveedit" class="btn btn-default" type="button">Edit CVE Data ...</button></span> {% endif %} + <span style="padding-left:30px;"><button id="submit-delete-cve" class="btn btn-default" type="button">Delete CVE</button></span> {% endif %} </span> {% if not is_edit %} @@ -106,8 +107,8 @@ </tr> </thead> - {% if cve_list_table.1.0.cve_history.all %} - {% for c in cve_list_table.1.0.cve_history.all %} + {% if object.cve_history.all %} + {% for c in object.cve_history.all %} <tr> <td>{{ c.comment }}</td> <td>{{ c.date }}</td> @@ -123,6 +124,7 @@ </div> <HR ALIGN="center" WIDTH="100%"> +Created={{object.srt_created}} Updated={{object.srt_updated}} <script> var selected_quickedit=false; @@ -149,7 +151,9 @@ } // reload the page with the updated tables - if (('new_name' in data) && ("" != data.new_name)) { + if (('new_name' in data) && (0 == data.new_name.indexOf("url:"))) { + window.location.replace(data.new_name.replace("url:","")); + } else if (('new_name' in data) && ("" != data.new_name)) { var new_url = "{% url 'cve' object.name %}".replace("{{object.name}}",data.new_name); window.location.replace(new_url); } else { @@ -199,18 +203,24 @@ $('#submit-quickedit').click(function(){ var note=$('#text-note').val().trim(); var private_note=$('#text-private-note').val().trim(); + var tags=$('#text-tags').val().trim(); var priority=$('#select-priority-state').val(); var status=$('#select-status-state').val(); var publish_state=$('#select-publish-state').val(); var publish_date=$('#select-publish-date').val(); + var acknowledge_date=$('#text-acknowledge-date').val(); + var affected_components=$('#text-affected-components').val(); postCommitAjaxRequest({ "action" : 'submit-quickedit', "priority" : priority, "status" : status, "note" : note, "private_note" : private_note, + "tags" : tags, "publish_state" : publish_state, "publish_date" : publish_date, + "acknowledge_date" : acknowledge_date, + "affected_components" : affected_components }); }); @@ -292,6 +302,15 @@ }); }); + $("#submit-delete-cve").click(function(){ + var result = confirm("Are you sure you want to permamently delete '{{object.name}}' and all its related records?"); + if (result){ + postCommitAjaxRequest({ + "action" : 'submit-delete-cve' + }); + } + }); + /* Set the report link */ |