summaryrefslogtreecommitdiffstats
path: root/dashboard
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2016-10-11 11:04:46 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2016-10-11 11:04:46 +0800
commitc9c6159b1d495299b28f8b5a727d2e5c84517151 (patch)
tree97bfe9b8f073a986cd514d6a88aa1530a3ec92a6 /dashboard
parentdf4fb1e1f45c381ce038da887c3ca611b19629f7 (diff)
always config conf.js in kibana_dashboard
JIRA: FUNCTEST-507 Change-Id: Iad6000ccc94285bd8be03939eb2e83d7f254a887 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'dashboard')
-rw-r--r--dashboard/dashboard/conf/config.py4
-rw-r--r--dashboard/dashboard/elastic2kibana/main.py20
-rw-r--r--dashboard/etc/config.ini1
3 files changed, 9 insertions, 16 deletions
diff --git a/dashboard/dashboard/conf/config.py b/dashboard/dashboard/conf/config.py
index 143b193..48fed88 100644
--- a/dashboard/dashboard/conf/config.py
+++ b/dashboard/dashboard/conf/config.py
@@ -26,7 +26,6 @@ class APIConfig:
self.es_url = 'http://localhost:9200'
self.es_creds = None
self.kibana_url = None
- self.is_js = True
self.js_path = None
def _get_str_parameter(self, section, param):
@@ -67,7 +66,6 @@ class APIConfig:
obj.es_url = obj._get_str_parameter("elastic", "url")
obj.es_creds = obj._get_str_parameter("elastic", "creds")
obj.kibana_url = obj._get_str_parameter("kibana", "url")
- obj.is_js = obj._get_bool_parameter("kibana", "js")
obj.js_path = obj._get_str_parameter("kibana", "js_path")
return obj
@@ -76,9 +74,7 @@ class APIConfig:
return "elastic_url = %s \n" \
"elastic_creds = %s \n" \
"kibana_url = %s \n" \
- "is_js = %s \n" \
"js_path = %s \n" % (self.es_url,
self.es_creds,
self.kibana_url,
- self.is_js,
self.js_path)
diff --git a/dashboard/dashboard/elastic2kibana/main.py b/dashboard/dashboard/elastic2kibana/main.py
index 35a1543..9ee8942 100644
--- a/dashboard/dashboard/elastic2kibana/main.py
+++ b/dashboard/dashboard/elastic2kibana/main.py
@@ -64,13 +64,12 @@ class KibanaConstructor(object):
visualizations,
CONF.es_url,
CONF.es_creds)
- if CONF.is_js:
- self._set_js_dict(case,
- pod,
- installer,
- family,
- vis_p.get('name'),
- dashboard.id)
+ self._set_js_dict(case,
+ pod,
+ installer,
+ family,
+ vis_p.get('name'),
+ dashboard.id)
@staticmethod
def _construct_visualizations(project,
@@ -112,10 +111,9 @@ class KibanaConstructor(object):
js_installer[pod] = CONF.kibana_url + '#/dashboard/' + id
def config_js(self):
- if CONF.is_js:
- with open(CONF.js_path, 'w+') as conf_js_fdesc:
- conf_js_fdesc.write('var kibana_dashboard_links = ')
- conf_js_fdesc.write(str(self.js_dict).replace("u'", "'"))
+ with open(CONF.js_path, 'w+') as conf_js_fdesc:
+ conf_js_fdesc.write('var kibana_dashboard_links = ')
+ conf_js_fdesc.write(str(self.js_dict).replace("u'", "'"))
def _get_pods_and_scenarios(self, project, case, installer):
query = json.JSONEncoder().encode({
diff --git a/dashboard/etc/config.ini b/dashboard/etc/config.ini
index 1e67bd8..d932798 100644
--- a/dashboard/etc/config.ini
+++ b/dashboard/etc/config.ini
@@ -6,5 +6,4 @@ creds =
[kibana]
url = http://10.63.243.17:5601/app/kibana
-js = true
js_path = /usr/share/nginx/html/kibana_dashboards/conf.js