fix quota info failed

This commit is contained in:
leebaok 2016-04-18 10:35:04 +08:00
parent 04e04c8a94
commit 898aad3229
2 changed files with 3 additions and 3 deletions

View File

@ -35,7 +35,7 @@
<th>CPU</th>
<th>Memory</th>
<th>Disk</th>
<th>Network</th>
<th>Vnode</th>
<th>Image</th>
<th>Idletime</th>
</tr>
@ -49,7 +49,7 @@
{% endif %}
<th>{{ quotainfo['memory'] }} MB</th>
<th>{{ quotainfo['disk'] }} MB</th>
<th>{{ quotainfo['network'] }} IP addresses</th>
<th>{{ quotainfo['vnode'] }}</th>
<th>{{ quotainfo['image'] }}</th>
<th>{{ quotainfo['idletime'] }} hours</th>
</tr>

View File

@ -15,7 +15,7 @@ class statusView(normalView):
clusters = result.get('clusters')
result = dockletRequest.post('/monitor/user/quotainfo/', data)
quotainfo = result.get('quotainfo')
quotainfo['cpu'] = int(int(quotainfo['cpu'])/100000)
quotainfo['cpu'] = int(int(quotainfo['cpu']))
print(quotainfo)
if (result):
containers = {}