Mini Shell
# patch for cPanel 11.54 version
--- /usr/local/cpanel/base/frontend/paper_lantern/home/statistics.html.tt
+++ /usr/local/cpanel/base/frontend/paper_lantern/home/statistics.html.tt
@@ -8,11 +8,11 @@
hasDiskUsageIncludeSQLdbs = CPANEL.CPCONF.disk_usage_include_sqldbs,
hasDiskUsageIncludeMailman = CPANEL.CPCONF.disk_usage_include_mailman;
- IF hasCloudLinux;
+ IF hasCloudLinux && !CPANEL.CPCONF.lve_hideuserstat;
Api1.pre_exec("LVEInfo", "start");
Api1.exec("LVEInfo", "start", [undef]);
Api1.post_exec("LVEInfo", "start");
- SET statsCloudLinux = execute( 'StatsBar', 'get_stats', { 'display' => 'lvecpu|lvemem|lvemep', 'infinitylang' => 'true', 'needshash' => 1 } ).data;
+ SET statsCloudLinux = execute( 'StatsBar', 'get_stats', { 'display' => 'lvecpu|lvemem|lvepmem|lvemep|lveiop|lveiops|lveproc|lvequota', 'infinitylang' => 'true', 'needshash' => 1 } ).data;
END;
IF hasPostGres;
@@ -245,7 +245,7 @@
</li>
[% END %]
- [% IF hasCloudLinux %]
+ [% IF hasCloudLinux && !CPANEL.CPCONF.lve_hideuserstat %]
<li class="dashboard-item">
<div class="widget">
<div class="widget-header">
@@ -253,15 +253,44 @@
</div>
<div class="widget-body">
[%
- SET cloudLinuxCPU_info.itemdesc = locale.maketext('CPU Usage');
- PROCESS stats_bar stats=statsCloudLinux.lvecpu app_info=cloudLinuxCPU_info;
+ statsCloudLinux.lvecpu.percent = statsCloudLinux.lvecpu.pc;
+ PROCESS stats_bar stats=statsCloudLinux.lvecpu app_info=statsCloudLinux.lvecpu;
- SET cloudLinuxMem_info.itemdesc = locale.maketext('Memory Usage');
- PROCESS stats_bar stats=statsCloudLinux.lvemem app_info=cloudLinuxMem_info;
+ IF statsCloudLinux.lvemem;
+ statsCloudLinux.lvemem.percent = statsCloudLinux.lvemem.pc;
+ PROCESS stats_bar stats=statsCloudLinux.lvemem app_info=statsCloudLinux.lvemem;
+ END;
- SET cloudLinuxMEP_info.itemdesc = locale.maketext('Entry Processes');
- PROCESS stats_bar stats=statsCloudLinux.lvemep app_info=cloudLinuxMEP_info;
- %]
+ IF statsCloudLinux.lvepmem;
+ statsCloudLinux.lvepmem.percent = statsCloudLinux.lvepmem.pc;
+ PROCESS stats_bar stats=statsCloudLinux.lvepmem app_info=statsCloudLinux.lvepmem;
+ END;
+
+ IF statsCloudLinux.lvemep;
+ statsCloudLinux.lvemep.percent = statsCloudLinux.lvemep.pc;
+ PROCESS stats_bar stats=statsCloudLinux.lvemep app_info=statsCloudLinux.lvemep;
+ END;
+
+ IF statsCloudLinux.lveiop;
+ statsCloudLinux.lveiop.percent = statsCloudLinux.lveiop.pc;
+ PROCESS stats_bar stats=statsCloudLinux.lveiop app_info=statsCloudLinux.lveiop;
+ END;
+
+ IF statsCloudLinux.lveiops;
+ statsCloudLinux.lveiops.percent = statsCloudLinux.lveiops.pc;
+ PROCESS stats_bar stats=statsCloudLinux.lveiops app_info=statsCloudLinux.lveiops;
+ END;
+
+ IF statsCloudLinux.lveproc;
+ statsCloudLinux.lveproc.percent = statsCloudLinux.lveproc.pc;
+ PROCESS stats_bar stats=statsCloudLinux.lveproc app_info=statsCloudLinux.lveproc;
+ END;
+
+ IF statsCloudLinux.lvequota;
+ statsCloudLinux.lvequota.percent = statsCloudLinux.lvequota.pc;
+ PROCESS stats_bar stats=statsCloudLinux.lvequota app_info=statsCloudLinux.lvequota;
+ END;
+ %]
</div>
</div>
</li>
--- /usr/local/cpanel/base/frontend/paper_lantern/home/retro/stats_bar.html.tt
+++ /usr/local/cpanel/base/frontend/paper_lantern/home/retro/stats_bar.html.tt
@@ -19,8 +19,8 @@
statsCollapsed = xStatsCollapsed.data.1.value;
END;
-IF hasCloudLinux;
- SET stats = execute( 'StatsBar', 'get_stats', { 'display' => 'lvecpu|lvemem|lvemep|diskusage|filesusage|bandwidthusage', 'infinitylang' => 'true' } );
+IF hasCloudLinux && !CPANEL.CPCONF.lve_hideuserstat;
+ SET stats = execute( 'StatsBar', 'get_stats', { 'display' => 'lvecpu|lvemem|lvemep|lvepmem|lveiop|lveiops|lvequota|lveproc|diskusage|filesusage|bandwidthusage', 'infinitylang' => 'true' } );
ELSE;
SET stats = execute( 'StatsBar', 'get_stats', { 'display' => 'diskusage|filesusage|bandwidthusage', 'infinitylang' => 'true' } );
END;
@@ -83,6 +83,11 @@
[% END %]
[% FOREACH stat IN stats.data %]
+ [%
+ IF stat.pc.defined;
+ stat.percent = stat.pc;
+ END;
+ %]
<tr id="stats_[% stat.id %]_row">
<td id="stats_[% stat.id %]_text" class="stats_left">
[% stat.item %]
Zerion Mini Shell 1.0