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.

Files changed (177) hide show
  1. django_cfg/__init__.py +1 -1
  2. django_cfg/apps/centrifugo/views/__init__.py +0 -2
  3. django_cfg/apps/dashboard/permissions.py +48 -0
  4. django_cfg/apps/dashboard/serializers/__init__.py +8 -1
  5. django_cfg/apps/dashboard/serializers/commands.py +29 -0
  6. django_cfg/apps/dashboard/services/__init__.py +2 -0
  7. django_cfg/{modules/django_unfold/callbacks/base.py → apps/dashboard/services/commands_security.py} +28 -90
  8. django_cfg/apps/dashboard/services/commands_service.py +208 -9
  9. django_cfg/apps/dashboard/services/overview_service.py +205 -0
  10. django_cfg/apps/dashboard/views/commands_views.py +92 -4
  11. django_cfg/apps/frontend/test_routing.py +134 -0
  12. django_cfg/apps/frontend/views.py +73 -28
  13. django_cfg/apps/urls.py +0 -1
  14. django_cfg/core/builders/apps_builder.py +0 -58
  15. django_cfg/modules/django_unfold/__init__.py +5 -24
  16. django_cfg/modules/django_unfold/models/__init__.py +0 -23
  17. django_cfg/modules/django_unfold/models/config.py +11 -65
  18. django_cfg/modules/django_unfold/{dashboard.py → navigation.py} +21 -152
  19. django_cfg/modules/django_unfold/tailwind.py +2 -4
  20. django_cfg/pyproject.toml +1 -1
  21. django_cfg/registry/third_party.py +0 -9
  22. django_cfg/routing/callbacks.py +1 -43
  23. django_cfg/static/frontend/admin/404/index.html +1 -1
  24. django_cfg/static/frontend/admin/404.html +1 -1
  25. django_cfg/static/frontend/admin/500/index.html +1 -1
  26. django_cfg/static/frontend/admin/_next/static/{ZJZBgOL9mO1koHrgaaLEV → 0sN9ktsgXH48ygtGSrhfu}/_buildManifest.js +1 -1
  27. django_cfg/static/frontend/admin/_next/static/chunks/{19430.fe7bff7372f8a256.js → 19430.c4c95603c23c17fe.js} +1 -1
  28. django_cfg/static/frontend/admin/_next/static/chunks/50314-9443faa6df24aebf.js +1 -0
  29. django_cfg/static/frontend/admin/_next/static/chunks/94141-bc6d47f419b26b21.js +1 -0
  30. django_cfg/static/frontend/admin/_next/static/chunks/pages/{_app-c336f254967dd101.js → _app-c7dcd3aa616fab68.js} +6 -6
  31. django_cfg/static/frontend/admin/_next/static/chunks/pages/legal/{cookies-b39c7f22c066e2c6.js → cookies-97d279800f12aab4.js} +1 -1
  32. django_cfg/static/frontend/admin/_next/static/chunks/pages/legal/{privacy-5aedad0cf3a4f80f.js → privacy-1d5e6cd94689247e.js} +1 -1
  33. django_cfg/static/frontend/admin/_next/static/chunks/pages/legal/{security-dbd854d0d5d483e2.js → security-55e49700e7a01f5a.js} +1 -1
  34. django_cfg/static/frontend/admin/_next/static/chunks/pages/legal/{terms-f3e1d2b9e5edf12f.js → terms-14c02bb2d3198352.js} +1 -1
  35. django_cfg/static/frontend/admin/_next/static/chunks/pages/private/{centrifugo-22532c65971225eb.js → centrifugo-f9ecbc3ae0052a03.js} +1 -1
  36. django_cfg/static/frontend/admin/_next/static/chunks/pages/private-d4ccbe1265cbd853.js +1 -0
  37. django_cfg/static/frontend/admin/_next/static/chunks/{webpack-da114020a6b940f5.js → webpack-5a92f81363b62aa7.js} +1 -1
  38. django_cfg/static/frontend/admin/_next/static/css/3063068f0d5a8a00.css +3 -0
  39. django_cfg/static/frontend/admin/_next/static/media/19cfc7226ec3afaa-s.woff2 +0 -0
  40. django_cfg/static/frontend/admin/_next/static/media/21350d82a1f187e9-s.p.woff2 +0 -0
  41. django_cfg/static/frontend/admin/_next/static/media/8e9860b6e62d6359-s.woff2 +0 -0
  42. django_cfg/static/frontend/admin/_next/static/media/ba9851c3c22cd980-s.woff2 +0 -0
  43. django_cfg/static/frontend/admin/_next/static/media/c5fe6dc8356a8c31-s.woff2 +0 -0
  44. django_cfg/static/frontend/admin/_next/static/media/df0a9ae256c0569c-s.woff2 +0 -0
  45. django_cfg/static/frontend/admin/_next/static/media/e4af272ccee01ff0-s.p.woff2 +0 -0
  46. django_cfg/static/frontend/admin/auth/index.html +1 -1
  47. django_cfg/static/frontend/admin/index.html +1 -1
  48. django_cfg/static/frontend/admin/legal/cookies/index.html +1 -1
  49. django_cfg/static/frontend/admin/legal/privacy/index.html +1 -1
  50. django_cfg/static/frontend/admin/legal/security/index.html +1 -1
  51. django_cfg/static/frontend/admin/legal/terms/index.html +1 -1
  52. django_cfg/static/frontend/admin/private/centrifugo/index.html +1 -1
  53. django_cfg/static/frontend/admin/private/index.html +1 -1
  54. django_cfg/static/frontend/admin/private/profile/index.html +1 -1
  55. django_cfg/static/frontend/admin/private/ui/index.html +2 -2
  56. django_cfg/templates/admin/index.html +1 -1
  57. {django_cfg-1.4.87.dist-info → django_cfg-1.4.89.dist-info}/METADATA +1 -1
  58. {django_cfg-1.4.87.dist-info → django_cfg-1.4.89.dist-info}/RECORD +62 -163
  59. django_cfg/apps/centrifugo/static/django_cfg_centrifugo/css/dashboard.css +0 -260
  60. django_cfg/apps/centrifugo/static/django_cfg_centrifugo/js/dashboard/live_channels.mjs +0 -313
  61. django_cfg/apps/centrifugo/static/django_cfg_centrifugo/js/dashboard/live_testing.mjs +0 -803
  62. django_cfg/apps/centrifugo/static/django_cfg_centrifugo/js/dashboard/main.mjs +0 -341
  63. django_cfg/apps/centrifugo/static/django_cfg_centrifugo/js/dashboard/overview.mjs +0 -432
  64. django_cfg/apps/centrifugo/static/django_cfg_centrifugo/js/dashboard/testing.mjs +0 -33
  65. django_cfg/apps/centrifugo/static/django_cfg_centrifugo/js/dashboard/websocket.mjs +0 -210
  66. django_cfg/apps/centrifugo/templates/django_cfg_centrifugo/components/channels_content.html +0 -46
  67. django_cfg/apps/centrifugo/templates/django_cfg_centrifugo/components/live_channels_content.html +0 -123
  68. django_cfg/apps/centrifugo/templates/django_cfg_centrifugo/components/overview_content.html +0 -45
  69. django_cfg/apps/centrifugo/templates/django_cfg_centrifugo/components/publishes_content.html +0 -84
  70. django_cfg/apps/centrifugo/templates/django_cfg_centrifugo/components/stat_cards.html +0 -53
  71. django_cfg/apps/centrifugo/templates/django_cfg_centrifugo/components/system_status.html +0 -91
  72. django_cfg/apps/centrifugo/templates/django_cfg_centrifugo/components/tab_navigation.html +0 -29
  73. django_cfg/apps/centrifugo/templates/django_cfg_centrifugo/components/testing_tools.html +0 -415
  74. django_cfg/apps/centrifugo/templates/django_cfg_centrifugo/layout/base.html +0 -61
  75. django_cfg/apps/centrifugo/templates/django_cfg_centrifugo/pages/dashboard.html +0 -58
  76. django_cfg/apps/centrifugo/templates/django_cfg_centrifugo/tags/connection_script.html +0 -48
  77. django_cfg/apps/centrifugo/templatetags/__init__.py +0 -1
  78. django_cfg/apps/centrifugo/templatetags/centrifugo_tags.py +0 -81
  79. django_cfg/apps/centrifugo/urls_admin.py +0 -20
  80. django_cfg/apps/centrifugo/views/dashboard.py +0 -28
  81. django_cfg/modules/django_dashboard/__init__.py +0 -23
  82. django_cfg/modules/django_dashboard/components.py +0 -312
  83. django_cfg/modules/django_dashboard/debug.py +0 -174
  84. django_cfg/modules/django_dashboard/management/__init__.py +0 -0
  85. django_cfg/modules/django_dashboard/management/commands/__init__.py +0 -0
  86. django_cfg/modules/django_dashboard/management/commands/debug_dashboard.py +0 -109
  87. django_cfg/modules/django_dashboard/sections/__init__.py +0 -1
  88. django_cfg/modules/django_dashboard/sections/base.py +0 -129
  89. django_cfg/modules/django_dashboard/sections/commands.py +0 -33
  90. django_cfg/modules/django_dashboard/sections/documentation.py +0 -393
  91. django_cfg/modules/django_dashboard/sections/overview.py +0 -398
  92. django_cfg/modules/django_dashboard/sections/stats.py +0 -48
  93. django_cfg/modules/django_dashboard/sections/system.py +0 -74
  94. django_cfg/modules/django_dashboard/sections/widgets.py +0 -222
  95. django_cfg/modules/django_unfold/callbacks/__init__.py +0 -9
  96. django_cfg/modules/django_unfold/callbacks/actions.py +0 -51
  97. django_cfg/modules/django_unfold/callbacks/apizones.py +0 -122
  98. django_cfg/modules/django_unfold/callbacks/charts.py +0 -223
  99. django_cfg/modules/django_unfold/callbacks/commands.py +0 -40
  100. django_cfg/modules/django_unfold/callbacks/main.py +0 -322
  101. django_cfg/modules/django_unfold/callbacks/statistics.py +0 -240
  102. django_cfg/modules/django_unfold/callbacks/system.py +0 -180
  103. django_cfg/modules/django_unfold/callbacks/users.py +0 -65
  104. django_cfg/modules/django_unfold/models/dashboard.py +0 -207
  105. django_cfg/modules/django_unfold/models/tabs.py +0 -26
  106. django_cfg/modules/django_unfold/models.py +0 -98
  107. django_cfg/modules/django_unfold/templates/unfold/helpers/app_list.html +0 -102
  108. django_cfg/static/frontend/admin/_next/static/chunks/23004-faae121bbfecc163.js +0 -1
  109. django_cfg/static/frontend/admin/_next/static/chunks/50314-48bd5701f62faf27.js +0 -1
  110. django_cfg/static/frontend/admin/_next/static/chunks/pages/private-fe9faa86ecdb0ce6.js +0 -1
  111. django_cfg/static/frontend/admin/_next/static/css/5f9a37b6e6a72303.css +0 -3
  112. django_cfg/static/frontend/admin/_next/static/media/438aa629764e75f3-s.woff2 +0 -0
  113. django_cfg/static/frontend/admin/_next/static/media/4c9affa5bc8f420e-s.p.woff2 +0 -0
  114. django_cfg/static/frontend/admin/_next/static/media/51251f8b9793cdb3-s.woff2 +0 -0
  115. django_cfg/static/frontend/admin/_next/static/media/875ae681bfde4580-s.p.woff2 +0 -0
  116. django_cfg/static/frontend/admin/_next/static/media/cc978ac5ee68c2b6-s.woff2 +0 -0
  117. django_cfg/static/frontend/admin/_next/static/media/e857b654a2caa584-s.woff2 +0 -0
  118. django_cfg/templates/admin/sections/commands_section.html +0 -5
  119. django_cfg/templates/admin/sections/documentation_section.html +0 -5
  120. django_cfg/templates/admin/sections/overview_section.html +0 -5
  121. django_cfg/templates/admin/sections/stats_section.html +0 -5
  122. django_cfg/templates/admin/sections/system_section.html +0 -5
  123. django_cfg/templates/admin/sections/widgets_section.html +0 -11
  124. django_cfg/templates/admin_old/components/action_grid.html +0 -49
  125. django_cfg/templates/admin_old/components/card.html +0 -50
  126. django_cfg/templates/admin_old/components/data_table.html +0 -67
  127. django_cfg/templates/admin_old/components/metric_card.html +0 -39
  128. django_cfg/templates/admin_old/components/modal.html +0 -58
  129. django_cfg/templates/admin_old/components/progress_bar.html +0 -20
  130. django_cfg/templates/admin_old/components/section_header.html +0 -26
  131. django_cfg/templates/admin_old/components/stat_item.html +0 -32
  132. django_cfg/templates/admin_old/components/stats_grid.html +0 -72
  133. django_cfg/templates/admin_old/components/status_badge.html +0 -28
  134. django_cfg/templates/admin_old/components/user_avatar.html +0 -27
  135. django_cfg/templates/admin_old/constance/change_list.html +0 -74
  136. django_cfg/templates/admin_old/constance/includes/default_value.html +0 -24
  137. django_cfg/templates/admin_old/constance/includes/fieldset_header.html +0 -15
  138. django_cfg/templates/admin_old/constance/includes/results_list.html +0 -16
  139. django_cfg/templates/admin_old/constance/includes/setting_row.html +0 -50
  140. django_cfg/templates/admin_old/constance/includes/table_headers.html +0 -10
  141. django_cfg/templates/admin_old/examples/component_class_example.html +0 -156
  142. django_cfg/templates/admin_old/import_export/change_list_export.html +0 -24
  143. django_cfg/templates/admin_old/import_export/change_list_import.html +0 -24
  144. django_cfg/templates/admin_old/import_export/change_list_import_export.html +0 -34
  145. django_cfg/templates/admin_old/index.html +0 -80
  146. django_cfg/templates/admin_old/index_new.html +0 -119
  147. django_cfg/templates/admin_old/layouts/base_dashboard.html +0 -62
  148. django_cfg/templates/admin_old/layouts/dashboard_with_tabs.html +0 -176
  149. django_cfg/templates/admin_old/sections/commands_section.html +0 -549
  150. django_cfg/templates/admin_old/sections/documentation_section.html +0 -152
  151. django_cfg/templates/admin_old/sections/overview_section.html +0 -112
  152. django_cfg/templates/admin_old/sections/stats_section.html +0 -35
  153. django_cfg/templates/admin_old/sections/system_section.html +0 -99
  154. django_cfg/templates/admin_old/sections/widgets_section.html +0 -129
  155. django_cfg/templates/admin_old/snippets/components/activity_tracker.html +0 -70
  156. django_cfg/templates/admin_old/snippets/components/charts_section.html +0 -113
  157. django_cfg/templates/admin_old/snippets/components/django_commands.html +0 -270
  158. django_cfg/templates/admin_old/snippets/components/quick_actions.html +0 -66
  159. django_cfg/templates/admin_old/snippets/components/recent_activity_improved.html +0 -25
  160. django_cfg/templates/admin_old/snippets/components/recent_users_table.html +0 -102
  161. django_cfg/templates/admin_old/snippets/components/stats_cards.html +0 -4
  162. django_cfg/templates/admin_old/snippets/components/stats_tiles.html +0 -92
  163. django_cfg/templates/admin_old/snippets/components/system_health.html +0 -22
  164. django_cfg/templates/admin_old/snippets/components/system_metrics.html +0 -199
  165. django_cfg/templates/admin_old/snippets/components/user_permissions.html +0 -57
  166. django_cfg/templates/admin_old/snippets/tabs/app_stats_tab.html +0 -201
  167. django_cfg/templates/admin_old/snippets/tabs/commands_tab.html +0 -114
  168. django_cfg/templates/admin_old/snippets/tabs/documentation_tab.html +0 -42
  169. django_cfg/templates/admin_old/snippets/tabs/overview_tab.html +0 -116
  170. django_cfg/templates/admin_old/snippets/tabs/stats_tab.html +0 -89
  171. django_cfg/templates/admin_old/snippets/tabs/users_tab.html +0 -51
  172. django_cfg/templates/admin_old/snippets/tabs/widgets_tab.html +0 -38
  173. django_cfg/templates/admin_old/snippets/zones/zones_table.html +0 -176
  174. /django_cfg/static/frontend/admin/_next/static/{ZJZBgOL9mO1koHrgaaLEV → 0sN9ktsgXH48ygtGSrhfu}/_ssgManifest.js +0 -0
  175. {django_cfg-1.4.87.dist-info → django_cfg-1.4.89.dist-info}/WHEEL +0 -0
  176. {django_cfg-1.4.87.dist-info → django_cfg-1.4.89.dist-info}/entry_points.txt +0 -0
  177. {django_cfg-1.4.87.dist-info → django_cfg-1.4.89.dist-info}/licenses/LICENSE +0 -0
@@ -1,156 +0,0 @@
1
- {% load unfold %}
2
-
3
- <!--
4
- Component Class Example Template
5
-
6
- This demonstrates using Unfold's Component Class system with @register_component.
7
- This is an ALTERNATIVE approach to the section-based architecture.
8
-
9
- Benefits:
10
- - Templates specify which component to use
11
- - Components handle their own data fetching
12
- - More self-contained and reusable
13
-
14
- Usage:
15
- - Add to UNFOLD settings: custom page or tab
16
- - Components automatically fetch data when rendered
17
- -->
18
-
19
- <div class="space-y-8">
20
- <!-- System Metrics using Component Class -->
21
- <div>
22
- <h2 class="text-xl font-semibold mb-4">System Metrics (Component Class)</h2>
23
-
24
- <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
25
- <!-- Database Metric -->
26
- {% component "unfold/components/card.html" with title="Database" component_class="SystemMetricsComponent" %}
27
- {% if data.database %}
28
- {% component "unfold/components/progress.html" with
29
- value=data.database.value
30
- title=data.database.title
31
- description=data.database.description %}
32
- {% endcomponent %}
33
- {% endif %}
34
- {% endcomponent %}
35
-
36
- <!-- Cache Metric -->
37
- {% component "unfold/components/card.html" with title="Cache" component_class="SystemMetricsComponent" %}
38
- {% if data.cache %}
39
- {% component "unfold/components/progress.html" with
40
- value=data.cache.value
41
- title=data.cache.title
42
- description=data.cache.description %}
43
- {% endcomponent %}
44
- {% endif %}
45
- {% endcomponent %}
46
-
47
- <!-- Storage Metric -->
48
- {% component "unfold/components/card.html" with title="Storage" component_class="SystemMetricsComponent" %}
49
- {% if data.storage %}
50
- {% component "unfold/components/progress.html" with
51
- value=data.storage.value
52
- title=data.storage.title
53
- description=data.storage.description %}
54
- {% endcomponent %}
55
- {% endif %}
56
- {% endcomponent %}
57
-
58
- <!-- API Metric -->
59
- {% component "unfold/components/card.html" with title="API" component_class="SystemMetricsComponent" %}
60
- {% if data.api %}
61
- {% component "unfold/components/progress.html" with
62
- value=data.api.value
63
- title=data.api.title
64
- description=data.api.description %}
65
- {% endcomponent %}
66
- {% endif %}
67
- {% endcomponent %}
68
- </div>
69
- </div>
70
-
71
- <!-- Recent Users using Component Class -->
72
- <div>
73
- <h2 class="text-xl font-semibold mb-4">Recent Users (Component Class)</h2>
74
-
75
- {% component "unfold/components/card.html" with title="Latest Registrations" component_class="RecentUsersComponent" %}
76
- {% if data.rows %}
77
- {% component "unfold/components/table.html" with
78
- table=data
79
- striped=1
80
- height=400 %}
81
- {% endcomponent %}
82
- {% else %}
83
- <p class="text-font-subtle-light dark:text-font-subtle-dark">No users yet</p>
84
- {% endif %}
85
- {% endcomponent %}
86
- </div>
87
-
88
- <!-- Charts using Component Class -->
89
- <div>
90
- <h2 class="text-xl font-semibold mb-4">Analytics (Component Class)</h2>
91
-
92
- <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
93
- <!-- User Registrations Chart -->
94
- {% component "unfold/components/card.html" with title="User Registrations" component_class="ChartsComponent" days=7 %}
95
- {% if data.registrations %}
96
- {% component "unfold/components/chart/line.html" with
97
- data=data.registrations
98
- height=300 %}
99
- {% endcomponent %}
100
- {% else %}
101
- <p class="text-font-subtle-light dark:text-font-subtle-dark">No data available</p>
102
- {% endif %}
103
- {% endcomponent %}
104
-
105
- <!-- User Activity Chart -->
106
- {% component "unfold/components/card.html" with title="User Activity" component_class="ChartsComponent" days=7 %}
107
- {% if data.activity %}
108
- {% component "unfold/components/chart/bar.html" with
109
- data=data.activity
110
- height=300 %}
111
- {% endcomponent %}
112
- {% else %}
113
- <p class="text-font-subtle-light dark:text-font-subtle-dark">No data available</p>
114
- {% endif %}
115
- {% endcomponent %}
116
- </div>
117
- </div>
118
-
119
- <!-- Activity Tracker using Component Class -->
120
- <div>
121
- <h2 class="text-xl font-semibold mb-4">Activity Tracker (Component Class)</h2>
122
-
123
- {% component "unfold/components/card.html" with title="365 Day Heatmap" component_class="ActivityTrackerComponent" %}
124
- {% if data %}
125
- {% component "unfold/components/tracker.html" with data=data %}
126
- {% endcomponent %}
127
- {% else %}
128
- <p class="text-font-subtle-light dark:text-font-subtle-dark">No activity data</p>
129
- {% endif %}
130
- {% endcomponent %}
131
- </div>
132
- </div>
133
-
134
- <!--
135
- How Component Classes Work:
136
-
137
- 1. Template specifies: component_class="SystemMetricsComponent"
138
- 2. Unfold finds registered component by name
139
- 3. Component's get_context_data() is called
140
- 4. Data is fetched and returned
141
- 5. Template receives data and renders
142
-
143
- Comparison with Section-Based Approach:
144
-
145
- Section-Based (current):
146
- - Section class prepares all data
147
- - Template receives pre-processed data
148
- - Single render call for entire section
149
-
150
- Component Classes:
151
- - Each component fetches its own data
152
- - More granular, reusable components
153
- - Multiple component renders per page
154
-
155
- Both approaches are valid - choose based on needs!
156
- -->
@@ -1,24 +0,0 @@
1
- {% extends "admin/change_list.html" %}
2
- {% load admin_urls i18n %}
3
-
4
- {% block object-tools %}
5
- {# Export only button #}
6
- <div class="ml-2 flex flex-row items-center gap-2">
7
- {% if has_export_permission %}
8
- <a href="{% url opts|admin_urlname:'export' %}{{ cl.get_query_string }}"
9
- class="bg-white border border-base-200 cursor-pointer flex font-medium gap-2 items-center px-3 py-2 rounded-default shadow-xs text-sm hover:text-primary-600 dark:bg-base-900 dark:border-base-700 dark:hover:text-primary-500">
10
- <span class="material-symbols-outlined">download</span>
11
- {% trans "Export" %}
12
- </a>
13
- {% endif %}
14
-
15
- {# Add button and other standard tools #}
16
- {% if has_add_permission %}
17
- <a href="{% url cl.opts|admin_urlname:'add' %}{% if is_popup %}?{{ popup_var }}=1{% endif %}"
18
- class="addlink bg-primary-600 flex items-center h-9 justify-center -my-1 rounded-full w-9"
19
- title="{% blocktrans with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktrans %}">
20
- <span class="material-symbols-outlined text-white">add</span>
21
- </a>
22
- {% endif %}
23
- </div>
24
- {% endblock %}
@@ -1,24 +0,0 @@
1
- {% extends "admin/change_list.html" %}
2
- {% load admin_urls i18n %}
3
-
4
- {% block object-tools %}
5
- {# Import only button #}
6
- <div class="ml-2 flex flex-row items-center gap-2">
7
- {% if has_import_permission %}
8
- <a href="{% url opts|admin_urlname:"import" %}"
9
- class="bg-white border border-base-200 cursor-pointer flex font-medium gap-2 items-center px-3 py-2 rounded-default shadow-xs text-sm hover:text-primary-600 dark:bg-base-900 dark:border-base-700 dark:hover:text-primary-500">
10
- <span class="material-symbols-outlined">upload</span>
11
- {% trans "Import" %}
12
- </a>
13
- {% endif %}
14
-
15
- {# Add button and other standard tools #}
16
- {% if has_add_permission %}
17
- <a href="{% url cl.opts|admin_urlname:'add' %}{% if is_popup %}?{{ popup_var }}=1{% endif %}"
18
- class="addlink bg-primary-600 flex items-center h-9 justify-center -my-1 rounded-full w-9"
19
- title="{% blocktrans with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktrans %}">
20
- <span class="material-symbols-outlined text-white">add</span>
21
- </a>
22
- {% endif %}
23
- </div>
24
- {% endblock %}
@@ -1,34 +0,0 @@
1
- {% extends "admin/change_list.html" %}
2
- {% load admin_urls i18n %}
3
-
4
- {% block object-tools %}
5
- {# Override object-tools to integrate import/export buttons into unfold header #}
6
- <div class="ml-2 flex flex-row items-center gap-2">
7
- {# Import button #}
8
- {% if has_import_permission %}
9
- <a href="{% url opts|admin_urlname:"import" %}"
10
- class="bg-white border border-base-200 cursor-pointer flex font-medium gap-2 items-center px-3 py-2 rounded-default shadow-xs text-sm hover:text-primary-600 dark:bg-base-900 dark:border-base-700 dark:hover:text-primary-500">
11
- <span class="material-symbols-outlined">upload</span>
12
- {% trans "Import" %}
13
- </a>
14
- {% endif %}
15
-
16
- {# Export button #}
17
- {% if has_export_permission %}
18
- <a href="{% url opts|admin_urlname:'export' %}{{ cl.get_query_string }}"
19
- class="bg-white border border-base-200 cursor-pointer flex font-medium gap-2 items-center px-3 py-2 rounded-default shadow-xs text-sm hover:text-primary-600 dark:bg-base-900 dark:border-base-700 dark:hover:text-primary-500">
20
- <span class="material-symbols-outlined">download</span>
21
- {% trans "Export" %}
22
- </a>
23
- {% endif %}
24
-
25
- {# Add button and other standard tools #}
26
- {% if has_add_permission %}
27
- <a href="{% url cl.opts|admin_urlname:'add' %}{% if is_popup %}?{{ popup_var }}=1{% endif %}"
28
- class="addlink bg-primary-600 flex items-center h-9 justify-center -my-1 rounded-full w-9"
29
- title="{% blocktrans with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktrans %}">
30
- <span class="material-symbols-outlined text-white">add</span>
31
- </a>
32
- {% endif %}
33
- </div>
34
- {% endblock %}
@@ -1,80 +0,0 @@
1
- {% extends 'admin/layouts/dashboard_with_tabs.html' %}
2
-
3
- {% load unfold %}
4
-
5
- {% block overview_tab %}
6
- {% if overview_section %}
7
- {{ overview_section|safe }}
8
- {% else %}
9
- {% include 'admin/snippets/tabs/overview_tab.html' %}
10
- {% endif %}
11
- {% endblock %}
12
-
13
- {% block zones_tab %}
14
- {% if zones_section %}
15
- {{ zones_section|safe }}
16
- {% else %}
17
- {% include 'admin/snippets/zones/zones_table.html' %}
18
- {% endif %}
19
- {% endblock %}
20
-
21
- {% block users_tab %}
22
- {% if users_section %}
23
- {{ users_section|safe }}
24
- {% else %}
25
- {% include 'admin/snippets/tabs/users_tab.html' %}
26
- {% endif %}
27
- {% endblock %}
28
-
29
- {% block system_tab %}
30
- {% if system_section %}
31
- {{ system_section|safe }}
32
- {% else %}
33
- <div class="space-y-8">
34
- <h2 class="text-xl font-semibold text-font-important-light dark:text-font-important-dark mb-4">
35
- System Management
36
- </h2>
37
-
38
- <!-- System Health -->
39
- {% include 'admin/snippets/components/system_health.html' %}
40
-
41
- <!-- System Metrics -->
42
- {% include 'admin/snippets/components/system_metrics.html' %}
43
-
44
- <!-- Activity Tracker -->
45
- {% include 'admin/snippets/components/activity_tracker.html' %}
46
- </div>
47
- {% endif %}
48
- {% endblock %}
49
-
50
- {% block stats_tab %}
51
- {% if stats_section %}
52
- {{ stats_section|safe }}
53
- {% else %}
54
- {% include 'admin/snippets/tabs/stats_tab.html' %}
55
- {% endif %}
56
- {% endblock %}
57
-
58
- {% block app_stats_tab %}
59
- {% if app_stats_section %}
60
- {{ app_stats_section|safe }}
61
- {% else %}
62
- {% include 'admin/snippets/tabs/app_stats_tab.html' with stats_groups=stats_groups %}
63
- {% endif %}
64
- {% endblock %}
65
-
66
- {% block commands_tab %}
67
- {% if commands_section %}
68
- {{ commands_section|safe }}
69
- {% else %}
70
- {% include 'admin/snippets/tabs/commands_tab.html' %}
71
- {% endif %}
72
- {% endblock %}
73
-
74
- {% block widgets_tab %}
75
- {% if widgets_section %}
76
- {{ widgets_section|safe }}
77
- {% else %}
78
- {% include 'admin/snippets/tabs/widgets_tab.html' %}
79
- {% endif %}
80
- {% endblock %}
@@ -1,119 +0,0 @@
1
- {% extends 'admin/layouts/base_dashboard.html' %}
2
-
3
- {% load unfold %}
4
-
5
- {% block tabs %}
6
- <button type="button" data-tab="0" class="px-4 py-3 rounded-t-lg focus:outline-none font-semibold active">
7
- <span class="material-icons mr-2 align-middle text-sm">dashboard</span>
8
- Overview
9
- </button>
10
- <button type="button" data-tab="1" class="px-4 py-3 rounded-t-lg focus:outline-none">
11
- <span class="material-icons mr-2 align-middle text-sm">public</span>
12
- API Zones
13
- </button>
14
- <button type="button" data-tab="2" class="px-4 py-3 rounded-t-lg focus:outline-none">
15
- <span class="material-icons mr-2 align-middle text-sm">people</span>
16
- Users
17
- </button>
18
- <button type="button" data-tab="3" class="px-4 py-3 rounded-t-lg focus:outline-none">
19
- <span class="material-icons mr-2 align-middle text-sm">settings</span>
20
- System
21
- </button>
22
- <button type="button" data-tab="4" class="px-4 py-3 rounded-t-lg focus:outline-none">
23
- <span class="material-icons mr-2 align-middle text-sm">analytics</span>
24
- Statistics
25
- </button>
26
- <button type="button" data-tab="5" class="px-4 py-3 rounded-t-lg focus:outline-none">
27
- <span class="material-icons mr-2 align-middle text-sm">apps</span>
28
- App Stats
29
- </button>
30
- <button type="button" data-tab="6" class="px-4 py-3 rounded-t-lg focus:outline-none">
31
- <span class="material-icons mr-2 align-middle text-sm">terminal</span>
32
- Commands
33
- </button>
34
- <button type="button" data-tab="7" class="px-4 py-3 rounded-t-lg focus:outline-none">
35
- <span class="material-icons mr-2 align-middle text-sm">description</span>
36
- Documentation
37
- </button>
38
- {% endblock %}
39
-
40
- {% block tab_content %}
41
- <!-- Overview Tab -->
42
- <div class="tab-content active" data-tab="0">
43
- {% if overview_section %}
44
- {{ overview_section|safe }}
45
- {% else %}
46
- {% include 'admin/snippets/tabs/overview_tab.html' %}
47
- {% endif %}
48
- </div>
49
-
50
- <!-- Zones Tab -->
51
- <div class="tab-content" data-tab="1">
52
- {% if zones_section %}
53
- {{ zones_section|safe }}
54
- {% else %}
55
- {% include 'admin/snippets/zones/zones_table.html' %}
56
- {% endif %}
57
- </div>
58
-
59
- <!-- Users Tab -->
60
- <div class="tab-content" data-tab="2">
61
- {% if users_section %}
62
- {{ users_section|safe }}
63
- {% else %}
64
- {% include 'admin/snippets/tabs/users_tab.html' %}
65
- {% endif %}
66
- </div>
67
-
68
- <!-- System Tab -->
69
- <div class="tab-content" data-tab="3">
70
- {% if system_section %}
71
- {{ system_section|safe }}
72
- {% else %}
73
- <div class="space-y-8">
74
- <h2 class="text-xl font-semibold text-font-important-light dark:text-font-important-dark mb-4">
75
- System Management
76
- </h2>
77
- {% include 'admin/snippets/components/system_health.html' %}
78
- {% include 'admin/snippets/components/system_metrics.html' %}
79
- {% include 'admin/snippets/components/activity_tracker.html' %}
80
- </div>
81
- {% endif %}
82
- </div>
83
-
84
- <!-- Stats Tab -->
85
- <div class="tab-content" data-tab="4">
86
- {% if stats_section %}
87
- {{ stats_section|safe }}
88
- {% else %}
89
- {% include 'admin/snippets/tabs/stats_tab.html' %}
90
- {% endif %}
91
- </div>
92
-
93
- <!-- App Stats Tab -->
94
- <div class="tab-content" data-tab="5">
95
- {% if app_stats_section %}
96
- {{ app_stats_section|safe }}
97
- {% else %}
98
- {% include 'admin/snippets/tabs/app_stats_tab.html' with stats_groups=stats_groups %}
99
- {% endif %}
100
- </div>
101
-
102
- <!-- Commands Tab -->
103
- <div class="tab-content" data-tab="6">
104
- {% if commands_section %}
105
- {{ commands_section|safe }}
106
- {% else %}
107
- {% include 'admin/snippets/tabs/commands_tab.html' %}
108
- {% endif %}
109
- </div>
110
-
111
- <!-- Documentation Tab -->
112
- <div class="tab-content" data-tab="7">
113
- {% if documentation_section %}
114
- {{ documentation_section|safe }}
115
- {% else %}
116
- {% include 'admin/snippets/tabs/documentation_tab.html' %}
117
- {% endif %}
118
- </div>
119
- {% endblock %}
@@ -1,62 +0,0 @@
1
- {% extends 'admin/base.html' %}
2
-
3
- {% load static %}
4
- {% load unfold %}
5
-
6
- {% block extrahead %}
7
- {{ block.super }}
8
- <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
9
- <link rel="stylesheet" href="{% static 'admin/css/dashboard.css' %}">
10
- {% endblock %}
11
-
12
- {% block breadcrumbs %}{% endblock %}
13
-
14
- {% block title %}
15
- {% if subtitle %}{{ subtitle }} | {% endif %}
16
- {{ title }} | {{ site_title|default:'Django site admin' }}
17
- {% endblock %}
18
-
19
- {% block branding %}
20
- {% include "unfold/helpers/site_branding.html" %}
21
- {% endblock %}
22
-
23
- {% block content %}
24
- <!-- Main Container -->
25
- {% component "unfold/components/container.html" %}
26
- <!-- Tab Navigation -->
27
- {% block tab_navigation %}
28
- <div class="flex gap-1 mb-6" id="dashboard-tabs">
29
- {% block tabs %}{% endblock %}
30
- </div>
31
- {% endblock %}
32
-
33
- <!-- Tab Content -->
34
- <div class="flex flex-col gap-5">
35
- {% block tab_content %}{% endblock %}
36
- </div>
37
-
38
- <!-- Footer -->
39
- {% block dashboard_footer %}
40
- <div class="text-center py-8 border-t theme-border mt-5">
41
- <p class="text-sm text-gray-500 dark:text-gray-400">
42
- {% load django_cfg %}
43
- <a href="{% lib_site_url %}" class="text-blue-600 hover:text-blue-700 font-medium">
44
- {% lib_name %}
45
- </a>
46
- <span class="mx-2">•</span>
47
- <a href="{% lib_health_url %}" class="text-blue-600 hover:text-blue-700">
48
- System Health
49
- </a>
50
- </p>
51
- </div>
52
- {% endblock %}
53
- {% endcomponent %}
54
- {% endblock %}
55
-
56
- {% block footer %}
57
- {{ block.super }}
58
-
59
- <!-- Utils.js is loaded in dashboard_with_tabs.html extrahead -->
60
- <!-- All legacy Vanilla JS files have been migrated to Alpine.js components -->
61
- <!-- Old files removed: dashboard.js, commands.js -->
62
- {% endblock %}
@@ -1,176 +0,0 @@
1
- {% extends 'admin/base.html' %}
2
-
3
- {% load unfold %}
4
-
5
- {% block extrahead %}
6
- {{ block.super }}
7
- <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
8
- <!-- Removed Tailwind CDN - using CSS-only solution -->
9
-
10
- <!-- Alpine.js Components - Load before Alpine.js -->
11
- {% load static %}
12
- <script src="{% static 'admin/js/utils.js' %}"></script>
13
- <script src="{% static 'admin/js/alpine/dashboard-tabs.js' %}"></script>
14
-
15
- <!-- Note: Alpine.js and its plugins are already loaded by Unfold's skeleton.html -->
16
- <!-- Removed duplicate Alpine.js CDN loading to prevent conflicts with Unfold's Alpine instance -->
17
-
18
- <!-- Admin Styles -->
19
- <link rel="stylesheet" href="{% static 'admin/css/layout.css' %}">
20
- <link rel="stylesheet" href="{% static 'admin/css/theme.css' %}">
21
- <link rel="stylesheet" href="{% static 'admin/css/tabs.css' %}">
22
-
23
- <!-- JavaScript Component Notes:
24
- - Dashboard tabs functionality: dashboard-tabs.js Alpine component
25
- - Toggle category functionality: commands-panel.js Alpine component
26
- - Command execution: command-modal.js Alpine component
27
- - copyToClipboard and getCookie: dashboard.js (loaded in base_dashboard.html)
28
- -->
29
- {% endblock %}
30
-
31
- {% block breadcrumbs %}{% endblock %}
32
-
33
- {% block title %}
34
- {% if subtitle %}
35
- {{ subtitle }} |
36
- {% endif %}
37
- {{ title }} | {{ site_title|default:'Django site admin' }}
38
- {% endblock %}
39
-
40
- {% block branding %}
41
- {% include "unfold/helpers/site_branding.html" %}
42
- {% endblock %}
43
-
44
- {% block content %}
45
- <!-- Main Dashboard Container -->
46
- {% component "unfold/components/container.html" %}
47
- <div x-data="dashboardTabs">
48
- <!-- Tabs Navigation -->
49
- <div class="flex gap-1 mb-4" id="dashboard-tabs">
50
- <button
51
- type="button"
52
- @click="switchTab(0)"
53
- :class="isActive(0) ? 'active' : ''"
54
- class="px-4 py-3 rounded-t-lg focus:outline-none font-semibold"
55
- >
56
- <span class="material-icons mr-2 align-middle text-sm">dashboard</span>
57
- Overview
58
- </button>
59
- <button
60
- type="button"
61
- @click="switchTab(1)"
62
- :class="isActive(1) ? 'active' : ''"
63
- class="px-4 py-3 rounded-t-lg focus:outline-none"
64
- >
65
- <span class="material-icons mr-2 align-middle text-sm">public</span>
66
- API Zones
67
- </button>
68
- <button
69
- type="button"
70
- @click="switchTab(2)"
71
- :class="isActive(2) ? 'active' : ''"
72
- class="px-4 py-3 rounded-t-lg focus:outline-none"
73
- >
74
- <span class="material-icons mr-2 align-middle text-sm">people</span>
75
- Users
76
- </button>
77
- <button
78
- type="button"
79
- @click="switchTab(3)"
80
- :class="isActive(3) ? 'active' : ''"
81
- class="px-4 py-3 rounded-t-lg focus:outline-none"
82
- >
83
- <span class="material-icons mr-2 align-middle text-sm">settings</span>
84
- System
85
- </button>
86
- <button
87
- type="button"
88
- @click="switchTab(4)"
89
- :class="isActive(4) ? 'active' : ''"
90
- class="px-4 py-3 rounded-t-lg focus:outline-none"
91
- >
92
- <span class="material-icons mr-2 align-middle text-sm">analytics</span>
93
- Statistics
94
- </button>
95
- <button
96
- type="button"
97
- @click="switchTab(5)"
98
- :class="isActive(5) ? 'active' : ''"
99
- class="px-4 py-3 rounded-t-lg focus:outline-none"
100
- >
101
- <span class="material-icons mr-2 align-middle text-sm">apps</span>
102
- App Stats
103
- </button>
104
- <button
105
- type="button"
106
- @click="switchTab(6)"
107
- :class="isActive(6) ? 'active' : ''"
108
- class="px-4 py-3 rounded-t-lg focus:outline-none"
109
- >
110
- <span class="material-icons mr-2 align-middle text-sm">terminal</span>
111
- Commands
112
- </button>
113
- <button
114
- type="button"
115
- @click="switchTab(7)"
116
- :class="isActive(7) ? 'active' : ''"
117
- class="px-4 py-3 rounded-t-lg focus:outline-none"
118
- >
119
- <span class="material-icons mr-2 align-middle text-sm">widgets</span>
120
- Widgets
121
- </button>
122
- </div>
123
-
124
- <div class="flex flex-col gap-5">
125
-
126
- <!-- Tab Content with improved spacing -->
127
- <div class="tab-content" x-show="isActive(0)">
128
- {% block overview_tab %}{% endblock %}
129
- </div>
130
-
131
- <div class="tab-content" x-show="isActive(1)">
132
- {% block zones_tab %}{% endblock %}
133
- </div>
134
-
135
- <div class="tab-content" x-show="isActive(2)">
136
- {% block users_tab %}{% endblock %}
137
- </div>
138
-
139
- <div class="tab-content" x-show="isActive(3)">
140
- {% block system_tab %}{% endblock %}
141
- </div>
142
-
143
- <div class="tab-content" x-show="isActive(4)">
144
- {% block stats_tab %}{% endblock %}
145
- </div>
146
-
147
- <div class="tab-content" x-show="isActive(5)">
148
- {% block app_stats_tab %}{% endblock %}
149
- </div>
150
-
151
- <div class="tab-content" x-show="isActive(6)">
152
- {% block commands_tab %}{% endblock %}
153
- </div>
154
-
155
- <div class="tab-content" x-show="isActive(7)">
156
- {% block widgets_tab %}{% endblock %}
157
- </div>
158
- </div>
159
- </div>
160
-
161
- <!-- Footer Section -->
162
- <div class="text-center py-8 border-t theme-border mt-5">
163
- <p class="text-sm text-gray-500 dark:text-gray-400">
164
- {% load django_cfg %}
165
- <a href="{% lib_site_url %}" class="text-blue-600 hover:text-blue-700 font-medium">
166
- {% lib_name %}
167
- </a>
168
- <span class="mx-2">•</span>
169
- <a href="{% lib_health_url %}" class="text-blue-600 hover:text-blue-700">
170
- System Health
171
- </a>
172
- </p>
173
- </div>
174
-
175
- {% endcomponent %}
176
- {% endblock %}