diff --git a/static/css/main.css b/static/css/main.css new file mode 100644 index 0000000..f4d0219 --- /dev/null +++ b/static/css/main.css @@ -0,0 +1,9 @@ +:root{--radius:1rem}.card{border-radius:var(--radius)}.form-control,.form-select,.btn{border-radius:.75rem}.table{border-color:rgba(255,255,255,.1)}.badge{border-radius:.5rem} +/* UX enhancements */ +.breadcrumb{--bs-breadcrumb-divider: '›';} +main.container{scroll-margin-top: 4rem;} +.toast-container{z-index: 1080} +.btn .bi{margin-right:.35rem} +.form-progress{height:4px} +.spinner-inline{display:inline-flex;align-items:center;gap:.5rem} + \ No newline at end of file diff --git a/static/js/main.js b/static/js/main.js new file mode 100644 index 0000000..3f0d21d --- /dev/null +++ b/static/js/main.js @@ -0,0 +1,95 @@ + +// Bootstrap helpers +(() => { + 'use strict'; + + // 1) Show Flask flash messages as Bootstrap toasts + const flashes = document.getElementById('_flash_msgs'); + if (flashes) { + try{ + const msgs = JSON.parse(flashes.dataset.msgs || "[]"); + const stack = document.getElementById('toast-stack'); + msgs.forEach((m) => { + const el = document.createElement('div'); + el.className = 'toast align-items-center text-bg-primary border-0'; + el.role = 'alert'; el.ariaLive = 'assertive'; el.ariaAtomic = 'true'; + el.innerHTML = `
{{ check_output }}
+ {{ check_output }}
+ {{ check_output }}
+ {{ check_output }}
+ {{ frontend_count }} frontends
+{{ backend_count }} backends
+{{ acl_count }} acl's
+{{ layer7_count }} layer7(mode http) loadbalanced frontends
+{{ layer4_count }} layer4(mode tcp)loadbalanced frontends
+ +Time Stamp: {{ entry['timestamp'] }}
+IP Address: {{ entry['ip_address'] }}
+HTTP Method: {{ entry['http_method'] }}
+Requested URL: {{ entry['requested_url'] }}
+ + + {% if entry['xss_alert'] %} +XSS Alert (Click to show details)
+{{ entry['xss_alert'] }}
+SQL Alert (Click to show details)
+{{ entry['sql_alert'] }}
+PUT Method Alert (Click to show details)
+{{ entry['put_method'] }}
+Illegal Resource Access Alert (Click to show details)
+{{ entry['illegal_resource'] }}
+WebShell Attack Alert (Click to show details)
+{{ entry['webshell_alert'] }}
+Status Code: 403
+| Frontend Name | +Server Name | +4xx Errors | +5xx Errors | +Bytes In (MB) | +Bytes Out (MB) | +Total Connections | +
|---|---|---|---|---|---|---|
| + {{ stat.frontend_name }} + | ++ {{ stat.server_name }} + | ++ {% if stat['4xx_errors'] > 0 %} + {{ stat['4xx_errors'] }} + {% else %} + {{ stat['4xx_errors'] }} + {% endif %} + | ++ {% if stat['5xx_errors'] > 0 %} + {{ stat['5xx_errors'] }} + {% else %} + {{ stat['5xx_errors'] }} + {% endif %} + | +{{ "%.2f"|format(stat.bytes_in_mb) }} | +{{ "%.2f"|format(stat.bytes_out_mb) }} | ++ {{ stat.conn_tot }} + | +