From 03a74a05318742d63f9b5a7e0de8769024950aff Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Mon, 15 Dec 2025 14:02:37 +0000 Subject: [PATCH] Auto commit: 2025-12-15T14:02:37.099Z --- core/__pycache__/urls.cpython-311.pyc | Bin 347 -> 348 bytes core/__pycache__/views.cpython-311.pyc | Bin 1364 -> 1473 bytes core/templates/base.html | 10 +- core/templates/core/index.html | 207 ++++++++----------------- core/urls.py | 4 +- core/views.py | 48 ++++-- static/css/custom.css | 63 +++++++- 7 files changed, 172 insertions(+), 160 deletions(-) diff --git a/core/__pycache__/urls.cpython-311.pyc b/core/__pycache__/urls.cpython-311.pyc index 1f807fae1897c89361c99c5e868a26d00799b73f..261aebd4f6b25466525d521e694b8919c697ecb9 100644 GIT binary patch delta 86 zcmcc3bccy|IWI340}#lIIArEd#?8T^YeRt@AvHad0?Oq zK^wcg#QsVn^rsQJEpf)2E&=lsB8XTXs&rg*gf1^c4^Y z!y*ZiBq@?6Ht8XmqcrIyeI!fz$v`X(k|8ooM#!aD8YP!O_g+U=OR0Z(-u{Ot?~^Mp zAl;YUl+pj}yGq8+?<3F+HC&~@8$M6NxzUO>bzP1JFN^e3A6jW|!N>J)F5S5`4` zWc?X;1i^bu)v?dr9avLNp*a}q?|1blYvAR?MBDseHS`o~coc6r%%cQ*yv73TC`J8- zk~-rGrkLw^&C$8i-2BY!+|2Aeo-HkYQd%sPni(fl^#a)B(>lS3PAjH7sxy*8J(xPs zy`}_GIetUil83^jCkB(|7!362`o^QLSMEKo-e1|gw^3eyTz<6H%q@3nqB!^P78eFr z>;#T?Aek)ak*-a7b@{O;&E_P(YacMDjzsu;JEHn;uIzC8DfpISk`5TZ! z)V9%BJ{q5Z`O4L3?DJ^iW|W(Y#&5K<_P}5p88RHJ7Nd!&SoPrr)u++KjaW5xLG{Id zSr~i&V_2*&z+aU6dG3-zT8 literal 1364 zcmZ`(&1)M+6ra_{dS%J>I!@|TuH%hUh$T{~CE!96oTjQ1oHkCdQ%ZHHPf-Q6#oP5Eq{V!1Q7#*Ku^61OfEk4%~~s}guETzy!YnKoA>c! z|CpMZL_mL+PRlpL2>m0JfI>sz+l$SscSs^=|k4VB6wxYJ2mwh>6 zP1s6a0Xh0B%Et_88>QrbMYzqB#N#E*3Oks3CUHQODRvA@K~k7$;|6iCE(zZu#bJlk z(8(RJK1WUTVt6pV9fEo^GQIeJgpqaJXHRNMhV;}glZK3tBN^en5Q~o7QAND#(>piA zMx+^HvEUS;@pC3}9#TaPq;a2SxGAxj;0&RP639l>kPjiNqhJ8&1AY_l`WecBvKL`< zK_mp-GGfihA=Gg+ss)BI*;w21yRNY^)~upqm`+Labc(T~)l62_EK-D_XmFxoXUC+( zv9ZH61GA!Od6`C{=(;tt(Wqy1VsquT>;5P-9=l@|nMF#b-iU4DnzqgA7Upvgw;tSE z&pj%9yS|;<+IaYA=m{Nfc9(G8LP76tKq2MQk+Efgahls~zxB^Y15iq2p ze1hU%s@P+67IZo#*hj*3LMINxyUY_2H9@DJWy{3I+3Mq}!>U=li}flaG+QI|spl4T zob~hDF>%eyxOE;8-gFVJ3n+TO18bo->ila}J65%hy4+QlU#ly}>PkmVchz)jqo<`_ z{(P+6Xlpn2)BEXH3$5?^ljojY`z`Y<)5;BG^zo;?`Q?6crISo|lj(kPxtsi=lf2$d zUhiF8=v}zfU%GryZ>QE?g*r>Q?ozJ5xODJS`|4MJebZUI)m^+bn2pWI0|cyf_w9L< zIJbYby>RVisS{uA##h^s)e}e(07x&wM(2TX`E06G0Q9V<>X{|ul?i3g0?%(HPYlgf z1`zb;;Me{qqL;+gPk@~&H*I26ExbmrfGYk1-V - {% block title %}Knowledge Base{% endblock %} + {% block title %}SIEM Dashboard{% endblock %} {% if project_description %} @@ -13,13 +13,19 @@ {% endif %} + + + + + {% load static %} {% block head %}{% endblock %} - + {% block content %}{% endblock %} + diff --git a/core/templates/core/index.html b/core/templates/core/index.html index faec813..af92934 100644 --- a/core/templates/core/index.html +++ b/core/templates/core/index.html @@ -1,145 +1,72 @@ -{% extends "base.html" %} +{% extends 'base.html' %} +{% load static %} {% block title %}{{ project_name }}{% endblock %} -{% block head %} - - - - -{% endblock %} - {% block content %} -
-
-

Analyzing your requirements and generating your app…

-
- Loading… +
+
+

SIEM Dashboard

+
+
Overall Security Score
+
{{ security_score }}
+
+
+ +
+
+
+
+

Active Alerts

+
+ {% for alert in alerts %} +
+
+
{{ alert.title }}
+ {{ alert.timestamp }} +
+

Source: {{ alert.source }}

+
+ {% endfor %} +
+
+
+ +
+
+

Live Event Stream

+
+

[2025-12-15 10:30:05] user admin failed to login from 192.168.1.10

+

[2025-12-15 10:30:04] user admin failed to login from 192.168.1.10

+

[2025-12-15 10:30:02] user admin failed to login from 192.168.1.10

+

[2025-12-15 10:25:10] GET /api/users?id=1%27%20OR%201=1 -- 200

+

[2025-12-15 10:15:30] process /usr/bin/unusual_proc started by user root

+
+
+
+
+ +
+
+
+

Top Alert Sources

+
    +
  • + suricata.log + 2 +
  • +
  • + auth.log + 1 +
  • +
  • + syslog + 1 +
  • +
+
+
+
-

AppWizzy AI is collecting your requirements and applying the first changes.

-

This page will refresh automatically as the plan is implemented.

-

- Runtime: Django {{ django_version }} · Python {{ python_version }} - — UTC {{ current_time|date:"Y-m-d H:i:s" }} -

-
-
- -{% endblock %} \ No newline at end of file + +{% endblock %} diff --git a/core/urls.py b/core/urls.py index 6299e3d..8e0d0ae 100644 --- a/core/urls.py +++ b/core/urls.py @@ -1,7 +1,7 @@ from django.urls import path -from .views import home +from .views import index urlpatterns = [ - path("", home, name="home"), + path("", index, name="index"), ] diff --git a/core/views.py b/core/views.py index c9aed12..fc55881 100644 --- a/core/views.py +++ b/core/views.py @@ -6,20 +6,42 @@ from django.shortcuts import render from django.utils import timezone -def home(request): - """Render the landing screen with loader and environment details.""" - host_name = request.get_host().lower() - agent_brand = "AppWizzy" if host_name == "appwizzy.com" else "Flatlogic" - now = timezone.now() - +def index(request): + """Render the SIEM dashboard with mock data.""" context = { - "project_name": "New Style", - "agent_brand": agent_brand, - "django_version": django_version(), - "python_version": platform.python_version(), - "current_time": now, - "host_name": host_name, - "project_description": os.getenv("PROJECT_DESCRIPTION", ""), + "project_name": "SIEM Dashboard", + "security_score": 78, + "alerts": [ + { + "id": 1, + "title": "Multiple failed login attempts", + "severity": "critical", + "timestamp": "2025-12-15 10:30:00", + "source": "auth.log" + }, + { + "id": 2, + "title": "Potential SQL Injection attempt", + "severity": "high", + "timestamp": "2025-12-15 10:25:00", + "source": "suricata.log" + }, + { + "id": 3, + "title": "Unusual process execution", + "severity": "medium", + "timestamp": "2025-12-15 10:15:00", + "source": "syslog" + }, + { + "id": 4, + "title": "Access from a known malicious IP", + "severity": "high", + "timestamp": "2025-12-15 10:10:00", + "source": "suricata.log" + } + ], + "project_description": os.getenv("PROJECT_DESCRIPTION", "A SIEM tool for log analysis."), "project_image_url": os.getenv("PROJECT_IMAGE_URL", ""), } return render(request, "core/index.html", context) diff --git a/static/css/custom.css b/static/css/custom.css index 925f6ed..f7cbc53 100644 --- a/static/css/custom.css +++ b/static/css/custom.css @@ -1,4 +1,61 @@ -/* Custom styles for the application */ -body { - font-family: system-ui, -apple-system, sans-serif; +:root { + --bs-dark-rgb: 26, 28, 35; + --bs-light-rgb: 224, 224, 224; + --primary-ui-color: #252831; + --accent-color: #00aaff; + --critical-alert-color: #ff4d4d; + --high-alert-color: #ff9933; + --medium-alert-color: #ffff66; + --text-secondary-color: #a0a0a0; } + +body { + font-family: 'Inter', sans-serif; + background-color: #1a1c23; +} + +h1, h2, h3, h4, h5, h6 { + font-family: 'Roboto Mono', monospace; +} + +.card { + background-color: var(--primary-ui-color); +} + +.security-score { + width: 150px; + height: 150px; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + font-size: 2.5rem; + font-weight: bold; + border: 10px solid var(--accent-color); +} + +.alert-card { + border-left: 5px solid; +} + +.alert-critical { + border-color: var(--critical-alert-color); +} + +.alert-high { + border-color: var(--high-alert-color); +} + +.alert-medium { + border-color: var(--medium-alert-color); +} + +.text-secondary { + color: var(--text-secondary-color) !important; +} + +.log-line { + font-family: 'Roboto Mono', monospace; + font-size: 0.9rem; + white-space: pre-wrap; +} \ No newline at end of file