Skip to content

Commit 0a4bd8a

Browse files
committed
updates for WASM dashboardapp
1 parent 2f15bf6 commit 0a4bd8a

6 files changed

Lines changed: 17 additions & 5 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ path = "src/codeaudit/__about__.py"
4141

4242

4343
[tool.hatch.build.targets.wheel]
44-
packages = ["src/codeaudit"]
44+
packages = ["src/codeaudit" , "src/dashboard"]
4545
include = ["codeaudit/data/*.csv"]
4646

4747
[project.scripts]

src/codeaudit/api_interfaces.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import altair as alt
2323
import pandas as pd
2424

25+
2526
from codeaudit import __version__
2627
from codeaudit.checkmodules import (
2728
check_module_vulnerability,

src/codeaudit/codeaudit.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import fire # for working CLI with this PoC-thing (The Google way)
1919

2020
from codeaudit import __version__
21+
2122
from codeaudit.reporting import (
2223
overview_report,
2324
report_implemented_tests,

src/codeaudit/dashboard_reports.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ def _require_panel():
9898
return pn
9999
except ImportError:
100100
raise ImportError(
101-
"Optional dependency 'panel' not installed. "
102-
"Run: pip install your-package[panel]"
101+
"Optional dependency Python package 'panel' not installed. "
102+
"Run: pip install panel"
103103
)
104104

105105

src/dashboard/__init__.py

Whitespace-only changes.
Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
pn.extension("vega")
2525

26+
# from codeaudit import __version__
2627

2728
from codeaudit.altairplots import (
2829
ast_nodes_overview,
@@ -35,7 +36,10 @@
3536
weaknesses_radial_overview,
3637
)
3738
from codeaudit.api_helpers import _codeaudit_directory_scan_wasm
39+
3840
from codeaudit.api_interfaces import get_package_source, version
41+
42+
3943
from codeaudit.dashboard_reports import (
4044
create_statistics_overview,
4145
get_disclaimer_text,
@@ -191,13 +195,14 @@ async def filescan_wasm(input_path, nosec=False):
191195
)
192196

193197

194-
run_button = pn.widgets.Button(name="Run Scan", button_type="primary")
198+
run_button = pn.widgets.Button(name="Start Scan", button_type="primary")
195199
status = pn.pane.Markdown("### Ready to scan.")
196200
result_pane = pn.pane.JSON({}, name="JSON", sizing_mode="stretch_both", depth=-1)
197201
loading = pn.indicators.LoadingSpinner(
198202
value=False, size=60, color="primary", bgcolor="light", name="Scanning..."
199203
)
200204

205+
201206
overview_visuals = create_statistics_overview(result_pane.object)
202207

203208
tabs = pn.Tabs(
@@ -315,12 +320,17 @@ async def run_scan(event):
315320

316321
# Sidebar layout
317322
ca_sidebar = pn.Column(
318-
"## Package Code Security Scan",
323+
"## 🔍 Code Security Scan",
324+
pn.Spacer(height=10),
325+
"### Input",
319326
text_input,
320327
run_button,
328+
pn.Spacer(height=15),
321329
loading,
322330
status,
331+
pn.Spacer(height=20),
323332
infotext,
333+
pn.Spacer(height=10),
324334
disclaimer_text,
325335
sizing_mode="stretch_width",
326336
)

0 commit comments

Comments
 (0)