django-cfg 1.4.58__py3-none-any.whl → 1.4.60__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/ipc/RPC_LOGGING.md +321 -0
- django_cfg/apps/ipc/TESTING.md +539 -0
- django_cfg/apps/ipc/__init__.py +12 -3
- django_cfg/apps/ipc/admin.py +212 -0
- django_cfg/apps/ipc/migrations/0001_initial.py +137 -0
- django_cfg/apps/ipc/migrations/__init__.py +0 -0
- django_cfg/apps/ipc/models.py +221 -0
- django_cfg/apps/ipc/serializers/__init__.py +10 -0
- django_cfg/apps/ipc/serializers/serializers.py +114 -0
- django_cfg/apps/ipc/services/client/client.py +83 -4
- django_cfg/apps/ipc/services/logging.py +239 -0
- django_cfg/apps/ipc/services/monitor.py +5 -3
- django_cfg/apps/ipc/static/django_cfg_ipc/js/dashboard/main.mjs +269 -0
- django_cfg/apps/ipc/static/django_cfg_ipc/js/dashboard/overview.mjs +259 -0
- django_cfg/apps/ipc/static/django_cfg_ipc/js/dashboard/testing.mjs +375 -0
- django_cfg/apps/ipc/templates/django_cfg_ipc/components/methods_content.html +22 -0
- django_cfg/apps/ipc/templates/django_cfg_ipc/components/notifications_content.html +9 -0
- django_cfg/apps/ipc/templates/django_cfg_ipc/components/overview_content.html +9 -0
- django_cfg/apps/ipc/templates/django_cfg_ipc/components/requests_content.html +23 -0
- django_cfg/apps/ipc/templates/django_cfg_ipc/components/stat_cards.html +50 -0
- django_cfg/apps/ipc/templates/django_cfg_ipc/components/system_status.html +47 -0
- django_cfg/apps/ipc/templates/django_cfg_ipc/components/tab_navigation.html +29 -0
- django_cfg/apps/ipc/templates/django_cfg_ipc/components/testing_tools.html +184 -0
- django_cfg/apps/ipc/templates/django_cfg_ipc/pages/dashboard.html +56 -0
- django_cfg/apps/ipc/urls.py +4 -2
- django_cfg/apps/ipc/views/__init__.py +7 -2
- django_cfg/apps/ipc/views/dashboard.py +1 -1
- django_cfg/apps/ipc/views/{viewsets.py → monitoring.py} +17 -11
- django_cfg/apps/ipc/views/testing.py +285 -0
- django_cfg/core/backends/__init__.py +1 -0
- django_cfg/core/backends/smtp.py +69 -0
- django_cfg/middleware/authentication.py +157 -0
- django_cfg/models/api/drf/config.py +2 -2
- django_cfg/models/services/email.py +11 -1
- django_cfg/modules/django_client/system/generate_mjs_clients.py +1 -1
- django_cfg/modules/django_dashboard/sections/widgets.py +209 -0
- django_cfg/modules/django_unfold/callbacks/main.py +43 -18
- django_cfg/modules/django_unfold/dashboard.py +41 -4
- django_cfg/pyproject.toml +1 -1
- django_cfg/static/js/api/index.mjs +8 -3
- django_cfg/static/js/api/ipc/client.mjs +40 -0
- django_cfg/static/js/api/knowbase/client.mjs +309 -0
- django_cfg/static/js/api/knowbase/index.mjs +13 -0
- django_cfg/static/js/api/payments/client.mjs +46 -1215
- django_cfg/static/js/api/types.mjs +164 -337
- django_cfg/templates/admin/index.html +8 -0
- django_cfg/templates/admin/layouts/dashboard_with_tabs.html +13 -1
- django_cfg/templates/admin/sections/widgets_section.html +129 -0
- django_cfg/templates/admin/snippets/tabs/widgets_tab.html +38 -0
- django_cfg/utils/smart_defaults.py +1 -1
- {django_cfg-1.4.58.dist-info → django_cfg-1.4.60.dist-info}/METADATA +1 -1
- {django_cfg-1.4.58.dist-info → django_cfg-1.4.60.dist-info}/RECORD +58 -31
- django_cfg/apps/ipc/templates/django_cfg_ipc/dashboard.html +0 -202
- /django_cfg/apps/ipc/static/django_cfg_ipc/js/{dashboard.mjs → dashboard.mjs.old} +0 -0
- /django_cfg/apps/ipc/templates/django_cfg_ipc/{base.html → layout/base.html} +0 -0
- {django_cfg-1.4.58.dist-info → django_cfg-1.4.60.dist-info}/WHEEL +0 -0
- {django_cfg-1.4.58.dist-info → django_cfg-1.4.60.dist-info}/entry_points.txt +0 -0
- {django_cfg-1.4.58.dist-info → django_cfg-1.4.60.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
{% extends 'django_cfg_ipc/base.html' %}
|
|
2
|
-
{% load static %}
|
|
3
|
-
|
|
4
|
-
{% block title %}Dashboard{% endblock %}
|
|
5
|
-
|
|
6
|
-
{% block content %}
|
|
7
|
-
<!-- Overview Stats Cards -->
|
|
8
|
-
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
|
|
9
|
-
<!-- Total Requests -->
|
|
10
|
-
<div class="stat-card bg-white dark:bg-gray-800 rounded-lg p-6 border border-gray-200 dark:border-gray-700">
|
|
11
|
-
<div class="flex items-center justify-between mb-4">
|
|
12
|
-
<span class="material-icons text-4xl text-blue-500 dark:text-blue-400">bar_chart</span>
|
|
13
|
-
<span class="text-xs text-gray-600 dark:text-gray-400">Today</span>
|
|
14
|
-
</div>
|
|
15
|
-
<h3 class="text-2xl font-bold text-gray-900 dark:text-white mb-1" id="total-requests">
|
|
16
|
-
{{ overview_stats.total_requests_today|default:"0" }}
|
|
17
|
-
</h3>
|
|
18
|
-
<p class="text-sm text-gray-600 dark:text-gray-400">Total Requests</p>
|
|
19
|
-
</div>
|
|
20
|
-
|
|
21
|
-
<!-- Active Methods -->
|
|
22
|
-
<div class="stat-card bg-white dark:bg-gray-800 rounded-lg p-6 border border-gray-200 dark:border-gray-700">
|
|
23
|
-
<div class="flex items-center justify-between mb-4">
|
|
24
|
-
<span class="material-icons text-4xl text-green-500 dark:text-green-400">functions</span>
|
|
25
|
-
<span class="text-xs text-gray-600 dark:text-gray-400">Active</span>
|
|
26
|
-
</div>
|
|
27
|
-
<h3 class="text-2xl font-bold text-gray-900 dark:text-white mb-1" id="active-methods-count">
|
|
28
|
-
{{ overview_stats.active_methods|length|default:"0" }}
|
|
29
|
-
</h3>
|
|
30
|
-
<p class="text-sm text-gray-600 dark:text-gray-400">Active Methods</p>
|
|
31
|
-
</div>
|
|
32
|
-
|
|
33
|
-
<!-- Avg Response Time -->
|
|
34
|
-
<div class="stat-card bg-white dark:bg-gray-800 rounded-lg p-6 border border-gray-200 dark:border-gray-700">
|
|
35
|
-
<div class="flex items-center justify-between mb-4">
|
|
36
|
-
<span class="material-icons text-4xl text-yellow-500 dark:text-yellow-400">timer</span>
|
|
37
|
-
<span class="text-xs text-gray-600 dark:text-gray-400">Average</span>
|
|
38
|
-
</div>
|
|
39
|
-
<h3 class="text-2xl font-bold text-gray-900 dark:text-white mb-1" id="avg-response-time">
|
|
40
|
-
{{ overview_stats.avg_response_time_ms|default:"0" }}<span class="text-lg text-gray-600 dark:text-gray-400">ms</span>
|
|
41
|
-
</h3>
|
|
42
|
-
<p class="text-sm text-gray-600 dark:text-gray-400">Response Time</p>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
<!-- Success Rate -->
|
|
46
|
-
<div class="stat-card bg-white dark:bg-gray-800 rounded-lg p-6 border border-gray-200 dark:border-gray-700">
|
|
47
|
-
<div class="flex items-center justify-between mb-4">
|
|
48
|
-
<span class="material-icons text-4xl text-purple-500 dark:text-purple-400">check_circle</span>
|
|
49
|
-
<span class="text-xs text-gray-600 dark:text-gray-400">Rate</span>
|
|
50
|
-
</div>
|
|
51
|
-
<h3 class="text-2xl font-bold text-gray-900 dark:text-white mb-1" id="success-rate">
|
|
52
|
-
{{ overview_stats.success_rate|default:"0" }}<span class="text-lg text-gray-600 dark:text-gray-400">%</span>
|
|
53
|
-
</h3>
|
|
54
|
-
<p class="text-sm text-gray-600 dark:text-gray-400">Success Rate</p>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
|
|
58
|
-
<!-- System Status -->
|
|
59
|
-
<div class="bg-white dark:bg-gray-800 rounded-lg p-6 border border-gray-200 dark:border-gray-700 mb-8">
|
|
60
|
-
<h2 class="text-xl font-bold text-gray-900 dark:text-white mb-4 flex items-center">
|
|
61
|
-
<span class="material-icons mr-2">health_and_safety</span>
|
|
62
|
-
System Status
|
|
63
|
-
</h2>
|
|
64
|
-
<div id="system-status" class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
65
|
-
<!-- Redis Status -->
|
|
66
|
-
<div class="flex items-start gap-3">
|
|
67
|
-
<span class="material-icons flex-shrink-0 text-2xl {% if health.redis_connected %}text-green-500{% else %}text-red-500{% endif %}">
|
|
68
|
-
{% if health.redis_connected %}check_circle{% else %}cancel{% endif %}
|
|
69
|
-
</span>
|
|
70
|
-
<div class="min-w-0">
|
|
71
|
-
<p class="text-sm font-medium text-gray-900 dark:text-white">Redis</p>
|
|
72
|
-
<p class="text-xs text-gray-600 dark:text-gray-400">
|
|
73
|
-
{% if health.redis_connected %}Connected (DB 2){% else %}Disconnected{% endif %}
|
|
74
|
-
</p>
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
|
|
78
|
-
<!-- Stream Status -->
|
|
79
|
-
<div class="flex items-start gap-3">
|
|
80
|
-
<span class="material-icons flex-shrink-0 text-2xl {% if health.stream_exists %}text-green-500{% else %}text-gray-500{% endif %}">
|
|
81
|
-
{% if health.stream_exists %}stream{% else %}stream_off{% endif %}
|
|
82
|
-
</span>
|
|
83
|
-
<div class="min-w-0">
|
|
84
|
-
<p class="text-sm font-medium text-gray-900 dark:text-white">Request Stream</p>
|
|
85
|
-
<p class="text-xs text-gray-600 dark:text-gray-400">
|
|
86
|
-
{% if health.stream_exists %}{{ health.stream_length }} entries{% else %}Not initialized{% endif %}
|
|
87
|
-
</p>
|
|
88
|
-
</div>
|
|
89
|
-
</div>
|
|
90
|
-
|
|
91
|
-
<!-- Activity Status -->
|
|
92
|
-
<div class="flex items-start gap-3">
|
|
93
|
-
<span class="material-icons flex-shrink-0 text-2xl {% if health.recent_activity %}text-green-500{% else %}text-yellow-500{% endif %}">
|
|
94
|
-
{% if health.recent_activity %}notifications_active{% else %}notifications_paused{% endif %}
|
|
95
|
-
</span>
|
|
96
|
-
<div class="min-w-0">
|
|
97
|
-
<p class="text-sm font-medium text-gray-900 dark:text-white">Recent Activity</p>
|
|
98
|
-
<p class="text-xs text-gray-600 dark:text-gray-400">
|
|
99
|
-
{% if health.recent_activity %}Active (last 5 min){% else %}No recent activity{% endif %}
|
|
100
|
-
</p>
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|
|
103
|
-
</div>
|
|
104
|
-
</div>
|
|
105
|
-
|
|
106
|
-
<!-- Tabs Navigation -->
|
|
107
|
-
<div class="border-b border-gray-200 dark:border-gray-700 mb-6">
|
|
108
|
-
<nav class="flex space-x-4">
|
|
109
|
-
<button class="tab-button active px-4 py-2 text-blue-600 dark:text-blue-400 border-b-2 border-blue-600 dark:border-blue-400 font-medium" data-tab="overview">
|
|
110
|
-
Overview
|
|
111
|
-
</button>
|
|
112
|
-
<button class="tab-button px-4 py-2 text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-300 border-b-2 border-transparent font-medium" data-tab="requests">
|
|
113
|
-
Recent Requests
|
|
114
|
-
</button>
|
|
115
|
-
<button class="tab-button px-4 py-2 text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-300 border-b-2 border-transparent font-medium" data-tab="notifications">
|
|
116
|
-
Notifications
|
|
117
|
-
</button>
|
|
118
|
-
<button class="tab-button px-4 py-2 text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-300 border-b-2 border-transparent font-medium" data-tab="methods">
|
|
119
|
-
Methods
|
|
120
|
-
</button>
|
|
121
|
-
</nav>
|
|
122
|
-
</div>
|
|
123
|
-
|
|
124
|
-
<!-- Tab Content -->
|
|
125
|
-
<div class="tab-content">
|
|
126
|
-
<!-- Overview Tab (Active by default) -->
|
|
127
|
-
<div id="overview-tab" class="tab-panel">
|
|
128
|
-
<div class="bg-white dark:bg-gray-800 rounded-lg p-6 border border-gray-200 dark:border-gray-700">
|
|
129
|
-
<h3 class="text-lg font-bold text-gray-900 dark:text-white mb-4">Top Method</h3>
|
|
130
|
-
<p class="text-gray-700 dark:text-gray-300" id="top-method">
|
|
131
|
-
{% if overview_stats.top_method %}
|
|
132
|
-
<code class="bg-gray-100 dark:bg-gray-700 px-2 py-1 rounded text-blue-600 dark:text-blue-300">{{ overview_stats.top_method }}</code>
|
|
133
|
-
{% else %}
|
|
134
|
-
No data available
|
|
135
|
-
{% endif %}
|
|
136
|
-
</p>
|
|
137
|
-
</div>
|
|
138
|
-
</div>
|
|
139
|
-
|
|
140
|
-
<!-- Recent Requests Tab -->
|
|
141
|
-
<div id="requests-tab" class="tab-panel hidden">
|
|
142
|
-
<div class="bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 overflow-hidden">
|
|
143
|
-
<table class="w-full">
|
|
144
|
-
<thead class="bg-gray-50 dark:bg-gray-900">
|
|
145
|
-
<tr>
|
|
146
|
-
<th class="px-4 py-3 text-left text-xs font-medium text-gray-700 dark:text-gray-400 uppercase">Time</th>
|
|
147
|
-
<th class="px-4 py-3 text-left text-xs font-medium text-gray-700 dark:text-gray-400 uppercase">Method</th>
|
|
148
|
-
<th class="px-4 py-3 text-left text-xs font-medium text-gray-700 dark:text-gray-400 uppercase">Correlation ID</th>
|
|
149
|
-
<th class="px-4 py-3 text-left text-xs font-medium text-gray-700 dark:text-gray-400 uppercase">Params</th>
|
|
150
|
-
</tr>
|
|
151
|
-
</thead>
|
|
152
|
-
<tbody id="requests-table-body" class="divide-y divide-gray-200 dark:divide-gray-700">
|
|
153
|
-
<tr>
|
|
154
|
-
<td colspan="4" class="px-4 py-8 text-center text-gray-600 dark:text-gray-400">
|
|
155
|
-
Loading...
|
|
156
|
-
</td>
|
|
157
|
-
</tr>
|
|
158
|
-
</tbody>
|
|
159
|
-
</table>
|
|
160
|
-
</div>
|
|
161
|
-
</div>
|
|
162
|
-
|
|
163
|
-
<!-- Notifications Tab -->
|
|
164
|
-
<div id="notifications-tab" class="tab-panel hidden">
|
|
165
|
-
<div class="bg-white dark:bg-gray-800 rounded-lg p-6 border border-gray-200 dark:border-gray-700">
|
|
166
|
-
<h3 class="text-lg font-bold text-gray-900 dark:text-white mb-4">Notification Statistics</h3>
|
|
167
|
-
<div id="notification-stats-content">
|
|
168
|
-
<p class="text-gray-600 dark:text-gray-400">Loading...</p>
|
|
169
|
-
</div>
|
|
170
|
-
</div>
|
|
171
|
-
</div>
|
|
172
|
-
|
|
173
|
-
<!-- Methods Tab -->
|
|
174
|
-
<div id="methods-tab" class="tab-panel hidden">
|
|
175
|
-
<div class="bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 overflow-hidden">
|
|
176
|
-
<table class="w-full">
|
|
177
|
-
<thead class="bg-gray-50 dark:bg-gray-900">
|
|
178
|
-
<tr>
|
|
179
|
-
<th class="px-4 py-3 text-left text-xs font-medium text-gray-700 dark:text-gray-400 uppercase">Method</th>
|
|
180
|
-
<th class="px-4 py-3 text-left text-xs font-medium text-gray-700 dark:text-gray-400 uppercase">Count</th>
|
|
181
|
-
<th class="px-4 py-3 text-left text-xs font-medium text-gray-700 dark:text-gray-400 uppercase">Percentage</th>
|
|
182
|
-
<th class="px-4 py-3 text-left text-xs font-medium text-gray-700 dark:text-gray-400 uppercase">Avg Time</th>
|
|
183
|
-
</tr>
|
|
184
|
-
</thead>
|
|
185
|
-
<tbody id="methods-table-body" class="divide-y divide-gray-200 dark:divide-gray-700">
|
|
186
|
-
<tr>
|
|
187
|
-
<td colspan="4" class="px-4 py-8 text-center text-gray-600 dark:text-gray-400">
|
|
188
|
-
Loading...
|
|
189
|
-
</td>
|
|
190
|
-
</tr>
|
|
191
|
-
</tbody>
|
|
192
|
-
</table>
|
|
193
|
-
</div>
|
|
194
|
-
</div>
|
|
195
|
-
</div>
|
|
196
|
-
{% endblock %}
|
|
197
|
-
|
|
198
|
-
{% block extra_js %}
|
|
199
|
-
{% load i18n %}
|
|
200
|
-
{% now "U" as current_timestamp %}
|
|
201
|
-
<script type="module" src="{% static 'django_cfg_ipc/js/dashboard.mjs' %}?v={{ current_timestamp }}"></script>
|
|
202
|
-
{% endblock %}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|