From 118968712e004f43ce5363aaa785ff5969f17d55 Mon Sep 17 00:00:00 2001 From: guohongze Date: Mon, 10 Sep 2018 10:14:32 +0800 Subject: [PATCH] monitor tree default close --- monitor/system.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/monitor/system.py b/monitor/system.py index 57b536d6..1864669d 100644 --- a/monitor/system.py +++ b/monitor/system.py @@ -150,7 +150,7 @@ def host_tree(): cabinet_data = {'name': cabinet.name, 'children': server_list} cabinet_list.append(cabinet_data) del server_list - data = {"name": idc.name, "open": True, "children": cabinet_list + single_server_list } + data = {"name": idc.name, "open": False, "children": cabinet_list + single_server_list } del cabinet_list host_node.append(data) return host_node @@ -164,7 +164,7 @@ def group_tree(): for server in servers: server_data = {'name': server.hostname, 'url': "/monitor/system/{}/0/".format(server.hostname), 'target':"myframe"} server_list.append(server_data) - group_data = {'name': group.name, 'children': server_list} + group_data = {'name': group.name, "open": False, 'children': server_list} group_node.append(group_data) del server_list return group_node @@ -184,7 +184,7 @@ def product_tree(): project_data = {'name': pjs.name, 'children': server_list} project_list.append(project_data) del server_list - data = {"name": pdt.name, "open": True, "children": project_list} + data = {"name": pdt.name, "open": False, "children": project_list} del project_list product_node.append(data) return product_node