File size: 18,765 Bytes
09f686f e0d434e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 |
<!-- File: C:\Users\Shakeel\Desktop\PROFESSOR-BOT\templates\dashboard.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<title>Professor Bot Dashboard</title>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet"/>
<link href="/static/css/dashboard.css" rel="stylesheet"/>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
</head>
<body>
<div class="navbar">
<div class="nav-left">
<div class="logo">Professor Bot</div>
<div class="dropdown" id="toggleSidebar">
<span>Dashboard</span>
<i class="fas fa-chevron-down"></i>
</div>
</div>
<div class="nav-right">
<div class="profile-photo" id="profilePhoto"></div>
<div class="profile-menu" id="profileMenu">
<a href="#">Profile</a>
<a href="#">Logout</a>
</div>
</div>
</div>
<div class="main-content">
<div class="sidebar" id="sidebar">
<div class="sidebar-item active" data-tab="dashboard">
<span>π</span>
<span>Dashboard</span>
</div>
<div class="sidebar-item" data-tab="filters">
<span>π</span>
<span>Filters</span>
</div>
<div class="sidebar-item" data-tab="global-filters">
<span>π</span>
<span>Global Filters</span>
</div>
<div class="sidebar-item" data-tab="users">
<span>π₯</span>
<span>Users</span>
</div>
<div class="sidebar-item" data-tab="chats">
<span>π¬</span>
<span>Chats</span>
</div>
<div class="sidebar-item" data-tab="files">
<span>π</span>
<span>Files</span>
</div>
<div class="sidebar-item" data-tab="broadcast">
<span>π’</span>
<span>Broadcast</span>
</div>
<div class="sidebar-item" data-tab="connections">
<span>π</span>
<span>Connections</span>
</div>
<div class="sidebar-item" data-tab="settings">
<span>π§</span>
<span>Settings</span>
</div>
<div class="sidebar-item" data-tab="stats">
<span>π</span>
<span>Stats</span>
</div>
<div class="sidebar-item" data-tab="group-manager">
<span>π₯</span>
<span>Group Manager</span>
</div>
<div class="sidebar-item" data-tab="extra-mods">
<span>π οΈ</span>
<span>Extra Mods</span>
</div>
</div>
<div class="content-area">
<div id="dashboard-content" class="tab-content active">
<h2 class="page-title">Dashboard Overview</h2>
<p>Get a comprehensive overview of your bot's performance, including total files, users, and chats.</p>
<div class="stats-grid">
<div class="stat-card">
<div class="stat-header">
<div>
<h3>Total Files</h3>
<p style="font-size: 28px; font-weight: bold;" id="totalFiles">Loading...</p>
</div>
<div class="stat-icon">
<i class="fas fa-file-alt"></i>
</div>
</div>
<p style="color: #4caf50;">File statistics</p>
</div>
<div class="stat-card">
<div class="stat-header">
<div>
<h3>Total Users</h3>
<p style="font-size: 28px; font-weight: bold;" id="totalUsers">Loading...</p>
</div>
<div class="stat-icon">
<i class="fas fa-users"></i>
</div>
</div>
<p style="color: #4caf50;">User statistics</p>
</div>
<div class="stat-card">
<div class="stat-header">
<div>
<h3>Total Chats</h3>
<p style="font-size: 28px; font-weight: bold;" id="totalChats">Loading...</p>
</div>
<div class="stat-icon">
<i class="fas fa-comments"></i>
</div>
</div>
<p style="color: #4caf50;">Chat statistics</p>
</div>
<div class="stat-card">
<div class="stat-header">
<div>
<h3>Operating System</h3>
<p style="font-size: 28px; font-weight: bold;" id="osName">Loading...</p>
</div>
<div class="stat-icon">
<i class="fas fa-server"></i>
</div>
</div>
<p id="osVersion" style="color: #4caf50;">Loading...</p>
</div>
<div class="stat-card">
<div class="stat-header">
<div>
<h3>Uptime</h3>
<p style="font-size: 28px; font-weight: bold;" id="uptime">Loading...</p>
</div>
<div class="stat-icon">
<i class="fas fa-clock"></i>
</div>
</div>
<p style="color: #4caf50;">Time since last boot</p>
</div>
<div class="stat-card">
<div class="stat-header">
<div>
<h3>Storage</h3>
<p style="font-size: 28px; font-weight: bold;" id="storage">Loading...</p>
</div>
<div class="stat-icon">
<i class="fas fa-hdd"></i>
</div>
</div>
<p style="color: #4caf50;">Total / Free</p>
</div>
</div>
<div class="charts-grid">
<div class="chart-card">
<h3>Upload Performance</h3>
<canvas id="performanceChart"></canvas>
</div>
<div class="chart-card">
<h3>Platform Distribution</h3>
<canvas id="platformChart"></canvas>
</div>
</div>
<div class="recent-videos">
<h2>Recent Uploads</h2>
<p>View and manage your recent video uploads.</p>
<div class="thumbnail-grid" id="recentFilesGrid">
<!-- Thumbnails will be dynamically loaded here -->
</div>
</div>
</div>
<div id="filters-content" class="tab-content" style="display: none;">
<h2 class="page-title">Filters</h2>
<p>Manage and organize your local filters.</p>
<form id="addFilterForm">
<label for="chatId">Chat ID:</label>
<input type="text" id="chatId" name="chatId" required>
<label for="filterText">Filter Text:</label>
<input type="text" id="filterText" name="filterText" required>
<label for="replyText">Reply Text:</label>
<textarea id="replyText" name="replyText" required></textarea>
<label for="btn">Buttons (JSON):</label>
<textarea id="btn" name="btn"></textarea>
<label for="file">File ID:</label>
<input type="text" id="file" name="file">
<label for="alert">Alerts (JSON):</label>
<textarea id="alert" name="alert"></textarea>
<button type="submit">Add Filter</button>
</form>
<div class="filters-list" id="filtersList">
<!-- Filters will be dynamically loaded here -->
</div>
</div>
<div id="global-filters-content" class="tab-content" style="display: none;">
<h2 class="page-title">Global Filters</h2>
<p>Manage and organize your global filters.</p>
<form id="addGFilterForm">
<label for="gfilterText">Filter Text:</label>
<input type="text" id="gfilterText" name="gfilterText" required>
<label for="greplyText">Reply Text:</label>
<textarea id="greplyText" name="greplyText" required></textarea>
<label for="gbtn">Buttons (JSON):</label>
<textarea id="gbtn" name="gbtn"></textarea>
<label for="gfile">File ID:</label>
<input type="text" id="gfile" name="gfile">
<label for="galert">Alerts (JSON):</label>
<textarea id="galert" name="galert"></textarea>
<button type="submit">Add Global Filter</button>
</form>
<div class="gfilters-list" id="gfiltersList">
<!-- Global Filters will be dynamically loaded here -->
</div>
</div>
<div id="users-content" class="tab-content" style="display: none;">
<h2 class="page-title">Users</h2>
<p>Manage and view all users connected to the bot.</p>
<div class="users-list" id="usersList">
<!-- Users will be dynamically loaded here -->
</div>
</div>
<div id="chats-content" class="tab-content" style="display: none;">
<h2 class="page-title">Chats</h2>
<p>Manage and view all chats connected to the bot.</p>
<div class="chats-list" id="chatsList">
<!-- Chats will be dynamically loaded here -->
</div>
</div>
<div id="files-content" class="tab-content" style="display: none;">
<h2 class="page-title">Files</h2>
<p>Manage and view all files stored in the bot's database.</p>
<form id="uploadFileForm" enctype="multipart/form-data">
<label for="fileUpload">Upload File:</label>
<input type="file" id="fileUpload" name="fileUpload" required>
<button type="submit">Upload File</button>
</form>
<div class="files-list" id="filesList">
<!-- Files will be dynamically loaded here -->
</div>
</div>
<div id="broadcast-content" class="tab-content" style="display: none;">
<h2 class="page-title">Broadcast</h2>
<p>Broadcast messages to all users or chats.</p>
<form id="broadcastForm">
<label for="broadcastText">Message Text:</label>
<textarea id="broadcastText" name="broadcastText" required></textarea>
<button type="submit">Broadcast</button>
</form>
</div>
<div id="connections-content" class="tab-content" style="display: none;">
<h2 class="page-title">Connections</h2>
<p>Manage connections between users and groups.</p>
<form id="addConnectionForm">
<label for="groupId">Group ID:</label>
<input type="text" id="groupId" name="groupId" required>
<label for="userId">User ID:</label>
<input type="text" id="userId" name="userId" required>
<button type="submit">Add Connection</button>
</form>
<div class="connections-list" id="connectionsList">
<!-- Connections will be dynamically loaded here -->
</div>
</div>
<div id="settings-content" class="tab-content" style="display: none;">
<h2 class="page-title">Settings</h2>
<p>Configure bot settings for different groups.</p>
<form id="saveSettingsForm">
<label for="settingsChatId">Chat ID:</label>
<input type="text" id="settingsChatId" name="settingsChatId" required>
<label for="settingKey">Setting Key:</label>
<input type="text" id="settingKey" name="settingKey" required>
<label for="settingValue">Setting Value:</label>
<input type="text" id="settingValue" name="settingValue" required>
<button type="submit">Save Settings</button>
</form>
<div class="settings-list" id="settingsList">
<!-- Settings will be dynamically loaded here -->
</div>
</div>
<div id="stats-content" class="tab-content" style="display: none;">
<h2 class="page-title">Stats</h2>
<p>View detailed statistics about the bot.</p>
<div class="stats-grid">
<div class="stat-card">
<div class="stat-header">
<div>
<h3>CPU Usage</h3>
<p style="font-size: 28px; font-weight: bold;" id="cpuUsage">Loading...</p>
</div>
<div class="stat-icon">
<i class="fas fa-microchip"></i>
</div>
</div>
<p style="color: #4caf50;">Current CPU usage</p>
</div>
<div class="stat-card">
<div class="stat-header">
<div>
<h3>RAM Usage</h3>
<p style="font-size: 28px; font-weight: bold;" id="ramUsage">Loading...</p>
</div>
<div class="stat-icon">
<i class="fas fa-memory"></i>
</div>
</div>
<p style="color: #4caf50;">Current RAM usage</p>
</div>
<div class="stat-card">
<div class="stat-header">
<div>
<h3>Storage Used</h3>
<p style="font-size: 28px; font-weight: bold;" id="storageUsed">Loading...</p>
</div>
<div class="stat-icon">
<i class="fas fa-database"></i>
</div>
</div>
<p style="color: #4caf50;">Total storage used</p>
</div>
<div class="stat-card">
<div class="stat-header">
<div>
<h3>Storage Free</h3>
<p style="font-size: 28px; font-weight: bold;" id="storageFree">Loading...</p>
</div>
<div class="stat-icon">
<i class="fas fa-database"></i>
</div>
</div>
<p style="color: #4caf50;">Total storage free</p>
</div>
</div>
</div>
<div id="group-manager-content" class="tab-content" style="display: none;">
<h2 class="page-title">Group Manager</h2>
<p>Manage groups and users directly from the dashboard.</p>
<form id="banUserForm">
<label for="banUserId">User ID:</label>
<input type="text" id="banUserId" name="banUserId" required>
<label for="banReason">Ban Reason:</label>
<input type="text" id="banReason" name="banReason">
<button type="submit">Ban User</button>
</form>
<form id="unbanUserForm">
<label for="unbanUserId">User ID:</label>
<input type="text" id="unbanUserId" name="unbanUserId" required>
<button type="submit">Unban User</button>
</form>
<form id="disableChatForm">
<label for="disableChatId">Chat ID:</label>
<input type="text" id="disableChatId" name="disableChatId" required>
<label for="disableReason">Disable Reason:</label>
<input type="text" id="disableReason" name="disableReason">
<button type="submit">Disable Chat</button>
</form>
<form id="enableChatForm">
<label for="enableChatId">Chat ID:</label>
<input type="text" id="enableChatId" name="enableChatId" required>
<button type="submit">Enable Chat</button>
</form>
</div>
<div id="extra-mods-content" class="tab-content" style="display: none;">
<h2 class="page-title">Extra Mods</h2>
<p>Perform additional operations directly from the dashboard.</p>
<form id="restartBotForm">
<button type="submit">Restart Bot</button>
</form>
</div>
</div>
</div>
<script src="/static/js/dashboard.js"></script>
</body>
</html> |