fix disk detail bug

pull/26/head
wangyong 2015-11-24 19:04:16 +08:00
parent d7cb549eac
commit 0262d94dd3
3 changed files with 9 additions and 5 deletions

View File

@ -13,7 +13,7 @@ password = mysql234
database = jumpserver
[websocket]
web_socket_host = j:3000
web_socket_host = js:3000
[mail]
mail_enable = 1

View File

@ -209,7 +209,11 @@ def str_to_dic(info):
"""
str to list
"""
return ast.literal_eval(info).iteritems()
if '{' in info:
info_dic = ast.literal_eval(info).iteritems()
else:
info_dic = {}
return info_dic
@register.filter(name='str_to_code')

View File

@ -96,15 +96,15 @@
<div class="hr-line-dashed"></div>
{{ af.memory|bootstrap_horizontal }}
<div class="hr-line-dashed"></div>
{{ af.disk|bootstrap_horizontal }}
<div class="hr-line-dashed"></div>
{{ af.system_type|bootstrap_horizontal }}
<div class="hr-line-dashed"></div>
{{ af.system_version|bootstrap_horizontal }}
<div class="hr-line-dashed"></div>
{{ af.disk|bootstrap_horizontal }}
<div class="hr-line-dashed"></div>
{{ af.number|bootstrap_horizontal }}