From 7323525b696d83894bdbdde474bdbe09a75b2969 Mon Sep 17 00:00:00 2001 From: bunkerity Date: Tue, 1 Jun 2021 10:54:59 +0200 Subject: [PATCH] ui - show only multisite vars for settings --- ui/Config.py | 12 ++++-------- ui/entrypoint.py | 4 ++-- ui/templates/services-edit.html | 4 ++-- ui/templates/services-new.html | 22 +++++++++++++++++----- 4 files changed, 25 insertions(+), 17 deletions(-) diff --git a/ui/Config.py b/ui/Config.py index e24d417..0172310 100644 --- a/ui/Config.py +++ b/ui/Config.py @@ -1,4 +1,4 @@ -import json, uuid, glob +import json, uuid, glob, copy class Config : @@ -36,15 +36,11 @@ class Config : if stderr != "" or proc.returncode != 0 : raise Exception("Error from generator (return code = " + str(proc.returncode) + ") : " + stderr) - def get_config(self) : - config = self.__env_to_dict("/etc/nginx/global.env") - for service in self.get_services() : - for k, v in service.items() : - config[service["FIRST_SERVER"] + "_" + k] = v - return config - def get_settings(self) : return self.__settings + + def get_config(self) : + return self.__env_to_dict("/etc/nginx/global.env") def get_services(self) : services = [] diff --git a/ui/entrypoint.py b/ui/entrypoint.py index 6687c26..7dc233e 100644 --- a/ui/entrypoint.py +++ b/ui/entrypoint.py @@ -5,7 +5,7 @@ from flask import Flask, render_template, current_app, request from Docker import Docker from Config import Config import utils -import os, json, re +import os, json, re, traceback app = Flask(__name__, static_url_path="/", static_folder="static", template_folder="templates") ABSOLUTE_URI = "" @@ -104,4 +104,4 @@ def services(): return render_template("services.html", title="Services", services=services, operation=operation) except Exception as e : - return render_template("error.html", title="Error", error=str(e)) \ No newline at end of file + return render_template("error.html", title="Error", error=str(e) + traceback.format_exc()) \ No newline at end of file diff --git a/ui/templates/services-edit.html b/ui/templates/services-edit.html index e81bd4b..1c22dd8 100644 --- a/ui/templates/services-edit.html +++ b/ui/templates/services-edit.html @@ -8,7 +8,7 @@