django-cfg 1.4.87__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/permissions.py +48 -0
- django_cfg/apps/dashboard/serializers/__init__.py +8 -1
- django_cfg/apps/dashboard/serializers/commands.py +29 -0
- django_cfg/apps/dashboard/services/__init__.py +2 -0
- django_cfg/{modules/django_unfold/callbacks/base.py → apps/dashboard/services/commands_security.py} +28 -90
- django_cfg/apps/dashboard/services/commands_service.py +208 -9
- django_cfg/apps/dashboard/services/overview_service.py +205 -0
- django_cfg/apps/dashboard/views/commands_views.py +92 -4
- django_cfg/apps/frontend/test_routing.py +134 -0
- django_cfg/apps/frontend/views.py +73 -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/{ZJZBgOL9mO1koHrgaaLEV → 0sN9ktsgXH48ygtGSrhfu}/_buildManifest.js +1 -1
- django_cfg/static/frontend/admin/_next/static/chunks/{19430.fe7bff7372f8a256.js → 19430.c4c95603c23c17fe.js} +1 -1
- django_cfg/static/frontend/admin/_next/static/chunks/50314-9443faa6df24aebf.js +1 -0
- django_cfg/static/frontend/admin/_next/static/chunks/94141-bc6d47f419b26b21.js +1 -0
- django_cfg/static/frontend/admin/_next/static/chunks/pages/{_app-c336f254967dd101.js → _app-c7dcd3aa616fab68.js} +6 -6
- django_cfg/static/frontend/admin/_next/static/chunks/pages/legal/{cookies-b39c7f22c066e2c6.js → cookies-97d279800f12aab4.js} +1 -1
- django_cfg/static/frontend/admin/_next/static/chunks/pages/legal/{privacy-5aedad0cf3a4f80f.js → privacy-1d5e6cd94689247e.js} +1 -1
- django_cfg/static/frontend/admin/_next/static/chunks/pages/legal/{security-dbd854d0d5d483e2.js → security-55e49700e7a01f5a.js} +1 -1
- django_cfg/static/frontend/admin/_next/static/chunks/pages/legal/{terms-f3e1d2b9e5edf12f.js → terms-14c02bb2d3198352.js} +1 -1
- django_cfg/static/frontend/admin/_next/static/chunks/pages/private/{centrifugo-22532c65971225eb.js → centrifugo-f9ecbc3ae0052a03.js} +1 -1
- django_cfg/static/frontend/admin/_next/static/chunks/pages/private-d4ccbe1265cbd853.js +1 -0
- django_cfg/static/frontend/admin/_next/static/chunks/{webpack-da114020a6b940f5.js → webpack-5a92f81363b62aa7.js} +1 -1
- django_cfg/static/frontend/admin/_next/static/css/3063068f0d5a8a00.css +3 -0
- django_cfg/static/frontend/admin/_next/static/media/19cfc7226ec3afaa-s.woff2 +0 -0
- django_cfg/static/frontend/admin/_next/static/media/21350d82a1f187e9-s.p.woff2 +0 -0
- django_cfg/static/frontend/admin/_next/static/media/8e9860b6e62d6359-s.woff2 +0 -0
- django_cfg/static/frontend/admin/_next/static/media/ba9851c3c22cd980-s.woff2 +0 -0
- django_cfg/static/frontend/admin/_next/static/media/c5fe6dc8356a8c31-s.woff2 +0 -0
- django_cfg/static/frontend/admin/_next/static/media/df0a9ae256c0569c-s.woff2 +0 -0
- django_cfg/static/frontend/admin/_next/static/media/e4af272ccee01ff0-s.p.woff2 +0 -0
- 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/templates/admin/index.html +1 -1
- {django_cfg-1.4.87.dist-info → django_cfg-1.4.89.dist-info}/METADATA +1 -1
- {django_cfg-1.4.87.dist-info → django_cfg-1.4.89.dist-info}/RECORD +62 -163
- 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/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/23004-faae121bbfecc163.js +0 -1
- django_cfg/static/frontend/admin/_next/static/chunks/50314-48bd5701f62faf27.js +0 -1
- django_cfg/static/frontend/admin/_next/static/chunks/pages/private-fe9faa86ecdb0ce6.js +0 -1
- django_cfg/static/frontend/admin/_next/static/css/5f9a37b6e6a72303.css +0 -3
- django_cfg/static/frontend/admin/_next/static/media/438aa629764e75f3-s.woff2 +0 -0
- django_cfg/static/frontend/admin/_next/static/media/4c9affa5bc8f420e-s.p.woff2 +0 -0
- django_cfg/static/frontend/admin/_next/static/media/51251f8b9793cdb3-s.woff2 +0 -0
- django_cfg/static/frontend/admin/_next/static/media/875ae681bfde4580-s.p.woff2 +0 -0
- django_cfg/static/frontend/admin/_next/static/media/cc978ac5ee68c2b6-s.woff2 +0 -0
- django_cfg/static/frontend/admin/_next/static/media/e857b654a2caa584-s.woff2 +0 -0
- 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/{ZJZBgOL9mO1koHrgaaLEV → 0sN9ktsgXH48ygtGSrhfu}/_ssgManifest.js +0 -0
- {django_cfg-1.4.87.dist-info → django_cfg-1.4.89.dist-info}/WHEEL +0 -0
- {django_cfg-1.4.87.dist-info → django_cfg-1.4.89.dist-info}/entry_points.txt +0 -0
- {django_cfg-1.4.87.dist-info → django_cfg-1.4.89.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
{% load unfold %}
|
|
2
|
-
|
|
3
|
-
<!-- Charts Section -->
|
|
4
|
-
<div class="mb-8 w-full">
|
|
5
|
-
{% include 'admin/components/section_header.html' with title='Analytics Overview' icon='analytics' icon_color='blue' %}
|
|
6
|
-
|
|
7
|
-
<!-- Time Range Navigation -->
|
|
8
|
-
{% if navigation %}
|
|
9
|
-
<div class="mb-6 flex items-center space-x-2">
|
|
10
|
-
{% for nav_item in navigation %}
|
|
11
|
-
<a href="{{ nav_item.link }}"
|
|
12
|
-
class="px-4 py-2 rounded-default {% if nav_item.active %}bg-primary-600 text-white{% else %}bg-base-100 dark:bg-base-800 text-font-default-light dark:text-font-default-dark hover:bg-base-200 dark:hover:bg-base-700{% endif %} transition-colors flex items-center">
|
|
13
|
-
{% if nav_item.icon %}
|
|
14
|
-
<span class="material-icons text-sm mr-2">{{ nav_item.icon }}</span>
|
|
15
|
-
{% endif %}
|
|
16
|
-
{{ nav_item.title }}
|
|
17
|
-
</a>
|
|
18
|
-
{% endfor %}
|
|
19
|
-
</div>
|
|
20
|
-
{% endif %}
|
|
21
|
-
|
|
22
|
-
{% if charts %}
|
|
23
|
-
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
|
|
24
|
-
<!-- User Registration Chart -->
|
|
25
|
-
<div class="bg-white dark:bg-base-900 rounded-lg border border-base-200 dark:border-base-700 p-6 shadow-sm">
|
|
26
|
-
<div class="mb-4">
|
|
27
|
-
<h3 class="text-lg font-semibold text-font-important-light dark:text-font-important-dark">User Registrations</h3>
|
|
28
|
-
<p class="text-sm text-font-subtle-light dark:text-font-subtle-dark">Last 7 days activity</p>
|
|
29
|
-
</div>
|
|
30
|
-
<div class="flex items-center mb-4">
|
|
31
|
-
<span class="material-icons text-primary-600 dark:text-primary-500 mr-2">trending_up</span>
|
|
32
|
-
<span class="text-sm text-font-subtle-light dark:text-font-subtle-dark">Growth Trends</span>
|
|
33
|
-
</div>
|
|
34
|
-
{% if charts.user_registrations %}
|
|
35
|
-
<div class="relative h-[300px]" x-data='chart({{ charts.user_registrations_json|safe }}, "line")'>
|
|
36
|
-
<canvas x-ref="canvas"></canvas>
|
|
37
|
-
</div>
|
|
38
|
-
|
|
39
|
-
<!-- Fallback data table if chart doesn't render -->
|
|
40
|
-
<div class="mt-4 text-xs text-font-subtle-light dark:text-font-subtle-dark">
|
|
41
|
-
<div class="flex justify-between items-center mb-2">
|
|
42
|
-
<span class="font-medium">Data Preview:</span>
|
|
43
|
-
<span>{{ charts.user_registrations.datasets.0.label }}</span>
|
|
44
|
-
</div>
|
|
45
|
-
<div class="grid grid-cols-7 gap-1 text-center">
|
|
46
|
-
{% for label in charts.user_registrations.labels %}
|
|
47
|
-
<div class="bg-base-100 dark:bg-base-700 p-1 rounded text-xs">{{ label }}</div>
|
|
48
|
-
{% endfor %}
|
|
49
|
-
</div>
|
|
50
|
-
<div class="grid grid-cols-7 gap-1 text-center mt-1">
|
|
51
|
-
{% for value in charts.user_registrations.datasets.0.data %}
|
|
52
|
-
<div class="bg-primary-50 dark:bg-primary-900/20 p-1 rounded text-xs font-medium">{{ value }}</div>
|
|
53
|
-
{% endfor %}
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
{% else %}
|
|
57
|
-
<div class="h-[300px] flex items-center justify-center bg-base-50 dark:bg-base-800 rounded-lg border border-base-200 dark:border-base-700">
|
|
58
|
-
<p class="text-font-subtle-light dark:text-font-subtle-dark">No registration data available</p>
|
|
59
|
-
</div>
|
|
60
|
-
{% endif %}
|
|
61
|
-
</div>
|
|
62
|
-
|
|
63
|
-
<!-- User Activity Chart -->
|
|
64
|
-
<div class="bg-white dark:bg-base-900 rounded-lg border border-base-200 dark:border-base-700 p-6 shadow-sm">
|
|
65
|
-
<div class="mb-4">
|
|
66
|
-
<h3 class="text-lg font-semibold text-font-important-light dark:text-font-important-dark">User Activity</h3>
|
|
67
|
-
<p class="text-sm text-font-subtle-light dark:text-font-subtle-dark">Weekly engagement metrics</p>
|
|
68
|
-
</div>
|
|
69
|
-
<div class="flex items-center mb-4">
|
|
70
|
-
<span class="material-icons text-green-600 dark:text-green-400 mr-2">bar_chart</span>
|
|
71
|
-
<span class="text-sm text-font-subtle-light dark:text-font-subtle-dark">Activity Levels</span>
|
|
72
|
-
</div>
|
|
73
|
-
{% if charts.user_activity %}
|
|
74
|
-
<div class="relative h-[300px]" x-data='chart({{ charts.user_activity_json|safe }}, "bar")'>
|
|
75
|
-
<canvas x-ref="canvas"></canvas>
|
|
76
|
-
</div>
|
|
77
|
-
|
|
78
|
-
<!-- Fallback data table if chart doesn't render -->
|
|
79
|
-
<div class="mt-4 text-xs text-font-subtle-light dark:text-font-subtle-dark">
|
|
80
|
-
<div class="flex justify-between items-center mb-2">
|
|
81
|
-
<span class="font-medium">Data Preview:</span>
|
|
82
|
-
<span>{{ charts.user_activity.datasets.0.label }}</span>
|
|
83
|
-
</div>
|
|
84
|
-
<div class="grid grid-cols-7 gap-1 text-center">
|
|
85
|
-
{% for label in charts.user_activity.labels %}
|
|
86
|
-
<div class="bg-base-100 dark:bg-base-700 p-1 rounded text-xs">{{ label }}</div>
|
|
87
|
-
{% endfor %}
|
|
88
|
-
</div>
|
|
89
|
-
<div class="grid grid-cols-7 gap-1 text-center mt-1">
|
|
90
|
-
{% for value in charts.user_activity.datasets.0.data %}
|
|
91
|
-
<div class="bg-green-50 dark:bg-green-900/20 p-1 rounded text-xs font-medium">{{ value }}</div>
|
|
92
|
-
{% endfor %}
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
{% else %}
|
|
96
|
-
<div class="h-[300px] flex items-center justify-center bg-base-50 dark:bg-base-800 rounded-lg border border-base-200 dark:border-base-700">
|
|
97
|
-
<p class="text-font-subtle-light dark:text-font-subtle-dark">No activity data available</p>
|
|
98
|
-
</div>
|
|
99
|
-
{% endif %}
|
|
100
|
-
</div>
|
|
101
|
-
</div>
|
|
102
|
-
{% else %}
|
|
103
|
-
<div class="bg-base-50 dark:bg-base-800 rounded-lg border border-base-200 dark:border-base-700 p-8 text-center">
|
|
104
|
-
<span class="material-icons text-4xl text-base-400 dark:text-base-500 mb-4">analytics</span>
|
|
105
|
-
<h3 class="text-lg font-medium text-font-default-light dark:text-font-default-dark mb-2">No Chart Data</h3>
|
|
106
|
-
<p class="text-font-subtle-light dark:text-font-subtle-dark">Charts data is not available in the context</p>
|
|
107
|
-
</div>
|
|
108
|
-
{% endif %}
|
|
109
|
-
</div>
|
|
110
|
-
|
|
111
|
-
<!-- Load Chart Alpine component -->
|
|
112
|
-
{% load static %}
|
|
113
|
-
<script src="{% static 'admin/js/alpine/chart.js' %}"></script>
|
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
{% load unfold %}
|
|
2
|
-
|
|
3
|
-
<!-- Django Commands Section -->
|
|
4
|
-
<div class="mt-8 w-full" x-data="commandsPanel({{ django_commands.total_commands }})">
|
|
5
|
-
<!-- Header -->
|
|
6
|
-
<div class="flex items-center justify-between mb-6">
|
|
7
|
-
<div class="flex items-center">
|
|
8
|
-
<div class="flex items-center justify-center w-8 h-8 bg-purple-100 dark:bg-purple-900/20 rounded-lg mr-3">
|
|
9
|
-
<span class="material-icons text-purple-600 dark:text-purple-400 text-lg">terminal</span>
|
|
10
|
-
</div>
|
|
11
|
-
<h2 class="text-xl font-semibold text-font-important-light dark:text-font-important-dark">
|
|
12
|
-
Django Commands
|
|
13
|
-
</h2>
|
|
14
|
-
<span class="ml-4 text-xs text-font-subtle-light dark:text-font-subtle-dark bg-base-100 dark:bg-base-800 px-2 py-1 rounded-full">
|
|
15
|
-
<span x-text="visibleCommands"></span> commands
|
|
16
|
-
</span>
|
|
17
|
-
</div>
|
|
18
|
-
|
|
19
|
-
<!-- Search Box -->
|
|
20
|
-
<div class="flex items-center space-x-3">
|
|
21
|
-
<div class="bg-white border border-base-200 flex flex-row items-center px-3 rounded-default relative shadow-xs w-64 focus-within:outline-2 focus-within:-outline-offset-2 focus-within:outline-primary-600 dark:bg-base-900 dark:border-base-700">
|
|
22
|
-
<span class="material-symbols-outlined md-18 text-base-400 dark:text-base-500">search</span>
|
|
23
|
-
<input
|
|
24
|
-
type="text"
|
|
25
|
-
x-ref="searchInput"
|
|
26
|
-
x-model="searchQuery"
|
|
27
|
-
@input="search()"
|
|
28
|
-
placeholder="Search commands..."
|
|
29
|
-
class="grow font-medium min-w-0 overflow-hidden p-2 placeholder-font-subtle-light truncate focus:outline-hidden dark:bg-base-900 dark:placeholder-font-subtle-dark dark:text-font-default-dark"
|
|
30
|
-
>
|
|
31
|
-
</div>
|
|
32
|
-
<button
|
|
33
|
-
x-show="showClearButton"
|
|
34
|
-
@click="clearSearch()"
|
|
35
|
-
class="px-3 py-2 text-xs text-font-subtle-light dark:text-font-subtle-dark hover:text-font-default-light dark:hover:text-font-default-dark transition-colors"
|
|
36
|
-
>
|
|
37
|
-
Clear
|
|
38
|
-
</button>
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
|
|
42
|
-
{% if django_commands.categorized %}
|
|
43
|
-
<!-- Commands by Category -->
|
|
44
|
-
<div class="space-y-4">
|
|
45
|
-
{% for category, commands in django_commands.categorized.items %}
|
|
46
|
-
<div class="bg-white dark:bg-base-900 rounded-lg border border-base-200 dark:border-base-700 overflow-hidden shadow-sm mb-4">
|
|
47
|
-
<!-- Category Header -->
|
|
48
|
-
<button
|
|
49
|
-
type="button"
|
|
50
|
-
data-category="{{ category }}"
|
|
51
|
-
@click="toggleCategory('{{ category }}')"
|
|
52
|
-
class="w-full p-4 flex items-center justify-between hover:bg-base-100 dark:hover:bg-base-700 transition-colors"
|
|
53
|
-
>
|
|
54
|
-
<div class="flex items-center">
|
|
55
|
-
<span class="material-icons text-primary-600 dark:text-primary-400 mr-2">apps</span>
|
|
56
|
-
<h3 class="text-lg font-semibold text-font-important-light dark:text-font-important-dark capitalize">
|
|
57
|
-
{{ category|title }}
|
|
58
|
-
</h3>
|
|
59
|
-
<span class="ml-3 text-sm text-font-subtle-light dark:text-font-subtle-dark bg-base-100 dark:bg-base-700 px-2 py-1 rounded-lg">
|
|
60
|
-
{{ commands|length }} commands
|
|
61
|
-
</span>
|
|
62
|
-
</div>
|
|
63
|
-
<span
|
|
64
|
-
class="material-icons text-font-subtle-light dark:text-font-subtle-dark transition-transform"
|
|
65
|
-
:class="isCategoryExpanded('{{ category }}') ? 'rotate-0' : '-rotate-90'"
|
|
66
|
-
x-text="isCategoryExpanded('{{ category }}') ? 'expand_less' : 'expand_more'"
|
|
67
|
-
></span>
|
|
68
|
-
</button>
|
|
69
|
-
|
|
70
|
-
<!-- Collapsible Content -->
|
|
71
|
-
<div
|
|
72
|
-
id="content-{{ category }}"
|
|
73
|
-
class="border-t border-base-200 dark:border-base-700"
|
|
74
|
-
x-show="isCategoryExpanded('{{ category }}')"
|
|
75
|
-
x-cloak
|
|
76
|
-
>
|
|
77
|
-
<div class="p-4">
|
|
78
|
-
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
|
79
|
-
{% for command in commands %}
|
|
80
|
-
<div class="command-item bg-white dark:bg-base-900 rounded-lg border border-base-200 dark:border-base-700 hover:shadow-lg dark:hover:shadow-base-900/50 transition-all duration-200 overflow-hidden">
|
|
81
|
-
<!-- Card Header -->
|
|
82
|
-
<div class="p-4 border-b border-base-100 dark:border-base-700">
|
|
83
|
-
<div class="flex items-center justify-between mb-2">
|
|
84
|
-
<code class="command-name text-sm font-mono bg-base-100 dark:bg-base-700 px-2 py-1 rounded-lg text-font-default-light dark:text-font-default-dark">
|
|
85
|
-
{{ command.name }}
|
|
86
|
-
</code>
|
|
87
|
-
<div class="flex items-center space-x-1">
|
|
88
|
-
{% if command.is_core %}
|
|
89
|
-
<span class="text-xs bg-primary-100 dark:bg-primary-900/20 text-primary-600 dark:text-primary-400 px-2 py-1 rounded-lg">
|
|
90
|
-
Core
|
|
91
|
-
</span>
|
|
92
|
-
{% endif %}
|
|
93
|
-
{% if command.is_custom %}
|
|
94
|
-
<span class="text-xs bg-indigo-100 dark:bg-indigo-900/20 text-indigo-600 dark:text-indigo-400 px-2 py-1 rounded-lg">
|
|
95
|
-
Custom
|
|
96
|
-
</span>
|
|
97
|
-
{% endif %}
|
|
98
|
-
</div>
|
|
99
|
-
</div>
|
|
100
|
-
<div class="flex items-center text-xs text-font-subtle-light dark:text-font-subtle-dark">
|
|
101
|
-
<span class="material-icons text-xs mr-1">apps</span>
|
|
102
|
-
{{ command.app_label }}
|
|
103
|
-
</div>
|
|
104
|
-
</div>
|
|
105
|
-
|
|
106
|
-
<!-- Card Body -->
|
|
107
|
-
<div class="p-4">
|
|
108
|
-
<!-- Description -->
|
|
109
|
-
{% if command.description %}
|
|
110
|
-
<p class="command-description text-sm text-font-default-light dark:text-font-default-dark mb-3 line-clamp-2">
|
|
111
|
-
{{ command.description }}
|
|
112
|
-
</p>
|
|
113
|
-
{% endif %}
|
|
114
|
-
|
|
115
|
-
<!-- Usage -->
|
|
116
|
-
{% if command.usage %}
|
|
117
|
-
<div class="mb-3">
|
|
118
|
-
<span class="text-xs text-font-subtle-light dark:text-font-subtle-dark font-medium">Usage:</span>
|
|
119
|
-
<code class="block text-xs font-mono bg-base-50 dark:bg-base-700 px-2 py-1 rounded-lg mt-1 text-font-default-light dark:text-font-default-dark">
|
|
120
|
-
{{ command.usage }}
|
|
121
|
-
</code>
|
|
122
|
-
</div>
|
|
123
|
-
{% endif %}
|
|
124
|
-
|
|
125
|
-
<!-- Arguments & Options Summary -->
|
|
126
|
-
<div class="flex items-center justify-between text-xs text-font-subtle-light dark:text-font-subtle-dark mb-3">
|
|
127
|
-
{% if command.arguments %}
|
|
128
|
-
<span>{{ command.arguments|length }} arg{{ command.arguments|length|pluralize }}</span>
|
|
129
|
-
{% endif %}
|
|
130
|
-
{% if command.options %}
|
|
131
|
-
<span>{{ command.options|length }} option{{ command.options|length|pluralize }}</span>
|
|
132
|
-
{% endif %}
|
|
133
|
-
</div>
|
|
134
|
-
|
|
135
|
-
<!-- Action Buttons -->
|
|
136
|
-
<div class="flex gap-2">
|
|
137
|
-
<button
|
|
138
|
-
@click="window.copyToClipboard('python manage.py {{ command.name }}')"
|
|
139
|
-
class="flex-1 inline-flex items-center justify-center px-3 py-2 bg-base-100 dark:bg-base-700 hover:bg-base-200 dark:hover:bg-base-600 text-font-default-light dark:text-font-default-dark rounded-lg text-xs font-medium transition-colors"
|
|
140
|
-
title="Copy command to clipboard">
|
|
141
|
-
<span class="material-icons text-xs mr-1">content_copy</span>
|
|
142
|
-
Copy
|
|
143
|
-
</button>
|
|
144
|
-
<button
|
|
145
|
-
@click="window.executeCommand('{{ command.name }}')"
|
|
146
|
-
class="flex-1 inline-flex items-center justify-center px-3 py-2 bg-green-600 hover:bg-green-700 dark:bg-green-500 dark:hover:bg-green-600 text-white rounded-lg text-xs font-medium transition-colors"
|
|
147
|
-
title="Execute command">
|
|
148
|
-
<span class="material-icons text-xs mr-1">play_arrow</span>
|
|
149
|
-
Run
|
|
150
|
-
</button>
|
|
151
|
-
</div>
|
|
152
|
-
</div>
|
|
153
|
-
</div>
|
|
154
|
-
{% endfor %}
|
|
155
|
-
</div>
|
|
156
|
-
</div>
|
|
157
|
-
</div>
|
|
158
|
-
</div>
|
|
159
|
-
{% endfor %}
|
|
160
|
-
</div>
|
|
161
|
-
|
|
162
|
-
<!-- No Results Message -->
|
|
163
|
-
<div x-show="showNoResults" class="text-center py-12">
|
|
164
|
-
<div class="flex flex-col items-center">
|
|
165
|
-
<span class="material-icons text-6xl text-base-400 dark:text-base-500 mb-4">search_off</span>
|
|
166
|
-
<h3 class="text-lg font-medium text-font-important-light dark:text-font-important-dark mb-2">
|
|
167
|
-
No Commands Found
|
|
168
|
-
</h3>
|
|
169
|
-
<p class="text-font-subtle-light dark:text-font-subtle-dark max-w-md mx-auto">
|
|
170
|
-
No commands match your search criteria. Try different keywords or clear the search.
|
|
171
|
-
</p>
|
|
172
|
-
</div>
|
|
173
|
-
</div>
|
|
174
|
-
|
|
175
|
-
{% else %}
|
|
176
|
-
<!-- No Commands -->
|
|
177
|
-
<div class="text-center py-12">
|
|
178
|
-
<div class="flex flex-col items-center">
|
|
179
|
-
<span class="material-icons text-4xl text-base-400 dark:text-base-500 mb-4">terminal</span>
|
|
180
|
-
<h3 class="text-lg font-medium text-font-important-light dark:text-font-important-dark mb-2">
|
|
181
|
-
No Django Commands Found
|
|
182
|
-
</h3>
|
|
183
|
-
<p class="text-font-subtle-light dark:text-font-subtle-dark max-w-md mx-auto">
|
|
184
|
-
Django management commands will appear here once they are discovered.
|
|
185
|
-
</p>
|
|
186
|
-
</div>
|
|
187
|
-
</div>
|
|
188
|
-
{% endif %}
|
|
189
|
-
</div>
|
|
190
|
-
|
|
191
|
-
<!-- Command Execution Modal (Alpine.js) -->
|
|
192
|
-
<div x-data="commandModal" x-show="open" x-cloak class="fixed inset-0 bg-black/80 backdrop-blur-sm z-50">
|
|
193
|
-
<div class="flex items-center justify-center min-h-screen p-4">
|
|
194
|
-
<div class="bg-white dark:bg-base-900 rounded-lg shadow-2xl max-w-4xl w-full max-h-[80vh] flex flex-col border border-base-200 dark:border-base-700">
|
|
195
|
-
<!-- Modal Header -->
|
|
196
|
-
<div class="flex items-center justify-between p-4 border-b border-base-200 dark:border-base-700 bg-base-50 dark:bg-base-800">
|
|
197
|
-
<div class="flex items-center space-x-3">
|
|
198
|
-
<div class="flex items-center justify-center w-10 h-10 bg-primary-100 dark:bg-primary-900/20 rounded-lg">
|
|
199
|
-
<span class="material-icons text-primary-600 dark:text-primary-400">terminal</span>
|
|
200
|
-
</div>
|
|
201
|
-
<div>
|
|
202
|
-
<h3 class="text-lg font-semibold text-font-important-light dark:text-font-important-dark">
|
|
203
|
-
Command Execution
|
|
204
|
-
</h3>
|
|
205
|
-
<p class="text-sm text-font-subtle-light dark:text-font-subtle-dark">
|
|
206
|
-
Running: <span x-text="commandName" class="font-mono text-primary-600 dark:text-primary-400"></span>
|
|
207
|
-
</p>
|
|
208
|
-
</div>
|
|
209
|
-
</div>
|
|
210
|
-
<button @click="close()" class="p-2 text-font-subtle-light dark:text-font-subtle-dark hover:text-font-default-light dark:hover:text-font-default-dark hover:bg-base-100 dark:hover:bg-base-700 rounded-lg transition-colors">
|
|
211
|
-
<span class="material-icons">close</span>
|
|
212
|
-
</button>
|
|
213
|
-
</div>
|
|
214
|
-
|
|
215
|
-
<!-- Tabs Navigation -->
|
|
216
|
-
<div class="flex gap-1 px-4 pt-2 border-b border-base-200 dark:border-base-700">
|
|
217
|
-
<button
|
|
218
|
-
@click="activeTab = 'output'"
|
|
219
|
-
:class="activeTab === 'output' ? 'active' : ''"
|
|
220
|
-
class="command-tab px-4 py-2 text-sm font-medium rounded-t-lg transition-colors"
|
|
221
|
-
>
|
|
222
|
-
<span class="material-icons text-sm mr-1 align-middle">terminal</span>
|
|
223
|
-
Output
|
|
224
|
-
</button>
|
|
225
|
-
<button
|
|
226
|
-
@click="activeTab = 'docs'"
|
|
227
|
-
:class="activeTab === 'docs' ? 'active' : ''"
|
|
228
|
-
class="command-tab px-4 py-2 text-sm font-medium rounded-t-lg transition-colors"
|
|
229
|
-
>
|
|
230
|
-
<span class="material-icons text-sm mr-1 align-middle">help_outline</span>
|
|
231
|
-
Documentation
|
|
232
|
-
</button>
|
|
233
|
-
</div>
|
|
234
|
-
|
|
235
|
-
<!-- Modal Body -->
|
|
236
|
-
<div class="flex-1 p-4 min-h-0">
|
|
237
|
-
<!-- Output Tab Content -->
|
|
238
|
-
<div x-show="activeTab === 'output'" class="h-full">
|
|
239
|
-
<div x-html="outputHtml" class="bg-base-100 dark:bg-base-800 rounded-lg border border-base-200 dark:border-base-700 overflow-y-auto p-4 text-sm font-mono text-font-default-light dark:text-font-default-dark whitespace-pre-wrap leading-relaxed break-words h-full"></div>
|
|
240
|
-
</div>
|
|
241
|
-
|
|
242
|
-
<!-- Documentation Tab Content -->
|
|
243
|
-
<div x-show="activeTab === 'docs'" class="h-full">
|
|
244
|
-
<div class="bg-base-100 dark:bg-base-800 rounded-lg border border-base-200 dark:border-base-700 overflow-y-auto p-4 h-full">
|
|
245
|
-
<div x-html="docsHtml" class="prose prose-sm dark:prose-invert max-w-none"></div>
|
|
246
|
-
</div>
|
|
247
|
-
</div>
|
|
248
|
-
</div>
|
|
249
|
-
|
|
250
|
-
<!-- Modal Footer -->
|
|
251
|
-
<div class="flex items-center justify-between p-4 border-t border-base-200 dark:border-base-700 bg-base-50 dark:bg-base-800">
|
|
252
|
-
<div class="flex items-center space-x-3">
|
|
253
|
-
<div class="flex items-center">
|
|
254
|
-
<div :class="statusClass" class="w-3 h-3 rounded-full mr-2"></div>
|
|
255
|
-
<span x-text="statusText" class="text-sm font-medium text-font-default-light dark:text-font-default-dark"></span>
|
|
256
|
-
</div>
|
|
257
|
-
</div>
|
|
258
|
-
<button @click="close()" class="px-4 py-2 bg-base-100 dark:bg-base-700 hover:bg-base-200 dark:hover:bg-base-600 text-font-default-light dark:text-font-default-dark rounded-lg transition-colors font-medium">
|
|
259
|
-
Close
|
|
260
|
-
</button>
|
|
261
|
-
</div>
|
|
262
|
-
</div>
|
|
263
|
-
</div>
|
|
264
|
-
</div>
|
|
265
|
-
|
|
266
|
-
<!-- Alpine.js Components & Styles -->
|
|
267
|
-
{% load static %}
|
|
268
|
-
<link rel="stylesheet" href="{% static 'admin/css/tabs.css' %}">
|
|
269
|
-
<script src="{% static 'admin/js/alpine/command-modal.js' %}"></script>
|
|
270
|
-
<script src="{% static 'admin/js/alpine/commands-panel.js' %}"></script>
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
{% load unfold %}
|
|
2
|
-
|
|
3
|
-
<!-- Quick Actions Section using reusable components -->
|
|
4
|
-
{% if quick_actions %}
|
|
5
|
-
<div class="mt-8 w-full">
|
|
6
|
-
{% include 'admin/components/section_header.html' with title='Quick Actions' icon='flash_on' icon_color='amber' %}
|
|
7
|
-
|
|
8
|
-
{% include 'admin/components/action_grid.html' with actions=quick_actions cols=3 xl_cols=4 %}
|
|
9
|
-
|
|
10
|
-
<!-- Additional Action Categories -->
|
|
11
|
-
{% if admin_actions or user_actions or system_actions %}
|
|
12
|
-
<div class="mt-8 grid grid-cols-1 lg:grid-cols-3 gap-6">
|
|
13
|
-
{% if admin_actions %}
|
|
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-gray-900 dark:text-white mb-4 flex items-center">
|
|
16
|
-
<span class="material-icons text-primary-600 mr-2">admin_panel_settings</span>
|
|
17
|
-
Admin Actions
|
|
18
|
-
</h3>
|
|
19
|
-
<div class="space-y-2">
|
|
20
|
-
{% for action in admin_actions %}
|
|
21
|
-
<a href="{{ action.link }}" class="flex items-center text-sm text-font-subtle-light dark:text-font-subtle-dark hover:text-primary-600 dark:hover:text-primary-500 transition-colors">
|
|
22
|
-
<span class="material-icons text-xs mr-2">{{ action.icon }}</span>
|
|
23
|
-
{{ action.title }}
|
|
24
|
-
</a>
|
|
25
|
-
{% endfor %}
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
{% endif %}
|
|
29
|
-
|
|
30
|
-
{% if user_actions %}
|
|
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-gray-900 dark:text-white mb-4 flex items-center">
|
|
33
|
-
<span class="material-icons text-green-600 dark:text-green-400 mr-2">people</span>
|
|
34
|
-
User Management
|
|
35
|
-
</h3>
|
|
36
|
-
<div class="space-y-2">
|
|
37
|
-
{% for action in user_actions %}
|
|
38
|
-
<a href="{{ action.link }}" class="flex items-center text-sm text-font-subtle-light dark:text-font-subtle-dark hover:text-green-600 dark:hover:text-green-400 transition-colors">
|
|
39
|
-
<span class="material-icons text-xs mr-2">{{ action.icon }}</span>
|
|
40
|
-
{{ action.title }}
|
|
41
|
-
</a>
|
|
42
|
-
{% endfor %}
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
{% endif %}
|
|
46
|
-
|
|
47
|
-
{% if system_actions %}
|
|
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-gray-900 dark:text-white mb-4 flex items-center">
|
|
50
|
-
<span class="material-icons text-amber-600 dark:text-amber-400 mr-2">settings</span>
|
|
51
|
-
System Tools
|
|
52
|
-
</h3>
|
|
53
|
-
<div class="space-y-2">
|
|
54
|
-
{% for action in system_actions %}
|
|
55
|
-
<a href="{{ action.link }}" class="flex items-center text-sm text-font-subtle-light dark:text-font-subtle-dark hover:text-amber-600 dark:hover:text-amber-400 transition-colors">
|
|
56
|
-
<span class="material-icons text-xs mr-2">{{ action.icon }}</span>
|
|
57
|
-
{{ action.title }}
|
|
58
|
-
</a>
|
|
59
|
-
{% endfor %}
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
{% endif %}
|
|
63
|
-
</div>
|
|
64
|
-
{% endif %}
|
|
65
|
-
</div>
|
|
66
|
-
{% endif %}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{% load unfold %}
|
|
2
|
-
|
|
3
|
-
<!-- Recent Users Table Component -->
|
|
4
|
-
{% if recent_users_table and recent_users_table.rows %}
|
|
5
|
-
{% include 'admin/snippets/components/recent_users_table.html' %}
|
|
6
|
-
{% else %}
|
|
7
|
-
<!-- Empty State -->
|
|
8
|
-
<div class="flex flex-col items-center justify-center
|
|
9
|
-
rounded-default border-2 border-dashed
|
|
10
|
-
border-base-200 bg-base-50 p-12
|
|
11
|
-
dark:border-base-700 dark:bg-base-800/50">
|
|
12
|
-
|
|
13
|
-
<div class="mb-4 rounded-full bg-base-100 p-4
|
|
14
|
-
dark:bg-base-700">
|
|
15
|
-
<span class="material-icons text-4xl text-base-400
|
|
16
|
-
dark:text-base-500">history</span>
|
|
17
|
-
</div>
|
|
18
|
-
|
|
19
|
-
<h3 class="mb-1 text-sm font-semibold text-font-important-light
|
|
20
|
-
dark:text-font-important-dark">No Recent Activity</h3>
|
|
21
|
-
<p class="text-xs text-font-subtle-light dark:text-font-subtle-dark">
|
|
22
|
-
User activity will appear here once users start joining
|
|
23
|
-
</p>
|
|
24
|
-
</div>
|
|
25
|
-
{% endif %}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
{% load unfold %}
|
|
2
|
-
|
|
3
|
-
<!-- Recent Users Table using reusable components -->
|
|
4
|
-
{% capture as table_actions silent %}
|
|
5
|
-
<span class="text-xs text-font-subtle-light dark:text-font-subtle-dark">Last 24 hours</span>
|
|
6
|
-
{% if user_admin_urls %}
|
|
7
|
-
<a href="{{ user_admin_urls.list }}" class="text-sm text-primary-600 hover:text-primary-700 dark:text-primary-500 dark:hover:text-primary-400 flex items-center">
|
|
8
|
-
View all
|
|
9
|
-
<span class="material-icons text-xs ml-1">arrow_forward</span>
|
|
10
|
-
</a>
|
|
11
|
-
{% else %}
|
|
12
|
-
<a href="/admin/accounts/customuser/" class="text-sm text-primary-600 hover:text-primary-700 dark:text-primary-500 dark:hover:text-primary-400 flex items-center">
|
|
13
|
-
View all
|
|
14
|
-
<span class="material-icons text-xs ml-1">arrow_forward</span>
|
|
15
|
-
</a>
|
|
16
|
-
{% endif %}
|
|
17
|
-
{% endcapture %}
|
|
18
|
-
|
|
19
|
-
<div class="bg-white dark:bg-base-900 rounded-lg border border-base-200 dark:border-base-700 overflow-hidden shadow-xs">
|
|
20
|
-
<!-- Card Header -->
|
|
21
|
-
<div class="px-6 py-4 border-b border-base-200 dark:border-base-700 bg-base-50 dark:bg-base-800">
|
|
22
|
-
<div class="flex items-center justify-between">
|
|
23
|
-
<div class="flex items-center">
|
|
24
|
-
<span class="material-icons text-primary-600 mr-2">people</span>
|
|
25
|
-
<h3 class="text-lg font-semibold text-font-important-light dark:text-font-important-dark">Recent Users</h3>
|
|
26
|
-
</div>
|
|
27
|
-
<div class="flex items-center space-x-2">
|
|
28
|
-
{{ table_actions }}
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
|
|
33
|
-
<!-- Table Content -->
|
|
34
|
-
<div class="overflow-x-auto">
|
|
35
|
-
{% if tables.recent_users %}
|
|
36
|
-
{% component "unfold/components/table.html" with table=tables.recent_users card_included=1 striped=1 class="w-full" %}
|
|
37
|
-
{% endcomponent %}
|
|
38
|
-
{% else %}
|
|
39
|
-
<!-- Custom table if data is different -->
|
|
40
|
-
<table class="w-full">
|
|
41
|
-
<thead class="bg-base-50 dark:bg-base-800">
|
|
42
|
-
<tr>
|
|
43
|
-
<th class="px-6 py-3 text-left text-xs font-medium text-font-subtle-light dark:text-font-subtle-dark uppercase tracking-wider">User</th>
|
|
44
|
-
<th class="px-6 py-3 text-left text-xs font-medium text-font-subtle-light dark:text-font-subtle-dark uppercase tracking-wider">Status</th>
|
|
45
|
-
<th class="px-6 py-3 text-left text-xs font-medium text-font-subtle-light dark:text-font-subtle-dark uppercase tracking-wider">Role</th>
|
|
46
|
-
<th class="px-6 py-3 text-left text-xs font-medium text-font-subtle-light dark:text-font-subtle-dark uppercase tracking-wider">Last Active</th>
|
|
47
|
-
<th class="px-6 py-3 text-left text-xs font-medium text-font-subtle-light dark:text-font-subtle-dark uppercase tracking-wider">Actions</th>
|
|
48
|
-
</tr>
|
|
49
|
-
</thead>
|
|
50
|
-
<tbody class="bg-white dark:bg-base-900 divide-y divide-base-200 dark:divide-base-700">
|
|
51
|
-
{% for user in recent_users %}
|
|
52
|
-
<tr class="hover:bg-base-50 dark:hover:bg-base-700 transition-colors duration-150">
|
|
53
|
-
<td class="px-6 py-4 whitespace-nowrap">
|
|
54
|
-
{% include 'admin/components/user_avatar.html' with name=user.username email=user.email show_details=True %}
|
|
55
|
-
</td>
|
|
56
|
-
<td class="px-6 py-4 whitespace-nowrap">
|
|
57
|
-
{% include 'admin/components/status_badge.html' with status=user.is_active|yesno:'active,inactive' %}
|
|
58
|
-
</td>
|
|
59
|
-
<td class="px-6 py-4 whitespace-nowrap">
|
|
60
|
-
{% if user.is_superuser %}
|
|
61
|
-
{% include 'admin/components/status_badge.html' with status='error' text='Admin' icon='admin_panel_settings' %}
|
|
62
|
-
{% elif user.is_staff %}
|
|
63
|
-
{% include 'admin/components/status_badge.html' with status='info' text='Staff' icon='manage_accounts' %}
|
|
64
|
-
{% else %}
|
|
65
|
-
{% include 'admin/components/status_badge.html' with status='' text='User' icon='person' %}
|
|
66
|
-
{% endif %}
|
|
67
|
-
</td>
|
|
68
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm text-font-subtle-light dark:text-font-subtle-dark">
|
|
69
|
-
{{ user.last_login|timesince|default:"Never" }}
|
|
70
|
-
</td>
|
|
71
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
|
|
72
|
-
<div class="flex items-center space-x-2">
|
|
73
|
-
{% if user.admin_urls %}
|
|
74
|
-
<a href="{{ user.admin_urls.change }}" class="text-primary-600 hover:text-primary-700 dark:text-primary-500 dark:hover:text-primary-400">
|
|
75
|
-
<span class="material-icons text-sm">edit</span>
|
|
76
|
-
</a>
|
|
77
|
-
<a href="{{ user.admin_urls.view }}" class="text-base-400 hover:text-base-600 dark:text-base-500 dark:hover:text-base-300">
|
|
78
|
-
<span class="material-icons text-sm">visibility</span>
|
|
79
|
-
</a>
|
|
80
|
-
{% else %}
|
|
81
|
-
<span class="text-base-400 dark:text-base-500">
|
|
82
|
-
<span class="material-icons text-sm">block</span>
|
|
83
|
-
</span>
|
|
84
|
-
{% endif %}
|
|
85
|
-
</div>
|
|
86
|
-
</td>
|
|
87
|
-
</tr>
|
|
88
|
-
{% empty %}
|
|
89
|
-
<tr>
|
|
90
|
-
<td colspan="5" class="px-6 py-8 text-center">
|
|
91
|
-
<div class="flex flex-col items-center">
|
|
92
|
-
<span class="material-icons text-4xl text-base-400 dark:text-base-500 mb-2">people_outline</span>
|
|
93
|
-
<p class="text-font-subtle-light dark:text-font-subtle-dark">No recent users found</p>
|
|
94
|
-
</div>
|
|
95
|
-
</td>
|
|
96
|
-
</tr>
|
|
97
|
-
{% endfor %}
|
|
98
|
-
</tbody>
|
|
99
|
-
</table>
|
|
100
|
-
{% endif %}
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|