Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,6 @@ pyyaml==6.0.2 # Reads and writes YAML configuration files
aiohttp==3.10.7 # Async HTTP client for non-blocking requests

fpdf==1.7.2 # PDF generation library
humanize==4.11.0 # Humanizes data (e.g., file sizes, timestamps)
humanize==4.11.0 # Humanizes data (e.g., file sizes, timestamps)

markdown==3.7
Binary file modified src/__int__.so
Binary file not shown.
Binary file modified src/activator.so
Binary file not shown.
Binary file modified src/alert_manager/__init__.so
Binary file not shown.
Binary file modified src/alert_manager/discord_alert.so
Binary file not shown.
Binary file modified src/alert_manager/email_alert.so
Binary file not shown.
Binary file modified src/alert_manager/google_chat_alert.so
Binary file not shown.
Binary file modified src/alert_manager/slack_alert.so
Binary file not shown.
Binary file modified src/alert_manager/team_alert.so
Binary file not shown.
Binary file modified src/alert_manager/telegram_alert.so
Binary file not shown.
Binary file modified src/background_task/__init__.so
Binary file not shown.
Binary file modified src/background_task/log_system_info.so
Binary file not shown.
Binary file modified src/background_task/prometheus_metrics.so
Binary file not shown.
Binary file modified src/config.so
Binary file not shown.
Binary file modified src/disk_manager.so
Binary file not shown.
Binary file modified src/helper.so
Binary file not shown.
Binary file modified src/logger.so
Binary file not shown.
Binary file modified src/models/__init__.so
Binary file not shown.
Binary file modified src/models/alert_data_models.so
Binary file not shown.
Binary file modified src/models/application_general_settings.so
Binary file not shown.
Binary file modified src/models/base_model.so
Binary file not shown.
Binary file modified src/models/graph_config.so
Binary file not shown.
Binary file modified src/models/instance_metadata.so
Binary file not shown.
Binary file modified src/models/log_directories.so
Binary file not shown.
Binary file modified src/models/network_speed_test_result.so
Binary file not shown.
Binary file modified src/models/notifications.so
Binary file not shown.
Binary file modified src/models/smtp_configuration.so
Binary file not shown.
Binary file modified src/models/user_dashboard_settings.so
Binary file not shown.
Binary file modified src/models/user_post_model.so
Binary file not shown.
Binary file modified src/models/user_profile.so
Binary file not shown.
Binary file modified src/network_manager.so
Binary file not shown.
Binary file modified src/routes/__init__.so
Binary file not shown.
Binary file modified src/routes/activation.so
Binary file not shown.
Binary file modified src/routes/alert_route.so
Binary file not shown.
Binary file modified src/routes/api.so
Binary file not shown.
Binary file modified src/routes/api_metrics.so
Binary file not shown.
Binary file modified src/routes/auth.so
Binary file not shown.
Binary file modified src/routes/cmd_route.so
Binary file not shown.
Binary file modified src/routes/dashboard.so
Binary file not shown.
Binary file modified src/routes/discussion_board.so
Binary file not shown.
Binary file modified src/routes/error_handlers.so
Binary file not shown.
Binary file modified src/routes/experimental.so
Binary file not shown.
Binary file modified src/routes/firewall.so
Binary file not shown.
Binary file modified src/routes/health.so
Binary file not shown.
Binary file modified src/routes/helper/__init__.so
Binary file not shown.
Binary file modified src/routes/helper/_system_helper.so
Binary file not shown.
Binary file modified src/routes/helper/access_decorators.so
Binary file not shown.
Binary file modified src/routes/helper/activation_helper.so
Binary file not shown.
Binary file modified src/routes/helper/alert_helper.so
Binary file not shown.
Binary file modified src/routes/helper/common_helper.so
Binary file not shown.
Binary file modified src/routes/helper/firewall_helper.so
Binary file not shown.
Binary file modified src/routes/helper/health_helper.so
Binary file not shown.
Binary file modified src/routes/helper/network_helper.so
Binary file not shown.
Binary file modified src/routes/helper/notification_helper.so
Binary file not shown.
Binary file modified src/routes/helper/prometheus_helper.so
Binary file not shown.
Binary file modified src/routes/helper/service_helper.so
Binary file not shown.
Binary file modified src/routes/historical_system_metrics.so
Binary file not shown.
Binary file modified src/routes/middleware.so
Binary file not shown.
Binary file modified src/routes/other.so
Binary file not shown.
Binary file modified src/routes/process_info.so
Binary file not shown.
Binary file modified src/routes/profile.so
Binary file not shown.
Binary file modified src/routes/prometheus.so
Binary file not shown.
Binary file modified src/routes/services.so
Binary file not shown.
Binary file modified src/routes/settings.so
Binary file not shown.
Binary file modified src/routes/smtp_email_config.so
Binary file not shown.
Binary file modified src/routes/socket_route.so
Binary file not shown.
Binary file modified src/routes/speedtest.so
Binary file not shown.
Binary file modified src/routes/unified_logger.so
Binary file not shown.
Binary file modified src/routes/update_webhooks.so
Binary file not shown.
Binary file modified src/routes/user_management.so
Binary file not shown.
Binary file modified src/scripts/utils/cpu_stress.so
Binary file not shown.
Binary file modified src/scripts/utils/line_counter.so
Binary file not shown.
Binary file modified src/scripts/utils/locustfile.so
Binary file not shown.
Binary file modified src/scripts/utils/memory_stress.so
Binary file not shown.
Binary file modified src/scripts/utils/minify.so
Binary file not shown.
Binary file modified src/scripts/utils/missing_dependency.so
Binary file not shown.
2 changes: 1 addition & 1 deletion src/templates/alerts/alert_history.html
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ <h3 class="text-xl font-semibold text-{{ color }}-600 mb-4">{{ title }}</h3>
</a>
{% endif %}

{% for page_num in range(max(1, alerts.page - 2), min(alerts.pages + 1, alerts.page + 3)) %}
{% for page_num in range((1, alerts.page - 2) | max, (alerts.pages + 1, alerts.page + 3) | min) %}
<a href="{{ url_for('alert_history', **{alert_type|lower ~ '_page': page_num, 'search': request.args.get('search'), 'per_page': request.args.get('per_page', 10)}) }}"
class="relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm font-medium {% if page_num == alerts.page %}text-indigo-600 bg-indigo-50{% else %}text-gray-700 hover:bg-gray-50{% endif %}">
{{ page_num }}
Expand Down
5 changes: 4 additions & 1 deletion src/templates/auths/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ <h2 class="signup-title">Join <span>{{title}}</span></h2>
{% if total_users >= max_users_allowed | int %}disabled{% endif %}>
</div>
</div>

<div class="form-group">
<label for="profession">Role</label>
<select id="profession" name="profession" required
Expand All @@ -69,6 +69,9 @@ <h2 class="signup-title">Join <span>{{title}}</span></h2>
<option value="System Administrator">System Administrator</option>
<option value="Database Administrator">Database Administrator</option>
<option value="Security Analyst">Security Analyst</option>
<option value="DevOps Engineer">DevOps Engineer</option>
<option value="Data Scientist">Data Scientist</option>
<option value="Product Manager">Product Manager</option>
</select>
</div>

Expand Down
2 changes: 1 addition & 1 deletion src/templates/base/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css">

<!-- Tailwind CSS -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
<script src="https://cdn.tailwindcss.com"></script>

<!-- Custom CSS -->
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
Expand Down
141 changes: 141 additions & 0 deletions src/templates/base/base_alt.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
<!DOCTYPE html>
<html lang="en" class="h-full bg-gray-50">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="System Dashboard - Manage and monitor your system">
<title>{% block title %}System Dashboard{% endblock %}</title>
<link rel="icon" href="https://img.icons8.com/emoji/48/shield-emoji.png">
<link rel="icon" type="image/png" sizes="96x96" href="https://img.icons8.com/emoji/96/shield-emoji.png">

<!-- Font Awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css">

<!-- Tailwind CSS -->
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.16/dist/tailwind.min.css" rel="stylesheet">

<!-- Custom CSS -->
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">

{% block extra_head %}{% endblock %}
</head>

<body class="h-full bg-gray-50">
<!-- Page Loader -->
{% include 'ext/loader.html' %}

<!-- Toast Notifications Container -->
<div id="toast-container" class="fixed top-4 right-4 z-50 space-y-4"></div>

<div class="min-h-screen">
<!-- Sidebar -->
<div class="hidden lg:fixed lg:inset-y-0 lg:flex lg:w-64 lg:flex-col">
{% if current_user.is_authenticated %}
{% include 'ext/sidebar.html' %}
{% else %}
{% include 'ext/sidebar_unauth.html' %}
{% endif %}
</div>

<!-- Main Content Wrapper -->
<div class="lg:pl-80 flex flex-col min-h-screen bg-gray-50">
<!-- Mobile Header -->
<header class="sticky top-0 z-20 flex-shrink-0 lg:hidden">
<!-- Blur effect wrapper -->
<div class="absolute inset-0 bg-white/80 backdrop-blur-sm border-b border-gray-200"></div>

<!-- Header content -->
<div class="relative flex items-center justify-between h-20 px-4 sm:px-6">
<!-- Menu Button -->
<button type="button"
class="inline-flex items-center justify-center p-2.5 rounded-xl text-gray-600 hover:text-gray-900 hover:bg-gray-100/80 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-indigo-500 transition-all duration-200"
onclick="toggleSidebar()">
<span class="sr-only">Open sidebar</span>
<svg class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M4 6h16M4 12h16M4 18h16" />
</svg>
</button>

<!-- User Menu -->
{% if current_user.is_authenticated %}
<div class="flex items-center space-x-4">
<!-- Notifications -->
<button type="button"
class="relative p-2.5 rounded-xl text-gray-600 hover:text-gray-900 hover:bg-gray-100/80 focus:outline-none focus:ring-2 focus:ring-indigo-500 transition-all duration-200">
<span class="sr-only">View notifications</span>
<svg class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9" />
</svg>
<!-- Notification badge -->
<span
class="absolute top-2 right-2 h-2 w-2 rounded-full bg-red-500 ring-2 ring-white"></span>
</button>

<!-- User dropdown -->
<div class="relative" x-data="{ open: false }">
<button type="button"
class="relative flex items-center space-x-3 p-1.5 rounded-xl hover:bg-gray-100/80 focus:outline-none focus:ring-2 focus:ring-indigo-500 transition-all duration-200"
id="user-menu-button" @click="open = !open">
<div class="relative">
<div
class="absolute -inset-0.5 bg-gradient-to-r from-indigo-600 to-purple-600 rounded-full blur opacity-50">
</div>
</div>
<div class="hidden sm:flex sm:flex-col sm:items-start">
<span class="text-sm font-semibold text-gray-900">{{ current_user.first_name }} {{
current_user.last_name }}</span>
<span class="text-xs text-gray-500">{{ current_user.role }}</span>
</div>
</button>

<!-- Dropdown menu -->
<div class="absolute right-0 mt-2 w-48 rounded-xl bg-white py-2 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none transform origin-top-right transition-all duration-200"
x-show="open" @click.away="open = false"
x-transition:enter="transition ease-out duration-200"
x-transition:enter-start="opacity-0 scale-95"
x-transition:enter-end="opacity-100 scale-100"
x-transition:leave="transition ease-in duration-75"
x-transition:leave-start="opacity-100 scale-100"
x-transition:leave-end="opacity-0 scale-95">
<a href="{{ url_for('view_profile') }}"
class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50">Your Profile</a>
<a href="{{ url_for('user_settings') }}"
class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50">Settings</a>
<a href="{{ url_for('logout') }}"
class="block px-4 py-2 text-sm text-red-600 hover:bg-red-50">Sign out</a>
</div>

</div>

</div>
{% endif %}
</div>
</header>

<!-- Main Content -->
<main class="flex-1 pb-8">
<!-- Page content -->
<div class="space-y-8 py-8 mx-4 lg:mx-8">
{% include 'ext/message.html' %}
{% include 'ext/plan_notice.html' %}
{% block content %}

<!-- Main content goes here -->
{% endblock %}
</div>
</main>
</div>
</div>

<!-- Scripts -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js"></script>
<!-- Custom Scripts -->
<script src="{{ url_for('static', filename='js/spinner.js') }}"></script>
{% block extra_scripts %}{% endblock %}
</body>

</html>
4 changes: 2 additions & 2 deletions src/templates/ext/loader.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div id="loader" class="fixed inset-0 z-50 flex items-center justify-center bg-white dark:bg-gray-900">
<div id="loader" class="fixed inset-0 z-50 flex items-center justify-center bg-white ">
<div class="flex flex-col items-center space-y-6">
<!-- Spinning Ring -->
<div class="relative w-16 h-16">
Expand All @@ -8,7 +8,7 @@

<!-- Loading Text -->
<div class="flex flex-col items-center">
<p class="text-xl font-semibold text-gray-700 dark:text-gray-200">Loading</p>
<p class="text-xl font-semibold text-gray-700 text-dark">Loading</p>
<p id="loadingText" class="text-sm text-gray-500 dark:text-gray-400 mt-1">
Please wait<span class="loader-dots" aria-hidden="true"></span>
</p>
Expand Down
13 changes: 7 additions & 6 deletions src/templates/ext/sidebar.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<aside id="sidebar"
class="fixed top-0 left-0 z-40 h-screen w-80 transform -translate-x-full lg:translate-x-0 transition-transform duration-300 ease-in-out bg-white shadow-xl border-r border-gray-100 flex flex-col">
<!-- Logo Section -->
<div class="p-6 bg-gradient-to-br from-blue-800 to-purple-700 text-white shadow-lg ">
<div class="p-6 bg-gradient-to-br from-blue-800 to-purple-600 text-white shadow-lg ">
<div class="flex items-center justify-between">
<div class="flex items-center space-x-4">
<div class="relative">
Expand Down Expand Up @@ -36,18 +36,19 @@ <h1 class="text-2xl font-extrabold">{{ title }}</h1>
<!-- <div class="px-4 py-4 bg-gradient-to-b from-blue-50 via-purple-50 to-white">
<div class="rounded-2xl bg-white p-4 shadow-lg border border-purple-100/50 transition-all duration-300 hover:shadow-xl hover:border-purple-200">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-bold bg-gradient-to-r from-blue-600 to-purple-600 text-transparent bg-clip-text">Performance Insights</h3>
<h3 class="text-lg font-bold bg-gradient-to-r from-blue-600 to-purple-600 text-transparent bg-clip-text">Quick Insights</h3>
<span class="text-xs px-2 py-1 rounded-full bg-blue-100 text-blue-700 font-medium animate-pulse">Live</span>
</div>
<div class="grid grid-cols-2 gap-4">
<div class="p-4 rounded-xl bg-gradient-to-br from-blue-50 to-blue-100 shadow-md hover:shadow-xl transition-all duration-300 group">
<div class="text-3xl font-extrabold text-blue-600 group-hover:scale-110 transition-transform duration-300">100%</div>
<div class="text-sm text-gray-600 font-medium">Resource Utilization</div>
<div class="text-3xl font-extrabold text-blue-600 group-hover:scale-110 transition-transform duration-300">1.0.0</div>
<div class="text-sm text-gray-600 font-medium">SystemGuard Version</div>
</div>
<div class="p-4 rounded-xl bg-gradient-to-br from-yellow-50 to-yellow-100 shadow-md hover:shadow-xl transition-all duration-300 group">
<div class="text-3xl font-extrabold text-yellow-600 response-time group-hover:scale-110 transition-transform duration-300">0.5ms</div>
<div class="text-sm text-gray-600 font-medium">Response Time</div>
</div>

</div>
</div>
</div> -->
Expand Down Expand Up @@ -247,7 +248,7 @@ <h3 class="text-lg font-bold bg-gradient-to-r from-blue-600 to-purple-600 text-t
class="group flex items-center px-3 py-2 text-sm font-medium rounded-xl transition-all duration-200 text-gray-400 cursor-not-allowed"
title="Available in Enterprise version">
<div
class="flex-shrink-0 h-8 w-8 flex items-center justify-center rounded-lg bg-gray-100 text-gray-400">
class="flex-shrink-0 h-8 w-8 flex items-center justify-center rounded-lg bg-gray">
<i class="fas fa-bell"></i>
</div>
<span class="ml-2">Configure Rules</span>
Expand All @@ -260,7 +261,7 @@ <h3 class="text-lg font-bold bg-gradient-to-r from-blue-600 to-purple-600 text-t
<a href="{{ url_for('activation') }}"
class="group flex items-center px-3 py-2 text-sm font-medium rounded-xl transition-all duration-200 {% if request.endpoint == 'activation' %}bg-gradient-to-r from-indigo-50 to-purple-50 text-indigo-700{% else %}text-gray-600 hover:bg-gray-100{% endif %}">
<div
class="flex-shrink-0 h-8 w-8 flex items-center justify-center rounded-lg {% if request.endpoint == 'activation' %}bg-indigo-100 text-indigo-600{% else %}bg-gray-100 group-hover:bg-indigo-100 group-hover:text-indigo-600{% endif %}">
class="flex-shrink-0 h-8 w-8 flex items-center justify-center rounded-lg {% if request.endpoint == 'activation' %}bg-indigo-100 text-indigo-600{% else %}bg-gray-200 group-hover:bg-indigo-100 group-hover:text-indigo-600{% endif %}">
<i
class="fas fa-key w-5 h-5 mr-2 {% if request.endpoint == 'activation' %}text-indigo-600{% else %}text-gray-400 group-hover:text-indigo-600{% endif %} transition-colors duration-200"></i>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/graphs/historical_system_metrics.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'base/base.html' %}
{% extends 'base/base_alt.html' %}
{% block title %}{{title}} - Historical System Metrics{% endblock %}

{% block extra_head %}
Expand Down
Loading