Skip to content

Commit

Permalink
Listing WEBSITES should show their space usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Aug 16, 2019
1 parent 6e1da4f commit 438f167
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions websiteFunctions/templates/websiteFunctions/listWebsites.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ <h2 style="display: inline; color: #414C59;" ng-bind="web.domain"></h2>
<div class="col-md-12">

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

<div class="col-md-4 content-box-header">
Expand Down
5 changes: 4 additions & 1 deletion websiteFunctions/website.py
Original file line number Diff line number Diff line change
Expand Up @@ -2084,8 +2084,11 @@ def findWebsitesJson(self, currentACL, userID, pageNumber):
state = "Suspended"
else:
state = "Active"

diskUsed = "%sMB" % str(virtualHostUtilities.getDiskUsage("/home/" + items.domain, items.package.diskSpace)[0])

dic = {'domain': items.domain, 'adminEmail': items.adminEmail, 'ipAddress': ipAddress,
'admin': items.admin.userName, 'package': items.package.packageName, 'state': state}
'admin': items.admin.userName, 'package': items.package.packageName, 'state': state, 'diskUsed': diskUsed}

if checker == 0:
json_data = json_data + json.dumps(dic)
Expand Down

0 comments on commit 438f167

Please sign in to comment.