"feat: Integrate rate limiter
This commit is contained in:
@@ -3,30 +3,48 @@
|
||||
{% block title %}Drucker - Mercedes-Benz MYP Platform{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="bg-professional">
|
||||
<div class="bg-professional" style="background: #f8fafc !important;">
|
||||
<!-- Dark Mode Override -->
|
||||
<style>
|
||||
.dark .bg-professional {
|
||||
background: #000000 !important;
|
||||
}
|
||||
.dark .professional-hero {
|
||||
background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%) !important;
|
||||
border-color: #333333 !important;
|
||||
}
|
||||
.dark .professional-container {
|
||||
background: #111111 !important;
|
||||
border-color: #333333 !important;
|
||||
}
|
||||
.dark .mb-glass {
|
||||
background: rgba(17, 17, 17, 0.95) !important;
|
||||
border-color: rgba(255, 255, 255, 0.1) !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- Professional Hero Header -->
|
||||
<div class="professional-hero hero-pattern animate-fade-in">
|
||||
<div class="absolute inset-0 bg-gradient-to-r from-black/10 to-black/20 dark:from-black/20 dark:to-black/40"></div>
|
||||
<div class="professional-hero hero-pattern animate-fade-in" style="margin: 2rem; margin-bottom: 3rem;">
|
||||
<div class="absolute inset-0 bg-gradient-to-r from-black/10 to-black/20 dark:from-black/40 dark:to-black/60"></div>
|
||||
|
||||
<!-- Status Indicator -->
|
||||
<div class="absolute top-6 right-6 flex items-center space-x-3 z-10">
|
||||
<div class="mb-glass rounded-full px-4 py-2 animate-scale-in">
|
||||
<div class="flex items-center space-x-2">
|
||||
<div class="absolute top-6 right-6 flex items-center space-x-4 z-10">
|
||||
<div class="mb-glass rounded-full px-6 py-3 animate-scale-in">
|
||||
<div class="flex items-center space-x-3">
|
||||
<div class="status-dot status-online"></div>
|
||||
<span class="text-sm font-semibold text-professional-primary">Live</span>
|
||||
<span class="text-sm font-semibold text-professional-primary">Live Status</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-glass rounded-full px-4 py-2 animate-scale-in">
|
||||
<div class="mb-glass rounded-full px-6 py-3 animate-scale-in">
|
||||
<span id="live-time" class="text-sm font-semibold text-professional-primary"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="relative max-w-7xl mx-auto px-6 lg:px-8 py-16 z-10">
|
||||
<div class="relative max-w-7xl mx-auto px-6 lg:px-8 py-20 z-10">
|
||||
<div class="text-center animate-slide-up">
|
||||
<!-- Mercedes-Benz Logo -->
|
||||
<div class="inline-flex items-center justify-center w-24 h-24 mb-glass rounded-full mb-8 professional-shadow">
|
||||
<svg class="w-12 h-12 text-professional-primary" viewBox="0 0 80 80" fill="currentColor">
|
||||
<div class="inline-flex items-center justify-center w-28 h-28 mb-glass rounded-full mb-10 professional-shadow">
|
||||
<svg class="w-14 h-14 text-professional-primary" viewBox="0 0 80 80" fill="currentColor">
|
||||
<path d="M58.6,4.5C53,1.6,46.7,0,40,0c-6.7,0-13,1.6-18.6,4.5v0C8.7,11.2,0,24.6,0,40c0,15.4,8.7,28.8,21.5,35.5
|
||||
C27,78.3,33.3,80,40,80c6.7,0,12.9-1.7,18.5-4.6C71.3,68.8,80,55.4,80,40C80,24.6,71.3,11.2,58.6,4.5z M4,40
|
||||
c0-13.1,7-24.5,17.5-30.9v0C26.6,6,32.5,4.2,39,4l-4.5,32.7L21.5,46.8v0L8.3,57.1C5.6,52,4,46.2,4,40z M58.6,70.8
|
||||
@@ -36,68 +54,77 @@
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<h1 class="title-professional text-5xl md:text-6xl font-bold mb-6 tracking-tight">
|
||||
<h1 class="title-professional text-6xl md:text-7xl font-bold mb-8 tracking-tight">
|
||||
3D-Drucker Management
|
||||
</h1>
|
||||
<p class="subtitle-professional text-xl md:text-2xl max-w-4xl mx-auto leading-relaxed mb-8">
|
||||
<p class="subtitle-professional text-2xl md:text-3xl max-w-5xl mx-auto leading-relaxed mb-12">
|
||||
Verwalten Sie Ihre 3D-Drucker mit höchster Präzision und Mercedes-Benz Qualitätsstandard
|
||||
</p>
|
||||
|
||||
<!-- Status Overview -->
|
||||
<div class="flex flex-wrap justify-center gap-6 mb-8">
|
||||
<div class="mb-glass rounded-2xl px-6 py-4 animate-scale-in">
|
||||
<div class="flex items-center space-x-3">
|
||||
<div class="status-dot status-online"></div>
|
||||
<span class="text-professional-primary font-semibold">Online: <span id="online-count" class="text-green-500 font-bold">-</span></span>
|
||||
<div class="flex flex-wrap justify-center gap-8 mb-12">
|
||||
<div class="mb-glass rounded-3xl px-8 py-6 animate-scale-in min-w-[200px]">
|
||||
<div class="flex items-center space-x-4">
|
||||
<div class="status-dot status-online w-4 h-4"></div>
|
||||
<div class="text-left">
|
||||
<div class="text-sm text-professional-muted uppercase tracking-wide">Online</div>
|
||||
<div class="text-3xl font-bold text-green-500" id="online-count">-</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-glass rounded-2xl px-6 py-4 animate-scale-in">
|
||||
<div class="flex items-center space-x-3">
|
||||
<div class="status-dot status-offline"></div>
|
||||
<span class="text-professional-primary font-semibold">Offline: <span id="offline-count" class="text-red-500 font-bold">-</span></span>
|
||||
<div class="mb-glass rounded-3xl px-8 py-6 animate-scale-in min-w-[200px]">
|
||||
<div class="flex items-center space-x-4">
|
||||
<div class="status-dot status-offline w-4 h-4"></div>
|
||||
<div class="text-left">
|
||||
<div class="text-sm text-professional-muted uppercase tracking-wide">Offline</div>
|
||||
<div class="text-3xl font-bold text-red-500" id="offline-count">-</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-glass rounded-2xl px-6 py-4 animate-scale-in">
|
||||
<div class="flex items-center space-x-3">
|
||||
<svg class="w-5 h-5 text-professional-primary" fill="currentColor" viewBox="0 0 20 20">
|
||||
<div class="mb-glass rounded-3xl px-8 py-6 animate-scale-in min-w-[200px]">
|
||||
<div class="flex items-center space-x-4">
|
||||
<svg class="w-6 h-6 text-professional-accent" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.829a1 1 0 101.415-1.415L11 9.586V6z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
<span class="text-professional-primary font-semibold">Gesamt: <span id="total-count" class="text-professional-accent font-bold">-</span></span>
|
||||
<div class="text-left">
|
||||
<div class="text-sm text-professional-muted uppercase tracking-wide">Gesamt</div>
|
||||
<div class="text-3xl font-bold text-professional-accent" id="total-count">-</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Action Buttons -->
|
||||
<div class="flex flex-wrap justify-center gap-4">
|
||||
<div class="flex flex-wrap justify-center gap-6">
|
||||
<!-- Filter Buttons -->
|
||||
<div class="flex bg-white/10 dark:bg-black/20 backdrop-blur-sm rounded-2xl p-2 border border-white/20 dark:border-white/10">
|
||||
<button id="filter-all" class="filter-btn-mercedes active px-4 py-2 rounded-xl text-sm font-semibold transition-all duration-300">
|
||||
Alle
|
||||
<div class="flex bg-white/10 dark:bg-black/30 backdrop-blur-sm rounded-3xl p-3 border border-white/20 dark:border-white/10">
|
||||
<button id="filter-all" class="filter-btn-mercedes active px-6 py-3 rounded-2xl text-sm font-semibold transition-all duration-300">
|
||||
Alle Drucker
|
||||
</button>
|
||||
<button id="filter-online" class="filter-btn-mercedes px-4 py-2 rounded-xl text-sm font-semibold transition-all duration-300">
|
||||
<button id="filter-online" class="filter-btn-mercedes px-6 py-3 rounded-2xl text-sm font-semibold transition-all duration-300">
|
||||
Online
|
||||
</button>
|
||||
<button id="filter-offline" class="filter-btn-mercedes px-4 py-2 rounded-xl text-sm font-semibold transition-all duration-300">
|
||||
<button id="filter-offline" class="filter-btn-mercedes px-6 py-3 rounded-2xl text-sm font-semibold transition-all duration-300">
|
||||
Offline
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<button onclick="toggleAutoRefresh()" id="auto-refresh-btn" class="btn-professional group">
|
||||
<button onclick="toggleAutoRefresh()" id="auto-refresh-btn" class="btn-professional group px-8 py-4">
|
||||
<svg class="w-6 h-6 mr-3 group-hover:rotate-180 transition-transform duration-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
||||
</svg>
|
||||
<span>Auto-Update</span>
|
||||
</button>
|
||||
|
||||
<button onclick="refreshPrinters()" class="btn-professional group">
|
||||
<button onclick="refreshPrinters()" class="btn-professional group px-8 py-4">
|
||||
<svg class="w-6 h-6 mr-3 group-hover:rotate-180 transition-transform duration-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"/>
|
||||
</svg>
|
||||
<span>Jetzt aktualisieren</span>
|
||||
<span>Status aktualisieren</span>
|
||||
</button>
|
||||
|
||||
{% if current_user.is_admin %}
|
||||
<button id="addPrinterBtn" class="btn-success-professional group">
|
||||
<button id="addPrinterBtn" class="btn-success-professional group px-8 py-4">
|
||||
<svg class="w-6 h-6 mr-3 group-hover:scale-110 transition-transform duration-300" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"/>
|
||||
</svg>
|
||||
@@ -107,35 +134,35 @@
|
||||
</div>
|
||||
|
||||
<!-- Auto-Update Info -->
|
||||
<div class="mt-6 flex items-center justify-center space-x-2 text-professional-muted">
|
||||
<svg id="auto-refresh-icon" class="w-4 h-4 animate-spin-slow" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<div class="mt-8 flex items-center justify-center space-x-3 text-professional-muted">
|
||||
<svg id="auto-refresh-icon" class="w-5 h-5 animate-spin-slow" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"/>
|
||||
</svg>
|
||||
<span class="text-sm">Auto-Update: <span id="next-update-time" class="font-mono">-</span>s</span>
|
||||
<span class="text-base">Auto-Update: <span id="next-update-time" class="font-mono font-bold">-</span>s</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 -mt-8 relative z-10 space-y-8">
|
||||
<div class="max-w-7xl mx-auto px-6 lg:px-8 -mt-12 relative z-10" style="margin-bottom: 4rem;">
|
||||
|
||||
<!-- Printers Grid -->
|
||||
<div class="professional-container p-8 lg:p-12 animate-slide-up">
|
||||
<div class="text-center mb-10">
|
||||
<h2 class="title-professional text-3xl font-bold mb-4">
|
||||
Verfügbare Drucker
|
||||
<div class="professional-container animate-slide-up" style="padding: 3rem; border-radius: 2rem; margin-bottom: 2rem;">
|
||||
<div class="text-center mb-16">
|
||||
<h2 class="title-professional text-4xl font-bold mb-6">
|
||||
Verfügbare 3D-Drucker
|
||||
</h2>
|
||||
<p class="subtitle-professional text-lg">
|
||||
Übersicht und Verwaltung Ihrer 3D-Drucker-Infrastruktur
|
||||
<p class="subtitle-professional text-xl max-w-3xl mx-auto">
|
||||
Übersicht und Verwaltung Ihrer gesamten 3D-Drucker-Infrastruktur mit Echtzeit-Statusanzeige
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="printers-grid" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||
<div id="printers-grid" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
|
||||
<!-- Loading state -->
|
||||
<div class="col-span-full text-center py-12">
|
||||
<div class="animate-spin rounded-full h-12 w-12 border-b-2 border-professional-accent mx-auto"></div>
|
||||
<p class="mt-4 text-base text-professional-secondary">Lade Drucker...</p>
|
||||
<p class="mt-1 text-sm text-professional-muted">Dies sollte nur wenige Sekunden dauern</p>
|
||||
<div class="col-span-full text-center py-16">
|
||||
<div class="animate-spin rounded-full h-16 w-16 border-b-3 border-professional-accent mx-auto mb-8"></div>
|
||||
<h3 class="text-2xl font-bold text-professional-primary mb-4">Lade Drucker...</h3>
|
||||
<p class="text-lg text-professional-secondary">Dies sollte nur wenige Sekunden dauern</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user