5959 {% if package_search %}
6060 < div class ="notification " style ="border: solid 1px #ff9999; padding: 20px; margin-top: 20px; background-color: #ffffff; color: #ff0000; z-index: 10; ">
6161 < button class =" delete "> </ button >
62- <!-- <h6 class="title is-6" style="margin-bottom: 10px;"><span style="color: #ff0000; font-weight: bold;">Search for packages:</span></h6> -->
6362 {{ package_search }}
6463 </ div >
6564 {% endif %}
6968 </ article >
7069</ section >
7170
72- <!-- 8/6/2022 Saturday 3:24:01 PM. Add an if condition here to display this section only if there's a record; -- packages uses `if package_name` -->
7371{% if package %}
7472
75- <!-- <section class="section01">
76- <h4 class="title is-4" style="margin-bottom: 0px;">Package Details</h4>
77- </section> -->
78-
79-
8073< section class ="section01 ">
81- <!-- <div style="margin-bottom: 10px;">
82- <span class="tag is-info is-medium has-text-weight-bold" style="margin-right: 10px;">Package Details</span>
83- </div> -->
8474 < article class ="panel is-info panel-header-only ">
8575 < p class ="panel-heading py-2 is-size-6 ">
8676 Package Details
@@ -166,23 +156,21 @@ <h4 class="title is-4" style="margin-bottom: 0px;">Package Details</h4>
166156 {{resolved_vuln|length}}
167157 </ td >
168158 </ tr >
159+ {% if debug_ui %}
169160 < tr >
170- < td class ="two-col-left "> Packages with no reported unresolved vulnerabilities</ td >
161+ < td class ="two-col-left " style =" color: #009900; " > Packages with no reported unresolved vulnerabilities</ td >
171162 < td class ="two-col-right ">
172- <!-- {% if package %} -->
173163 {% if no_reported_vulns_packages|length > 0 %}
174164 {% for pkg in no_reported_vulns_packages %}
175- <!-- {% if pkg %} -->
176165 < span > < a href ="{% url 'package_view' pkg.pk %}?type={{package_type}}&name={{pkg.package_url}} " target ="_self "> {{pkg.package_url}}</ a > </ span >
177166 < br />
178- <!-- {% endif %} -->
179167 {% endfor %}
180168 {% else %}
181169 We are unable to identify such a package.
182170 {% endif %}
183- <!-- {% endif %} -->
184171 </ td >
185172 </ tr >
173+ {% endif %}
186174 </ tbody >
187175 </ table >
188176
@@ -205,31 +193,14 @@ <h4 class="title is-4" style="margin-bottom: 0px;">Package Details</h4>
205193 {% for vuln in impacted_vuln %}
206194 < tr >
207195 < td >
208- {{ vuln.vulnerability_id }}
209- < span style ="font-size: 13px; ">
210- (< a href ="{% url 'vulnerability_view' vuln.pk %} " target ="_self "> HTML</ a > )
211- </ span >
212-
196+ < a href ="{% url 'vulnerability_view' vuln.pk %} " target ="_self "> {{ vuln.vulnerability_id }}</ a >
213197 </ td >
214198 < td >
215199 {{ vuln.summary }}
216200 </ td >
217201 < td >
218202 {% for alias in vuln.alias %}
219203 {{alias}}
220-
221- <!-- {% if object_list %}
222- {% for ref in object_list %}
223- {% if ref.reference_id %}
224- {% if ref.reference_id == alias %}
225- {% if ref.url %}
226- {{ref.url}}
227- {% endif %}
228- {% endif %}
229- {% endif %}
230- {% endfor %}
231- {% endif %} -->
232-
233204 < br />
234205 {% endfor %}
235206 </ td >
@@ -239,13 +210,13 @@ <h4 class="title is-4" style="margin-bottom: 0px;">Package Details</h4>
239210 {% else %}
240211 < tr >
241212 < td >
242- none
213+ None
243214 </ td >
244215 < td >
245- --
216+
246217 </ td >
247218 < td >
248- --
219+
249220 </ td >
250221 </ tr >
251222 {% endif %}
@@ -268,10 +239,7 @@ <h4 class="title is-4" style="margin-bottom: 0px;">Package Details</h4>
268239 {% for vuln in resolved_vuln %}
269240 < tr >
270241 < td >
271- {{ vuln.vulnerability_id }}
272- < span style ="font-size: 13px; ">
273- (< a href ="{% url 'vulnerability_view' vuln.pk %} " target ="_self "> HTML</ a > )
274- </ span >
242+ < a href ="{% url 'vulnerability_view' vuln.pk %} " target ="_self "> {{ vuln.vulnerability_id }}</ a >
275243 </ td >
276244 < td >
277245 {{ vuln.summary }}
@@ -288,13 +256,13 @@ <h4 class="title is-4" style="margin-bottom: 0px;">Package Details</h4>
288256 {% else %}
289257 < tr >
290258 < td >
291- none
259+ None
292260 </ td >
293261 < td >
294- --
262+
295263 </ td >
296264 < td >
297- --
265+
298266 </ td >
299267 </ tr >
300268 {% endif %}
@@ -304,6 +272,7 @@ <h4 class="title is-4" style="margin-bottom: 0px;">Package Details</h4>
304272
305273 </ div >
306274
275+ {% if debug_ui %}
307276 {% if package %}
308277 < div class ="columns ">
309278 < span class ="tag is-danger is-medium " style ="margin-bottom: 10px; "> Test view query data</ span >
@@ -457,17 +426,25 @@ <h4 class="title is-4" style="margin-bottom: 0px;">Package Details</h4>
457426 </ div >
458427 </ div >
459428 {% endif %}
460-
461-
462429</ section >
463430
431+ {% endif %}
464432{% endif %}
465433
466434{% endblock %}
467435
468436{% block scripts %}
469- < script src ="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js "> </ script >
470437< script >
438+ document . addEventListener ( 'DOMContentLoaded' , ( ) => {
439+ ( document . querySelectorAll ( '.notification .delete' ) || [ ] ) . forEach ( ( $delete ) => {
440+ const $notification = $delete . parentNode ;
441+
442+ $delete . addEventListener ( 'click' , ( ) => {
443+ $notification . parentNode . removeChild ( $notification ) ;
444+ } ) ;
445+ } ) ;
446+ } ) ;
447+
471448 $ ( document ) . ready ( function ( ) {
472449 $ ( '#tabs li' ) . on ( 'click' , function ( ) {
473450 var tab = $ ( this ) . data ( 'tab' ) ;
@@ -480,16 +457,6 @@ <h4 class="title is-4" style="margin-bottom: 0px;">Package Details</h4>
480457 } ) ;
481458 } ) ;
482459
483- document . addEventListener ( 'DOMContentLoaded' , ( ) => {
484- ( document . querySelectorAll ( '.notification .delete' ) || [ ] ) . forEach ( ( $delete ) => {
485- const $notification = $delete . parentNode ;
486-
487- $delete . addEventListener ( 'click' , ( ) => {
488- $notification . parentNode . removeChild ( $notification ) ;
489- } ) ;
490- } ) ;
491- } ) ;
492-
493460 $ ( document ) . ready ( function ( ) {
494461 $ ( '#submit_pkg' ) . click ( function ( ) {
495462 if ( $ ( '#id_name' ) . val ( ) . trim ( ) . length === 0 ) {
0 commit comments