Skip to content

Commit

Permalink
优化表格显示效果
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoweihong committed May 15, 2018
1 parent bf70950 commit ceafbb4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions monitor/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,15 @@
hostInfo = info['metric']
value=info['value']
hostInfo = OrderedDict(hostInfo)
hostInfo['value']=value[1]
hostInfo['value']=value[1]+"%"
disk_content.append(list(hostInfo.values()))
print(disk_content)

for info in mem_infos:
hostInfo = info['metric']
value=info['value']
hostInfo = OrderedDict(hostInfo)
hostInfo['value']=value[1]
hostInfo['value']=value[1]+"%"
mem_content.append(list(hostInfo.values()))

for info in gpu_infos:
Expand All @@ -110,14 +111,14 @@
hostInfo = info['metric']
value=info['value']
hostInfo = OrderedDict(hostInfo)
hostInfo['value']=value[1]
hostInfo['value']=value[1]+"GB"
network_receive_content.append(list(hostInfo.values()))

for info in network_transmit_infos:
hostInfo = info['metric']
value=info['value']
hostInfo = OrderedDict(hostInfo)
hostInfo['value']=value[1]
hostInfo['value']=value[1]+"GB"
network_transmit_content.append(list(hostInfo.values()))

print("正在导出disk信息....")
Expand Down

0 comments on commit ceafbb4

Please sign in to comment.