Skip to content

Add: Show user and bandwidth quota on the dashboard - #5031

Merged
jaapmarcus merged 1 commit into
hestiacp:mainfrom
sahsanu:show-user-and-bandwidth-quota-in-the-dashboard
Jul 11, 2025
Merged

jaapmarcus merged 1 commit into
hestiacp:mainfrom
sahsanu:show-user-and-bandwidth-quota-in-the-dashboard

Conversation

@sahsanu

@sahsanu sahsanu commented Jun 22, 2025

Copy link
Copy Markdown
Contributor

A forum user suggested displaying the user's disk and bandwidth quota on the dashboard.

https://forum.hestiacp.com/t/display-quota-in-user-dashboard/6498

User jojo showed the code to add the disk quota and I followed their code to also add the bandwidth quota.

imagen

Note: the panel.php template has many modifications but it's because npx prettier --write panel.php modified the file.

The code added is this:

<span class="top-bar-usage-item">
        <i class="fas fa-hard-drive" title="<?= _("Disk") ?>: <?= humanize_usage_size($panel[$user]["U_DISK"]) ?> <?= humanize_usage_measure($panel[$user]["U_DISK"]) ?>"></i>
        <span class="u-text-bold">
                <?= humanize_usage_size($panel[$user]["U_DISK"]) ?> 
        </span>
        <?= humanize_usage_measure($panel[$user]["U_DISK"]) ?>
        /
        <span class="u-text-bold">
        <?= humanize_usage_size($panel[$user]["DISK_QUOTA"]) ?>
        </span>
        <?= humanize_usage_measure($panel[$user]["DISK_QUOTA"]) ?>
</span>
<span class="top-bar-usage-item">
        <i class="fas fa-right-left" title="<?= _("Bandwidth") ?>: <?= humanize_usage_size($panel[$user]["U_BANDWIDTH"]) ?> <?= humanize_usage_measure($panel[$user]["U_BANDWIDTH"]) ?>"></i>
        <span class="u-text-bold">
                <?= humanize_usage_size($panel[$user]["U_BANDWIDTH"]) ?>
        </span>
        <?= humanize_usage_measure($panel[$user]["U_BANDWIDTH"]) ?>
        /
        <span class="u-text-bold">
                <?= humanize_usage_size($panel[$user]["BANDWIDTH"]) ?>
        </span>
        <?= humanize_usage_measure($panel[$user]["BANDWIDTH"]) ?>
</span> 

@bojandenic

Copy link
Copy Markdown

Does this future inform the client that his disk is full via email? @sahsanu

@uj

uj commented Jul 10, 2025

Copy link
Copy Markdown

Does this future inform the client that his disk is full via email? @sahsanu

No. The code added here in this github post only affects what you see in the panel. It does not do anything else.

@jaapmarcus

Copy link
Copy Markdown
Member

Does this future inform the client that his disk is full via email? @sahsanu

No it doesn't it is only a template change.

@jaapmarcus
jaapmarcus merged commit ae6a5db into hestiacp:main Jul 11, 2025
@sahsanu
sahsanu deleted the show-user-and-bandwidth-quota-in-the-dashboard branch August 29, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants