mirror of
https://github.com/netinvent/npbackup.git
synced 2025-02-22 21:46:04 +08:00
GUI: Remove injected prometheus values from object
This commit is contained in:
parent
ffa1b62286
commit
168711e274
1 changed files with 4 additions and 0 deletions
|
@ -654,6 +654,10 @@ def config_gui(full_config: dict, config_file: str):
|
||||||
parent_key = ".".join(active_object_key.split(".")[:-1])
|
parent_key = ".".join(active_object_key.split(".")[:-1])
|
||||||
full_config.s(parent_key, CommentedMap())
|
full_config.s(parent_key, CommentedMap())
|
||||||
full_config.s(active_object_key, value)
|
full_config.s(active_object_key, value)
|
||||||
|
|
||||||
|
# Remove injected global prometheus config
|
||||||
|
for prom_key in ('metrics', 'destination', 'additional_labels', 'instance', 'http_username', 'http_password'):
|
||||||
|
full_config.d(f"repos.{object_name}.prometheus.{prom_key}")
|
||||||
return full_config
|
return full_config
|
||||||
|
|
||||||
def set_permissions(full_config: dict, object_name: str) -> dict:
|
def set_permissions(full_config: dict, object_name: str) -> dict:
|
||||||
|
|
Loading…
Reference in a new issue