Skip to content

Commit 438f167

Browse files
committed
Listing WEBSITES should show their space usage.
1 parent 6e1da4f commit 438f167

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

websiteFunctions/templates/websiteFunctions/listWebsites.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ <h2 style="display: inline; color: #414C59;" ng-bind="web.domain"></h2>
7777
<div class="col-md-12">
7878

7979
<div class="col-md-4 content-box-header">
80-
<i class="p fa fa-envelope btn-icon text-muted" data-toggle="tooltip" data-placement="right"
80+
<i class="p fa fa-hdd-o btn-icon text-muted" data-toggle="tooltip" data-placement="right"
8181
title="Email">&emsp;</i>
82-
<span ng-bind="web.adminEmail" style="text-transform: none"></span>
82+
<span ng-bind="web.diskUsed" style="text-transform: none"></span>
8383
</div>
8484

8585
<div class="col-md-4 content-box-header">

websiteFunctions/website.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2084,8 +2084,11 @@ def findWebsitesJson(self, currentACL, userID, pageNumber):
20842084
state = "Suspended"
20852085
else:
20862086
state = "Active"
2087+
2088+
diskUsed = "%sMB" % str(virtualHostUtilities.getDiskUsage("/home/" + items.domain, items.package.diskSpace)[0])
2089+
20872090
dic = {'domain': items.domain, 'adminEmail': items.adminEmail, 'ipAddress': ipAddress,
2088-
'admin': items.admin.userName, 'package': items.package.packageName, 'state': state}
2091+
'admin': items.admin.userName, 'package': items.package.packageName, 'state': state, 'diskUsed': diskUsed}
20892092

20902093
if checker == 0:
20912094
json_data = json_data + json.dumps(dic)

0 commit comments

Comments
 (0)