File tree Expand file tree Collapse file tree 3 files changed +22
-7
lines changed Expand file tree Collapse file tree 3 files changed +22
-7
lines changed Original file line number Diff line number Diff line change @@ -566,3 +566,13 @@ div.dataTables_scrollHead th:first-child {
566566body .modal-scancode {
567567 width : 800px ;
568568}
569+ # scancode-info {
570+ text-align : left;
571+ }
572+ # scancode-label {
573+ text-align : left;
574+ padding : 10px 0px 10px 0px ;
575+ }
576+ # scancode-display {
577+ display : block;
578+ }
Original file line number Diff line number Diff line change @@ -210,8 +210,16 @@ $(document).ready(() => {
210210 return aboutCodeDB . sync
211211 . then ( ( db ) => db . Header . findById ( 1 )
212212 . then ( ( header ) => {
213- const scancode_label = $ ( '#scancode-label' ) . find ( '#scancode-display' ) ;
214- scancode_label . text ( 'ScanCode version: ' + header . scancode_version + '\n\nScanCode options: ' + JSON . stringify ( header . scancode_options , null , 2 ) ) ;
213+ const scancode_label = $ ( '#scancode-info' ) . find ( '#scancode-label' ) ;
214+ const scancode_display = $ ( '#scancode-info' ) . find ( '#scancode-display' ) ;
215+ if ( header === null || header . scancode_version === null || header . scancode_options === null ) {
216+ scancode_label . text ( 'Please import a ScanCode results file or an AboutCode Manager sqlite file to see the scan options.' ) ;
217+ scancode_display . css ( 'display' , 'none' ) ;
218+ } else {
219+ scancode_label . text ( 'This information has been extracted from your imported ScanCode JSON file:' ) ;
220+ scancode_display . text ( 'ScanCode version: ' + header . scancode_version + '\n\nScanCode options: ' + JSON . stringify ( header . scancode_options , null , 2 ) ) ;
221+ scancode_display . css ( 'display' , 'block' ) ;
222+ }
215223 } ) )
216224 . then ( $ ( '#myModal' ) . modal ( 'show' ) ) ;
217225 }
Original file line number Diff line number Diff line change @@ -425,11 +425,8 @@ <h3>Debugging</h3>
425425 < h4 class ="modal-title "> ScanCode Version and Options</ h4 >
426426 </ div >
427427 < div class ="modal-body ">
428- < div id ="scancode-label " style ="text-align: left; ">
429- < p >
430- This information has been extracted from your imported ScanCode JSON file:
431- </ p >
432-
428+ < div id ="scancode-info ">
429+ < div id ="scancode-label "> </ div >
433430 < pre id ="scancode-display "> </ pre >
434431 </ div >
435432 </ div >
You can’t perform that action at this time.
0 commit comments