Die Dateien wurden wie folgt geändert und hinzugefügt:
1. backend/logs - 'admin', 'admin_api', 'app', 'calendar', 'data_management', 'drucker_steuerung', 'energy_monitoring', 'guest', 'hardware_integration', 'job_queue_system', 'jobs', 'models', 'monitoring_analytics', 'permissions', 'scheduler', 'security_suite', 'startup', '
This commit is contained in:
223
backend/templates/admin_printer_configuration.html
Normal file
223
backend/templates/admin_printer_configuration.html
Normal file
@ -0,0 +1,223 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ config_data.printer.name }} - Erweiterte Konfiguration - Mercedes-Benz MYP Platform{% endblock %}
|
||||
|
||||
{% block head %}
|
||||
{{ super() }}
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="min-h-screen bg-gradient-to-br from-slate-50 via-blue-50 to-indigo-50 dark:from-slate-900 dark:via-slate-800 dark:to-slate-900">
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
||||
|
||||
<!-- Header -->
|
||||
<div class="mb-8">
|
||||
<div class="flex items-center justify-between">
|
||||
<div>
|
||||
<h1 class="text-3xl font-bold text-slate-900 dark:text-white">{{ config_data.printer.name }} - Erweiterte Konfiguration</h1>
|
||||
<p class="text-slate-600 dark:text-slate-400 mt-2">Umfassende Drucker-Konfiguration und Hardware-Integration</p>
|
||||
</div>
|
||||
<div class="flex items-center space-x-4">
|
||||
<a href="{{ url_for('admin.admin_dashboard', tab='printers') }}" class="inline-flex items-center px-4 py-2 bg-slate-200 dark:bg-slate-700 text-slate-700 dark:text-slate-300 rounded-xl hover:bg-slate-300 dark:hover:bg-slate-600 transition-all duration-300">
|
||||
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"/>
|
||||
</svg>
|
||||
Zurück zur Verwaltung
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Connectivity Status -->
|
||||
<div class="mb-8">
|
||||
<div class="bg-white dark:bg-slate-800 rounded-2xl shadow-xl p-6">
|
||||
<h2 class="text-xl font-bold text-slate-900 dark:text-white mb-4 flex items-center">
|
||||
<svg class="w-6 h-6 mr-2 text-blue-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.111 16.404a5.5 5.5 0 017.778 0M12 20h.01m-7.08-7.071c3.904-3.905 10.236-3.905 14.141 0M1.394 9.393c5.857-5.857 15.355-5.857 21.213 0"/>
|
||||
</svg>
|
||||
Verbindungsstatus
|
||||
</h2>
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<!-- Drucker-Verbindung -->
|
||||
<div class="bg-gradient-to-r from-blue-50 to-blue-100 dark:from-blue-900/20 dark:to-blue-800/20 rounded-xl p-4 border border-blue-200 dark:border-blue-800">
|
||||
<div class="flex items-center justify-between mb-2">
|
||||
<span class="font-medium text-blue-900 dark:text-blue-300">Drucker ({{ config_data.printer.ip_address }})</span>
|
||||
<div class="flex items-center">
|
||||
<div class="w-3 h-3 bg-{% if config_data.connectivity.printer_reachable %}green{% else %}red{% endif %}-500 rounded-full mr-2 animate-pulse"></div>
|
||||
<span class="text-sm font-medium text-{% if config_data.connectivity.printer_reachable %}green{% else %}red{% endif %}-700 dark:text-{% if config_data.connectivity.printer_reachable %}green{% else %}red{% endif %}-400">
|
||||
{% if config_data.connectivity.printer_reachable %}Online{% else %}Offline{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{% if config_data.connectivity.response_time %}
|
||||
<p class="text-sm text-blue-600 dark:text-blue-400">Response: {{ config_data.connectivity.response_time }}ms</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Smart-Plug-Verbindung -->
|
||||
<div class="bg-gradient-to-r from-purple-50 to-purple-100 dark:from-purple-900/20 dark:to-purple-800/20 rounded-xl p-4 border border-purple-200 dark:border-purple-800">
|
||||
<div class="flex items-center justify-between mb-2">
|
||||
<span class="font-medium text-purple-900 dark:text-purple-300">Smart-Plug ({{ config_data.printer.plug_ip or 'Nicht konfiguriert' }})</span>
|
||||
<div class="flex items-center">
|
||||
<div class="w-3 h-3 bg-{% if config_data.connectivity.plug_reachable %}green{% else %}red{% endif %}-500 rounded-full mr-2 animate-pulse"></div>
|
||||
<span class="text-sm font-medium text-{% if config_data.connectivity.plug_reachable %}green{% else %}red{% endif %}-700 dark:text-{% if config_data.connectivity.plug_reachable %}green{% else %}red{% endif %}-400">
|
||||
{% if config_data.connectivity.plug_reachable %}Online{% else %}Offline{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{% if config_data.connectivity.plug_status %}
|
||||
<p class="text-sm text-purple-600 dark:text-purple-400">Status: {{ config_data.connectivity.plug_status|title }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Konfigurationskategorien -->
|
||||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
|
||||
{% for category_key, category in config_data.config_categories.items() %}
|
||||
<div class="bg-white dark:bg-slate-800 rounded-2xl shadow-xl p-6 hover:shadow-2xl transition-all duration-300">
|
||||
<div class="flex items-center mb-4">
|
||||
<div class="p-3 bg-gradient-to-r from-blue-500 to-blue-600 rounded-xl mr-4">
|
||||
{% if category.icon == 'cog' %}
|
||||
<svg class="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"/>
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/>
|
||||
</svg>
|
||||
{% elif category.icon == 'wifi' %}
|
||||
<svg class="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.111 16.404a5.5 5.5 0 017.778 0M12 20h.01m-7.08-7.071c3.904-3.905 10.236-3.905 14.141 0M1.394 9.393c5.857-5.857 15.355-5.857 21.213 0"/>
|
||||
</svg>
|
||||
{% elif category.icon == 'cpu' %}
|
||||
<svg class="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z"/>
|
||||
</svg>
|
||||
{% elif category.icon == 'zap' %}
|
||||
<svg class="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/>
|
||||
</svg>
|
||||
{% elif category.icon == 'tool' %}
|
||||
<svg class="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"/>
|
||||
</svg>
|
||||
{% else %}
|
||||
<svg class="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 100 4m0-4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 100 4m0-4v2m0-6V4"/>
|
||||
</svg>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
<h3 class="text-lg font-bold text-slate-900 dark:text-white">{{ category.name }}</h3>
|
||||
<p class="text-sm text-slate-600 dark:text-slate-400">{{ category.description }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="space-y-4">
|
||||
<!-- Konfiguration für jede Kategorie -->
|
||||
{% if category_key == 'basic' %}
|
||||
<div class="space-y-3">
|
||||
<div class="flex justify-between items-center">
|
||||
<span class="text-sm font-medium text-slate-700 dark:text-slate-300">Name:</span>
|
||||
<span class="text-sm text-slate-600 dark:text-slate-400">{{ config_data.printer.name }}</span>
|
||||
</div>
|
||||
<div class="flex justify-between items-center">
|
||||
<span class="text-sm font-medium text-slate-700 dark:text-slate-300">Modell:</span>
|
||||
<span class="text-sm text-slate-600 dark:text-slate-400">{{ config_data.printer.model or 'Nicht gesetzt' }}</span>
|
||||
</div>
|
||||
<div class="flex justify-between items-center">
|
||||
<span class="text-sm font-medium text-slate-700 dark:text-slate-300">Standort:</span>
|
||||
<span class="text-sm text-slate-600 dark:text-slate-400">{{ config_data.printer.location or 'Nicht gesetzt' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
{% elif category_key == 'network' %}
|
||||
<div class="space-y-3">
|
||||
<div class="flex justify-between items-center">
|
||||
<span class="text-sm font-medium text-slate-700 dark:text-slate-300">Drucker-IP:</span>
|
||||
<span class="text-sm text-slate-600 dark:text-slate-400">{{ config_data.printer.ip_address or 'Nicht gesetzt' }}</span>
|
||||
</div>
|
||||
<div class="flex justify-between items-center">
|
||||
<span class="text-sm font-medium text-slate-700 dark:text-slate-300">Smart-Plug-IP:</span>
|
||||
<span class="text-sm text-slate-600 dark:text-slate-400">{{ config_data.printer.plug_ip or 'Nicht gesetzt' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
{% elif category_key == 'hardware' %}
|
||||
<div class="space-y-3">
|
||||
<div class="flex justify-between items-center">
|
||||
<span class="text-sm font-medium text-slate-700 dark:text-slate-300">Smart-Plug Status:</span>
|
||||
<span class="text-sm text-{% if config_data.connectivity.plug_reachable %}green{% else %}red{% endif %}-600 dark:text-{% if config_data.connectivity.plug_reachable %}green{% else %}red{% endif %}-400">
|
||||
{% if config_data.connectivity.plug_reachable %}Online{% else %}Offline{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
{% if config_data.hardware_status.energy_usage %}
|
||||
<div class="flex justify-between items-center">
|
||||
<span class="text-sm font-medium text-slate-700 dark:text-slate-300">Energieverbrauch:</span>
|
||||
<span class="text-sm text-slate-600 dark:text-slate-400">{{ config_data.hardware_status.energy_usage.power or 'N/A' }}W</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="mt-6 pt-4 border-t border-slate-200 dark:border-slate-700">
|
||||
<button class="w-full px-4 py-2 bg-gradient-to-r from-blue-500 to-blue-600 text-white rounded-xl hover:from-blue-600 hover:to-blue-700 transition-all duration-300">
|
||||
{{ category.name }} bearbeiten
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<!-- Schnellaktionen -->
|
||||
<div class="mt-8">
|
||||
<div class="bg-white dark:bg-slate-800 rounded-2xl shadow-xl p-6">
|
||||
<h2 class="text-xl font-bold text-slate-900 dark:text-white mb-6 flex items-center">
|
||||
<svg class="w-6 h-6 mr-2 text-green-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/>
|
||||
</svg>
|
||||
Schnellaktionen
|
||||
</h2>
|
||||
|
||||
<div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4">
|
||||
{% for action in config_data.available_actions %}
|
||||
<button class="flex flex-col items-center p-4 bg-gradient-to-br from-slate-50 to-slate-100 dark:from-slate-700 dark:to-slate-800 rounded-xl hover:from-blue-50 hover:to-blue-100 dark:hover:from-blue-800/20 dark:hover:to-blue-700/20 transition-all duration-300 border border-slate-200 dark:border-slate-600 hover:border-blue-300 dark:hover:border-blue-600">
|
||||
{% if action == 'test_connection' %}
|
||||
<svg class="w-8 h-8 text-blue-500 mb-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.111 16.404a5.5 5.5 0 017.778 0M12 20h.01m-7.08-7.071c3.904-3.905 10.236-3.905 14.141 0M1.394 9.393c5.857-5.857 15.355-5.857 21.213 0"/>
|
||||
</svg>
|
||||
<span class="text-xs font-medium text-slate-700 dark:text-slate-300 text-center">Verbindung testen</span>
|
||||
{% elif action == 'reset_settings' %}
|
||||
<svg class="w-8 h-8 text-orange-500 mb-2" 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 class="text-xs font-medium text-slate-700 dark:text-slate-300 text-center">Einstellungen zurücksetzen</span>
|
||||
{% elif action == 'calibrate' %}
|
||||
<svg class="w-8 h-8 text-green-500 mb-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
||||
</svg>
|
||||
<span class="text-xs font-medium text-slate-700 dark:text-slate-300 text-center">Kalibrieren</span>
|
||||
{% elif action == 'factory_reset' %}
|
||||
<svg class="w-8 h-8 text-red-500 mb-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z"/>
|
||||
</svg>
|
||||
<span class="text-xs font-medium text-slate-700 dark:text-slate-300 text-center">Werksreset</span>
|
||||
{% elif action == 'export_config' %}
|
||||
<svg class="w-8 h-8 text-purple-500 mb-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
|
||||
</svg>
|
||||
<span class="text-xs font-medium text-slate-700 dark:text-slate-300 text-center">Konfiguration exportieren</span>
|
||||
{% elif action == 'import_config' %}
|
||||
<svg class="w-8 h-8 text-indigo-500 mb-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v6m0 0l3-3m-3 3L9 7m3 3l3-3m-3 3l-3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
|
||||
</svg>
|
||||
<span class="text-xs font-medium text-slate-700 dark:text-slate-300 text-center">Konfiguration importieren</span>
|
||||
{% endif %}
|
||||
</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user