mirror of
https://github.com/FAUSheppy/icinga-webhook-gateway
synced 2025-12-06 07:21:38 +01:00
feat: warn about static configured services deletion
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user