diff --git a/src/web_interface/components/ajax_routes.py b/src/web_interface/components/ajax_routes.py index e9a7ca607..20f23c93f 100644 --- a/src/web_interface/components/ajax_routes.py +++ b/src/web_interface/components/ajax_routes.py @@ -90,10 +90,7 @@ def ajax_get_binary(self, mime_type, uid): mime_type = mime_type.replace('_', '/') binary = self.intercom.get_binary_and_filename(uid)[0] if 'text/' in mime_type: - return ( - '
'
-                f'{html.escape(bytes_to_str_filter(binary))}
' - ) + return f'
{html.escape(bytes_to_str_filter(binary))}
' if 'image/' in mime_type: return ( '
' + pre[i].innerHTML + ''; - var num = pre[i].innerHTML.split(/\n/).length; - for (var j = 0; j < num-1; j++) { - var line_num = pre[i].getElementsByTagName('span')[0]; - line_num.innerHTML += '' + (j + 1) + ''; - } - } -} diff --git a/src/web_interface/static/js/show_analysis_preview.js b/src/web_interface/static/js/show_analysis_preview.js index 261c21e1c..d331be14d 100644 --- a/src/web_interface/static/js/show_analysis_preview.js +++ b/src/web_interface/static/js/show_analysis_preview.js @@ -5,19 +5,33 @@ const offset_input = document.getElementById("hex-preview-offset"); function hide_gif(element) { element.style.display = "none"; } + function init_preview() { hide_gif(preview_loading_gif); if (isTextOrImage) { - highlight_code(); + highlightCode('div#preview-div pre', true).then( + (_) => null, // do nothing + (error) => { + console.log(`Error: Code highlighting not successful: ${error}`); + } + ); } preview_button.scrollIntoView(); offset_input.focus(); } -function highlight_code() { - const block = $('div#preview-div pre')[0]; - hljs.highlightElement(block); - line_numbering(); + +async function highlightCode(jqElement, lineNumbering = false, sizeLimit = 1048576) { + if (typeof jqElement === "string") { + jqElement = $(jqElement)[0]; + } + if (jqElement.innerText.length < sizeLimit) { // only highlight the element if it isn't too large + hljs.highlightElement(jqElement); + } + if (lineNumbering) { + hljs.lineNumbersBlock(jqElement); + } } + function load_preview(offset = null, focus = false) { let resourcePath; document.getElementById("preview_button").onclick = () => false; @@ -43,16 +57,16 @@ function load_preview(offset = null, focus = false) { preview_loading_gif.style.display = "block"; $("#preview-content").load(resourcePath, init_preview); } + preview_button.onclick = load_preview; let rawResultIsHighlighted = false; const toggleSwitch = document.getElementById("rawResultSwitch"); +const analysisTable = document.getElementById("analysis-table-body"); +const rawResultRow = document.getElementById("raw-result"); +const analysisRows = Array.from(analysisTable.children) + .filter(child => !child.classList.contains("analysis-meta")); -toggleSwitch.addEventListener('change', function() { - const analysisTable = document.getElementById("analysis-table-body"); - const rawResultRow = document.getElementById("raw-result"); - const analysisRows = Array.from(analysisTable.children) - .filter(child => !child.classList.contains("analysis-meta")); - +toggleSwitch.addEventListener('change', function () { if (toggleSwitch.checked) { analysisRows.forEach((element) => { element.style.visibility = "collapse"; @@ -69,11 +83,16 @@ toggleSwitch.addEventListener('change', function() { // highlight the result lazily and only once rawResultIsHighlighted = true; let rawResult = document.getElementById('raw-analysis'); - hljs.highlightBlock(rawResult); + highlightCode(rawResult).then( + (_) => null, // do nothing + (error) => { + console.log(`Error: Raw result highlighting not successful: ${error}`); + } + ); } }); -window.onload = function() { +window.onload = function () { // make sure the switch is off when the page is reloaded toggleSwitch.checked = false; }; diff --git a/src/web_interface/static/package-lock.json b/src/web_interface/static/package-lock.json index 5a1bc5867..a4c3fdf04 100644 --- a/src/web_interface/static/package-lock.json +++ b/src/web_interface/static/package-lock.json @@ -1,13 +1,8 @@ { - "name": "FACT_core-static", - "version": "0.0.0", "lockfileVersion": 3, - "requires": true, + "name": "FACT_core-static", "packages": { "": { - "name": "FACT_core-static", - "version": "0.0.0", - "license": "GPL-3.0-only", "dependencies": { "@fortawesome/fontawesome-free": "^5.15.4", "@highlightjs/cdn-assets": "^11.8.0", @@ -16,58 +11,59 @@ "bootstrap-select": "^1.13.18", "chart.js": "^2.3.0", "diff2html": "^3.4.18", + "highlightjs-line-numbers.js": "^2.9.0", "jquery": "^3.5.0", "jstree": "^3.3.12", "jstree-bootstrap-theme": "^1.0.1", "moment": "^2.29.4", "popper.js": "^1.16.1", "vis-network": "^9.1.6" - } + }, + "license": "GPL-3.0-only", + "name": "FACT_core-static", + "version": "0.0.0" }, "node_modules/@egjs/hammerjs": { - "version": "2.0.17", - "resolved": "https://registry.npmjs.org/@egjs/hammerjs/-/hammerjs-2.0.17.tgz", - "integrity": "sha512-XQsZgjm2EcVUiZQf11UBJQfmZeEmOW8DpI1gsFeln6w0ae0ii4dMQEQ0kjl6DspdWX1aGY1/loyXnP0JS06e/A==", - "peer": true, "dependencies": { "@types/hammerjs": "^2.0.36" }, "engines": { "node": ">=0.8.0" - } + }, + "integrity": "sha512-XQsZgjm2EcVUiZQf11UBJQfmZeEmOW8DpI1gsFeln6w0ae0ii4dMQEQ0kjl6DspdWX1aGY1/loyXnP0JS06e/A==", + "peer": true, + "resolved": "https://registry.npmjs.org/@egjs/hammerjs/-/hammerjs-2.0.17.tgz", + "version": "2.0.17" }, "node_modules/@fortawesome/fontawesome-free": { - "version": "5.15.4", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.4.tgz", - "integrity": "sha512-eYm8vijH/hpzr/6/1CJ/V/Eb1xQFW2nnUKArb3z+yUWv7HTwj6M7SP957oMjfZjAHU6qpoNc2wQvIxBLWYa/Jg==", - "hasInstallScript": true, "engines": { "node": ">=6" - } + }, + "hasInstallScript": true, + "integrity": "sha512-eYm8vijH/hpzr/6/1CJ/V/Eb1xQFW2nnUKArb3z+yUWv7HTwj6M7SP957oMjfZjAHU6qpoNc2wQvIxBLWYa/Jg==", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.4.tgz", + "version": "5.15.4" }, "node_modules/@highlightjs/cdn-assets": { - "version": "11.8.0", - "resolved": "https://registry.npmjs.org/@highlightjs/cdn-assets/-/cdn-assets-11.8.0.tgz", - "integrity": "sha512-gkfCH4xGBGY9xPaW+t26WpgnfpDhNhB5RtVUDLx3MHkC7ZrmKeIxXsfjzOiuOnEgRk+vydlY6XeOeglh+eVhyg==", "engines": { "node": ">=12.0.0" - } + }, + "integrity": "sha512-gkfCH4xGBGY9xPaW+t26WpgnfpDhNhB5RtVUDLx3MHkC7ZrmKeIxXsfjzOiuOnEgRk+vydlY6XeOeglh+eVhyg==", + "resolved": "https://registry.npmjs.org/@highlightjs/cdn-assets/-/cdn-assets-11.8.0.tgz", + "version": "11.8.0" }, "node_modules/@types/hammerjs": { - "version": "2.0.41", - "resolved": "https://registry.npmjs.org/@types/hammerjs/-/hammerjs-2.0.41.tgz", "integrity": "sha512-ewXv/ceBaJprikMcxCmWU1FKyMAQ2X7a9Gtmzw8fcg2kIePI1crERDM818W+XYrxqdBBOdlf2rm137bU+BltCA==", - "peer": true + "peer": true, + "resolved": "https://registry.npmjs.org/@types/hammerjs/-/hammerjs-2.0.41.tgz", + "version": "2.0.41" }, "node_modules/abbrev": { - "version": "1.1.1", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" + "version": "1.1.1" }, "node_modules/bootstrap": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.6.2.tgz", - "integrity": "sha512-51Bbp/Uxr9aTuy6ca/8FbFloBUJZLHwnhTcnjIeRn2suQWsWzcuJhGjKDB5eppVte/8oCdOL3VuwxvZDUggwGQ==", "funding": [ { "type": "github", @@ -78,90 +74,90 @@ "url": "https://opencollective.com/bootstrap" } ], + "integrity": "sha512-51Bbp/Uxr9aTuy6ca/8FbFloBUJZLHwnhTcnjIeRn2suQWsWzcuJhGjKDB5eppVte/8oCdOL3VuwxvZDUggwGQ==", "peerDependencies": { "jquery": "1.9.1 - 3", "popper.js": "^1.16.1" - } + }, + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.6.2.tgz", + "version": "4.6.2" }, "node_modules/bootstrap-datepicker": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/bootstrap-datepicker/-/bootstrap-datepicker-1.10.0.tgz", - "integrity": "sha512-lWxtSYddAQOpbAO8UhYhHLcK6425eWoSjb5JDvZU3ePHEPF6A3eUr51WKaFy4PccU19JRxUG6wEU3KdhtKfvpg==", "dependencies": { "jquery": ">=3.4.0 <4.0.0" - } + }, + "integrity": "sha512-lWxtSYddAQOpbAO8UhYhHLcK6425eWoSjb5JDvZU3ePHEPF6A3eUr51WKaFy4PccU19JRxUG6wEU3KdhtKfvpg==", + "resolved": "https://registry.npmjs.org/bootstrap-datepicker/-/bootstrap-datepicker-1.10.0.tgz", + "version": "1.10.0" }, "node_modules/bootstrap-select": { - "version": "1.13.18", - "resolved": "https://registry.npmjs.org/bootstrap-select/-/bootstrap-select-1.13.18.tgz", "integrity": "sha512-V1IzK4rxBq5FrJtkzSH6RmFLFBsjx50byFbfAf8jYyXROWs7ZpprGjdHeoyq2HSsHyjJhMMwjsQhRoYAfxCGow==", "peerDependencies": { "bootstrap": ">=3.0.0", "jquery": "1.9.1 - 3" - } + }, + "resolved": "https://registry.npmjs.org/bootstrap-select/-/bootstrap-select-1.13.18.tgz", + "version": "1.13.18" }, "node_modules/chart.js": { - "version": "2.9.4", - "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-2.9.4.tgz", - "integrity": "sha512-B07aAzxcrikjAPyV+01j7BmOpxtQETxTSlQ26BEYJ+3iUkbNKaOJ/nDbT6JjyqYxseM0ON12COHYdU2cTIjC7A==", "dependencies": { "chartjs-color": "^2.1.0", "moment": "^2.10.2" - } + }, + "integrity": "sha512-B07aAzxcrikjAPyV+01j7BmOpxtQETxTSlQ26BEYJ+3iUkbNKaOJ/nDbT6JjyqYxseM0ON12COHYdU2cTIjC7A==", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-2.9.4.tgz", + "version": "2.9.4" }, "node_modules/chartjs-color": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chartjs-color/-/chartjs-color-2.4.1.tgz", - "integrity": "sha512-haqOg1+Yebys/Ts/9bLo/BqUcONQOdr/hoEr2LLTRl6C5LXctUdHxsCYfvQVg5JIxITrfCNUDr4ntqmQk9+/0w==", "dependencies": { "chartjs-color-string": "^0.6.0", "color-convert": "^1.9.3" - } + }, + "integrity": "sha512-haqOg1+Yebys/Ts/9bLo/BqUcONQOdr/hoEr2LLTRl6C5LXctUdHxsCYfvQVg5JIxITrfCNUDr4ntqmQk9+/0w==", + "resolved": "https://registry.npmjs.org/chartjs-color/-/chartjs-color-2.4.1.tgz", + "version": "2.4.1" }, "node_modules/chartjs-color-string": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/chartjs-color-string/-/chartjs-color-string-0.6.0.tgz", - "integrity": "sha512-TIB5OKn1hPJvO7JcteW4WY/63v6KwEdt6udfnDE9iCAZgy+V4SrbSxoIbTw/xkUIapjEI4ExGtD0+6D3KyFd7A==", "dependencies": { "color-name": "^1.0.0" - } + }, + "integrity": "sha512-TIB5OKn1hPJvO7JcteW4WY/63v6KwEdt6udfnDE9iCAZgy+V4SrbSxoIbTw/xkUIapjEI4ExGtD0+6D3KyFd7A==", + "resolved": "https://registry.npmjs.org/chartjs-color-string/-/chartjs-color-string-0.6.0.tgz", + "version": "0.6.0" }, "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dependencies": { "color-name": "1.1.3" - } + }, + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "version": "1.9.3" }, "node_modules/color-convert/node_modules/color-name": { - "version": "1.1.3", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + "version": "1.1.3" }, "node_modules/color-name": { - "version": "1.1.4", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "version": "1.1.4" }, "node_modules/component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "peer": true + "peer": true, + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "version": "1.3.0" }, "node_modules/diff": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", - "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", "engines": { "node": ">=0.3.1" - } + }, + "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", + "version": "5.1.0" }, "node_modules/diff2html": { - "version": "3.4.35", - "resolved": "https://registry.npmjs.org/diff2html/-/diff2html-3.4.35.tgz", - "integrity": "sha512-+pKs1BrA7l8DAwY33awHyznE3iuTIo58xmINmDBUwGsnou2KvBoSr6dAa6AvQAM7SH+nGtuOKNXmxumgbGp/Pw==", "dependencies": { "diff": "5.1.0", "hogan.js": "3.0.2" @@ -169,138 +165,144 @@ "engines": { "node": ">=12" }, + "integrity": "sha512-+pKs1BrA7l8DAwY33awHyznE3iuTIo58xmINmDBUwGsnou2KvBoSr6dAa6AvQAM7SH+nGtuOKNXmxumgbGp/Pw==", "optionalDependencies": { "highlight.js": "11.6.0" - } + }, + "resolved": "https://registry.npmjs.org/diff2html/-/diff2html-3.4.35.tgz", + "version": "3.4.35" }, "node_modules/highlight.js": { - "version": "11.6.0", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.6.0.tgz", - "integrity": "sha512-ig1eqDzJaB0pqEvlPVIpSSyMaO92bH1N2rJpLMN/nX396wTpDA4Eq0uK+7I/2XG17pFaaKE0kjV/XPeGt7Evjw==", - "optional": true, "engines": { "node": ">=12.0.0" - } + }, + "integrity": "sha512-ig1eqDzJaB0pqEvlPVIpSSyMaO92bH1N2rJpLMN/nX396wTpDA4Eq0uK+7I/2XG17pFaaKE0kjV/XPeGt7Evjw==", + "optional": true, + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.6.0.tgz", + "version": "11.6.0" + }, + "node_modules/highlightjs-line-numbers.js": { + "integrity": "sha512-hMYK5VU+Qi0HmkkdZxamV71ALu9Hq2icQk2WP8OX5q7IPMilSv47ILlJu+fBvxAQdhjW6wONnSQeypsbeRM7WQ==", + "resolved": "https://registry.npmjs.org/highlightjs-line-numbers.js/-/highlightjs-line-numbers.js-2.9.0.tgz", + "version": "2.9.0" }, "node_modules/hogan.js": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/hogan.js/-/hogan.js-3.0.2.tgz", - "integrity": "sha512-RqGs4wavGYJWE07t35JQccByczmNUXQT0E12ZYV1VKYu5UiAU9lsos/yBAcf840+zrUQQxgVduCR5/B8nNtibg==", + "bin": { + "hulk": "bin/hulk" + }, "dependencies": { "mkdirp": "0.3.0", "nopt": "1.0.10" }, - "bin": { - "hulk": "bin/hulk" - } + "integrity": "sha512-RqGs4wavGYJWE07t35JQccByczmNUXQT0E12ZYV1VKYu5UiAU9lsos/yBAcf840+zrUQQxgVduCR5/B8nNtibg==", + "resolved": "https://registry.npmjs.org/hogan.js/-/hogan.js-3.0.2.tgz", + "version": "3.0.2" }, "node_modules/jquery": { - "version": "3.7.0", + "integrity": "sha512-umpJ0/k8X0MvD1ds0P9SfowREz2LenHsQaxSohMZ5OMNEU2r0tf8pdeEFTHMFxWVxKNyU9rTtK3CWzUCTKJUeQ==", "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.0.tgz", - "integrity": "sha512-umpJ0/k8X0MvD1ds0P9SfowREz2LenHsQaxSohMZ5OMNEU2r0tf8pdeEFTHMFxWVxKNyU9rTtK3CWzUCTKJUeQ==" + "version": "3.7.0" }, "node_modules/jstree": { - "version": "3.3.15", - "resolved": "https://registry.npmjs.org/jstree/-/jstree-3.3.15.tgz", - "integrity": "sha512-fNK2EBgGjaJQ3cJuINX/80vDeAufYWtM0csudgYl3eJG+eRAH/1r1IJVUOvAlJIa+uSgg+Fi8uGrt+Xbs92eKg==", "dependencies": { "jquery": "^3.5.0" - } + }, + "integrity": "sha512-fNK2EBgGjaJQ3cJuINX/80vDeAufYWtM0csudgYl3eJG+eRAH/1r1IJVUOvAlJIa+uSgg+Fi8uGrt+Xbs92eKg==", + "resolved": "https://registry.npmjs.org/jstree/-/jstree-3.3.15.tgz", + "version": "3.3.15" }, "node_modules/jstree-bootstrap-theme": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/jstree-bootstrap-theme/-/jstree-bootstrap-theme-1.0.1.tgz", - "integrity": "sha512-H1F1NOwfPnsQAzsLPRBRR0zO4pfXD5tUHfRj9psT/2+eEMMotG1mYtU3gP5Lsr67TKbsE53M8HLv93EAL+zC2A==", "dependencies": { "jquery": ">=1.9.1" - } + }, + "integrity": "sha512-H1F1NOwfPnsQAzsLPRBRR0zO4pfXD5tUHfRj9psT/2+eEMMotG1mYtU3gP5Lsr67TKbsE53M8HLv93EAL+zC2A==", + "resolved": "https://registry.npmjs.org/jstree-bootstrap-theme/-/jstree-bootstrap-theme-1.0.1.tgz", + "version": "1.0.1" }, "node_modules/keycharm": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/keycharm/-/keycharm-0.4.0.tgz", "integrity": "sha512-TyQTtsabOVv3MeOpR92sIKk/br9wxS+zGj4BG7CR8YbK4jM3tyIBaF0zhzeBUMx36/Q/iQLOKKOT+3jOQtemRQ==", - "peer": true + "peer": true, + "resolved": "https://registry.npmjs.org/keycharm/-/keycharm-0.4.0.tgz", + "version": "0.4.0" }, "node_modules/mkdirp": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz", - "integrity": "sha512-OHsdUcVAQ6pOtg5JYWpCBo9W/GySVuwvP9hueRMW7UqshC0tbfzLv8wjySTPm3tfUZ/21CE9E1pJagOA91Pxew==", "deprecated": "Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)", "engines": { "node": "*" - } + }, + "integrity": "sha512-OHsdUcVAQ6pOtg5JYWpCBo9W/GySVuwvP9hueRMW7UqshC0tbfzLv8wjySTPm3tfUZ/21CE9E1pJagOA91Pxew==", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz", + "version": "0.3.0" }, "node_modules/moment": { - "version": "2.29.4", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", - "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==", "engines": { "node": "*" - } + }, + "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", + "version": "2.29.4" }, "node_modules/nopt": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", - "dependencies": { - "abbrev": "1" - }, "bin": { "nopt": "bin/nopt.js" }, + "dependencies": { + "abbrev": "1" + }, "engines": { "node": "*" - } + }, + "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "version": "1.0.10" }, "node_modules/popper.js": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz", - "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==", "deprecated": "You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1", "funding": { "type": "opencollective", "url": "https://opencollective.com/popperjs" - } + }, + "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz", + "version": "1.16.1" }, "node_modules/timsort": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", "integrity": "sha512-qsdtZH+vMoCARQtyod4imc2nIJwg9Cc7lPRrw9CzF8ZKR0khdr8+2nX80PBhET3tcyTtJDxAffGh2rXH4tyU8A==", - "peer": true + "peer": true, + "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", + "version": "0.3.0" }, "node_modules/uuid": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", - "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", - "peer": true, "bin": { "uuid": "dist/bin/uuid" - } + }, + "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", + "peer": true, + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", + "version": "9.0.0" }, "node_modules/vis-data": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/vis-data/-/vis-data-7.1.6.tgz", - "integrity": "sha512-lG7LJdkawlKSXsdcEkxe/zRDyW29a4r7N7PMwxCPxK12/QIdqxJwcMxwjVj9ozdisRhP5TyWDHZwsgjmj0g6Dg==", - "hasInstallScript": true, - "peer": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/visjs" }, + "hasInstallScript": true, + "integrity": "sha512-lG7LJdkawlKSXsdcEkxe/zRDyW29a4r7N7PMwxCPxK12/QIdqxJwcMxwjVj9ozdisRhP5TyWDHZwsgjmj0g6Dg==", + "peer": true, "peerDependencies": { "uuid": "^3.4.0 || ^7.0.0 || ^8.0.0 || ^9.0.0", "vis-util": "^5.0.1" - } + }, + "resolved": "https://registry.npmjs.org/vis-data/-/vis-data-7.1.6.tgz", + "version": "7.1.6" }, "node_modules/vis-network": { - "version": "9.1.6", - "resolved": "https://registry.npmjs.org/vis-network/-/vis-network-9.1.6.tgz", - "integrity": "sha512-Eiwx1JleAsUqfy4pzcsFngCVlCEdjAtRPB/OwCV7PHBm+o2jtE4IZPcPITAEGUlxvL4Fdw7/lZsfD32dL+IL6g==", - "hasInstallScript": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/visjs" }, + "hasInstallScript": true, + "integrity": "sha512-Eiwx1JleAsUqfy4pzcsFngCVlCEdjAtRPB/OwCV7PHBm+o2jtE4IZPcPITAEGUlxvL4Fdw7/lZsfD32dL+IL6g==", "peerDependencies": { "@egjs/hammerjs": "^2.0.0", "component-emitter": "^1.3.0", @@ -309,13 +311,11 @@ "uuid": "^3.4.0 || ^7.0.0 || ^8.0.0 || ^9.0.0", "vis-data": "^6.3.0 || ^7.0.0", "vis-util": "^5.0.1" - } + }, + "resolved": "https://registry.npmjs.org/vis-network/-/vis-network-9.1.6.tgz", + "version": "9.1.6" }, "node_modules/vis-util": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/vis-util/-/vis-util-5.0.3.tgz", - "integrity": "sha512-Wf9STUcFrDzK4/Zr7B6epW2Kvm3ORNWF+WiwEz2dpf5RdWkLUXFSbLcuB88n1W6tCdFwVN+v3V4/Xmn9PeL39g==", - "peer": true, "engines": { "node": ">=8" }, @@ -323,10 +323,16 @@ "type": "opencollective", "url": "https://opencollective.com/visjs" }, + "integrity": "sha512-Wf9STUcFrDzK4/Zr7B6epW2Kvm3ORNWF+WiwEz2dpf5RdWkLUXFSbLcuB88n1W6tCdFwVN+v3V4/Xmn9PeL39g==", + "peer": true, "peerDependencies": { "@egjs/hammerjs": "^2.0.0", "component-emitter": "^1.3.0" - } + }, + "resolved": "https://registry.npmjs.org/vis-util/-/vis-util-5.0.3.tgz", + "version": "5.0.3" } - } + }, + "requires": true, + "version": "0.0.0" } diff --git a/src/web_interface/static/package.json b/src/web_interface/static/package.json index fd80b324d..7d8e037e1 100644 --- a/src/web_interface/static/package.json +++ b/src/web_interface/static/package.json @@ -7,6 +7,7 @@ "bootstrap-select": "^1.13.18", "chart.js": "^2.3.0", "diff2html": "^3.4.18", + "highlightjs-line-numbers.js": "^2.9.0", "jquery": "^3.5.0", "jstree": "^3.3.12", "jstree-bootstrap-theme": "^1.0.1", diff --git a/src/web_interface/templates/show_analysis.html b/src/web_interface/templates/show_analysis.html index d28b35927..c02e12bfe 100644 --- a/src/web_interface/templates/show_analysis.html +++ b/src/web_interface/templates/show_analysis.html @@ -28,9 +28,7 @@ - {# line_numbering.js import #} - - +