django-cfg 1.2.29__py3-none-any.whl → 1.2.31__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- django_cfg/__init__.py +1 -1
- django_cfg/apps/payments/admin/__init__.py +3 -2
- django_cfg/apps/payments/admin/balance_admin.py +18 -18
- django_cfg/apps/payments/admin/currencies_admin.py +319 -131
- django_cfg/apps/payments/admin/payments_admin.py +15 -4
- django_cfg/apps/payments/config/module.py +2 -2
- django_cfg/apps/payments/config/utils.py +2 -2
- django_cfg/apps/payments/decorators.py +2 -2
- django_cfg/apps/payments/management/commands/README.md +95 -127
- django_cfg/apps/payments/management/commands/currency_stats.py +5 -24
- django_cfg/apps/payments/management/commands/manage_currencies.py +229 -0
- django_cfg/apps/payments/management/commands/manage_providers.py +235 -0
- django_cfg/apps/payments/managers/__init__.py +3 -2
- django_cfg/apps/payments/managers/balance_manager.py +2 -2
- django_cfg/apps/payments/managers/currency_manager.py +272 -49
- django_cfg/apps/payments/managers/payment_manager.py +161 -13
- django_cfg/apps/payments/middleware/api_access.py +2 -2
- django_cfg/apps/payments/middleware/rate_limiting.py +8 -18
- django_cfg/apps/payments/middleware/usage_tracking.py +20 -17
- django_cfg/apps/payments/migrations/0002_network_providercurrency_and_more.py +241 -0
- django_cfg/apps/payments/migrations/0003_add_usd_rate_cache.py +30 -0
- django_cfg/apps/payments/models/__init__.py +3 -2
- django_cfg/apps/payments/models/currencies.py +187 -71
- django_cfg/apps/payments/models/payments.py +3 -2
- django_cfg/apps/payments/serializers/__init__.py +3 -2
- django_cfg/apps/payments/serializers/currencies.py +20 -12
- django_cfg/apps/payments/services/cache/simple_cache.py +2 -2
- django_cfg/apps/payments/services/core/balance_service.py +2 -2
- django_cfg/apps/payments/services/core/fallback_service.py +2 -2
- django_cfg/apps/payments/services/core/payment_service.py +3 -6
- django_cfg/apps/payments/services/core/subscription_service.py +4 -7
- django_cfg/apps/payments/services/internal_types.py +171 -7
- django_cfg/apps/payments/services/monitoring/api_schemas.py +58 -204
- django_cfg/apps/payments/services/monitoring/provider_health.py +2 -2
- django_cfg/apps/payments/services/providers/base.py +144 -43
- django_cfg/apps/payments/services/providers/cryptapi/__init__.py +4 -0
- django_cfg/apps/payments/services/providers/cryptapi/config.py +8 -0
- django_cfg/apps/payments/services/providers/cryptapi/models.py +192 -0
- django_cfg/apps/payments/services/providers/cryptapi/provider.py +439 -0
- django_cfg/apps/payments/services/providers/cryptomus/__init__.py +4 -0
- django_cfg/apps/payments/services/providers/cryptomus/models.py +176 -0
- django_cfg/apps/payments/services/providers/cryptomus/provider.py +429 -0
- django_cfg/apps/payments/services/providers/cryptomus/provider_v2.py +564 -0
- django_cfg/apps/payments/services/providers/models/__init__.py +34 -0
- django_cfg/apps/payments/services/providers/models/currencies.py +190 -0
- django_cfg/apps/payments/services/providers/nowpayments/__init__.py +4 -0
- django_cfg/apps/payments/services/providers/nowpayments/models.py +196 -0
- django_cfg/apps/payments/services/providers/nowpayments/provider.py +380 -0
- django_cfg/apps/payments/services/providers/registry.py +294 -11
- django_cfg/apps/payments/services/providers/stripe/__init__.py +4 -0
- django_cfg/apps/payments/services/providers/stripe/models.py +184 -0
- django_cfg/apps/payments/services/providers/stripe/provider.py +109 -0
- django_cfg/apps/payments/services/security/error_handler.py +6 -8
- django_cfg/apps/payments/services/security/payment_notifications.py +2 -2
- django_cfg/apps/payments/services/security/webhook_validator.py +3 -4
- django_cfg/apps/payments/signals/api_key_signals.py +2 -2
- django_cfg/apps/payments/signals/payment_signals.py +11 -5
- django_cfg/apps/payments/signals/subscription_signals.py +2 -2
- django_cfg/apps/payments/tasks/webhook_processing.py +2 -2
- django_cfg/apps/payments/templates/admin/payments/currency/change_list.html +50 -0
- django_cfg/apps/payments/templates/payments/base.html +4 -4
- django_cfg/apps/payments/templates/payments/components/payment_card.html +6 -6
- django_cfg/apps/payments/templates/payments/components/payment_qr_code.html +4 -4
- django_cfg/apps/payments/templates/payments/components/progress_bar.html +14 -7
- django_cfg/apps/payments/templates/payments/components/provider_stats.html +2 -2
- django_cfg/apps/payments/templates/payments/components/status_badge.html +8 -1
- django_cfg/apps/payments/templates/payments/components/status_overview.html +34 -30
- django_cfg/apps/payments/templates/payments/dashboard.html +202 -290
- django_cfg/apps/payments/templates/payments/dashboard_simple_test.html +35 -0
- django_cfg/apps/payments/templates/payments/payment_create.html +579 -0
- django_cfg/apps/payments/templates/payments/payment_detail.html +373 -0
- django_cfg/apps/payments/templates/payments/payment_list.html +354 -0
- django_cfg/apps/payments/templates/payments/stats.html +261 -0
- django_cfg/apps/payments/templates/payments/test.html +213 -0
- django_cfg/apps/payments/urls.py +3 -1
- django_cfg/apps/payments/{urls_templates.py → urls_admin.py} +6 -0
- django_cfg/apps/payments/utils/__init__.py +1 -3
- django_cfg/apps/payments/utils/billing_utils.py +2 -2
- django_cfg/apps/payments/utils/config_utils.py +2 -8
- django_cfg/apps/payments/utils/validation_utils.py +2 -2
- django_cfg/apps/payments/views/__init__.py +3 -2
- django_cfg/apps/payments/views/currency_views.py +31 -20
- django_cfg/apps/payments/views/payment_views.py +2 -2
- django_cfg/apps/payments/views/templates/ajax.py +141 -2
- django_cfg/apps/payments/views/templates/base.py +21 -13
- django_cfg/apps/payments/views/templates/payment_detail.py +1 -1
- django_cfg/apps/payments/views/templates/payment_management.py +34 -40
- django_cfg/apps/payments/views/templates/stats.py +8 -4
- django_cfg/apps/payments/views/webhook_views.py +2 -2
- django_cfg/apps/payments/viewsets.py +3 -2
- django_cfg/apps/tasks/urls.py +0 -2
- django_cfg/apps/tasks/urls_admin.py +14 -0
- django_cfg/apps/urls.py +4 -4
- django_cfg/core/config.py +35 -0
- django_cfg/models/payments.py +2 -8
- django_cfg/modules/django_currency/__init__.py +16 -11
- django_cfg/modules/django_currency/clients/__init__.py +4 -4
- django_cfg/modules/django_currency/clients/coinpaprika_client.py +289 -0
- django_cfg/modules/django_currency/clients/yahoo_client.py +157 -0
- django_cfg/modules/django_currency/core/__init__.py +1 -7
- django_cfg/modules/django_currency/core/converter.py +18 -23
- django_cfg/modules/django_currency/core/models.py +122 -11
- django_cfg/modules/django_currency/database/__init__.py +4 -4
- django_cfg/modules/django_currency/database/database_loader.py +190 -309
- django_cfg/modules/django_unfold/dashboard.py +7 -2
- django_cfg/template_archive/django_sample.zip +0 -0
- django_cfg/templates/admin/components/action_grid.html +9 -9
- django_cfg/templates/admin/components/metric_card.html +5 -5
- django_cfg/templates/admin/components/status_badge.html +2 -2
- django_cfg/templates/admin/layouts/dashboard_with_tabs.html +152 -24
- django_cfg/templates/admin/snippets/components/quick_actions.html +3 -3
- django_cfg/templates/admin/snippets/components/system_health.html +1 -1
- django_cfg/templates/admin/snippets/tabs/overview_tab.html +49 -52
- {django_cfg-1.2.29.dist-info → django_cfg-1.2.31.dist-info}/METADATA +2 -4
- {django_cfg-1.2.29.dist-info → django_cfg-1.2.31.dist-info}/RECORD +118 -96
- django_cfg/apps/payments/management/commands/populate_currencies.py +0 -246
- django_cfg/apps/payments/management/commands/update_currencies.py +0 -336
- django_cfg/apps/payments/services/providers/cryptapi.py +0 -273
- django_cfg/apps/payments/services/providers/cryptomus.py +0 -311
- django_cfg/apps/payments/services/providers/nowpayments.py +0 -293
- django_cfg/apps/payments/services/validators/__init__.py +0 -8
- django_cfg/modules/django_currency/clients/coingecko_client.py +0 -257
- django_cfg/modules/django_currency/clients/yfinance_client.py +0 -246
- {django_cfg-1.2.29.dist-info → django_cfg-1.2.31.dist-info}/WHEEL +0 -0
- {django_cfg-1.2.29.dist-info → django_cfg-1.2.31.dist-info}/entry_points.txt +0 -0
- {django_cfg-1.2.29.dist-info → django_cfg-1.2.31.dist-info}/licenses/LICENSE +0 -0
@@ -145,7 +145,7 @@ class DashboardManager(BaseCfgModule):
|
|
145
145
|
collapsible=True,
|
146
146
|
items=[
|
147
147
|
NavigationItem(title="Task Queue", icon=Icons.QUEUE, link="/admin/django_dramatiq/task/"),
|
148
|
-
NavigationItem(title="Task Dashboard", icon=Icons.SETTINGS_APPLICATIONS, link="/cfg/
|
148
|
+
NavigationItem(title="Task Dashboard", icon=Icons.SETTINGS_APPLICATIONS, link="/cfg/admin/django_cfg_tasks/admin/dashboard/"),
|
149
149
|
]
|
150
150
|
))
|
151
151
|
|
@@ -170,13 +170,18 @@ class DashboardManager(BaseCfgModule):
|
|
170
170
|
separator=True,
|
171
171
|
collapsible=True,
|
172
172
|
items=[
|
173
|
+
NavigationItem(title="Payment Dashboard", icon=Icons.DASHBOARD, link="/cfg/admin/django_cfg_payments/admin/"),
|
174
|
+
NavigationItem(title="Payment List", icon=Icons.LIST, link="/cfg/admin/django_cfg_payments/admin/list/"),
|
175
|
+
NavigationItem(title="Create Payment", icon=Icons.ADD, link="/cfg/admin/django_cfg_payments/admin/create/"),
|
176
|
+
NavigationItem(title="Payment Analytics", icon=Icons.ANALYTICS, link="/cfg/admin/django_cfg_payments/admin/stats/"),
|
177
|
+
NavigationItem(title="Payment Testing", icon=Icons.SETTINGS, link="/cfg/admin/django_cfg_payments/admin/test/"),
|
173
178
|
NavigationItem(title="Payments", icon=Icons.ACCOUNT_BALANCE, link="/admin/django_cfg_payments/universalpayment/"),
|
174
179
|
NavigationItem(title="Subscriptions", icon=Icons.PERSON_ADD, link="/admin/django_cfg_payments/subscription/"),
|
175
180
|
NavigationItem(title="API Keys", icon=Icons.KEY, link="/admin/django_cfg_payments/apikey/"),
|
176
181
|
NavigationItem(title="Balances", icon=Icons.ACCOUNT_BALANCE_WALLET, link="/admin/django_cfg_payments/userbalance/"),
|
177
182
|
NavigationItem(title="Transactions", icon=Icons.DESCRIPTION, link="/admin/django_cfg_payments/transaction/"),
|
178
183
|
NavigationItem(title="Currencies", icon=Icons.ACCOUNT_CIRCLE, link="/admin/django_cfg_payments/currency/"),
|
179
|
-
NavigationItem(title="Currency Networks", icon=Icons.LINK, link="/admin/django_cfg_payments/
|
184
|
+
NavigationItem(title="Currency Networks", icon=Icons.LINK, link="/admin/django_cfg_payments/network/"),
|
180
185
|
NavigationItem(title="Endpoint Groups", icon=Icons.GROUP, link="/admin/django_cfg_payments/endpointgroup/"),
|
181
186
|
NavigationItem(title="Tariffs", icon=Icons.SETTINGS, link="/admin/django_cfg_payments/tariff/"),
|
182
187
|
]
|
Binary file
|
@@ -1,26 +1,26 @@
|
|
1
1
|
{% load unfold %}
|
2
2
|
|
3
3
|
<!-- Action Grid Component -->
|
4
|
-
<div class="grid grid-cols-1
|
4
|
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
5
5
|
{% for action in actions %}
|
6
6
|
<a href="{{ action.link }}"
|
7
|
-
class="group flex items-center p-4
|
7
|
+
class="group flex items-center p-4 theme-card rounded-lg border theme-border hover:border-blue-600 dark:hover:border-blue-500 hover:shadow-md transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2">
|
8
8
|
|
9
9
|
<!-- Icon -->
|
10
10
|
<div class="flex-shrink-0 mr-4">
|
11
11
|
<div class="p-2 rounded-lg transition-colors duration-200
|
12
|
-
{% if action.color == 'primary' %}bg-
|
12
|
+
{% if action.color == 'primary' %}bg-blue-100 dark:bg-blue-900/20 group-hover:bg-blue-200 dark:group-hover:bg-blue-800/30
|
13
13
|
{% elif action.color == 'success' %}bg-green-100 dark:bg-green-900/20 group-hover:bg-green-200 dark:group-hover:bg-green-800/30
|
14
14
|
{% elif action.color == 'warning' %}bg-amber-100 dark:bg-amber-900/20 group-hover:bg-amber-200 dark:group-hover:bg-amber-800/30
|
15
15
|
{% elif action.color == 'danger' %}bg-red-100 dark:bg-red-900/20 group-hover:bg-red-200 dark:group-hover:bg-red-800/30
|
16
|
-
{% else %}bg-
|
16
|
+
{% else %}bg-gray-100 dark:bg-gray-800 group-hover:bg-gray-200 dark:group-hover:bg-gray-700{% endif %}">
|
17
17
|
|
18
18
|
<span class="material-icons text-lg
|
19
|
-
{% if action.color == 'primary' %}text-
|
19
|
+
{% if action.color == 'primary' %}text-blue-600 dark:text-blue-400
|
20
20
|
{% elif action.color == 'success' %}text-green-600 dark:text-green-400
|
21
21
|
{% elif action.color == 'warning' %}text-amber-600 dark:text-amber-400
|
22
22
|
{% elif action.color == 'danger' %}text-red-600 dark:text-red-400
|
23
|
-
{% else %}text-
|
23
|
+
{% else %}text-gray-600 dark:text-gray-400{% endif %}">
|
24
24
|
{{ action.icon }}
|
25
25
|
</span>
|
26
26
|
</div>
|
@@ -28,11 +28,11 @@
|
|
28
28
|
|
29
29
|
<!-- Content -->
|
30
30
|
<div class="flex-1 min-w-0">
|
31
|
-
<h3 class="text-sm font-medium
|
31
|
+
<h3 class="text-sm font-medium theme-text group-hover:text-blue-600 dark:group-hover:text-blue-500 transition-colors duration-200">
|
32
32
|
{{ action.title }}
|
33
33
|
</h3>
|
34
34
|
{% if action.description %}
|
35
|
-
<p class="text-xs text-
|
35
|
+
<p class="text-xs text-gray-500 dark:text-gray-400 mt-1 line-clamp-2">
|
36
36
|
{{ action.description }}
|
37
37
|
</p>
|
38
38
|
{% endif %}
|
@@ -40,7 +40,7 @@
|
|
40
40
|
|
41
41
|
<!-- Arrow -->
|
42
42
|
<div class="flex-shrink-0 ml-2">
|
43
|
-
<span class="material-icons text-
|
43
|
+
<span class="material-icons text-gray-400 dark:text-gray-500 group-hover:text-blue-600 dark:group-hover:text-blue-500 transition-colors duration-200">
|
44
44
|
arrow_forward
|
45
45
|
</span>
|
46
46
|
</div>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{% load unfold %}
|
2
2
|
|
3
3
|
<!-- Metric Card Component -->
|
4
|
-
<div class="
|
4
|
+
<div class="theme-card rounded-lg p-5 border theme-border hover:shadow-md transition-shadow duration-200">
|
5
5
|
<div class="flex items-center justify-between">
|
6
6
|
<div class="flex items-center space-x-3">
|
7
7
|
<div class="flex-shrink-0">
|
@@ -10,16 +10,16 @@
|
|
10
10
|
{% elif status == 'warning' %}text-amber-600 dark:text-amber-400
|
11
11
|
{% elif status == 'error' or status == 'failed' %}text-red-600 dark:text-red-400
|
12
12
|
{% elif status == 'info' %}text-blue-600 dark:text-blue-400
|
13
|
-
{% else %}text-
|
13
|
+
{% else %}text-blue-600 dark:text-blue-400{% endif %}">
|
14
14
|
{{ icon }}
|
15
15
|
</span>
|
16
16
|
</div>
|
17
|
-
<div>
|
18
|
-
<div class="text-sm font-medium text
|
17
|
+
<div class="min-w-0 flex-1">
|
18
|
+
<div class="text-sm font-medium theme-text truncate">
|
19
19
|
{{ title }}
|
20
20
|
</div>
|
21
21
|
{% if description %}
|
22
|
-
<div class="text-xs text-
|
22
|
+
<div class="text-xs text-gray-500 dark:text-gray-400 mt-1 truncate">
|
23
23
|
{{ description }}
|
24
24
|
</div>
|
25
25
|
{% endif %}
|
@@ -1,12 +1,12 @@
|
|
1
1
|
{% load unfold %}
|
2
2
|
|
3
3
|
<!-- Status Badge Component -->
|
4
|
-
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium
|
4
|
+
<span class="status-badge inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium
|
5
5
|
{% if status == 'active' or status == 'healthy' or status == 'success' %}bg-green-100 dark:bg-green-900/20 text-green-600 dark:text-green-400
|
6
6
|
{% elif status == 'warning' or status == 'pending' %}bg-amber-100 dark:bg-amber-900/20 text-amber-600 dark:text-amber-400
|
7
7
|
{% elif status == 'error' or status == 'failed' or status == 'inactive' %}bg-red-100 dark:bg-red-900/20 text-red-600 dark:text-red-400
|
8
8
|
{% elif status == 'info' or status == 'processing' %}bg-blue-100 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400
|
9
|
-
{% else %}bg-
|
9
|
+
{% else %}bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-400{% endif %}">
|
10
10
|
|
11
11
|
{% if icon %}
|
12
12
|
<span class="material-icons text-xs mr-1">{{ icon }}</span>
|
@@ -5,6 +5,7 @@
|
|
5
5
|
{% block extrahead %}
|
6
6
|
{{ block.super }}
|
7
7
|
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
8
|
+
<!-- Removed Tailwind CDN - using CSS-only solution -->
|
8
9
|
|
9
10
|
<script>
|
10
11
|
// Dashboard tabs functionality
|
@@ -22,12 +23,10 @@
|
|
22
23
|
tabs.forEach((t, i) => {
|
23
24
|
if (i === idx) {
|
24
25
|
// Active tab
|
25
|
-
t.classList.add('
|
26
|
-
t.classList.remove('bg-base-100', 'text-font-default-light', 'border-base-200', 'dark:bg-base-800', 'dark:text-font-default-dark', 'dark:border-base-700');
|
26
|
+
t.classList.add('active');
|
27
27
|
} else {
|
28
|
-
// Inactive tab
|
29
|
-
t.classList.remove('
|
30
|
-
t.classList.add('bg-base-100', 'text-font-default-light', 'border-base-200', 'dark:bg-base-800', 'dark:text-font-default-dark', 'dark:border-base-700');
|
28
|
+
// Inactive tab
|
29
|
+
t.classList.remove('active');
|
31
30
|
}
|
32
31
|
});
|
33
32
|
|
@@ -92,19 +91,21 @@
|
|
92
91
|
const button = event.target.closest('button');
|
93
92
|
const originalText = button.innerHTML;
|
94
93
|
button.innerHTML = '<span class="material-icons text-xs mr-1">check</span>Copied';
|
95
|
-
button.classList.remove('bg-
|
94
|
+
button.classList.remove('bg-gray-100', 'dark:bg-gray-700', 'hover:bg-gray-200', 'dark:hover:bg-gray-600');
|
96
95
|
button.classList.add('bg-green-600', 'hover:bg-green-700', 'dark:bg-green-500', 'dark:hover:bg-green-600', 'text-white');
|
97
96
|
|
98
97
|
setTimeout(function() {
|
99
98
|
button.innerHTML = originalText;
|
100
99
|
button.classList.remove('bg-green-600', 'hover:bg-green-700', 'dark:bg-green-500', 'dark:hover:bg-green-600', 'text-white');
|
101
|
-
button.classList.add('bg-
|
100
|
+
button.classList.add('bg-gray-100', 'dark:bg-gray-700', 'hover:bg-gray-200', 'dark:hover:bg-gray-600');
|
102
101
|
}, 2000);
|
103
102
|
}).catch(function(err) {
|
104
103
|
console.error('Could not copy text: ', err);
|
105
104
|
});
|
106
105
|
};
|
107
106
|
|
107
|
+
// No JS needed - using pure CSS solution
|
108
|
+
|
108
109
|
window.executeCommand = function(commandName) {
|
109
110
|
const modal = document.getElementById('commandModal');
|
110
111
|
const commandNameEl = document.getElementById('commandName');
|
@@ -118,7 +119,7 @@
|
|
118
119
|
|
119
120
|
commandNameEl.textContent = commandName;
|
120
121
|
commandOutput.textContent = '';
|
121
|
-
commandStatus.innerHTML = '<div class="w-3 h-3 bg-yellow-500 rounded-full mr-2 animate-pulse"></div><span class="text-sm font-medium text-
|
122
|
+
commandStatus.innerHTML = '<div class="w-3 h-3 bg-yellow-500 rounded-full mr-2 animate-pulse"></div><span class="text-sm font-medium text-gray-700 dark:text-gray-300">Executing...</span>';
|
122
123
|
modal.classList.remove('hidden');
|
123
124
|
|
124
125
|
fetch('/cfg/commands/execute/', {
|
@@ -185,7 +186,7 @@
|
|
185
186
|
addLogLine(output, `🚀 Starting command: ${data.command}`, 'info');
|
186
187
|
addLogLine(output, `📝 Arguments: ${data.args.join(' ')}`, 'info');
|
187
188
|
addLogLine(output, '', 'spacer');
|
188
|
-
status.innerHTML = '<div class="w-3 h-3 bg-yellow-500 rounded-full mr-2 animate-pulse"></div><span class="text-sm font-medium text-
|
189
|
+
status.innerHTML = '<div class="w-3 h-3 bg-yellow-500 rounded-full mr-2 animate-pulse"></div><span class="text-sm font-medium text-gray-700 dark:text-gray-300">Executing...</span>';
|
189
190
|
break;
|
190
191
|
case 'output':
|
191
192
|
addLogLine(output, data.line, 'output');
|
@@ -232,7 +233,7 @@
|
|
232
233
|
line.className += ' h-2';
|
233
234
|
break;
|
234
235
|
default:
|
235
|
-
line.className += ' text-
|
236
|
+
line.className += ' text-gray-700 dark:text-gray-300';
|
236
237
|
}
|
237
238
|
|
238
239
|
// Set content
|
@@ -296,6 +297,133 @@
|
|
296
297
|
from { opacity: 0; transform: translateY(10px); }
|
297
298
|
to { opacity: 1; transform: translateY(0); }
|
298
299
|
}
|
300
|
+
|
301
|
+
/* 🎨 Theme classes - cross-theme compatible cards */
|
302
|
+
.theme-card {
|
303
|
+
background-color: rgba(255, 255, 255, 0.2) !important;
|
304
|
+
backdrop-filter: blur(10px) !important;
|
305
|
+
color: #111827 !important;
|
306
|
+
border-color: rgba(229, 231, 235, 0.6) !important;
|
307
|
+
border-radius: 10px !important;
|
308
|
+
transition: all 0.2s ease;
|
309
|
+
}
|
310
|
+
|
311
|
+
html.dark .theme-card {
|
312
|
+
background-color: rgba(31, 41, 55, 0.2) !important;
|
313
|
+
backdrop-filter: blur(10px) !important;
|
314
|
+
color: white !important;
|
315
|
+
border-color: rgba(55, 65, 81, 0.6) !important;
|
316
|
+
border-radius: 10px !important;
|
317
|
+
}
|
318
|
+
|
319
|
+
.theme-text {
|
320
|
+
color: #111827 !important;
|
321
|
+
}
|
322
|
+
|
323
|
+
html.dark .theme-text {
|
324
|
+
color: white !important;
|
325
|
+
}
|
326
|
+
|
327
|
+
.theme-border {
|
328
|
+
border-color: rgba(229, 231, 235, 0.6) !important;
|
329
|
+
}
|
330
|
+
|
331
|
+
html.dark .theme-border {
|
332
|
+
border-color: rgba(55, 65, 81, 0.6) !important;
|
333
|
+
}
|
334
|
+
|
335
|
+
/* Fix grid layout */
|
336
|
+
.overview-grid {
|
337
|
+
display: grid !important;
|
338
|
+
grid-template-columns: 1fr !important;
|
339
|
+
}
|
340
|
+
|
341
|
+
@media (min-width: 1280px) {
|
342
|
+
.overview-grid {
|
343
|
+
grid-template-columns: 2fr 1fr !important;
|
344
|
+
}
|
345
|
+
}
|
346
|
+
|
347
|
+
/* 🎯 Tab styling */
|
348
|
+
#dashboard-tabs {
|
349
|
+
border-bottom: 2px solid #e5e7eb !important;
|
350
|
+
}
|
351
|
+
|
352
|
+
html.dark #dashboard-tabs {
|
353
|
+
border-bottom-color: #374151 !important;
|
354
|
+
}
|
355
|
+
|
356
|
+
#dashboard-tabs button {
|
357
|
+
background-color: #f3f4f6 !important;
|
358
|
+
color: #6b7280 !important;
|
359
|
+
border-bottom: 2px solid transparent !important;
|
360
|
+
transition: all 0.2s ease !important;
|
361
|
+
}
|
362
|
+
|
363
|
+
html.dark #dashboard-tabs button {
|
364
|
+
background-color: #374151 !important;
|
365
|
+
color: #9ca3af !important;
|
366
|
+
}
|
367
|
+
|
368
|
+
#dashboard-tabs button:hover {
|
369
|
+
background-color: #e5e7eb !important;
|
370
|
+
color: #374151 !important;
|
371
|
+
}
|
372
|
+
|
373
|
+
html.dark #dashboard-tabs button:hover {
|
374
|
+
background-color: #4b5563 !important;
|
375
|
+
color: #d1d5db !important;
|
376
|
+
}
|
377
|
+
|
378
|
+
/* Active tab */
|
379
|
+
#dashboard-tabs button.active,
|
380
|
+
#dashboard-tabs button[class*="bg-blue"] {
|
381
|
+
background-color: #2563eb !important;
|
382
|
+
color: white !important;
|
383
|
+
border-bottom-color: #2563eb !important;
|
384
|
+
}
|
385
|
+
|
386
|
+
html.dark #dashboard-tabs button.active,
|
387
|
+
html.dark #dashboard-tabs button[class*="bg-blue"] {
|
388
|
+
background-color: #3b82f6 !important;
|
389
|
+
color: white !important;
|
390
|
+
border-bottom-color: #3b82f6 !important;
|
391
|
+
}
|
392
|
+
|
393
|
+
/* 🎯 Universal card borders - transparent cross-theme */
|
394
|
+
.card-border,
|
395
|
+
.border-base-200,
|
396
|
+
[class*="border-base-200"],
|
397
|
+
[class*="dark:border-base-700"] {
|
398
|
+
border-color: rgba(229, 231, 235, 0.6) !important;
|
399
|
+
}
|
400
|
+
|
401
|
+
html.dark .card-border,
|
402
|
+
html.dark .border-base-200,
|
403
|
+
html.dark [class*="border-base-200"],
|
404
|
+
html.dark [class*="dark:border-base-700"] {
|
405
|
+
border-color: rgba(55, 65, 81, 0.6) !important;
|
406
|
+
}
|
407
|
+
|
408
|
+
/* 🎯 Icon spacing defaults - more specific targeting */
|
409
|
+
.theme-card .material-icons:not(.no-margin) {
|
410
|
+
margin-right: 0.75rem !important; /* 12px default spacing */
|
411
|
+
}
|
412
|
+
|
413
|
+
/* Override for specific contexts */
|
414
|
+
.theme-card .flex.items-center .material-icons {
|
415
|
+
margin-right: 0.75rem !important;
|
416
|
+
}
|
417
|
+
|
418
|
+
.theme-card .status-badge .material-icons {
|
419
|
+
margin-right: 0.25rem !important; /* 4px for badges */
|
420
|
+
}
|
421
|
+
|
422
|
+
/* Fix for buttons and interactive elements */
|
423
|
+
.theme-card button .material-icons,
|
424
|
+
.theme-card a .material-icons {
|
425
|
+
margin-right: 0.5rem !important;
|
426
|
+
}
|
299
427
|
</style>
|
300
428
|
{% endblock %}
|
301
429
|
|
@@ -315,10 +443,10 @@
|
|
315
443
|
{% block content %}
|
316
444
|
<!-- Dashboard Header -->
|
317
445
|
<div class="mb-8">
|
318
|
-
<h1 class="text-3xl font-bold text-
|
446
|
+
<h1 class="text-3xl font-bold text-gray-900 dark:text-white">
|
319
447
|
{{ dashboard_title|default:"Dashboard" }}
|
320
448
|
</h1>
|
321
|
-
<p class="mt-2 text-
|
449
|
+
<p class="mt-2 text-gray-700 dark:text-gray-300">
|
322
450
|
Welcome to the administration dashboard
|
323
451
|
</p>
|
324
452
|
</div>
|
@@ -335,11 +463,11 @@
|
|
335
463
|
</div>
|
336
464
|
|
337
465
|
<!-- Tabs Navigation -->
|
338
|
-
<div class="flex gap-1 mb-6
|
466
|
+
<div class="flex gap-1 mb-6" id="dashboard-tabs">
|
339
467
|
<button
|
340
468
|
type="button"
|
341
469
|
data-tab="0"
|
342
|
-
class="px-4 py-3
|
470
|
+
class="px-4 py-3 rounded-t-lg focus:outline-none font-semibold active"
|
343
471
|
>
|
344
472
|
<span class="material-icons mr-2 align-middle text-sm">dashboard</span>
|
345
473
|
Overview
|
@@ -347,7 +475,7 @@
|
|
347
475
|
<button
|
348
476
|
type="button"
|
349
477
|
data-tab="1"
|
350
|
-
class="px-4 py-3
|
478
|
+
class="px-4 py-3 rounded-t-lg focus:outline-none"
|
351
479
|
>
|
352
480
|
<span class="material-icons mr-2 align-middle text-sm">public</span>
|
353
481
|
API Zones
|
@@ -355,7 +483,7 @@
|
|
355
483
|
<button
|
356
484
|
type="button"
|
357
485
|
data-tab="2"
|
358
|
-
class="px-4 py-3
|
486
|
+
class="px-4 py-3 rounded-t-lg focus:outline-none"
|
359
487
|
>
|
360
488
|
<span class="material-icons mr-2 align-middle text-sm">people</span>
|
361
489
|
Users
|
@@ -363,7 +491,7 @@
|
|
363
491
|
<button
|
364
492
|
type="button"
|
365
493
|
data-tab="3"
|
366
|
-
class="px-4 py-3
|
494
|
+
class="px-4 py-3 rounded-t-lg focus:outline-none"
|
367
495
|
>
|
368
496
|
<span class="material-icons mr-2 align-middle text-sm">settings</span>
|
369
497
|
System
|
@@ -371,7 +499,7 @@
|
|
371
499
|
<button
|
372
500
|
type="button"
|
373
501
|
data-tab="4"
|
374
|
-
class="px-4 py-3
|
502
|
+
class="px-4 py-3 rounded-t-lg focus:outline-none"
|
375
503
|
>
|
376
504
|
<span class="material-icons mr-2 align-middle text-sm">analytics</span>
|
377
505
|
Statistics
|
@@ -379,7 +507,7 @@
|
|
379
507
|
<button
|
380
508
|
type="button"
|
381
509
|
data-tab="5"
|
382
|
-
class="px-4 py-3
|
510
|
+
class="px-4 py-3 rounded-t-lg focus:outline-none"
|
383
511
|
>
|
384
512
|
<span class="material-icons mr-2 align-middle text-sm">apps</span>
|
385
513
|
App Stats
|
@@ -387,7 +515,7 @@
|
|
387
515
|
<button
|
388
516
|
type="button"
|
389
517
|
data-tab="6"
|
390
|
-
class="px-4 py-3
|
518
|
+
class="px-4 py-3 rounded-t-lg focus:outline-none"
|
391
519
|
>
|
392
520
|
<span class="material-icons mr-2 align-middle text-sm">terminal</span>
|
393
521
|
Commands
|
@@ -427,14 +555,14 @@
|
|
427
555
|
</div>
|
428
556
|
|
429
557
|
<!-- Footer Section -->
|
430
|
-
<div class="text-center py-8 border-t
|
431
|
-
<p class="text-sm text-
|
558
|
+
<div class="text-center py-8 border-t theme-border mt-5">
|
559
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">
|
432
560
|
{% load django_cfg %}
|
433
|
-
<a href="{% lib_site_url %}" class="text-
|
561
|
+
<a href="{% lib_site_url %}" class="text-blue-600 hover:text-blue-700 font-medium">
|
434
562
|
{% lib_name %}
|
435
563
|
</a>
|
436
564
|
<span class="mx-2">•</span>
|
437
|
-
<a href="{% lib_health_url %}" class="text-
|
565
|
+
<a href="{% lib_health_url %}" class="text-blue-600 hover:text-blue-700">
|
438
566
|
System Health
|
439
567
|
</a>
|
440
568
|
</p>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<div class="mt-8 grid grid-cols-1 lg:grid-cols-3 gap-6">
|
13
13
|
{% if admin_actions %}
|
14
14
|
<div class="bg-base-50 dark:bg-base-800 rounded-lg p-6 border border-base-200 dark:border-base-700">
|
15
|
-
<h3 class="text-lg font-semibold text-
|
15
|
+
<h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-4 flex items-center">
|
16
16
|
<span class="material-icons text-primary-600 mr-2">admin_panel_settings</span>
|
17
17
|
Admin Actions
|
18
18
|
</h3>
|
@@ -29,7 +29,7 @@
|
|
29
29
|
|
30
30
|
{% if user_actions %}
|
31
31
|
<div class="bg-base-50 dark:bg-base-800 rounded-lg p-6 border border-base-200 dark:border-base-700">
|
32
|
-
<h3 class="text-lg font-semibold text-
|
32
|
+
<h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-4 flex items-center">
|
33
33
|
<span class="material-icons text-green-600 dark:text-green-400 mr-2">people</span>
|
34
34
|
User Management
|
35
35
|
</h3>
|
@@ -46,7 +46,7 @@
|
|
46
46
|
|
47
47
|
{% if system_actions %}
|
48
48
|
<div class="bg-base-50 dark:bg-base-800 rounded-lg p-6 border border-base-200 dark:border-base-700">
|
49
|
-
<h3 class="text-lg font-semibold text-
|
49
|
+
<h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-4 flex items-center">
|
50
50
|
<span class="material-icons text-amber-600 dark:text-amber-400 mr-2">settings</span>
|
51
51
|
System Tools
|
52
52
|
</h3>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<div class="mt-8 w-full">
|
5
5
|
{% include 'admin/components/section_header.html' with title='System Health' icon='health_and_safety' icon_color='green' %}
|
6
6
|
|
7
|
-
<div class="grid grid-cols-1 md:grid-cols-2
|
7
|
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 w-full">
|
8
8
|
{% for key, value in system_health.items %}
|
9
9
|
{% if key == "database_status" %}
|
10
10
|
{% include 'admin/components/metric_card.html' with title='Database' description='Connection & queries' icon='storage' status=value|yesno:'healthy,error' status_text=value|title %}
|
@@ -6,12 +6,12 @@
|
|
6
6
|
<div>
|
7
7
|
<div class="flex items-center justify-between mb-6">
|
8
8
|
<div>
|
9
|
-
<h1 class="text-2xl font-bold
|
10
|
-
<p class="text-
|
9
|
+
<h1 class="text-2xl font-bold theme-text">System Overview</h1>
|
10
|
+
<p class="text-gray-600 dark:text-gray-300 mt-2">
|
11
11
|
Real-time monitoring and key performance indicators
|
12
12
|
</p>
|
13
13
|
</div>
|
14
|
-
<div class="flex items-center space-x-2 text-sm text-
|
14
|
+
<div class="flex items-center space-x-2 text-sm text-gray-500 dark:text-gray-400">
|
15
15
|
<span class="material-icons text-green-500">fiber_manual_record</span>
|
16
16
|
<span>Live data</span>
|
17
17
|
</div>
|
@@ -21,60 +21,57 @@
|
|
21
21
|
{% include 'admin/snippets/components/stats_cards.html' %}
|
22
22
|
</div>
|
23
23
|
|
24
|
-
<!--
|
25
|
-
<div class="grid grid-cols-1
|
26
|
-
<!--
|
27
|
-
<div class="
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
<!-- Recent Activity Stream -->
|
32
|
-
<div class="bg-white dark:bg-base-900 rounded-lg border border-base-200 dark:border-base-700 shadow-xs">
|
33
|
-
<div class="p-6 border-b border-base-200 dark:border-base-700">
|
34
|
-
<div class="flex items-center justify-between">
|
35
|
-
<h3 class="text-lg font-semibold text-font-important-light dark:text-font-important-dark flex items-center">
|
36
|
-
<span class="material-icons text-primary-600 mr-2">timeline</span>
|
37
|
-
Recent Activity
|
38
|
-
</h3>
|
39
|
-
<a
|
40
|
-
href="#"
|
41
|
-
class="text-sm text-primary-600 hover:text-primary-700 flex items-center"
|
42
|
-
>
|
43
|
-
View all
|
44
|
-
<span class="material-icons text-xs ml-1">arrow_forward</span>
|
45
|
-
</a>
|
46
|
-
</div>
|
47
|
-
</div>
|
48
|
-
<div class="p-6">
|
49
|
-
{% include 'admin/snippets/components/recent_activity.html' %}
|
50
|
-
</div>
|
24
|
+
<!-- System Health & Quick Actions - Full Width Row -->
|
25
|
+
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8 mb-8">
|
26
|
+
<!-- System Health Card -->
|
27
|
+
<div class="theme-card rounded-lg shadow-sm border">
|
28
|
+
<div class="p-6">
|
29
|
+
{% include 'admin/snippets/components/system_health.html' %}
|
51
30
|
</div>
|
52
31
|
</div>
|
53
32
|
|
54
|
-
<!--
|
55
|
-
<div class="
|
56
|
-
|
57
|
-
|
58
|
-
<div class="p-6">
|
59
|
-
{% include 'admin/snippets/components/system_health.html' %}
|
60
|
-
</div>
|
33
|
+
<!-- Quick Actions Card -->
|
34
|
+
<div class="theme-card rounded-lg border theme-border shadow-sm">
|
35
|
+
<div class="p-6">
|
36
|
+
{% include 'admin/snippets/components/quick_actions.html' %}
|
61
37
|
</div>
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<!-- Charts & Recent Activity - Full Width -->
|
42
|
+
<div class="space-y-8">
|
43
|
+
<!-- Charts Section -->
|
44
|
+
{% include 'admin/snippets/components/charts_section.html' %}
|
62
45
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
46
|
+
<!-- Recent Activity Stream -->
|
47
|
+
<div class="theme-card rounded-lg shadow-sm border">
|
48
|
+
<div class="p-6 border-b theme-border">
|
49
|
+
<div class="flex items-center justify-between">
|
50
|
+
<h3 class="text-lg font-semibold theme-text flex items-center">
|
51
|
+
<span class="material-icons text-blue-600 mr-2">timeline</span>
|
52
|
+
Recent Activity
|
53
|
+
</h3>
|
54
|
+
<a
|
55
|
+
href="#"
|
56
|
+
class="text-sm text-blue-600 hover:text-blue-700 flex items-center"
|
57
|
+
>
|
58
|
+
View all
|
59
|
+
<span class="material-icons text-xs ml-1">arrow_forward</span>
|
60
|
+
</a>
|
67
61
|
</div>
|
68
62
|
</div>
|
63
|
+
<div class="p-6">
|
64
|
+
{% include 'admin/snippets/components/recent_activity.html' %}
|
65
|
+
</div>
|
69
66
|
</div>
|
70
67
|
</div>
|
71
68
|
|
72
69
|
<!-- Secondary Metrics Row -->
|
73
|
-
<div class="grid grid-cols-1 lg:grid-cols-2
|
70
|
+
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
|
74
71
|
<!-- System Metrics -->
|
75
|
-
<div class="
|
76
|
-
<div class="p-6 border-b
|
77
|
-
<h3 class="text-lg font-semibold
|
72
|
+
<div class="theme-card rounded-lg border theme-border shadow-sm">
|
73
|
+
<div class="p-6 border-b theme-border">
|
74
|
+
<h3 class="text-lg font-semibold theme-text flex items-center">
|
78
75
|
<span class="material-icons text-blue-500 mr-2">memory</span>
|
79
76
|
System Metrics
|
80
77
|
</h3>
|
@@ -85,10 +82,10 @@
|
|
85
82
|
</div>
|
86
83
|
|
87
84
|
<!-- Activity Tracker -->
|
88
|
-
<div class="
|
89
|
-
<div class="p-6 border-b
|
90
|
-
<h3 class="text-lg font-semibold
|
91
|
-
<span class="material-icons text-
|
85
|
+
<div class="theme-card rounded-lg border theme-border shadow-sm">
|
86
|
+
<div class="p-6 border-b theme-border">
|
87
|
+
<h3 class="text-lg font-semibold theme-text flex items-center">
|
88
|
+
<span class="material-icons text-blue-600 mr-2">track_changes</span>
|
92
89
|
Activity Tracker
|
93
90
|
</h3>
|
94
91
|
</div>
|
@@ -100,14 +97,14 @@
|
|
100
97
|
|
101
98
|
<!-- Application Statistics (if available) -->
|
102
99
|
{% if stats_groups %}
|
103
|
-
<div class="bg-
|
100
|
+
<div class="bg-gray-50 dark:bg-gray-800 rounded-xl p-8 border theme-border">
|
104
101
|
<div class="flex items-center mb-6">
|
105
102
|
<span class="material-icons text-green-500 mr-3">apps</span>
|
106
103
|
<div>
|
107
|
-
<h2 class="text-xl font-semibold
|
104
|
+
<h2 class="text-xl font-semibold theme-text">
|
108
105
|
Application Statistics
|
109
106
|
</h2>
|
110
|
-
<p class="text-
|
107
|
+
<p class="text-gray-600 dark:text-gray-300 text-sm mt-1">
|
111
108
|
Detailed metrics for each application module
|
112
109
|
</p>
|
113
110
|
</div>
|