Skip to content
Permalink
Browse files

Listing WEBSITES should show their space usage.

  • Loading branch information...
usmannasir committed Aug 16, 2019
1 parent 6e1da4f commit 438f1671cc729ee78fc99f80f2b9d2ac9d0597f0
Showing with 6 additions and 3 deletions.
  1. +2 −2 websiteFunctions/templates/websiteFunctions/listWebsites.html
  2. +4 −1 websiteFunctions/website.py
@@ -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">
@@ -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)

0 comments on commit 438f167

Please sign in to comment.
You can’t perform that action at this time.