Professor / templates /dashboard.html
azils3's picture
Update templates/dashboard.html
09f686f verified
raw
history blame
18.8 kB
<!-- 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>