diff --git a/server.py b/server.py index 0dca43d..563bef6 100755 --- a/server.py +++ b/server.py @@ -40,6 +40,8 @@ class Service(db.Model): timeout = Column(Integer) owner = Column(String) + staticly_configured = Column(Boolean) + class Status(db.Model): __tablename__ = "states" @@ -301,7 +303,9 @@ def create_app(): for key in config: timeout = timeparse.timeparse(config[key]["timeout"]) - db.session.merge(Service(service=key, token=config[key]["token"], timeout=timeout)) + staticly_configured = True + db.session.merge(Service(service=key, token=config[key]["token"], + staticly_configured=staticly_configured, timeout=timeout)) db.session.commit() diff --git a/static/site.css b/static/site.css index 75c13ce..57713fe 100644 --- a/static/site.css +++ b/static/site.css @@ -160,3 +160,13 @@ body{ border-color: aliceblue; width: fit-content; } + +.static-configured-info{ + margin-bottom: 20px; + color: aliceblue; + text-align: center; + padding: 8px; + border-style: solid; + border-color: red; + font-size: 17px; +} diff --git a/templates/service_info.html b/templates/service_info.html index f5931e9..b8fe090 100644 --- a/templates/service_info.html +++ b/templates/service_info.html @@ -4,6 +4,12 @@ {% include "navbar.html" %}

Service: {{ service.service }}

+ {% if service.staticly_configured %} +

+ This service is staticly configured, to permanently delete it, you have to remove + it from the configuration file on the server. +

+ {% endif %} Modify