| 7 | * @returns WebView HTML |
| 8 | */ |
| 9 | export function quarkSummaryReportHTML(report: QuarkReport): string { |
| 10 | let allCrimesHTML = ""; |
| 11 | |
| 12 | for (const key in report) { |
| 13 | const crimeObj = report[key]; |
| 14 | allCrimesHTML += ` |
| 15 | <tr class="row100 body" onclick="a(this.id)" id="${key}"> |
| 16 | <td class="cell100 column1">${crimeObj["crime"]}</td> |
| 17 | <td class="cell100 column2">${crimeObj["confidence"]}</td> |
| 18 | </tr>`; |
| 19 | |
| 20 | for (const pkey in report[key]["api_call"]) { |
| 21 | const parentFunc = report[key]["api_call"]; |
| 22 | allCrimesHTML += ` |
| 23 | <tr onclick="navigate(this.id, '${key}')" id="${pkey}" style="display: none;"> |
| 24 | <td class="sub"> |
| 25 | <p>Class : ${parentFunc[pkey]["function"]["class"]}</p> |
| 26 | <p>Method : ${parentFunc[pkey]["function"]["method"]}</p> |
| 27 | |
| 28 | <div class="api"> |
| 29 | <p>API 1: <a>${parentFunc[pkey]["apis"][0]}</a></p> |
| 30 | <p>API 2: <a>${parentFunc[pkey]["apis"][1]}</a></p> |
| 31 | </div> |
| 32 | |
| 33 | </td> |
| 34 | </tr>`; |
| 35 | } |
| 36 | } |
| 37 | const backgroundColor = new ThemeColor("badge.background"); |
| 38 | const style = ` |
| 39 | |
| 40 | .vscode-light body{ |
| 41 | background: ${backgroundColor}; |
| 42 | color: #e2e2e2; |
| 43 | } |
| 44 | .vscode-dark body{ |
| 45 | background: ${backgroundColor}; |
| 46 | color: #000; |
| 47 | } |
| 48 | |
| 49 | .js-pscroll { |
| 50 | position: relative; |
| 51 | overflow: hidden; |
| 52 | } |
| 53 | |
| 54 | .table100 .ps__rail-y { |
| 55 | width: 9px; |
| 56 | background-color: transparent; |
| 57 | opacity: 1 !important; |
| 58 | right: 5px; |
| 59 | } |
| 60 | |
| 61 | .table100 .ps__rail-y::before { |
| 62 | content: ""; |
| 63 | display: block; |
| 64 | position: absolute; |
| 65 | background-color: #ebebeb; |
| 66 | border-radius: 5px; |