diff options
Diffstat (limited to 'lib/srtgui/templates/cve.html')
-rw-r--r-- | lib/srtgui/templates/cve.html | 713 |
1 files changed, 404 insertions, 309 deletions
diff --git a/lib/srtgui/templates/cve.html b/lib/srtgui/templates/cve.html index b1df1819..a70448f8 100644 --- a/lib/srtgui/templates/cve.html +++ b/lib/srtgui/templates/cve.html @@ -8,357 +8,452 @@ <div class="row"> <!-- Breadcrumbs --> - <div class="col-md-12"> - <ul class="breadcrumb" id="breadcrumb"> - <li><a href="{% url 'landing' %}">Home</a></li><span class="divider">→</span> - <li><a href="{% url 'all-cves' %}">CVE's</a></li><span class="divider">→</span> - <li>{{cve_list_table.0.0.name}}</li> - <li><a class="btn btn-default navbar-btn " id="cve-prev" href="{% url 'cve' cve_prev %}">Prev</a></li> - <li><a class="btn btn-default navbar-btn " id="cve-next" href="{% url 'cve' cve_next %}">Next</a></li> - </ul> - </div> + <div class="col-md-12"> + <ul class="breadcrumb" id="breadcrumb"> + <li><a href="{% url 'landing' %}">Home</a></li><span class="divider">→</span> + <li><a href="{% url 'cves' %}">CVE's</a></li><span class="divider">→</span> + <li>{{cve_list_table.0.0.name}}</li> + <li><a class="btn btn-default navbar-btn " id="cve-prev" href="{% url 'cve' cve_prev %}">Prev</a></li> + <li><a class="btn btn-default navbar-btn " id="cve-next" href="{% url 'cve' cve_next %}">Next</a></li> + </ul> + </div> </div> <!-- Begin container --> + <div class="row"> <div class="col-md-12"> <div class="page-header build-data"> - <h1>{{cve_list_table.0.0.name}} Detail {% if not cve_list_table.0.0.public %} <font color="red">[PRIVATE]</font> {% endif %}</h1> + <h1 style="display:inline-block;vertical-align: middle;">{{cve_list_table.0.0.name}} Detail {% if not cve_list_table.0.0.public %} <font color="red">[PRIVATE]</font> {% endif %}</h1> + {% if access.is_creator %} + <span style="padding-left:30px;"><button id="select-quickedit" class="btn btn-default" type="button">Edit SRTool Status...</button></span> + <!--<span style="padding-left:30px;"><button id="select-quickedit" class="btn btn-default" type="button">Edit CVE Data ...</button></span>--> + {% endif %} </div> </div> </div> + <div class="row" style="padding-left: 25px;"> <UL> - <LI> + <LI> + <i>SRTool Priority:</i> {{cve_list_table.0.0.get_priority_text}} + </LI> + <LI> <i>SRTool Status:</i> {{cve_list_table.0.0.get_status_text}} - </LI> - <LI> + </LI> + <LI> <i>SRTool Notes:</i> '{{cve_list_table.0.0.comments}}' - {% if access.is_creator %} - </LI> - <LI> - <i>SRTool Private Notes:</i> '{{cve_list_table.0.0.comments_private}}' - {% endif %} - </LI> - <LI> - {% if access.is_creator %} - <i>Publish</i> = - <select name="Publish"> - <option value="Undetermined">Undetermined</option> - <option value="Automatic Publish Date">Automatic Publish Date</option> - <option value="Request Publish Date">Request Publish Date</option> - <option value="Published">Published</option> - <option value="Do Not Published">Do Not Published</option> - </select> - <i>Publish Date</i> = {{cve_list_table.0.0.publish_date}} - <a class="btn btn-default " id="login-button" href="">Publish Now</a> - <!--<a class="btn btn-default navbar-btn " id="login-button" href="">Publish Now</a> --> - {% else %} - <i>Publish</i> = {{cve_list_table.0.0.get_publish_text}}, <i>Publish Date</i> = {{cve_list_table.0.0.publish_date}} - {% endif %} - </LI> + {% if access.is_creator %} + </LI> + <LI> + <i>SRTool Private Notes:</i> '{{cve_list_table.0.0.comments_private}}' + {% endif %} + </LI> + <LI> + {% if access.is_creator %} + <i>Publish = {{cve_list_table.0.0.get_publish_text}}</i> + <!--<a class="btn btn-default navbar-btn " id="login-button" href="">Publish Now</a> --> + {% else %} + <i>Publish</i> = {{cve_list_table.0.0.get_publish_text}}, <i>Publish Date</i> = {{cve_list_table.0.0.publish_date}} + {% endif %} + </LI> </UL> + + +</div> +<!-- Quick Edit --> +<div id="details-quickedit" style="display:none;"> + <p><p> + <button class="execute" id="submit-quickedit"> Submit Changes </button> + <p><i>Priority</i> = + <select name="Priority" id="select-priority-state"> + <option value="0" {% if 0 == cve_list_table.0.0.priority %}selected{% endif %}></option> + <option value="1" {% if 1 == cve_list_table.0.0.priority %}selected{% endif %}>Minor</option> + <option value="2" {% if 2 == cve_list_table.0.0.priority %}selected{% endif %}>Low</option> + <option value="3" {% if 3 == cve_list_table.0.0.priority %}selected{% endif %}>Medium</option> + <option value="4" {% if 4 == cve_list_table.0.0.priority %}selected{% endif %}>High</option> + </select> + <p><input type="text" placeholder="Edit Note" id="text-note" size="40" value="{{cve_list_table.0.0.comments}}"></p> + <p><input type="text" placeholder="Edit Private Note" id="text-private-note" size="40" value="{{cve_list_table.0.0.comments_private}}"></p> + <i>Publish</i> = + <select name="Publish" id="select-publish-state"> + <option value="0" {% if 0 == cve_list_table.0.0.publish_state %}selected{% endif %}>Unpublished</option> + <option value="1" {% if 1 == cve_list_table.0.0.publish_state %}selected{% endif %}>Not to be Published</option> + <option value="2" {% if 2 == cve_list_table.0.0.publish_state %}selected{% endif %}>Published</option> + <option value="3" {% if 3 == cve_list_table.0.0.publish_state %}selected{% endif %}>Publish Request (New)</option> + <option value="4" {% if 4 == cve_list_table.0.0.publish_state %}selected{% endif %}>Publish Request (Update)</option> + <option value="5" {% if 5 == cve_list_table.0.0.publish_state %}selected{% endif %}>Publish Submitted</option> + </select> + <i>Publish Date</i> = <input type="text" placeholder="Auto Publish Date" id="select-publish-date" size="40" value="{{cve_list_table.0.0.publish_date}}"><p> + <p><p> </div> <div class="row"> <div class="col-md-8 tabbable"> <ul class="nav nav-tabs"> - {% for object,state,id in cve_list_table %} + {% for object,details,state,id in cve_list_table %} <li class="{{state}}"> <a href="#{{id}}" data-toggle="tab"> <span class="glyphicon glyphicon-question-sign get-help" title="{{id}}"></span> {{id}} </a> </li> - {% endfor %} + {% endfor %} </ul> <div class="tab-content"> - {% for object,state,id in cve_list_table %} - <div class="tab-pane {{state}}" id="{{id}}"> + {% for object,details,state,id in cve_list_table %} + <div class="tab-pane {{state}}" id="{{id}}"> <!-- vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv --> - <div class="row"> - <div class="col-md-5"> - <div> - <h3>Decription</h3> - {{object.description}} - </div> - <p/> - <div> - <B>Source:</B> {{object.cve_data_format}} <B>Last Modified:</B> {{object.lastModifiedDate}} - </div> - </div> - <div class="col-md-5"> - <div class="well"> - <h2>Quick Info</h2> - - - <dl class="dl-horizontal"> - <dt>CVE Dictionary Entry:</dt> - <dd>{{object.name}}</dd> - - <dt>Original release date:</dt> - <dd>{{object.publishedDate}}</dd> - - <dt>Last revised:</dt> - <dd>{{object.lastModifiedDate}}</dd> - - <dt>Source:</dt> - <dd>{{object.cve_data_format}}</dd> - - {% if id == "Summary" %} - <dt>SRTool Vulnerability:</dt> - <dd> - {% if object.cve_to_vulnerability.all %} - {% for cv in object.cve_to_vulnerability.all %} - {% if not forloop.first %}| {% endif %}<a href="{% url 'vulnerability' cv.vulnerability.pk %}">{{cv.vulnerability.name}}</a> - {% endfor %} - {% else %} - No vulnerability record found - {% endif %} - {% endif %} - </dd> - </dl> - </div> - </div> - </div> - - <div class="row"> - <h3>Impact</h3> - <div class="col-md-4"> - <h3>CVSS Severity (version 3.0):</h3> - <dl class="dl-horizontal"> - <dt>CVSS v3 Base Score:</dt> - <dd>{{object.cvssV3_baseScore}} {{object.cvssV3_baseSeverity}}</dd> - - <dt>Vector:</dt> - <dd>{{object.cvssV3_vectorString}}</dd> - - <dt>Impact Score:</dt> - <dd>{{object.cvssV3_impactScore}}</dd> - - <dt>Exploitability Score:</dt> - <dd>{{object.cvssV3_exploitabilityScore}}</dd> - </dl> - <h3>CVSS Version 3 Metrics:</h3> - <dl class="dl-horizontal"> - <dt>Attack Vector (AV):</dt> - <dd>{{object.cvssV3_attackVector}}</dd> - - <dt>Attack Complexity (AC):</dt> - <dd>{{object.cvssV3_attackComplexity}}</dd> - - <dt>Privileges Required (PR):</dt> - <dd>{{object.cvssV3_privilegesRequired}}</dd> - - <dt>User Interaction (UI):</dt> - <dd>{{object.cvssV3_userInteraction}}</dd> - - <dt>Scope (S):</dt> - <dd>{{object.cvssV3_scope}}</dd> - - <dt>Confidentiality (C):</dt> - <dd>{{object.cvssV3_confidentialityImpact}}</dd> - - <dt>Integrity (I):</dt> - <dd>{{object.cvssV3_integrityImpact}}</dd> - - <dt>Availability (A):</dt> - <dd>{{object.cvssV3_availabilityImpact}}</dd> - </dl> - </div> - <div class="col-md-4"> - <h3>CVSS Severity (version 2.0):</h3> - <dl class="dl-horizontal"> - <dt>CVSS v2 Base Score:</dt> - <dd>{{object.cvssV2_baseScore}} {{object.cvssV2_severity}}</dd> - - <dt>Vector:</dt> - <dd>{{object.cvssV2_vectorString}}</dd> - - <dt>Impact Subscore:</dt> - <dd>{{object.cvssV2_impactScore}}</dd> - - <dt>Exploitability Subscore:</dt> - <dd>{{object.cvssV2_exploitabilityScore}}</dd> - - </dl> - <h3>CVSS Version 2 Metrics:</h3> - <dl class="dl-horizontal"> - <dt>Access Vector (AV):</dt> - <dd>{{object.cvssV2_accessVector}}</dd> - - <dt>Access Complexity (AC):</dt> - <dd>{{object.cvssV2_accessComplexity}}</dd> - - <dt>Authentication:</dt> - <dd>{{object.cvssV2_authentication}}</dd> - - <dt>Impact Type:</dt> - <dd>???</dd> - - </dl> - </div> - </div> - - <div class="row"> - <h3>References to Advisories, Solutions, and Tools</h3> - <p> - By selecting these links, you will be leaving NIST webspace. We have provided these links to other web sites - because they may have information that would be of interest to you. No inferences should be drawn on account - of other sites being referenced, or not, from this page. There may be other web sites that are more appropriate - for your purpose. NIST does not necessarily endorse the views expressed, or concur with the facts presented on - these sites. Further, NIST does not endorse any commercial products that may be mentioned on these sites. Please - address comments about this page to nvd@nist.gov. - </p> - <table class="table table-striped table-condensed" data-testid="vuln-hyperlinks-table"> - <thead> - <tr> - <th>Hyperlink</th> - <th>Resource</th> - <th>Type</th> - <th>Source</th> - <th>Name</th> - </tr> - </thead> - {% if object.references.all %} - {% for ref in object.references.all %} - <tr> - <td><a href="{{ref.hyperlink}}" target="_blank">{{ ref.hyperlink }}</a></td> - <td>{{ ref.resource }}</td> - <td>{{ ref.type }}</td> - <td>{{ ref.source }}</td> - <td>{{ ref.name }}</td> - </tr> - {% endfor %} - {% else %} - <tr> - <td>No references</td> - </tr> - {% endif %} - </table> - </div> - - <div class="row"> - <h3>Technical Details</h3> - <p> - <h4>Vulnerability Type<a href="{% url 'all-cwes' %}"> (View All)</a></h4> - <p> - <table class="table table-striped table-condensed" data-testid="cve2cwe-hyperlinks-table"> - <thead> - <tr> - <th>Name</th> - <th>Summary</th> - </tr> - </thead> - {% if object.cve2cwe.all %} - {% for ref in object.cve2cwe.all %} - <tr> - <td>{{ ref.cwe.name }}</td> - <td>{{ ref.cwe.summary }}</td> - </tr> - {% endfor %} - {% else %} - <tr> - <td>No CWE references</td> - </tr> - {% endif %} - </table> - </div> - - <div class="row"> - <h3>Vulnerable software and versions</h3> - <div > <!--style="padding-left: 25px;" --> - {% if object.get_cpe_list %} - {% for cpe in object.get_cpe_list %} - {% if not cpe %} - {% elif not cpe.0 %} - {% elif '<config' in cpe.0 %} - <div style="padding-left: 25px;"> - <h4>• Configuration </h3> - {% elif '<and>' == cpe.0 %} - <div style="padding-left: 25px;"> - <h4>• AND</h3> - {% elif '<or>' == cpe.0 %} - <div style="padding-left: 25px;"> - <h4>• OR</h3> - <table class="table table-striped table-condensed" data-testid="configs-hyperlinks-table"> - <thead> - <tr> - <th>Vulnerable</th> - <th>CPE 2.3</th> - <th>CPE 2.2</th> - <th><!--<span class="glyphicon glyphicon-question-sign get-help" title="Version End Including"></span>-->Version End</th> - </tr> - </thead> - {% elif '</or>' == cpe.0 %} - </table> - </div> - {% elif '</and>' == cpe.0 %} - </div> - {% elif '</config>' == cpe.0 %} - </div> - {% else %} - <tr> - <td>{{ cpe.0 }}</td> - <td>{{ cpe.1 }}</td> - <td>{{ cpe.2 }}</td> - <td>{{ cpe.3 }}</td> - </tr> - {% endif %} - {% endfor %} - {% else %} - No CPE configurations - {% endif %} - </div> - <p/> - </div> - - - <div class="row"> - <h3>History - </h3> - - <table class="table table-striped table-condensed" data-testid="vuln-hyperlinks-table"> - <thead> - <tr> - <th>Comment</th> - <th>Date</th> - <th>Author</th> - </tr> - </thead> - - {% if object.cve_history.all %} - {% for c in object.cve_history.all %} - <tr> - <td>{{ c.comment }}</td> - <td>{{ c.date }}</td> - <td>{{ c.author }}</td> - </tr> - {% endfor %} - {% else %} - <tr> - <td>No history found</td> - </tr> - {% endif %} - </table> - - </div> + <!-- Row: Description and Quick Info --> + <div class="row"> + <div class="col-md-5"> + <div> + <h3>Decription</h3> + {{object.description}} + </div> + <p/> + <div> + <B>Source:</B> {{object.cve_data_format}} <B>Last Modified:</B> {{object.lastModifiedDate}} + </div> + </div> + <div class="col-md-5"> + <div class="well"> + <h2>Quick Info</h2> + + + <dl class="dl-horizontal"> + <dt>CVE Dictionary Entry:</dt> + <dd>{{object.name}}</dd> + + <dt>Original release date:</dt> + <dd>{{object.publishedDate}}</dd> + + <dt>Last revised:</dt> + <dd>{{object.lastModifiedDate}}</dd> + + <dt>Source:</dt> + <dd>{{object.cve_data_format}}</dd> + + {% if id == "Summary" %} + <dt>SRTool Vulnerability:</dt> + <dd> + {% if object.cve_to_vulnerability.all %} + {% for cv in object.cve_to_vulnerability.all %} + {% if not forloop.first %}| {% endif %}<a href="{% url 'vulnerability' cv.vulnerability.pk %}">{{cv.vulnerability.name}}</a> + {% endfor %} + {% else %} + No vulnerability record found + {% endif %} + {% endif %} + </dd> + + <dt>NIST Link:</dt> + <dd><a href="https://nvd.nist.gov/vuln/detail/{{object.name}}" target="_blank">{{object.name}}</a></dd> + + </dl> + </div> + </div> + </div> <!-- /Description --> + + <!-- Row: CVSS --> + <div class="row" style="padding-left: 25px;"> + <h3>Impact</h3> + <div class="col-md-4"> + <h3>CVSS Severity (version 3.0):</h3> + <dl class="dl-horizontal"> + <dt>CVSS v3 Base Score:</dt> + <dd>{{object.cvssV3_baseScore}} {{object.cvssV3_baseSeverity}}</dd> + + <dt>Vector:</dt> + <dd>{{details.cvssV3_vectorString}}</dd> + + <dt>Impact Score:</dt> + <dd>{{details.cvssV3_impactScore}}</dd> + + <dt>Exploitability Score:</dt> + <dd>{{details.cvssV3_exploitabilityScore}}</dd> + </dl> + <h3>CVSS Version 3 Metrics:</h3> + <dl class="dl-horizontal"> + <dt>Attack Vector (AV):</dt> + <dd>{{details.cvssV3_attackVector}}</dd> + + <dt>Attack Complexity (AC):</dt> + <dd>{{details.cvssV3_attackComplexity}}</dd> + + <dt>Privileges Required (PR):</dt> + <dd>{{details.cvssV3_privilegesRequired}}</dd> + + <dt>User Interaction (UI):</dt> + <dd>{{details.cvssV3_userInteraction}}</dd> + + <dt>Scope (S):</dt> + <dd>{{details.cvssV3_scope}}</dd> + + <dt>Confidentiality (C):</dt> + <dd>{{details.cvssV3_confidentialityImpact}}</dd> + + <dt>Integrity (I):</dt> + <dd>{{details.cvssV3_integrityImpact}}</dd> + + <dt>Availability (A):</dt> + <dd>{{details.cvssV3_availabilityImpact}}</dd> + </dl> + </div> + <div class="col-md-4"> + <h3>CVSS Severity (version 2.0):</h3> + <dl class="dl-horizontal"> + <dt>CVSS v2 Base Score:</dt> + <dd>{{object.cvssV2_baseScore}} {{details.cvssV2_severity}}</dd> + + <dt>Vector:</dt> + <dd>{{details.cvssV2_vectorString}}</dd> + + <dt>Impact Subscore:</dt> + <dd>{{details.cvssV2_impactScore}}</dd> + + <dt>Exploitability Subscore:</dt> + <dd>{{details.cvssV2_exploitabilityScore}}</dd> + + </dl> + <h3>CVSS Version 2 Metrics:</h3> + <dl class="dl-horizontal"> + <dt>Access Vector (AV):</dt> + <dd>{{details.cvssV2_accessVector}}</dd> + + <dt>Access Complexity (AC):</dt> + <dd>{{details.cvssV2_accessComplexity}}</dd> + + <dt>Authentication:</dt> + <dd>{{details.cvssV2_authentication}}</dd> + + <dt>Impact Type:</dt> + <dd>???</dd> + + </dl> + </div> + </div> <!-- /CVSS --> + + <!-- Row: References --> + <div class="row" style="padding-left: 25px;"> + <h3>References to Advisories, Solutions, and Tools</h3> + <p> + By selecting these links, you will be leaving NIST webspace. We have provided these links to other web sites + because they may have information that would be of interest to you. No inferences should be drawn on account + of other sites being referenced, or not, from this page. There may be other web sites that are more appropriate + for your purpose. NIST does not necessarily endorse the views expressed, or concur with the facts presented on + these sites. Further, NIST does not endorse any commercial products that may be mentioned on these sites. Please + address comments about this page to nvd@nist.gov. + </p> + <table class="table table-striped table-condensed" data-testid="vuln-hyperlinks-table"> + <thead> + <tr> + <th>Hyperlink</th> + <th>Resource</th> + </tr> + </thead> + {% if object.references.all %} + {% for ref in object.references.all %} + <tr> + <td><a href="{{ref.hyperlink}}" target="_blank">{{ ref.hyperlink }}</a></td> + <td>{{ ref.resource }}</td> + </tr> + {% endfor %} + {% else %} + <tr> + <td>No references</td> + </tr> + {% endif %} + </table> + </div> <!-- /References --> + + <!-- Row: CWE --> + <div class="row" style="padding-left: 25px;"> + <h3>Technical Details</h3> + <p> + <h4>Vulnerability Type<a href="{% url 'cwes' %}"> (View All)</a></h4> + <p> + <table class="table table-striped table-condensed" data-testid="cve2cwe-hyperlinks-table"> + <thead> + <tr> + <th>Name</th> + <th>Summary</th> + </tr> + </thead> + {% if object.cve2cwe.all %} + {% for ref in object.cve2cwe.all %} + <tr> + <td>{{ ref.cwe.name }}</td> + <td>{{ ref.cwe.summary }}</td> + </tr> + {% endfor %} + {% else %} + <tr> + <td>No CWE references</td> + </tr> + {% endif %} + </table> + </div> <!-- /CWE --> + + <!-- Row: CPE --> + <div class="row" style="padding-left: 25px;"> + <h3>Vulnerable software and versions</h3> + <div > <!--style="padding-left: 25px;" --> + {% if details.get_cpe_list %} + {% for cpe in details.get_cpe_list %} + {% if not cpe %} + {% elif not cpe.0 %} + {% elif '[config' in cpe.0 %} + <div style="padding-left: 25px;"> + <h4>• Configuration </h3> + {% elif '[and]' == cpe.0 %} + <div style="padding-left: 25px;"> + <h4>• AND</h3> + {% elif '[or]' == cpe.0 %} + <div style="padding-left: 25px;"> + <h4>• OR</h3> + <table class="table table-striped table-condensed" data-testid="configs-hyperlinks-table"> + <thead> + <tr> + <th>Vulnerable</th> + <th>CPE 2.3</th> + <th>CPE 2.2</th> + <th><!--<span class="glyphicon glyphicon-question-sign get-help" title="Version End Including"></span>-->Version End</th> + </tr> + </thead> + {% elif '[/or]' == cpe.0 %} + </table> + </div> + {% elif '[/and]' == cpe.0 %} + </div> + {% elif '[/config]' == cpe.0 %} + </div> + {% else %} + <tr> + <td>{{ cpe.0 }}</td> + <td>{{ cpe.1 }}</td> + <td>{{ cpe.2 }}</td> + <td>{{ cpe.3 }}</td> + </tr> + {% endif %} + {% endfor %} + {% else %} + No CPE configurations + {% endif %} + </div> + <p> + </div> <!-- /CPE --> + <!-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ --> - </div> <!-- end tab-pane --> + </div> <!-- end tab-pane --> {% endfor %} </div> <!-- end tab-content --> </div> <!-- end tabbable --> </div> <!-- end row --> +<div class="row" style="padding-left: 25px;"> + <h3>History</h3> + + <table class="table table-striped table-condensed" data-testid="vuln-hyperlinks-table"> + <thead> + <tr> + <th>Comment</th> + <th>Date</th> + <th>Author</th> + </tr> + </thead> + + {% if cve_list_table.1.0.cve_history.all %} + {% for c in cve_list_table.1.0.cve_history.all %} + <tr> + <td>{{ c.comment }}</td> + <td>{{ c.date }}</td> + <td>{{ c.author }}</td> + </tr> + {% endfor %} + {% else %} + <tr> + <td>No history found</td> + </tr> + {% endif %} + </table> +</div> + <HR ALIGN="center" WIDTH="100%"> +<script> + var selected_quickedit=false; + + $(document).ready(function() { + function onCommitAjaxSuccess(data, textstatus) { + if (window.console && window.console.log) { + console.log("XHR returned:", data, "(" + textstatus + ")"); + } else { + alert("NO CONSOLE:\n"); + return; + } + if (data.error != "ok") { + alert("error on request:\n" + data.error); + return; + } + // reload the page with the updated tables + location.reload(true); + } + + function onCommitAjaxError(jqXHR, textstatus, error) { + console.log("ERROR:"+error+"|"+textstatus); + alert("XHR errored1:\n" + error + "\n(" + textstatus + ")"); + } + + /* ensure cookie exists {% csrf_token %} */ + function postCommitAjaxRequest(reqdata) { + reqdata['cve_id'] = {{ object.id }}; + var ajax = $.ajax({ + type:"POST", + data: reqdata, + url:"{% url 'xhr_cve_commit' %}", + headers: { 'X-CSRFToken': $.cookie("csrftoken")}, + success: onCommitAjaxSuccess, + error: onCommitAjaxError, + }) + } + + $('#select-quickedit').click(function(){ + if (selected_quickedit) { + selected_quickedit=false; + $("#details-quickedit").slideUp(); + } else { + selected_quickedit=true; + $("#details-quickedit").slideDown(); + } + }); + + $('#submit-quickedit').click(function(){ + var note=$('#text-note').val().trim(); + var private_note=$('#text-private-note').val().trim(); + var priority=$('#select-priority-state').val(); + var publish_state=$('#select-publish-state').val(); + var publish_date=$('#select-publish-date').val(); + postCommitAjaxRequest({ + "action" : 'submit-quickedit', + "priority" : priority, + "note" : note, + "private_note" : private_note, + "publish_state" : publish_state, + "publish_date" : publish_date, + }); + }); + + /* Set the report link */ + $('#report_link').attr('href',"{% url 'report' request.resolver_match.url_name %}?record_list={{cve_list_table.0.0.id}}"); + }); +</script> {% endblock %} - |