From 37d7caa0f1af7570a31b69feb26d3cbabd8a2483 Mon Sep 17 00:00:00 2001 From: jiasirui Date: Thu, 3 Jun 2021 14:03:16 +0800 Subject: [PATCH] repair the elasticsearch store day result to json Change-Id: I052f6b540b22ebe9917e536efc411e81f81fb2b0 --- venus/api/v1/router.py | 5 ----- venus/modules/custom_config/controller.py | 4 +++- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/venus/api/v1/router.py b/venus/api/v1/router.py index c4858a8..af92674 100644 --- a/venus/api/v1/router.py +++ b/venus/api/v1/router.py @@ -50,11 +50,6 @@ class APIRouter(venus.api.openstack.APIRouter): action='get_config', conditions={'method': ['GET']}) - mapper.connect("get_custom_config", "/custom_config", - controller=config_resource, - action='set_config', - conditions={'method': ['POST']}) - mapper.connect("search_params", "/search/params", controller=search_resource, action='search_params', diff --git a/venus/modules/custom_config/controller.py b/venus/modules/custom_config/controller.py index 24ca9c1..5abd996 100644 --- a/venus/modules/custom_config/controller.py +++ b/venus/modules/custom_config/controller.py @@ -25,7 +25,9 @@ class CustomConfigController(wsgi.Controller): @wsgi.wrap_check_policy def get_config(self, req): - return CONF.elasticsearch.es_index_days + result = dict() + result["log_save_days"] = CONF.elasticsearch.es_index_days + return result def create_resource(ext_mgr):