4th task
هذا الالتزام موجود في:
33
miniSIEM/dashboard/app.js
Normal file
33
miniSIEM/dashboard/app.js
Normal file
@@ -0,0 +1,33 @@
|
||||
|
||||
fetch("../alerts.json")
|
||||
|
||||
.then(res=>res.json())
|
||||
|
||||
.then(data=>{
|
||||
|
||||
|
||||
let table=document.getElementById("alerts");
|
||||
|
||||
|
||||
data.forEach(alert=>{
|
||||
|
||||
|
||||
table.innerHTML +=
|
||||
|
||||
`
|
||||
<tr>
|
||||
|
||||
<td>${alert.ip}</td>
|
||||
|
||||
<td>${alert.attack}</td>
|
||||
|
||||
<td>${alert.severity}</td>
|
||||
|
||||
</tr>
|
||||
|
||||
`
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
45
miniSIEM/dashboard/index.html
Normal file
45
miniSIEM/dashboard/index.html
Normal file
@@ -0,0 +1,45 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<title>Mini SIEM Dashboard</title>
|
||||
|
||||
<link rel="stylesheet" href="style.css">
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<h1>Security Alerts</h1>
|
||||
|
||||
|
||||
<table>
|
||||
|
||||
<thead>
|
||||
|
||||
<tr>
|
||||
|
||||
<th>IP</th>
|
||||
<th>Attack</th>
|
||||
<th>Severity</th>
|
||||
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
|
||||
|
||||
<tbody id="alerts"></tbody>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<script src="app.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
24
miniSIEM/dashboard/style.css
Normal file
24
miniSIEM/dashboard/style.css
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
body{
|
||||
|
||||
font-family:Arial;
|
||||
margin:40px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
table{
|
||||
|
||||
border-collapse:collapse;
|
||||
|
||||
width:80%;
|
||||
|
||||
}
|
||||
|
||||
|
||||
td,th{
|
||||
|
||||
border:1px solid black;
|
||||
padding:10px;
|
||||
|
||||
}
|
||||
المرجع في مشكلة جديدة
حظر مستخدم