Skip to content

Commit 8af017f

Browse files
Merge pull request #160 from ProjectZeroDays/fix-frontend-dashboard
Fix frontend dashboard pages for consistent styling and linkage
2 parents 8ca9469 + b46f065 commit 8af017f

20 files changed

+1443
-774
lines changed

src/backend/data_visualization.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,25 @@ def ensure_compatibility(self, existing_data, new_component_data):
7575
"new_component_defcon_data": new_component_data.get("defcon_data", {})
7676
}
7777
return compatible_data
78+
79+
def link_frontend_components(self, frontend_data):
80+
# Placeholder for linking frontend components to backend
81+
linked_data = {
82+
"frontend_device_data": frontend_data.get("device_data", {}),
83+
"frontend_traffic_data": frontend_data.get("traffic_data", {}),
84+
"frontend_log_data": frontend_data.get("log_data", {}),
85+
"frontend_threat_data": frontend_data.get("threat_data", {}),
86+
"frontend_defcon_data": frontend_data.get("defcon_data", {})
87+
}
88+
return linked_data
89+
90+
def verify_control_mechanisms(self, control_data):
91+
# Placeholder for verifying control mechanisms
92+
verified_data = {
93+
"control_device_data": control_data.get("device_data", {}),
94+
"control_traffic_data": control_data.get("traffic_data", {}),
95+
"control_log_data": control_data.get("log_data", {}),
96+
"control_threat_data": control_data.get("threat_data", {}),
97+
"control_defcon_data": control_data.get("defcon_data", {})
98+
}
99+
return verified_data

src/backend/home_feed.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,17 @@ def save_activities(self):
5151
def save_notifications(self):
5252
with open(self.notifications_file, 'w') as file:
5353
json.dump(self.notifications, file)
54+
55+
def link_frontend_components(self, frontend_data):
56+
linked_data = {
57+
"frontend_activities": frontend_data.get("activities", []),
58+
"frontend_notifications": frontend_data.get("notifications", [])
59+
}
60+
return linked_data
61+
62+
def verify_control_mechanisms(self, control_data):
63+
verified_data = {
64+
"control_activities": control_data.get("activities", []),
65+
"control_notifications": control_data.get("notifications", [])
66+
}
67+
return verified_data

src/frontend/admin_profile.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,27 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<title>Admin Profile and Account Settings</title>
77
<link rel="stylesheet" href="styles.css">
8+
<link rel="stylesheet" href="admin_login.css">
89
</head>
910
<body>
1011
<header>
1112
<h1>Admin Profile and Account Settings</h1>
13+
<nav>
14+
<ul>
15+
<li><a href="index.html">Main Dashboard</a></li>
16+
<li><a href="analytics_dashboard.html">Analytics Dashboard</a></li>
17+
<li><a href="c2_panel.html">C2 Panel</a></li>
18+
<li><a href="chatbot_dashboard.html">Chatbot Dashboard</a></li>
19+
<li><a href="feature_pages.html">Feature Pages</a></li>
20+
<li><a href="osint_tools_dashboard.html">OSINT Tools Dashboard</a></li>
21+
<li><a href="rat_dashboard.html">RAT Dashboard</a></li>
22+
<li><a href="rss_dashboard.html">RSS Dashboard</a></li>
23+
<li><a href="shodan_dashboard.html">Shodan Dashboard</a></li>
24+
<li><a href="simplenote_dashboard.html">Simplenote Dashboard</a></li>
25+
<li><a href="trojan_dashboard.html">Trojan Dashboard</a></li>
26+
<li><a href="zenmap_dashboard.html">Zenmap Dashboard</a></li>
27+
</ul>
28+
</nav>
1229
</header>
1330
<main>
1431
<section id="admin-profile">
@@ -43,5 +60,6 @@ <h2>Account Settings</h2>
4360
<p>&copy; 2023 ProjectZeroDays. All rights reserved.</p>
4461
</footer>
4562
<script src="scripts.js"></script>
63+
<script src="admin_login.js"></script>
4664
</body>
4765
</html>

src/frontend/ai_chatbox_settings.html

Lines changed: 48 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,57 @@
99
color: #ffffff;
1010
font-family: Arial, sans-serif;
1111
}
12+
.header {
13+
display: flex;
14+
justify-content: space-between;
15+
align-items: center;
16+
padding: 1rem;
17+
background-color: #1e293b;
18+
}
19+
.header a {
20+
color: #ffffff;
21+
text-decoration: none;
22+
font-size: 1.25rem;
23+
}
24+
.sidebar {
25+
width: 200px;
26+
background-color: #1e293b;
27+
padding: 1rem;
28+
position: fixed;
29+
top: 0;
30+
bottom: 0;
31+
left: 0;
32+
}
33+
.sidebar a {
34+
display: block;
35+
color: #ffffff;
36+
text-decoration: none;
37+
margin-bottom: 1rem;
38+
}
39+
.content {
40+
margin-left: 220px;
41+
padding: 1rem;
42+
}
1243
</style>
1344
</head>
1445
<body>
15-
<div id="app" class="p-4">
16-
<div class="flex items-center justify-between mb-4">
17-
<div class="flex items-center space-x-2">
18-
<i class="fas fa-home text-white"></i>
19-
<span class="text-gray-400">venice.ai/chat/XZi</span>
20-
</div>
21-
<div class="flex items-center space-x-2">
22-
<i class="fas fa-share-alt text-white"></i>
23-
<i class="fas fa-ellipsis-v text-white"></i>
24-
</div>
46+
<div class="header">
47+
<a href="index.html">Main Dashboard</a>
48+
<div>
49+
<i class="fas fa-share-alt text-white"></i>
50+
<i class="fas fa-ellipsis-v text-white"></i>
2551
</div>
52+
</div>
53+
<div class="sidebar">
54+
<a href="admin_profile.html">Admin Profile</a>
55+
<a href="ai_chatbox_settings.html">AI Chatbox Settings</a>
56+
<a href="ai_code_review.html">AI Code Review</a>
57+
<a href="c2_panel.html">C2 Panel</a>
58+
<a href="chatbot_dashboard.html">Chatbot Dashboard</a>
59+
<a href="feature_pages.html">Feature Pages</a>
60+
<a href="settings.html">Settings</a>
61+
</div>
62+
<div id="app" class="content">
2663
<div class="text-center text-white text-2xl mb-4">Settings</div>
2764
<div class="flex justify-center space-x-4 mb-4">
2865
<div class="text-gray-400">Text</div>
@@ -68,4 +105,4 @@
68105
}).mount('#app');
69106
</script>
70107
</body>
71-
</html>
108+
</html>

src/frontend/ai_code_review.html

Lines changed: 103 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,77 @@
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<title>AI Code Review</title>
7+
<script src="https://cdn.tailwindcss.com"></script>
8+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
79
<style>
8-
body { font-family: sans-serif; margin: 20px; }
9-
button { margin: 5px; padding: 8px 12px; cursor: pointer; }
10-
textarea { width: 100%; height: 100px; margin: 5px 0; }
11-
pre { border: 1px solid #ccc; padding: 10px; overflow-x: auto; }
12-
.error { color: red; }
13-
.success { color: green; }
14-
.loading { opacity: 0.6; pointer-events: none; }
15-
.form-group { margin-bottom: 10px; }
16-
.form-group label { display: block; margin-bottom: 5px; }
10+
body {
11+
background-color: #0f172a;
12+
color: #ffffff;
13+
font-family: Arial, sans-serif;
14+
}
15+
.header {
16+
display: flex;
17+
justify-content: space-between;
18+
align-items: center;
19+
padding: 1rem;
20+
background-color: #1e293b;
21+
}
22+
.header a {
23+
color: #ffffff;
24+
text-decoration: none;
25+
font-size: 1.25rem;
26+
}
27+
.sidebar {
28+
width: 200px;
29+
background-color: #1e293b;
30+
padding: 1rem;
31+
position: fixed;
32+
top: 0;
33+
bottom: 0;
34+
left: 0;
35+
}
36+
.sidebar a {
37+
display: block;
38+
color: #ffffff;
39+
text-decoration: none;
40+
margin-bottom: 1rem;
41+
}
42+
.content {
43+
margin-left: 220px;
44+
padding: 1rem;
45+
}
46+
button {
47+
margin: 5px;
48+
padding: 8px 12px;
49+
cursor: pointer;
50+
}
51+
textarea {
52+
width: 100%;
53+
height: 100px;
54+
margin: 5px 0;
55+
}
56+
pre {
57+
border: 1px solid #ccc;
58+
padding: 10px;
59+
overflow-x: auto;
60+
}
61+
.error {
62+
color: red;
63+
}
64+
.success {
65+
color: green;
66+
}
67+
.loading {
68+
opacity: 0.6;
69+
pointer-events: none;
70+
}
71+
.form-group {
72+
margin-bottom: 10px;
73+
}
74+
.form-group label {
75+
display: block;
76+
margin-bottom: 5px;
77+
}
1778
button.loading::after {
1879
content: "";
1980
position: absolute;
@@ -34,26 +95,44 @@
3495
</style>
3596
</head>
3697
<body>
37-
<h1>AI Code Review</h1>
38-
39-
<div class="form-group">
40-
<label for="apiKey">API Key:</label>
41-
<input type="text" id="apiKey" placeholder="Enter API Key" required>
42-
<button onclick="saveApiKey()">Save API Key</button>
98+
<div class="header">
99+
<a href="index.html">Main Dashboard</a>
100+
<div>
101+
<i class="fas fa-share-alt text-white"></i>
102+
<i class="fas fa-ellipsis-v text-white"></i>
103+
</div>
104+
</div>
105+
<div class="sidebar">
106+
<a href="admin_profile.html">Admin Profile</a>
107+
<a href="ai_chatbox_settings.html">AI Chatbox Settings</a>
108+
<a href="ai_code_review.html">AI Code Review</a>
109+
<a href="c2_panel.html">C2 Panel</a>
110+
<a href="chatbot_dashboard.html">Chatbot Dashboard</a>
111+
<a href="feature_pages.html">Feature Pages</a>
112+
<a href="settings.html">Settings</a>
43113
</div>
114+
<div class="content">
115+
<h1>AI Code Review</h1>
44116

45-
<h2>Upload Code for Review</h2>
46-
<form id="uploadCodeForm">
47117
<div class="form-group">
48-
<label for="codeFile">Select Code File:</label>
49-
<input type="file" id="codeFile" required>
118+
<label for="apiKey">API Key:</label>
119+
<input type="text" id="apiKey" placeholder="Enter API Key" required>
120+
<button onclick="saveApiKey()">Save API Key</button>
50121
</div>
51-
<button type="submit">Upload</button>
52-
</form>
53-
<pre id="uploadResult"></pre>
54122

55-
<h2>AI Code Review Results</h2>
56-
<div id="reviewResults"></div>
123+
<h2>Upload Code for Review</h2>
124+
<form id="uploadCodeForm">
125+
<div class="form-group">
126+
<label for="codeFile">Select Code File:</label>
127+
<input type="file" id="codeFile" required>
128+
</div>
129+
<button type="submit">Upload</button>
130+
</form>
131+
<pre id="uploadResult"></pre>
132+
133+
<h2>AI Code Review Results</h2>
134+
<div id="reviewResults"></div>
135+
</div>
57136

58137
<script>
59138
const API_BASE_URL = '/api/ai_code_review'; // Backend API endpoint

src/frontend/analytics_dashboard.html

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,58 @@
99
body {
1010
background-color: #f8f9fa;
1111
display: flex;
12-
justify-content: center;
13-
align-items: center;
14-
height: 100vh;
1512
}
1613
.dashboard-container {
1714
background-color: #fff;
1815
padding: 30px;
1916
border-radius: 8px;
2017
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
18+
flex-grow: 1;
19+
margin-left: 250px; /* Adjust for sidebar width */
2120
}
2221
.dashboard-container h2 {
2322
margin-bottom: 20px;
2423
}
2524
.chart {
2625
margin-bottom: 20px;
2726
}
27+
#sidebar {
28+
width: 250px;
29+
background-color: #343a40;
30+
color: white;
31+
height: 100vh;
32+
padding: 20px;
33+
position: fixed;
34+
top: 0;
35+
left: 0;
36+
}
37+
#sidebar a {
38+
color: white;
39+
display: block;
40+
margin-bottom: 10px;
41+
}
2842
</style>
2943
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
3044
</head>
3145
<body>
3246

47+
<!-- Sidebar -->
48+
<nav id="sidebar">
49+
<h2>Dashboard</h2>
50+
<a href="main_dashboard.html">Main Dashboard</a>
51+
<a href="analytics_dashboard.html">Analytics Dashboard</a>
52+
<a href="c2_panel.html">C2 Panel</a>
53+
<a href="chatbot_dashboard.html">Chatbot Dashboard</a>
54+
<a href="feature_pages.html">Feature Pages</a>
55+
<a href="osint_tools_dashboard.html">OSINT Tools Dashboard</a>
56+
<a href="rat_dashboard.html">RAT Dashboard</a>
57+
<a href="rss_dashboard.html">RSS Dashboard</a>
58+
<a href="shodan_dashboard.html">Shodan Dashboard</a>
59+
<a href="simplenote_dashboard.html">SimpleNote Dashboard</a>
60+
<a href="trojan_dashboard.html">Trojan Dashboard</a>
61+
<a href="zenmap_dashboard.html">Zenmap Dashboard</a>
62+
</nav>
63+
3364
<div class="dashboard-container">
3465
<h2>Analytics Dashboard</h2>
3566
<div class="chart">

src/frontend/c2_panel.html

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,18 @@
4040
<!-- Sidebar -->
4141
<nav id="sidebar">
4242
<h2>C2 Panel</h2>
43-
<a href="#">Dashboard</a>
43+
<a href="main_dashboard.html">Main Dashboard</a>
44+
<a href="analytics_dashboard.html">Analytics Dashboard</a>
45+
<a href="c2_panel.html">C2 Panel</a>
46+
<a href="chatbot_dashboard.html">Chatbot Dashboard</a>
47+
<a href="feature_pages.html">Feature Pages</a>
48+
<a href="osint_tools_dashboard.html">OSINT Tools Dashboard</a>
49+
<a href="rat_dashboard.html">RAT Dashboard</a>
50+
<a href="rss_dashboard.html">RSS Dashboard</a>
51+
<a href="shodan_dashboard.html">Shodan Dashboard</a>
52+
<a href="simplenote_dashboard.html">SimpleNote Dashboard</a>
53+
<a href="trojan_dashboard.html">Trojan Dashboard</a>
54+
<a href="zenmap_dashboard.html">Zenmap Dashboard</a>
4455
<a href="#">Devices</a>
4556
<a href="#">Logs</a>
4657
<a href="#">Settings</a>

0 commit comments

Comments
 (0)