diff --git a/BaseLib/configurator.py b/BaseLib/configurator.py index 8ea4c7e..b96a506 100644 --- a/BaseLib/configurator.py +++ b/BaseLib/configurator.py @@ -1,4 +1,5 @@ from requests import get, put, post, delete +from json import dumps URL_CONFIGS = 'http://configurator/api/v1/configs' @@ -9,7 +10,10 @@ def get_configs(project, stage): response = get(URL_CONFIGS, params={'project': project, 'stage': stage}) if response.status_code != 200: return [] - return response.json() + data = response.json() + for config in data: + config['value_pretty'] = dumps(config['value'], indent=4, ensure_ascii=False) + return data def create_config(project, stage, name): diff --git a/templates/configs.html b/templates/configs.html index e277008..b313d84 100644 --- a/templates/configs.html +++ b/templates/configs.html @@ -52,7 +52,7 @@