diff --git a/app.py b/app.py index 538db24..40f83e3 100644 --- a/app.py +++ b/app.py @@ -102,6 +102,22 @@ def save_settings(): return redirect(url_for('settings')) +@app.route('/save_raw_config', methods=['POST']) +def save_raw_config(): + try: + raw_data = request.form.get('raw_config') + config_data = json.loads(raw_data) + if config_mgr.save_config(config_data): + flash('Konfiguration gespeichert. Miner Neustart erforderlich.', 'success') + else: + flash('Fehler beim Speichern der Datei.', 'danger') + except json.JSONDecodeError: + flash('Ungültiges JSON Format.', 'danger') + except Exception as e: + flash(f'Fehler: {str(e)}', 'danger') + + return redirect(url_for('settings')) + @app.route('/control/restart') def restart_miner(): # Attempt to restart via API first, if fails, might need system command diff --git a/templates/settings.html b/templates/settings.html index db5d5f3..dceae30 100644 --- a/templates/settings.html +++ b/templates/settings.html @@ -76,6 +76,23 @@ + + +
+
+ Erweiterte Konfiguration (cgminer.conf) +
+
+
+
+
+ +
+ +
+
+
+