django-cfg 1.4.88__py3-none-any.whl → 1.4.89__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.
Potentially problematic release.
This version of django-cfg might be problematic. Click here for more details.
- django_cfg/__init__.py +1 -1
- django_cfg/apps/centrifugo/views/__init__.py +0 -2
- django_cfg/apps/dashboard/services/__init__.py +2 -0
- django_cfg/apps/dashboard/services/overview_service.py +205 -0
- django_cfg/apps/frontend/test_routing.py +134 -0
- django_cfg/apps/frontend/views.py +69 -28
- django_cfg/apps/urls.py +0 -1
- django_cfg/core/builders/apps_builder.py +0 -58
- django_cfg/modules/django_unfold/__init__.py +5 -24
- django_cfg/modules/django_unfold/models/__init__.py +0 -23
- django_cfg/modules/django_unfold/models/config.py +11 -65
- django_cfg/modules/django_unfold/{dashboard.py → navigation.py} +21 -152
- django_cfg/modules/django_unfold/tailwind.py +2 -4
- django_cfg/pyproject.toml +1 -1
- django_cfg/registry/third_party.py +0 -9
- django_cfg/routing/callbacks.py +1 -43
- django_cfg/static/frontend/admin/404/index.html +1 -1
- django_cfg/static/frontend/admin/404.html +1 -1
- django_cfg/static/frontend/admin/500/index.html +1 -1
- django_cfg/static/frontend/admin/_next/static/{D_d9HRw5Yn7BRHAX5q89_ → 0sN9ktsgXH48ygtGSrhfu}/_buildManifest.js +1 -1
- django_cfg/static/frontend/admin/_next/static/chunks/50314-9443faa6df24aebf.js +1 -0
- django_cfg/static/frontend/admin/_next/static/chunks/pages/{_app-1c0fff0f59a6d683.js → _app-c7dcd3aa616fab68.js} +1 -1
- django_cfg/static/frontend/admin/_next/static/chunks/pages/private/{centrifugo-44a8313fa040e9ad.js → centrifugo-f9ecbc3ae0052a03.js} +1 -1
- django_cfg/static/frontend/admin/auth/index.html +1 -1
- django_cfg/static/frontend/admin/index.html +1 -1
- django_cfg/static/frontend/admin/legal/cookies/index.html +1 -1
- django_cfg/static/frontend/admin/legal/privacy/index.html +1 -1
- django_cfg/static/frontend/admin/legal/security/index.html +1 -1
- django_cfg/static/frontend/admin/legal/terms/index.html +1 -1
- django_cfg/static/frontend/admin/private/centrifugo/index.html +1 -1
- django_cfg/static/frontend/admin/private/index.html +1 -1
- django_cfg/static/frontend/admin/private/profile/index.html +1 -1
- django_cfg/static/frontend/admin/private/ui/index.html +2 -2
- {django_cfg-1.4.88.dist-info → django_cfg-1.4.89.dist-info}/METADATA +1 -1
- {django_cfg-1.4.88.dist-info → django_cfg-1.4.89.dist-info}/RECORD +39 -143
- django_cfg/apps/centrifugo/static/django_cfg_centrifugo/css/dashboard.css +0 -260
- django_cfg/apps/centrifugo/static/django_cfg_centrifugo/js/dashboard/live_channels.mjs +0 -313
- django_cfg/apps/centrifugo/static/django_cfg_centrifugo/js/dashboard/live_testing.mjs +0 -803
- django_cfg/apps/centrifugo/static/django_cfg_centrifugo/js/dashboard/main.mjs +0 -341
- django_cfg/apps/centrifugo/static/django_cfg_centrifugo/js/dashboard/overview.mjs +0 -432
- django_cfg/apps/centrifugo/static/django_cfg_centrifugo/js/dashboard/testing.mjs +0 -33
- django_cfg/apps/centrifugo/static/django_cfg_centrifugo/js/dashboard/websocket.mjs +0 -210
- django_cfg/apps/centrifugo/templates/django_cfg_centrifugo/components/channels_content.html +0 -46
- django_cfg/apps/centrifugo/templates/django_cfg_centrifugo/components/live_channels_content.html +0 -123
- django_cfg/apps/centrifugo/templates/django_cfg_centrifugo/components/overview_content.html +0 -45
- django_cfg/apps/centrifugo/templates/django_cfg_centrifugo/components/publishes_content.html +0 -84
- django_cfg/apps/centrifugo/templates/django_cfg_centrifugo/components/stat_cards.html +0 -53
- django_cfg/apps/centrifugo/templates/django_cfg_centrifugo/components/system_status.html +0 -91
- django_cfg/apps/centrifugo/templates/django_cfg_centrifugo/components/tab_navigation.html +0 -29
- django_cfg/apps/centrifugo/templates/django_cfg_centrifugo/components/testing_tools.html +0 -415
- django_cfg/apps/centrifugo/templates/django_cfg_centrifugo/layout/base.html +0 -61
- django_cfg/apps/centrifugo/templates/django_cfg_centrifugo/pages/dashboard.html +0 -58
- django_cfg/apps/centrifugo/templates/django_cfg_centrifugo/tags/connection_script.html +0 -48
- django_cfg/apps/centrifugo/templatetags/__init__.py +0 -1
- django_cfg/apps/centrifugo/templatetags/centrifugo_tags.py +0 -81
- django_cfg/apps/centrifugo/urls_admin.py +0 -20
- django_cfg/apps/centrifugo/views/dashboard.py +0 -28
- django_cfg/modules/django_dashboard/__init__.py +0 -23
- django_cfg/modules/django_dashboard/components.py +0 -312
- django_cfg/modules/django_dashboard/debug.py +0 -174
- django_cfg/modules/django_dashboard/management/__init__.py +0 -0
- django_cfg/modules/django_dashboard/management/commands/__init__.py +0 -0
- django_cfg/modules/django_dashboard/management/commands/debug_dashboard.py +0 -109
- django_cfg/modules/django_dashboard/sections/__init__.py +0 -1
- django_cfg/modules/django_dashboard/sections/base.py +0 -129
- django_cfg/modules/django_dashboard/sections/commands.py +0 -33
- django_cfg/modules/django_dashboard/sections/documentation.py +0 -393
- django_cfg/modules/django_dashboard/sections/overview.py +0 -398
- django_cfg/modules/django_dashboard/sections/stats.py +0 -48
- django_cfg/modules/django_dashboard/sections/system.py +0 -74
- django_cfg/modules/django_dashboard/sections/widgets.py +0 -222
- django_cfg/modules/django_unfold/callbacks/__init__.py +0 -9
- django_cfg/modules/django_unfold/callbacks/actions.py +0 -51
- django_cfg/modules/django_unfold/callbacks/apizones.py +0 -122
- django_cfg/modules/django_unfold/callbacks/base.py +0 -290
- django_cfg/modules/django_unfold/callbacks/charts.py +0 -223
- django_cfg/modules/django_unfold/callbacks/commands.py +0 -40
- django_cfg/modules/django_unfold/callbacks/main.py +0 -322
- django_cfg/modules/django_unfold/callbacks/statistics.py +0 -240
- django_cfg/modules/django_unfold/callbacks/system.py +0 -180
- django_cfg/modules/django_unfold/callbacks/users.py +0 -65
- django_cfg/modules/django_unfold/models/dashboard.py +0 -207
- django_cfg/modules/django_unfold/models/tabs.py +0 -26
- django_cfg/modules/django_unfold/models.py +0 -98
- django_cfg/modules/django_unfold/templates/unfold/helpers/app_list.html +0 -102
- django_cfg/static/frontend/admin/_next/static/chunks/50314-5ec79b293c2283dd.js +0 -1
- django_cfg/templates/admin/sections/commands_section.html +0 -5
- django_cfg/templates/admin/sections/documentation_section.html +0 -5
- django_cfg/templates/admin/sections/overview_section.html +0 -5
- django_cfg/templates/admin/sections/stats_section.html +0 -5
- django_cfg/templates/admin/sections/system_section.html +0 -5
- django_cfg/templates/admin/sections/widgets_section.html +0 -11
- django_cfg/templates/admin_old/components/action_grid.html +0 -49
- django_cfg/templates/admin_old/components/card.html +0 -50
- django_cfg/templates/admin_old/components/data_table.html +0 -67
- django_cfg/templates/admin_old/components/metric_card.html +0 -39
- django_cfg/templates/admin_old/components/modal.html +0 -58
- django_cfg/templates/admin_old/components/progress_bar.html +0 -20
- django_cfg/templates/admin_old/components/section_header.html +0 -26
- django_cfg/templates/admin_old/components/stat_item.html +0 -32
- django_cfg/templates/admin_old/components/stats_grid.html +0 -72
- django_cfg/templates/admin_old/components/status_badge.html +0 -28
- django_cfg/templates/admin_old/components/user_avatar.html +0 -27
- django_cfg/templates/admin_old/constance/change_list.html +0 -74
- django_cfg/templates/admin_old/constance/includes/default_value.html +0 -24
- django_cfg/templates/admin_old/constance/includes/fieldset_header.html +0 -15
- django_cfg/templates/admin_old/constance/includes/results_list.html +0 -16
- django_cfg/templates/admin_old/constance/includes/setting_row.html +0 -50
- django_cfg/templates/admin_old/constance/includes/table_headers.html +0 -10
- django_cfg/templates/admin_old/examples/component_class_example.html +0 -156
- django_cfg/templates/admin_old/import_export/change_list_export.html +0 -24
- django_cfg/templates/admin_old/import_export/change_list_import.html +0 -24
- django_cfg/templates/admin_old/import_export/change_list_import_export.html +0 -34
- django_cfg/templates/admin_old/index.html +0 -80
- django_cfg/templates/admin_old/index_new.html +0 -119
- django_cfg/templates/admin_old/layouts/base_dashboard.html +0 -62
- django_cfg/templates/admin_old/layouts/dashboard_with_tabs.html +0 -176
- django_cfg/templates/admin_old/sections/commands_section.html +0 -549
- django_cfg/templates/admin_old/sections/documentation_section.html +0 -152
- django_cfg/templates/admin_old/sections/overview_section.html +0 -112
- django_cfg/templates/admin_old/sections/stats_section.html +0 -35
- django_cfg/templates/admin_old/sections/system_section.html +0 -99
- django_cfg/templates/admin_old/sections/widgets_section.html +0 -129
- django_cfg/templates/admin_old/snippets/components/activity_tracker.html +0 -70
- django_cfg/templates/admin_old/snippets/components/charts_section.html +0 -113
- django_cfg/templates/admin_old/snippets/components/django_commands.html +0 -270
- django_cfg/templates/admin_old/snippets/components/quick_actions.html +0 -66
- django_cfg/templates/admin_old/snippets/components/recent_activity_improved.html +0 -25
- django_cfg/templates/admin_old/snippets/components/recent_users_table.html +0 -102
- django_cfg/templates/admin_old/snippets/components/stats_cards.html +0 -4
- django_cfg/templates/admin_old/snippets/components/stats_tiles.html +0 -92
- django_cfg/templates/admin_old/snippets/components/system_health.html +0 -22
- django_cfg/templates/admin_old/snippets/components/system_metrics.html +0 -199
- django_cfg/templates/admin_old/snippets/components/user_permissions.html +0 -57
- django_cfg/templates/admin_old/snippets/tabs/app_stats_tab.html +0 -201
- django_cfg/templates/admin_old/snippets/tabs/commands_tab.html +0 -114
- django_cfg/templates/admin_old/snippets/tabs/documentation_tab.html +0 -42
- django_cfg/templates/admin_old/snippets/tabs/overview_tab.html +0 -116
- django_cfg/templates/admin_old/snippets/tabs/stats_tab.html +0 -89
- django_cfg/templates/admin_old/snippets/tabs/users_tab.html +0 -51
- django_cfg/templates/admin_old/snippets/tabs/widgets_tab.html +0 -38
- django_cfg/templates/admin_old/snippets/zones/zones_table.html +0 -176
- /django_cfg/static/frontend/admin/_next/static/{D_d9HRw5Yn7BRHAX5q89_ → 0sN9ktsgXH48ygtGSrhfu}/_ssgManifest.js +0 -0
- {django_cfg-1.4.88.dist-info → django_cfg-1.4.89.dist-info}/WHEEL +0 -0
- {django_cfg-1.4.88.dist-info → django_cfg-1.4.89.dist-info}/entry_points.txt +0 -0
- {django_cfg-1.4.88.dist-info → django_cfg-1.4.89.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
{% load unfold %}
|
|
2
|
-
|
|
3
|
-
<!-- Statistics Tiles Grid -->
|
|
4
|
-
{% if stats_groups %}
|
|
5
|
-
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
|
|
6
|
-
{% for group in stats_groups %}
|
|
7
|
-
<div class="bg-white dark:bg-base-900 rounded-xl border border-base-200 dark:border-base-700 p-6 shadow-sm hover:shadow-md transition-shadow duration-200">
|
|
8
|
-
<div class="flex items-center mb-4 pb-3 border-b border-base-200 dark:border-base-700">
|
|
9
|
-
{% if group.icon %}
|
|
10
|
-
<div class="flex items-center justify-center w-10 h-10 rounded-lg mr-3" {% if group.color == 'success' %}bg-green-100 dark:bg-green-900/20
|
|
11
|
-
{% elif group.color == 'primary' %}bg-primary-100 dark:bg-primary-900/20
|
|
12
|
-
{% elif group.color == 'danger' %}bg-red-100 dark:bg-red-900/20
|
|
13
|
-
{% elif group.color == 'warning' %}bg-amber-100 dark:bg-amber-900/20
|
|
14
|
-
{% elif group.color == 'info' %}bg-blue-100 dark:bg-blue-900/20
|
|
15
|
-
{% else %}bg-base-100 dark:bg-base-800{% endif %}">
|
|
16
|
-
<span class="material-icons text-lg" {% if group.color == 'success' %}text-green-600 dark:text-green-400
|
|
17
|
-
{% elif group.color == 'primary' %}text-primary-600 dark:text-primary-500
|
|
18
|
-
{% elif group.color == 'danger' %}text-red-600 dark:text-red-400
|
|
19
|
-
{% elif group.color == 'warning' %}text-amber-600 dark:text-amber-400
|
|
20
|
-
{% elif group.color == 'info' %}text-blue-600 dark:text-blue-400
|
|
21
|
-
{% else %}text-font-default-light dark:text-font-default-dark{% endif %}">
|
|
22
|
-
{{ group.icon }}
|
|
23
|
-
</span>
|
|
24
|
-
</div>
|
|
25
|
-
{% endif %}
|
|
26
|
-
<h3 class="text-lg font-semibold text-font-important-light dark:text-font-important-dark">{{ group.title }}</h3>
|
|
27
|
-
</div>
|
|
28
|
-
|
|
29
|
-
{% for section in group.sections %}
|
|
30
|
-
<div class="mb-4 last:mb-0">
|
|
31
|
-
<h4 class="text-sm font-medium text-font-default-light dark:text-font-default-dark mb-3 flex items-center">
|
|
32
|
-
<span class="material-icons mr-2 text-sm" {% if group.color == 'success' %}text-green-600 dark:text-green-400
|
|
33
|
-
{% elif group.color == 'primary' %}text-primary-600 dark:text-primary-500
|
|
34
|
-
{% elif group.color == 'danger' %}text-red-600 dark:text-red-400
|
|
35
|
-
{% elif group.color == 'warning' %}text-amber-600 dark:text-amber-400
|
|
36
|
-
{% elif group.color == 'info' %}text-blue-600 dark:text-blue-400
|
|
37
|
-
{% else %}text-font-subtle-light dark:text-font-subtle-dark{% endif %}">
|
|
38
|
-
bar_chart
|
|
39
|
-
</span>
|
|
40
|
-
{{ section.title }}
|
|
41
|
-
</h4>
|
|
42
|
-
|
|
43
|
-
<div class="space-y-3">
|
|
44
|
-
{% for card in section.cards %}
|
|
45
|
-
<div class="flex items-center justify-between p-3 bg-base-50 dark:bg-base-800 rounded-lg hover:bg-base-100 dark:hover:bg-base-700 transition-colors duration-150 group">
|
|
46
|
-
<div class="flex items-center">
|
|
47
|
-
{% if card.icon %}
|
|
48
|
-
<div class="w-8 h-8 rounded-lg flex items-center justify-center mr-3" {% if group.color == 'success' %}bg-green-100 dark:bg-green-900/20
|
|
49
|
-
{% elif group.color == 'primary' %}bg-primary-100 dark:bg-primary-900/20
|
|
50
|
-
{% elif group.color == 'danger' %}bg-red-100 dark:bg-red-900/20
|
|
51
|
-
{% elif group.color == 'warning' %}bg-amber-100 dark:bg-amber-900/20
|
|
52
|
-
{% elif group.color == 'info' %}bg-blue-100 dark:bg-blue-900/20
|
|
53
|
-
{% else %}bg-base-100 dark:bg-base-800{% endif %}">
|
|
54
|
-
<span class="material-icons text-xs" {% if group.color == 'success' %}text-green-600 dark:text-green-400
|
|
55
|
-
{% elif group.color == 'primary' %}text-primary-600 dark:text-primary-400
|
|
56
|
-
{% elif group.color == 'danger' %}text-red-600 dark:text-red-400
|
|
57
|
-
{% elif group.color == 'warning' %}text-amber-600 dark:text-amber-400
|
|
58
|
-
{% elif group.color == 'info' %}text-blue-600 dark:text-blue-400
|
|
59
|
-
{% else %}text-font-default-light dark:text-font-default-dark{% endif %}">{{ card.icon }}</span>
|
|
60
|
-
</div>
|
|
61
|
-
{% endif %}
|
|
62
|
-
<div>
|
|
63
|
-
<div class="text-sm font-medium text-font-default-light dark:text-font-default-dark">{{ card.title }}</div>
|
|
64
|
-
{% if card.description %}
|
|
65
|
-
<div class="text-xs text-font-subtle-light dark:text-font-subtle-dark">{{ card.description }}</div>
|
|
66
|
-
{% endif %}
|
|
67
|
-
</div>
|
|
68
|
-
</div>
|
|
69
|
-
<div class="flex items-center gap-3">
|
|
70
|
-
<span class="inline-flex items-center px-3 py-1 rounded-full text-xs font-medium" {% if group.color == 'success' %}bg-green-100 dark:bg-green-900/20 text-green-600 dark:text-green-400
|
|
71
|
-
{% elif group.color == 'primary' %}bg-primary-100 dark:bg-primary-900/20 text-primary-600 dark:text-primary-400
|
|
72
|
-
{% elif group.color == 'danger' %}bg-red-100 dark:bg-red-900/20 text-red-600 dark:text-red-400
|
|
73
|
-
{% elif group.color == 'warning' %}bg-amber-100 dark:bg-amber-900/20 text-amber-600 dark:text-amber-400
|
|
74
|
-
{% elif group.color == 'info' %}bg-blue-100 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400
|
|
75
|
-
{% else %}bg-base-100 dark:bg-base-800 text-font-default-light dark:text-font-default-dark{% endif %}">
|
|
76
|
-
{{ card.count|default:0 }}
|
|
77
|
-
</span>
|
|
78
|
-
<a href="{% url card.url_name %}"
|
|
79
|
-
class="inline-flex items-center gap-1 px-3 py-1 bg-primary-600 hover:bg-primary-700 dark:bg-primary-500 dark:hover:bg-primary-600 text-white rounded-lg text-xs font-medium transition-colors duration-150 group-hover:shadow-sm">
|
|
80
|
-
<span class="material-icons text-xs">visibility</span>
|
|
81
|
-
<span>View</span>
|
|
82
|
-
</a>
|
|
83
|
-
</div>
|
|
84
|
-
</div>
|
|
85
|
-
{% endfor %}
|
|
86
|
-
</div>
|
|
87
|
-
</div>
|
|
88
|
-
{% endfor %}
|
|
89
|
-
</div>
|
|
90
|
-
{% endfor %}
|
|
91
|
-
</div>
|
|
92
|
-
{% endif %}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{% load unfold %}
|
|
2
|
-
|
|
3
|
-
<!-- System Health Grid using reusable components -->
|
|
4
|
-
<div class="mt-8 w-full">
|
|
5
|
-
{% include 'admin/components/section_header.html' with title='System Health' icon='health_and_safety' icon_color='green' %}
|
|
6
|
-
|
|
7
|
-
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 w-full">
|
|
8
|
-
{% for key, value in system_health.items %}
|
|
9
|
-
{% if key == "database_status" %}
|
|
10
|
-
{% include 'admin/components/metric_card.html' with title='Database' description='Connection & queries' icon='storage' status=value|yesno:'healthy,error' status_text=value|title %}
|
|
11
|
-
{% elif key == "cache_status" %}
|
|
12
|
-
{% include 'admin/components/metric_card.html' with title='Cache' description='Redis & memory' icon='memory' status=value|yesno:'healthy,error' status_text=value|title %}
|
|
13
|
-
{% elif key == "queue_status" %}
|
|
14
|
-
{% include 'admin/components/metric_card.html' with title='Queue' description='Background jobs' icon='queue' status=value|yesno:'healthy,error' status_text=value|title %}
|
|
15
|
-
{% elif key == "storage_status" %}
|
|
16
|
-
{% include 'admin/components/metric_card.html' with title='Storage' description='Disk & files' icon='folder' status=value|yesno:'healthy,error' status_text=value|title %}
|
|
17
|
-
{% else %}
|
|
18
|
-
{% include 'admin/components/metric_card.html' with title=key|title description='System component' icon='info' status=value|yesno:'healthy,error' status_text=value|title %}
|
|
19
|
-
{% endif %}
|
|
20
|
-
{% endfor %}
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
{% load unfold %}
|
|
2
|
-
|
|
3
|
-
<!-- System Metrics -->
|
|
4
|
-
{% if system_metrics %}
|
|
5
|
-
<div class="grid grid-cols-1 md:grid-cols-2 gap-4" x-data="systemMetrics({{ system_metrics|safe }})">
|
|
6
|
-
{% else %}
|
|
7
|
-
<div class="grid grid-cols-1 md:grid-cols-2 gap-4" x-data="systemMetrics({})">
|
|
8
|
-
{% endif %}
|
|
9
|
-
{% if system_metrics %}
|
|
10
|
-
<!-- Database Status -->
|
|
11
|
-
{% if system_metrics.database %}
|
|
12
|
-
<div class="bg-gradient-to-br from-green-50 to-white dark:from-green-900/10 dark:to-gray-800 rounded-lg border border-green-200 dark:border-green-800 p-4 hover:shadow-lg hover:border-green-400 dark:hover:border-green-600 transition-all duration-200 group">
|
|
13
|
-
<h4 class="text-sm font-semibold text-gray-900 dark:text-gray-100 mb-3 flex items-center">
|
|
14
|
-
<span class="material-icons
|
|
15
|
-
{% if system_metrics.database.status == 'healthy' %}text-green-600 dark:text-green-400
|
|
16
|
-
{% elif system_metrics.database.status == 'warning' %}text-amber-600 dark:text-amber-400
|
|
17
|
-
{% else %}text-red-600 dark:text-red-400{% endif %} mr-2">storage</span>
|
|
18
|
-
Database
|
|
19
|
-
</h4>
|
|
20
|
-
<div class="flex items-center mb-3">
|
|
21
|
-
<span class="text-sm text-gray-600 dark:text-gray-400">{{ system_metrics.database.type }}</span>
|
|
22
|
-
</div>
|
|
23
|
-
<div class="space-y-2">
|
|
24
|
-
<div class="flex items-center justify-between text-xs text-gray-600 dark:text-gray-400">
|
|
25
|
-
<span>Connection Health</span>
|
|
26
|
-
<span class="font-semibold">{{ system_metrics.database.health_percentage }}%</span>
|
|
27
|
-
</div>
|
|
28
|
-
<div class="w-full bg-green-100 dark:bg-green-900/30 rounded-full h-2">
|
|
29
|
-
<div class="bg-green-600 dark:bg-green-500 h-2 rounded-full transition-all duration-300 group-hover:bg-green-700 dark:group-hover:bg-green-400" :style="getBarStyle({{ system_metrics.database.health_percentage }})"></div>
|
|
30
|
-
</div>
|
|
31
|
-
<p class="text-xs text-gray-500 dark:text-gray-400">{{ system_metrics.database.description }}</p>
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
{% endif %}
|
|
35
|
-
|
|
36
|
-
<!-- Cache Status -->
|
|
37
|
-
{% if system_metrics.cache %}
|
|
38
|
-
<div class="bg-gradient-to-br from-blue-50 to-white dark:from-blue-900/10 dark:to-gray-800 rounded-lg border border-blue-200 dark:border-blue-800 p-4 hover:shadow-lg hover:border-blue-400 dark:hover:border-blue-600 transition-all duration-200 group">
|
|
39
|
-
<h4 class="text-sm font-semibold text-gray-900 dark:text-gray-100 mb-3 flex items-center">
|
|
40
|
-
<span class="material-icons
|
|
41
|
-
{% if system_metrics.cache.status == 'healthy' %}text-blue-600 dark:text-blue-400
|
|
42
|
-
{% elif system_metrics.cache.status == 'warning' %}text-amber-600 dark:text-amber-400
|
|
43
|
-
{% else %}text-red-600 dark:text-red-400{% endif %} mr-2">memory</span>
|
|
44
|
-
Cache
|
|
45
|
-
</h4>
|
|
46
|
-
<div class="flex items-center mb-3">
|
|
47
|
-
<span class="text-sm text-gray-600 dark:text-gray-400">{{ system_metrics.cache.type }}</span>
|
|
48
|
-
</div>
|
|
49
|
-
<div class="space-y-2">
|
|
50
|
-
<div class="flex items-center justify-between text-xs text-gray-600 dark:text-gray-400">
|
|
51
|
-
<span>Performance</span>
|
|
52
|
-
<span class="font-semibold">{{ system_metrics.cache.health_percentage }}%</span>
|
|
53
|
-
</div>
|
|
54
|
-
<div class="w-full bg-blue-100 dark:bg-blue-900/30 rounded-full h-2">
|
|
55
|
-
<div class="bg-blue-600 dark:bg-blue-500 h-2 rounded-full transition-all duration-300 group-hover:bg-blue-700 dark:group-hover:bg-blue-400" :style="getBarStyle({{ system_metrics.cache.health_percentage }})"></div>
|
|
56
|
-
</div>
|
|
57
|
-
<p class="text-xs text-gray-500 dark:text-gray-400">{{ system_metrics.cache.description }}</p>
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
{% endif %}
|
|
61
|
-
|
|
62
|
-
<!-- Storage Status -->
|
|
63
|
-
{% if system_metrics.storage %}
|
|
64
|
-
<div class="bg-gradient-to-br from-amber-50 to-white dark:from-amber-900/10 dark:to-gray-800 rounded-lg border border-amber-200 dark:border-amber-800 p-4 hover:shadow-lg hover:border-amber-400 dark:hover:border-amber-600 transition-all duration-200 group">
|
|
65
|
-
<h4 class="text-sm font-semibold text-gray-900 dark:text-gray-100 mb-3 flex items-center">
|
|
66
|
-
<span class="material-icons
|
|
67
|
-
{% if system_metrics.storage.status == 'healthy' %}text-amber-600 dark:text-amber-400
|
|
68
|
-
{% elif system_metrics.storage.status == 'warning' %}text-orange-600 dark:text-orange-400
|
|
69
|
-
{% else %}text-gray-600 dark:text-gray-400{% endif %} mr-2">folder</span>
|
|
70
|
-
Storage
|
|
71
|
-
</h4>
|
|
72
|
-
<div class="flex items-center mb-3">
|
|
73
|
-
<span class="text-sm text-gray-600 dark:text-gray-400">{{ system_metrics.storage.type }}</span>
|
|
74
|
-
</div>
|
|
75
|
-
<div class="space-y-2">
|
|
76
|
-
<div class="flex items-center justify-between text-xs text-gray-600 dark:text-gray-400">
|
|
77
|
-
<span>Usage</span>
|
|
78
|
-
<span class="font-semibold">{{ system_metrics.storage.health_percentage }}%</span>
|
|
79
|
-
</div>
|
|
80
|
-
<div class="w-full bg-amber-100 dark:bg-amber-900/30 rounded-full h-2">
|
|
81
|
-
<div class="bg-amber-600 dark:bg-amber-500 h-2 rounded-full transition-all duration-300 group-hover:bg-amber-700 dark:group-hover:bg-amber-400" :style="getBarStyle({{ system_metrics.storage.health_percentage }})"></div>
|
|
82
|
-
</div>
|
|
83
|
-
<p class="text-xs text-gray-500 dark:text-gray-400">{{ system_metrics.storage.description }}</p>
|
|
84
|
-
</div>
|
|
85
|
-
</div>
|
|
86
|
-
{% endif %}
|
|
87
|
-
|
|
88
|
-
<!-- API Status -->
|
|
89
|
-
{% if system_metrics.api %}
|
|
90
|
-
<div class="bg-gradient-to-br from-purple-50 to-white dark:from-purple-900/10 dark:to-gray-800 rounded-lg border border-purple-200 dark:border-purple-800 p-4 hover:shadow-lg hover:border-purple-400 dark:hover:border-purple-600 transition-all duration-200 group">
|
|
91
|
-
<h4 class="text-sm font-semibold text-gray-900 dark:text-gray-100 mb-3 flex items-center">
|
|
92
|
-
<span class="material-icons
|
|
93
|
-
{% if system_metrics.api.status == 'healthy' %}text-purple-600 dark:text-purple-400
|
|
94
|
-
{% elif system_metrics.api.status == 'warning' %}text-amber-600 dark:text-amber-400
|
|
95
|
-
{% else %}text-red-600 dark:text-red-400{% endif %} mr-2">api</span>
|
|
96
|
-
API
|
|
97
|
-
</h4>
|
|
98
|
-
<div class="flex items-center mb-3">
|
|
99
|
-
<span class="text-sm text-gray-600 dark:text-gray-400">{{ system_metrics.api.type }}</span>
|
|
100
|
-
</div>
|
|
101
|
-
<div class="space-y-2">
|
|
102
|
-
<div class="flex items-center justify-between text-xs text-gray-600 dark:text-gray-400">
|
|
103
|
-
<span>URL Patterns</span>
|
|
104
|
-
<span class="font-semibold">{{ system_metrics.api.health_percentage }}%</span>
|
|
105
|
-
</div>
|
|
106
|
-
<div class="w-full bg-purple-100 dark:bg-purple-900/30 rounded-full h-2">
|
|
107
|
-
<div class="bg-purple-600 dark:bg-purple-500 h-2 rounded-full transition-all duration-300 group-hover:bg-purple-700 dark:group-hover:bg-purple-400" :style="getBarStyle({{ system_metrics.api.health_percentage }})"></div>
|
|
108
|
-
</div>
|
|
109
|
-
<p class="text-xs text-gray-500 dark:text-gray-400">{{ system_metrics.api.description }}</p>
|
|
110
|
-
</div>
|
|
111
|
-
</div>
|
|
112
|
-
{% endif %}
|
|
113
|
-
{% else %}
|
|
114
|
-
<!-- Fallback static metrics -->
|
|
115
|
-
<div class="bg-gradient-to-br from-green-50 to-white dark:from-green-900/10 dark:to-gray-800 rounded-lg border border-green-200 dark:border-green-800 p-4 hover:shadow-lg hover:border-green-400 dark:hover:border-green-600 transition-all duration-200 group">
|
|
116
|
-
<h4 class="text-sm font-semibold text-gray-900 dark:text-gray-100 mb-3 flex items-center">
|
|
117
|
-
<span class="material-icons text-green-600 dark:text-green-400 mr-2">storage</span>
|
|
118
|
-
Database
|
|
119
|
-
</h4>
|
|
120
|
-
<div class="flex items-center mb-3">
|
|
121
|
-
<span class="text-sm text-gray-600 dark:text-gray-400">PostgreSQL</span>
|
|
122
|
-
</div>
|
|
123
|
-
<div class="space-y-2">
|
|
124
|
-
<div class="flex items-center justify-between text-xs text-gray-600 dark:text-gray-400">
|
|
125
|
-
<span>Connection Health</span>
|
|
126
|
-
<span class="font-semibold">85%</span>
|
|
127
|
-
</div>
|
|
128
|
-
<div class="w-full bg-green-100 dark:bg-green-900/30 rounded-full h-2">
|
|
129
|
-
<div class="bg-green-600 dark:bg-green-500 h-2 rounded-full transition-all duration-300 group-hover:bg-green-700 dark:group-hover:bg-green-400" :style="getBarStyle(85)"></div>
|
|
130
|
-
</div>
|
|
131
|
-
<p class="text-xs text-gray-500 dark:text-gray-400">Healthy - 85%</p>
|
|
132
|
-
</div>
|
|
133
|
-
</div>
|
|
134
|
-
|
|
135
|
-
<div class="bg-gradient-to-br from-blue-50 to-white dark:from-blue-900/10 dark:to-gray-800 rounded-lg border border-blue-200 dark:border-blue-800 p-4 hover:shadow-lg hover:border-blue-400 dark:hover:border-blue-600 transition-all duration-200 group">
|
|
136
|
-
<h4 class="text-sm font-semibold text-gray-900 dark:text-gray-100 mb-3 flex items-center">
|
|
137
|
-
<span class="material-icons text-blue-600 dark:text-blue-400 mr-2">memory</span>
|
|
138
|
-
Cache
|
|
139
|
-
</h4>
|
|
140
|
-
<div class="flex items-center mb-3">
|
|
141
|
-
<span class="text-sm text-gray-600 dark:text-gray-400">Memory Cache</span>
|
|
142
|
-
</div>
|
|
143
|
-
<div class="space-y-2">
|
|
144
|
-
<div class="flex items-center justify-between text-xs text-gray-600 dark:text-gray-400">
|
|
145
|
-
<span>Performance</span>
|
|
146
|
-
<span class="font-semibold">90%</span>
|
|
147
|
-
</div>
|
|
148
|
-
<div class="w-full bg-blue-100 dark:bg-blue-900/30 rounded-full h-2">
|
|
149
|
-
<div class="bg-blue-600 dark:bg-blue-500 h-2 rounded-full transition-all duration-300 group-hover:bg-blue-700 dark:group-hover:bg-blue-400" :style="getBarStyle(90)"></div>
|
|
150
|
-
</div>
|
|
151
|
-
<p class="text-xs text-gray-500 dark:text-gray-400">Optimal - 90%</p>
|
|
152
|
-
</div>
|
|
153
|
-
</div>
|
|
154
|
-
|
|
155
|
-
<div class="bg-gradient-to-br from-amber-50 to-white dark:from-amber-900/10 dark:to-gray-800 rounded-lg border border-amber-200 dark:border-amber-800 p-4 hover:shadow-lg hover:border-amber-400 dark:hover:border-amber-600 transition-all duration-200 group">
|
|
156
|
-
<h4 class="text-sm font-semibold text-gray-900 dark:text-gray-100 mb-3 flex items-center">
|
|
157
|
-
<span class="material-icons text-amber-600 dark:text-amber-400 mr-2">folder</span>
|
|
158
|
-
Storage
|
|
159
|
-
</h4>
|
|
160
|
-
<div class="flex items-center mb-3">
|
|
161
|
-
<span class="text-sm text-gray-600 dark:text-gray-400">Disk Space</span>
|
|
162
|
-
</div>
|
|
163
|
-
<div class="space-y-2">
|
|
164
|
-
<div class="flex items-center justify-between text-xs text-gray-600 dark:text-gray-400">
|
|
165
|
-
<span>Usage</span>
|
|
166
|
-
<span class="font-semibold">67%</span>
|
|
167
|
-
</div>
|
|
168
|
-
<div class="w-full bg-amber-100 dark:bg-amber-900/30 rounded-full h-2">
|
|
169
|
-
<div class="bg-amber-600 dark:bg-amber-500 h-2 rounded-full transition-all duration-300 group-hover:bg-amber-700 dark:group-hover:bg-amber-400" :style="getBarStyle(67)"></div>
|
|
170
|
-
</div>
|
|
171
|
-
<p class="text-xs text-gray-500 dark:text-gray-400">67% used (33% free)</p>
|
|
172
|
-
</div>
|
|
173
|
-
</div>
|
|
174
|
-
|
|
175
|
-
<div class="bg-gradient-to-br from-purple-50 to-white dark:from-purple-900/10 dark:to-gray-800 rounded-lg border border-purple-200 dark:border-purple-800 p-4 hover:shadow-lg hover:border-purple-400 dark:hover:border-purple-600 transition-all duration-200 group">
|
|
176
|
-
<h4 class="text-sm font-semibold text-gray-900 dark:text-gray-100 mb-3 flex items-center">
|
|
177
|
-
<span class="material-icons text-purple-600 dark:text-purple-400 mr-2">api</span>
|
|
178
|
-
API
|
|
179
|
-
</h4>
|
|
180
|
-
<div class="flex items-center mb-3">
|
|
181
|
-
<span class="text-sm text-gray-600 dark:text-gray-400">REST API</span>
|
|
182
|
-
</div>
|
|
183
|
-
<div class="space-y-2">
|
|
184
|
-
<div class="flex items-center justify-between text-xs text-gray-600 dark:text-gray-400">
|
|
185
|
-
<span>URL Patterns</span>
|
|
186
|
-
<span class="font-semibold">100%</span>
|
|
187
|
-
</div>
|
|
188
|
-
<div class="w-full bg-purple-100 dark:bg-purple-900/30 rounded-full h-2">
|
|
189
|
-
<div class="bg-purple-600 dark:bg-purple-500 h-2 rounded-full transition-all duration-300 group-hover:bg-purple-700 dark:group-hover:bg-purple-400" :style="getBarStyle(100)"></div>
|
|
190
|
-
</div>
|
|
191
|
-
<p class="text-xs text-gray-500 dark:text-gray-400">All routes healthy</p>
|
|
192
|
-
</div>
|
|
193
|
-
</div>
|
|
194
|
-
{% endif %}
|
|
195
|
-
</div>
|
|
196
|
-
|
|
197
|
-
<!-- Load Alpine component -->
|
|
198
|
-
{% load static %}
|
|
199
|
-
<script src="{% static 'admin/js/alpine/system-metrics.js' %}"></script>
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
{% load unfold %}
|
|
2
|
-
|
|
3
|
-
<!-- User Permissions Summary -->
|
|
4
|
-
{% if user_permissions %}
|
|
5
|
-
<div class="mt-8 w-full">
|
|
6
|
-
<div class="flex items-center mb-6">
|
|
7
|
-
<div class="flex items-center justify-center w-8 h-8 bg-amber-100 dark:bg-amber-900/20 rounded-lg mr-3">
|
|
8
|
-
<span class="material-icons text-amber-600 dark:text-amber-400 text-lg">security</span>
|
|
9
|
-
</div>
|
|
10
|
-
<h2 class="text-xl font-semibold text-font-important-light dark:text-font-important-dark">
|
|
11
|
-
Your Permissions
|
|
12
|
-
</h2>
|
|
13
|
-
<span class="ml-auto text-xs text-font-subtle-light dark:text-font-subtle-dark bg-base-100 dark:bg-base-800 px-2 py-1 rounded-full">
|
|
14
|
-
{{ user_permissions|length }} permissions
|
|
15
|
-
</span>
|
|
16
|
-
</div>
|
|
17
|
-
|
|
18
|
-
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 w-full">
|
|
19
|
-
{% for permission, has_perm in user_permissions.items %}
|
|
20
|
-
<div class="bg-white dark:bg-base-900 rounded-xl border border-base-200 dark:border-base-700 p-4 hover:shadow-md transition-shadow duration-200">
|
|
21
|
-
<div class="flex items-center justify-between">
|
|
22
|
-
<div class="flex items-center">
|
|
23
|
-
<div class="flex items-center justify-center w-8 h-8 rounded-lg mr-3" {% if has_perm %}bg-green-100 dark:bg-green-900/20{% else %}bg-base-100 dark:bg-base-800{% endif %}">
|
|
24
|
-
<span class="material-icons text-sm" {% if has_perm %}text-green-600 dark:text-green-400{% else %}text-font-subtle-light dark:text-font-subtle-dark{% endif %}">
|
|
25
|
-
{% if permission == "is_superuser" %}admin_panel_settings
|
|
26
|
-
{% elif "add" in permission %}add_circle
|
|
27
|
-
{% elif "change" in permission %}edit
|
|
28
|
-
{% elif "delete" in permission %}delete
|
|
29
|
-
{% elif "view" in permission %}visibility
|
|
30
|
-
{% else %}key{% endif %}
|
|
31
|
-
</span>
|
|
32
|
-
</div>
|
|
33
|
-
<span class="text-sm font-medium text-font-default-light dark:text-font-default-dark">
|
|
34
|
-
{% if permission == "can_add_user" %}Add Users
|
|
35
|
-
{% elif permission == "can_change_user" %}Edit Users
|
|
36
|
-
{% elif permission == "can_delete_user" %}Delete Users
|
|
37
|
-
{% elif permission == "can_view_user" %}View Users
|
|
38
|
-
{% elif permission == "is_superuser" %}Super Admin
|
|
39
|
-
{% else %}{{ permission|title|cut:"Can_"|cut:"_" }}{% endif %}
|
|
40
|
-
</span>
|
|
41
|
-
</div>
|
|
42
|
-
<span class="inline-flex items-center px-3 py-1 text-xs font-medium rounded-full" {% if has_perm %}bg-green-100 dark:bg-green-900/20 text-green-600 dark:text-green-400
|
|
43
|
-
{% else %}bg-base-100 dark:bg-base-800 text-font-subtle-light dark:text-font-subtle-dark{% endif %}">
|
|
44
|
-
{% if has_perm %}
|
|
45
|
-
<span class="material-icons text-xs mr-1">check_circle</span>
|
|
46
|
-
Granted
|
|
47
|
-
{% else %}
|
|
48
|
-
<span class="material-icons text-xs mr-1">cancel</span>
|
|
49
|
-
Denied
|
|
50
|
-
{% endif %}
|
|
51
|
-
</span>
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
{% endfor %}
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
{% endif %}
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
{% load unfold %}
|
|
2
|
-
|
|
3
|
-
<!-- App Statistics Tab -->
|
|
4
|
-
<div class="space-y-6">
|
|
5
|
-
<h2 class="text-xl font-semibold text-font-important-light dark:text-font-important-dark mb-4">
|
|
6
|
-
Application Statistics
|
|
7
|
-
</h2>
|
|
8
|
-
|
|
9
|
-
<!-- Summary Cards -->
|
|
10
|
-
<div class="grid grid-cols-1 md:grid-cols-4 gap-4 mb-6">
|
|
11
|
-
<div class="bg-white dark:bg-base-900 rounded-lg border border-base-200 dark:border-base-700 p-4">
|
|
12
|
-
<div class="flex items-center">
|
|
13
|
-
<span class="material-icons text-xl text-blue-600 dark:text-blue-400 mr-2">apps</span>
|
|
14
|
-
<div>
|
|
15
|
-
<div class="text-2xl font-bold text-font-important-light dark:text-font-important-dark">{{ app_statistics.total_apps|default:0 }}</div>
|
|
16
|
-
<div class="text-xs text-font-subtle-light dark:text-font-subtle-dark">Total Apps</div>
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
|
|
21
|
-
<div class="bg-white dark:bg-base-900 rounded-lg border border-base-200 dark:border-base-700 p-4">
|
|
22
|
-
<div class="flex items-center">
|
|
23
|
-
<span class="material-icons text-xl text-green-600 dark:text-green-400 mr-2">table_chart</span>
|
|
24
|
-
<div>
|
|
25
|
-
<div class="text-2xl font-bold text-font-important-light dark:text-font-important-dark">{{ app_statistics.total_models|default:0 }}</div>
|
|
26
|
-
<div class="text-xs text-font-subtle-light dark:text-font-subtle-dark">Total Models</div>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
<div class="bg-white dark:bg-base-900 rounded-lg border border-base-200 dark:border-base-700 p-4">
|
|
32
|
-
<div class="flex items-center">
|
|
33
|
-
<span class="material-icons text-xl text-purple-600 dark:text-purple-400 mr-2">storage</span>
|
|
34
|
-
<div>
|
|
35
|
-
<div class="text-2xl font-bold text-font-important-light dark:text-font-important-dark">{{ app_statistics.total_records|default:0 }}</div>
|
|
36
|
-
<div class="text-xs text-font-subtle-light dark:text-font-subtle-dark">Total Records</div>
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
|
|
41
|
-
<div class="bg-white dark:bg-base-900 rounded-lg border border-base-200 dark:border-base-700 p-4">
|
|
42
|
-
<div class="flex items-center">
|
|
43
|
-
<span class="material-icons text-xl text-orange-600 dark:text-orange-400 mr-2">public</span>
|
|
44
|
-
<div>
|
|
45
|
-
<div class="text-2xl font-bold text-font-important-light dark:text-font-important-dark">{{ app_statistics.zones|length|default:0 }}</div>
|
|
46
|
-
<div class="text-xs text-font-subtle-light dark:text-font-subtle-dark">API Zones</div>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
<!-- Statistics Groups -->
|
|
53
|
-
{% if stats_groups %}
|
|
54
|
-
<div class="grid grid-cols-1 lg:grid-cols-2 gap-4">
|
|
55
|
-
{% for group in stats_groups %}
|
|
56
|
-
<div class="bg-white dark:bg-base-900 rounded-lg border border-base-200 dark:border-base-700 p-4">
|
|
57
|
-
|
|
58
|
-
<!-- Group Header -->
|
|
59
|
-
<div class="flex items-center mb-3 pb-2 border-b border-base-200 dark:border-base-700">
|
|
60
|
-
{% if group.icon %}
|
|
61
|
-
<span class="material-icons mr-2 text-lg"
|
|
62
|
-
{% if group.color == 'success' %}text-green-600 dark:text-green-400
|
|
63
|
-
{% elif group.color == 'primary' %}text-primary-600 dark:text-primary-400
|
|
64
|
-
{% elif group.color == 'danger' %}text-red-600 dark:text-red-400
|
|
65
|
-
{% elif group.color == 'warning' %}text-amber-600 dark:text-amber-400
|
|
66
|
-
{% elif group.color == 'info' %}text-blue-600 dark:text-blue-400
|
|
67
|
-
{% else %}text-font-subtle-light dark:text-font-subtle-dark{% endif %}>
|
|
68
|
-
{{ group.icon }}
|
|
69
|
-
</span>
|
|
70
|
-
{% endif %}
|
|
71
|
-
<h3 class="text-md font-semibold text-font-important-light dark:text-font-important-dark">{{ group.title }}</h3>
|
|
72
|
-
</div>
|
|
73
|
-
|
|
74
|
-
<!-- Group Sections -->
|
|
75
|
-
{% for section in group.sections %}
|
|
76
|
-
<div class="mb-3 last:mb-0">
|
|
77
|
-
<h4 class="text-sm font-medium text-font-default-light dark:text-font-default-dark mb-2 flex items-center">
|
|
78
|
-
<span class="material-icons mr-1 text-xs"
|
|
79
|
-
{% if group.color == 'success' %}text-green-600 dark:text-green-400
|
|
80
|
-
{% elif group.color == 'primary' %}text-primary-600 dark:text-primary-400
|
|
81
|
-
{% elif group.color == 'danger' %}text-red-600 dark:text-red-400
|
|
82
|
-
{% elif group.color == 'warning' %}text-amber-600 dark:text-amber-400
|
|
83
|
-
{% elif group.color == 'info' %}text-blue-600 dark:text-blue-400
|
|
84
|
-
{% else %}text-font-subtle-light dark:text-font-subtle-dark{% endif %}>
|
|
85
|
-
bar_chart
|
|
86
|
-
</span>
|
|
87
|
-
{{ section.title }}
|
|
88
|
-
</h4>
|
|
89
|
-
|
|
90
|
-
<!-- Statistics Cards Grid -->
|
|
91
|
-
<div class="grid grid-cols-1 gap-2">
|
|
92
|
-
{% for card in section.cards %}
|
|
93
|
-
<div class="flex items-center justify-between p-2 bg-base-50 dark:bg-base-800 rounded-lg hover:bg-base-100 dark:hover:bg-base-700 transition">
|
|
94
|
-
<div class="flex items-center">
|
|
95
|
-
{% if card.icon %}
|
|
96
|
-
<div class="w-6 h-6 rounded flex items-center justify-center mr-2"
|
|
97
|
-
{% if group.color == 'success' %}bg-green-100 dark:bg-green-900/20
|
|
98
|
-
{% elif group.color == 'primary' %}bg-primary-100 dark:bg-primary-900/20
|
|
99
|
-
{% elif group.color == 'danger' %}bg-red-100 dark:bg-red-900/20
|
|
100
|
-
{% elif group.color == 'warning' %}bg-amber-100 dark:bg-amber-900/20
|
|
101
|
-
{% elif group.color == 'info' %}bg-blue-100 dark:bg-blue-900/20
|
|
102
|
-
{% else %}bg-base-100 dark:bg-base-800{% endif %}>
|
|
103
|
-
<span class="material-icons text-xs"
|
|
104
|
-
{% if group.color == 'success' %}text-green-600 dark:text-green-400
|
|
105
|
-
{% elif group.color == 'primary' %}text-primary-600 dark:text-primary-400
|
|
106
|
-
{% elif group.color == 'danger' %}text-red-600 dark:text-red-400
|
|
107
|
-
{% elif group.color == 'warning' %}text-amber-600 dark:text-amber-400
|
|
108
|
-
{% elif group.color == 'info' %}text-blue-600 dark:text-blue-400
|
|
109
|
-
{% else %}text-font-subtle-light dark:text-font-subtle-dark{% endif %}>{{ card.icon }}</span>
|
|
110
|
-
</div>
|
|
111
|
-
{% endif %}
|
|
112
|
-
<div>
|
|
113
|
-
<div class="text-sm font-medium text-font-default-light dark:text-font-default-dark">{{ card.title }}</div>
|
|
114
|
-
{% if card.description %}
|
|
115
|
-
<div class="text-xs text-font-subtle-light dark:text-font-subtle-dark">{{ card.description }}</div>
|
|
116
|
-
{% endif %}
|
|
117
|
-
</div>
|
|
118
|
-
</div>
|
|
119
|
-
<div class="flex items-center gap-2">
|
|
120
|
-
<span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium"
|
|
121
|
-
{% if group.color == 'success' %}bg-green-100 dark:bg-green-900/20 text-green-600 dark:text-green-400
|
|
122
|
-
{% elif group.color == 'primary' %}bg-primary-100 dark:bg-primary-900/20 text-primary-600 dark:text-primary-400
|
|
123
|
-
{% elif group.color == 'danger' %}bg-red-100 dark:bg-red-900/20 text-red-600 dark:text-red-400
|
|
124
|
-
{% elif group.color == 'warning' %}bg-amber-100 dark:bg-amber-900/20 text-amber-600 dark:text-amber-400
|
|
125
|
-
{% elif group.color == 'info' %}bg-blue-100 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400
|
|
126
|
-
{% else %}bg-base-100 dark:bg-base-800 text-font-default-light dark:text-font-default-dark{% endif %}>
|
|
127
|
-
{{ card.count|default:0 }}
|
|
128
|
-
</span>
|
|
129
|
-
<a href="{% url card.url_name %}"
|
|
130
|
-
class="inline-flex items-center gap-1 px-2 py-1 bg-primary-600 hover:bg-primary-700 dark:bg-primary-500 dark:hover:bg-primary-600 text-white rounded text-xs font-medium transition">
|
|
131
|
-
<span class="material-icons !text-[12px]">visibility</span>
|
|
132
|
-
<span class="text-xs">View</span>
|
|
133
|
-
</a>
|
|
134
|
-
</div>
|
|
135
|
-
</div>
|
|
136
|
-
{% endfor %}
|
|
137
|
-
</div>
|
|
138
|
-
</div>
|
|
139
|
-
{% endfor %}
|
|
140
|
-
</div>
|
|
141
|
-
{% endfor %}
|
|
142
|
-
</div>
|
|
143
|
-
{% else %}
|
|
144
|
-
<!-- Fallback to zones display if no stats_groups -->
|
|
145
|
-
<div class="grid grid-cols-1 lg:grid-cols-2 gap-4">
|
|
146
|
-
{% for zone_name, zone_data in app_statistics.zones.items %}
|
|
147
|
-
<div class="bg-white dark:bg-base-900 rounded-lg border border-base-200 dark:border-base-700 p-4">
|
|
148
|
-
<div class="flex items-center justify-between mb-3">
|
|
149
|
-
<h3 class="text-md font-semibold text-font-important-light dark:text-font-important-dark">
|
|
150
|
-
<span class="material-icons mr-2 text-sm">public</span>
|
|
151
|
-
{{ zone_data.name }}
|
|
152
|
-
</h3>
|
|
153
|
-
<div class="text-xs text-font-subtle-light dark:text-font-subtle-dark">
|
|
154
|
-
{{ zone_data.app_count }} apps, {{ zone_data.total_records }} records
|
|
155
|
-
</div>
|
|
156
|
-
</div>
|
|
157
|
-
|
|
158
|
-
<!-- Apps in this zone -->
|
|
159
|
-
<div class="space-y-2">
|
|
160
|
-
{% for app_name, app_data in zone_data.apps.items %}
|
|
161
|
-
<div class="bg-base-50 dark:bg-base-800 rounded p-2">
|
|
162
|
-
<div class="flex items-center justify-between mb-2">
|
|
163
|
-
<h4 class="text-sm font-medium text-font-default-light dark:text-font-default-dark">{{ app_data.name }}</h4>
|
|
164
|
-
<span class="text-xs text-font-subtle-light dark:text-font-subtle-dark">{{ app_data.model_count }} models</span>
|
|
165
|
-
</div>
|
|
166
|
-
|
|
167
|
-
<!-- Models in this app -->
|
|
168
|
-
<div class="space-y-1">
|
|
169
|
-
{% for model_name, model_data in app_data.models.items %}
|
|
170
|
-
<div class="flex items-center justify-between text-xs">
|
|
171
|
-
<span class="text-font-subtle-light dark:text-font-subtle-dark">{{ model_data.name }}</span>
|
|
172
|
-
<div class="flex items-center gap-1">
|
|
173
|
-
<span class="font-medium text-font-default-light dark:text-font-default-dark">{{ model_data.count }}</span>
|
|
174
|
-
<a href="{% url model_data.admin_url %}"
|
|
175
|
-
class="text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-300">
|
|
176
|
-
<span class="material-icons text-xs">visibility</span>
|
|
177
|
-
</a>
|
|
178
|
-
</div>
|
|
179
|
-
</div>
|
|
180
|
-
{% endfor %}
|
|
181
|
-
</div>
|
|
182
|
-
|
|
183
|
-
<div class="mt-2 pt-2 border-t border-base-200 dark:border-base-700">
|
|
184
|
-
<div class="flex justify-between text-xs text-font-subtle-light dark:text-font-subtle-dark">
|
|
185
|
-
<span>Total: {{ app_data.total_records }} records</span>
|
|
186
|
-
<span>{{ app_data.model_count }} models</span>
|
|
187
|
-
</div>
|
|
188
|
-
</div>
|
|
189
|
-
</div>
|
|
190
|
-
{% endfor %}
|
|
191
|
-
</div>
|
|
192
|
-
</div>
|
|
193
|
-
{% empty %}
|
|
194
|
-
<div class="col-span-full text-center py-8 text-font-subtle-light dark:text-font-subtle-dark">
|
|
195
|
-
<span class="material-icons text-4xl mb-2 block">apps</span>
|
|
196
|
-
<p>No application statistics available</p>
|
|
197
|
-
</div>
|
|
198
|
-
{% endfor %}
|
|
199
|
-
</div>
|
|
200
|
-
{% endif %}
|
|
201
|
-
</div>
|