keepup-admin 0.1.0__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.
Files changed (86) hide show
  1. keepup/THIRD-PARTY.md +44 -0
  2. keepup/__init__.py +41 -0
  3. keepup/api_versions.py +100 -0
  4. keepup/audit.py +499 -0
  5. keepup/auth/__init__.py +7 -0
  6. keepup/auth/config.py +128 -0
  7. keepup/auth/dependencies.py +485 -0
  8. keepup/auth/dto/__init__.py +0 -0
  9. keepup/auth/dto/token.py +31 -0
  10. keepup/auth/factory.py +28 -0
  11. keepup/auth/login_throttle.py +151 -0
  12. keepup/auth/oidc.py +245 -0
  13. keepup/auth/oidc_policy.py +111 -0
  14. keepup/auth/oidc_routes.py +288 -0
  15. keepup/auth/panel_session.py +220 -0
  16. keepup/auth/permissions.py +59 -0
  17. keepup/auth/providers/__init__.py +0 -0
  18. keepup/auth/providers/base.py +168 -0
  19. keepup/auth/providers/local.py +180 -0
  20. keepup/auth/routes.py +660 -0
  21. keepup/auth/seed_accounts.py +322 -0
  22. keepup/auth/session_lifetime.py +104 -0
  23. keepup/auth/signing_key.py +138 -0
  24. keepup/auth/websocket.py +86 -0
  25. keepup/cluster.py +634 -0
  26. keepup/db.py +663 -0
  27. keepup/events.py +764 -0
  28. keepup/factory.py +484 -0
  29. keepup/instance.py +46 -0
  30. keepup/integrations.py +260 -0
  31. keepup/locks.py +412 -0
  32. keepup/logging_setup.py +690 -0
  33. keepup/metrics.py +818 -0
  34. keepup/metrics_retention.py +376 -0
  35. keepup/modules.py +572 -0
  36. keepup/notification_bus.py +355 -0
  37. keepup/plugins/__init__.py +9 -0
  38. keepup/plugins/admin.py +246 -0
  39. keepup/plugins/base.py +234 -0
  40. keepup/plugins/enablement.py +184 -0
  41. keepup/plugins/registry.py +171 -0
  42. keepup/plugins/route_mask.py +338 -0
  43. keepup/plugins/routes.py +376 -0
  44. keepup/roles.py +17 -0
  45. keepup/scheduler.py +93 -0
  46. keepup/schema.py +295 -0
  47. keepup/sections.json +104 -0
  48. keepup/settings.py +184 -0
  49. keepup/static/css/aos.css +1 -0
  50. keepup/static/css/main_nebula.css +232 -0
  51. keepup/static/css/main_new.css +852 -0
  52. keepup/static/css/tailwind.css +1 -0
  53. keepup/static/index_nebula.html +293 -0
  54. keepup/static/index_new.html +286 -0
  55. keepup/static/js/aos.js +1 -0
  56. keepup/static/js/feather-icons.js +13 -0
  57. keepup/static/js/main_new.js +1861 -0
  58. keepup/static/js/tailwind.js +83 -0
  59. keepup/static/modules/css/background_tasks.css +233 -0
  60. keepup/static/modules/css/cluster.css +16 -0
  61. keepup/static/modules/css/event_manager.css +386 -0
  62. keepup/static/modules/css/integration_logs.css +33 -0
  63. keepup/static/modules/css/metrics.css +115 -0
  64. keepup/static/modules/css/modules.css +189 -0
  65. keepup/static/modules/css/themes.css +563 -0
  66. keepup/static/modules/css/users.css +278 -0
  67. keepup/static/modules/js/background_tasks.js +657 -0
  68. keepup/static/modules/js/chart.js +14 -0
  69. keepup/static/modules/js/chartjs-adapter-date-fns.bundle.min.js +7 -0
  70. keepup/static/modules/js/cluster.js +363 -0
  71. keepup/static/modules/js/event_manager.js +979 -0
  72. keepup/static/modules/js/integration_logs.js +767 -0
  73. keepup/static/modules/js/metrics.js +908 -0
  74. keepup/static/modules/js/modules.js +1086 -0
  75. keepup/static/modules/js/themes.js +653 -0
  76. keepup/static/modules/js/users.js +784 -0
  77. keepup/tables.py +302 -0
  78. keepup/themes.py +496 -0
  79. keepup/web.py +182 -0
  80. keepup_admin-0.1.0.dist-info/METADATA +117 -0
  81. keepup_admin-0.1.0.dist-info/RECORD +86 -0
  82. keepup_admin-0.1.0.dist-info/WHEEL +5 -0
  83. keepup_admin-0.1.0.dist-info/licenses/LICENSE +202 -0
  84. keepup_admin-0.1.0.dist-info/licenses/NOTICE +22 -0
  85. keepup_admin-0.1.0.dist-info/licenses/THIRD-PARTY.md +44 -0
  86. keepup_admin-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,563 @@
1
+ /* ============================================
2
+ The visual themes section
3
+ Visual Themes Management Module Styles
4
+ ============================================ */
5
+
6
+ /* ----------------------------
7
+ The themes section itself
8
+ ---------------------------- */
9
+ #themes-section {
10
+ animation: fadeIn 0.3s ease-in-out;
11
+ }
12
+
13
+ @keyframes fadeIn {
14
+ from {
15
+ opacity: 0;
16
+ transform: translateY(10px);
17
+ }
18
+ to {
19
+ opacity: 1;
20
+ transform: translateY(0);
21
+ }
22
+ }
23
+
24
+ /* ----------------------------
25
+ Theme cards
26
+ ---------------------------- */
27
+ .theme-item {
28
+ position: relative;
29
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
30
+ overflow: hidden;
31
+ }
32
+
33
+ .theme-item:hover {
34
+ transform: translateY(-4px);
35
+ box-shadow: 0 20px 25px -12px rgba(0, 0, 0, 0.15);
36
+ }
37
+
38
+ /* The active theme */
39
+ .theme-item.border-blue-400 {
40
+ border-width: 2px;
41
+ position: relative;
42
+ }
43
+
44
+ .theme-item.border-blue-400::before {
45
+ content: '';
46
+ position: absolute;
47
+ top: 0;
48
+ left: 0;
49
+ right: 0;
50
+ height: 4px;
51
+ background: linear-gradient(90deg, #3b82f6, #60a5fa, #3b82f6);
52
+ background-size: 200% 100%;
53
+ animation: gradientShift 2s ease infinite;
54
+ }
55
+
56
+ @keyframes gradientShift {
57
+ 0% {
58
+ background-position: 0% 50%;
59
+ }
60
+ 50% {
61
+ background-position: 100% 50%;
62
+ }
63
+ 100% {
64
+ background-position: 0% 50%;
65
+ }
66
+ }
67
+
68
+ /* ----------------------------
69
+ A theme's action buttons
70
+ ---------------------------- */
71
+ .theme-action-btn {
72
+ transition: all 0.2s ease;
73
+ position: relative;
74
+ overflow: hidden;
75
+ }
76
+
77
+ .theme-action-btn:active {
78
+ transform: scale(0.96);
79
+ }
80
+
81
+ .theme-action-btn::before {
82
+ content: '';
83
+ position: absolute;
84
+ top: 50%;
85
+ left: 50%;
86
+ width: 0;
87
+ height: 0;
88
+ border-radius: 50%;
89
+ background: rgba(255, 255, 255, 0.3);
90
+ transform: translate(-50%, -50%);
91
+ transition: width 0.6s, height 0.6s;
92
+ }
93
+
94
+ .theme-action-btn:active::before {
95
+ width: 200%;
96
+ height: 200%;
97
+ }
98
+
99
+ /* A colour per action */
100
+ .theme-action-btn.bg-green-600:hover {
101
+ background-color: #059669 !important;
102
+ box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
103
+ }
104
+
105
+ .theme-action-btn.bg-blue-600:hover {
106
+ background-color: #2563eb !important;
107
+ box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
108
+ }
109
+
110
+ .theme-action-btn.bg-red-600:hover {
111
+ background-color: #dc2626 !important;
112
+ box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
113
+ }
114
+
115
+ /* ----------------------------
116
+ The themes container (a grid)
117
+ ---------------------------- */
118
+ #themes-container {
119
+ display: grid;
120
+ gap: 1.5rem;
121
+ margin-top: 1rem;
122
+ }
123
+
124
+ /* Responsive grid */
125
+ @media (min-width: 640px) {
126
+ #themes-container {
127
+ grid-template-columns: repeat(1, 1fr);
128
+ }
129
+ }
130
+
131
+ @media (min-width: 768px) {
132
+ #themes-container {
133
+ grid-template-columns: repeat(2, 1fr);
134
+ }
135
+ }
136
+
137
+ @media (min-width: 1024px) {
138
+ #themes-container {
139
+ grid-template-columns: repeat(3, 1fr);
140
+ }
141
+ }
142
+
143
+ /* ----------------------------
144
+ The loading skeleton
145
+ ---------------------------- */
146
+ .theme-skeleton {
147
+ background: linear-gradient(
148
+ 90deg,
149
+ #f0f0f0 25%,
150
+ #e0e0e0 50%,
151
+ #f0f0f0 75%
152
+ );
153
+ background-size: 200% 100%;
154
+ animation: loading 1.5s infinite;
155
+ border-radius: 0.5rem;
156
+ }
157
+
158
+ @keyframes loading {
159
+ 0% {
160
+ background-position: 200% 0;
161
+ }
162
+ 100% {
163
+ background-position: -200% 0;
164
+ }
165
+ }
166
+
167
+ /* ----------------------------
168
+ The modal
169
+ ---------------------------- */
170
+ #theme-modal {
171
+ animation: modalFadeIn 0.2s ease-out;
172
+ }
173
+
174
+ @keyframes modalFadeIn {
175
+ from {
176
+ opacity: 0;
177
+ backdrop-filter: blur(0);
178
+ }
179
+ to {
180
+ opacity: 1;
181
+ backdrop-filter: blur(4px);
182
+ }
183
+ }
184
+
185
+ #theme-modal .bg-white {
186
+ animation: modalSlideIn 0.3s ease-out;
187
+ }
188
+
189
+ @keyframes modalSlideIn {
190
+ from {
191
+ opacity: 0;
192
+ transform: scale(0.95) translateY(-20px);
193
+ }
194
+ to {
195
+ opacity: 1;
196
+ transform: scale(1) translateY(0);
197
+ }
198
+ }
199
+
200
+ /* Input fields inside a modal */
201
+ #theme-modal input,
202
+ #theme-modal textarea,
203
+ #theme-modal select {
204
+ transition: all 0.2s ease;
205
+ }
206
+
207
+ #theme-modal input:focus,
208
+ #theme-modal textarea:focus,
209
+ #theme-modal select:focus {
210
+ border-color: #3b82f6;
211
+ box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
212
+ outline: none;
213
+ }
214
+
215
+ /* A checkbox inside a modal */
216
+ #theme-modal input[type="checkbox"] {
217
+ width: 1.2rem;
218
+ height: 1.2rem;
219
+ cursor: pointer;
220
+ transition: all 0.2s ease;
221
+ }
222
+
223
+ #theme-modal input[type="checkbox"]:checked {
224
+ background-color: #3b82f6;
225
+ border-color: #3b82f6;
226
+ }
227
+
228
+ /* ----------------------------
229
+ Status badges
230
+ ---------------------------- */
231
+ .theme-status-badge {
232
+ display: inline-flex;
233
+ align-items: center;
234
+ padding: 0.25rem 0.75rem;
235
+ border-radius: 9999px;
236
+ font-size: 0.75rem;
237
+ font-weight: 500;
238
+ line-height: 1;
239
+ transition: all 0.2s ease;
240
+ }
241
+
242
+ .theme-status-badge.active {
243
+ background-color: #d1fae5;
244
+ color: #065f46;
245
+ }
246
+
247
+ .theme-status-badge.inactive {
248
+ background-color: #f3f4f6;
249
+ color: #374151;
250
+ }
251
+
252
+ .theme-status-badge i {
253
+ width: 0.875rem;
254
+ height: 0.875rem;
255
+ margin-right: 0.25rem;
256
+ }
257
+
258
+ /* ----------------------------
259
+ Icons on the cards
260
+ ---------------------------- */
261
+ .theme-item i[data-feather] {
262
+ transition: transform 0.2s ease;
263
+ }
264
+
265
+ .theme-item:hover i[data-feather] {
266
+ transform: scale(1.1);
267
+ }
268
+
269
+ /* ----------------------------
270
+ Information blocks
271
+ ---------------------------- */
272
+ .theme-info-block {
273
+ background-color: #f9fafb;
274
+ border-radius: 0.5rem;
275
+ padding: 0.75rem;
276
+ margin-top: 0.5rem;
277
+ }
278
+
279
+ .theme-info-block code {
280
+ background-color: #e5e7eb;
281
+ padding: 0.125rem 0.375rem;
282
+ border-radius: 0.25rem;
283
+ font-size: 0.875rem;
284
+ font-family: 'Courier New', monospace;
285
+ }
286
+
287
+ /* ----------------------------
288
+ The empty state
289
+ ---------------------------- */
290
+ .empty-themes-state {
291
+ text-align: center;
292
+ padding: 3rem;
293
+ background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
294
+ border-radius: 1rem;
295
+ border: 2px dashed #d1d5db;
296
+ }
297
+
298
+ .empty-themes-state i {
299
+ color: #9ca3af;
300
+ margin-bottom: 1rem;
301
+ }
302
+
303
+ .empty-themes-state p {
304
+ color: #6b7280;
305
+ margin-bottom: 1.5rem;
306
+ }
307
+
308
+ /* ----------------------------
309
+ Notifications
310
+ ---------------------------- */
311
+ .theme-notification {
312
+ position: fixed;
313
+ top: 1rem;
314
+ right: 1rem;
315
+ z-index: 1000;
316
+ min-width: 300px;
317
+ max-width: 450px;
318
+ animation: slideInRight 0.3s ease-out;
319
+ }
320
+
321
+ @keyframes slideInRight {
322
+ from {
323
+ opacity: 0;
324
+ transform: translateX(100%);
325
+ }
326
+ to {
327
+ opacity: 1;
328
+ transform: translateX(0);
329
+ }
330
+ }
331
+
332
+ .theme-notification.success {
333
+ background-color: #10b981;
334
+ color: white;
335
+ border-left: 4px solid #047857;
336
+ }
337
+
338
+ .theme-notification.error {
339
+ background-color: #ef4444;
340
+ color: white;
341
+ border-left: 4px solid #b91c1c;
342
+ }
343
+
344
+ .theme-notification.info {
345
+ background-color: #3b82f6;
346
+ color: white;
347
+ border-left: 4px solid #1e40af;
348
+ }
349
+
350
+ /* ----------------------------
351
+ Action buttons in the header
352
+ ---------------------------- */
353
+ #themes-section .action-button {
354
+ padding: 0.5rem 1rem;
355
+ border-radius: 0.5rem;
356
+ font-weight: 500;
357
+ display: inline-flex;
358
+ align-items: center;
359
+ gap: 0.5rem;
360
+ transition: all 0.2s ease;
361
+ }
362
+
363
+ #themes-section .action-button i {
364
+ width: 1.25rem;
365
+ height: 1.25rem;
366
+ }
367
+
368
+ #themes-section .action-button:hover {
369
+ transform: translateY(-1px);
370
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
371
+ }
372
+
373
+ #themes-section .action-button:active {
374
+ transform: translateY(0);
375
+ }
376
+
377
+ /* ----------------------------
378
+ The modal's scrollbar
379
+ ---------------------------- */
380
+ #theme-modal .overflow-auto::-webkit-scrollbar {
381
+ width: 8px;
382
+ height: 8px;
383
+ }
384
+
385
+ #theme-modal .overflow-auto::-webkit-scrollbar-track {
386
+ background: #f1f1f1;
387
+ border-radius: 4px;
388
+ }
389
+
390
+ #theme-modal .overflow-auto::-webkit-scrollbar-thumb {
391
+ background: #c1c1c1;
392
+ border-radius: 4px;
393
+ }
394
+
395
+ #theme-modal .overflow-auto::-webkit-scrollbar-thumb:hover {
396
+ background: #a8a8a8;
397
+ }
398
+
399
+ /* ----------------------------
400
+ The removal animation
401
+ ---------------------------- */
402
+ .theme-item.removing {
403
+ animation: slideOut 0.3s ease-out forwards;
404
+ }
405
+
406
+ @keyframes slideOut {
407
+ from {
408
+ opacity: 1;
409
+ transform: translateX(0);
410
+ }
411
+ to {
412
+ opacity: 0;
413
+ transform: translateX(100%);
414
+ }
415
+ }
416
+
417
+ /* ----------------------------
418
+ Tooltips
419
+ ---------------------------- */
420
+ .theme-item [data-tooltip] {
421
+ position: relative;
422
+ cursor: help;
423
+ }
424
+
425
+ .theme-item [data-tooltip]:before {
426
+ content: attr(data-tooltip);
427
+ position: absolute;
428
+ bottom: 100%;
429
+ left: 50%;
430
+ transform: translateX(-50%);
431
+ padding: 0.25rem 0.5rem;
432
+ background-color: #1f2937;
433
+ color: white;
434
+ font-size: 0.75rem;
435
+ border-radius: 0.25rem;
436
+ white-space: nowrap;
437
+ z-index: 10;
438
+ opacity: 0;
439
+ pointer-events: none;
440
+ transition: opacity 0.2s;
441
+ }
442
+
443
+ .theme-item [data-tooltip]:hover:before {
444
+ opacity: 1;
445
+ }
446
+
447
+ /* ----------------------------
448
+ The preloader
449
+ ---------------------------- */
450
+ .theme-loader {
451
+ display: inline-block;
452
+ width: 2rem;
453
+ height: 2rem;
454
+ border: 3px solid #e5e7eb;
455
+ border-top-color: #3b82f6;
456
+ border-radius: 50%;
457
+ animation: spin 0.8s linear infinite;
458
+ }
459
+
460
+ @keyframes spin {
461
+ to {
462
+ transform: rotate(360deg);
463
+ }
464
+ }
465
+
466
+ /* ----------------------------
467
+ Media queries for phones
468
+ ---------------------------- */
469
+ @media (max-width: 640px) {
470
+ #themes-section .flex {
471
+ flex-direction: column;
472
+ gap: 1rem;
473
+ }
474
+
475
+ #themes-section .flex .space-x-2 {
476
+ margin-top: 0.5rem;
477
+ }
478
+
479
+ .theme-item {
480
+ padding: 1rem !important;
481
+ }
482
+
483
+ .theme-item .flex-wrap {
484
+ gap: 0.5rem;
485
+ }
486
+
487
+ .theme-action-btn {
488
+ padding: 0.5rem 0.75rem !important;
489
+ font-size: 0.875rem;
490
+ }
491
+
492
+ #theme-modal {
493
+ padding: 0.5rem;
494
+ }
495
+
496
+ #theme-modal .max-w-md {
497
+ width: 95%;
498
+ margin: auto;
499
+ }
500
+ }
501
+
502
+ /* ----------------------------
503
+ Dark mode
504
+ ---------------------------- */
505
+ @media (prefers-color-scheme: dark) {
506
+ .theme-item {
507
+ background-color: #1f2937;
508
+ border-color: #374151;
509
+ }
510
+
511
+ .theme-item .text-gray-800 {
512
+ color: #f3f4f6;
513
+ }
514
+
515
+ .theme-item .text-gray-600,
516
+ .theme-item .text-gray-500 {
517
+ color: #9ca3af;
518
+ }
519
+
520
+ .theme-status-badge.inactive {
521
+ background-color: #374151;
522
+ color: #9ca3af;
523
+ }
524
+
525
+ .theme-info-block {
526
+ background-color: #111827;
527
+ }
528
+
529
+ .theme-info-block code {
530
+ background-color: #374151;
531
+ color: #e5e7eb;
532
+ }
533
+
534
+ .empty-themes-state {
535
+ background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
536
+ border-color: #374151;
537
+ }
538
+
539
+ .empty-themes-state p {
540
+ color: #9ca3af;
541
+ }
542
+ }
543
+
544
+ /* ----------------------------
545
+ Print styles
546
+ ---------------------------- */
547
+ @media print {
548
+ .theme-action-btn,
549
+ .action-button {
550
+ display: none !important;
551
+ }
552
+
553
+ .theme-item {
554
+ break-inside: avoid;
555
+ page-break-inside: avoid;
556
+ border: 1px solid #ddd;
557
+ box-shadow: none;
558
+ }
559
+
560
+ #themes-container {
561
+ display: block;
562
+ }
563
+ }