[%-
USE Master;
SET hasCloudLinux = ExpVar.expand('$hascloudlinux'),
user = ExpVar.expand('$user'),
dns = CPANEL.CPDATA.DNS,
homeDir = ExpVar.expand('$homedir'),
isDemo = CPANEL.CPDATA.DEMO;
IF hasCloudLinux;
Api1.pre_exec("LVEInfo", "start");
Api1.exec("LVEInfo", "start", [undef]);
Api1.post_exec("LVEInfo", "start");
END;
# used to get the last login IP
-%]
[% MACRO set_bar_class(test_percent)
BLOCK;
IF test_percent >= 80;
'progress-bar progress-bar-danger';
ELSIF test_percent >= 60;
'progress-bar progress-bar-warning';
ELSIF test_percent >= 40;
'progress-bar progress-bar-info';
ELSE;
'progress-bar progress-bar-success';
END;
END
%]
<div id="content-stats" class="section">
<div id="stats-header">
<div id="toggle_extended_stats_img" class="box-expand-control">
</div>
<span role="heading" aria-level="3" class="section-header">
[% user %]
</span>
</div>
<table id="stats">
<tr>
<td id="stats_maindomain_text" class="stats_left">
[% locale.maketext("Main Domain") %]
</td>
<td id="stats_maindomain_value" class="stats_right">
<b>[% dns %]</b>
</td>
</tr>
<tr>
<td id="stats_homedir_text" class="stats_left">
[% locale.maketext("Home Directory") %]
</td>
<td id="stats_homedir_value" class="stats_right">
[% homeDir %]
</td>
</tr>
[% IF !isDemo %]
<tr>
<td id="stats_lastlogin_text" class="stats_left">
[% locale.maketext("Last Login From") %]
</td>
<td id="stats_lastlogin_value" class="stats_right">
[% execute( 'LastLogin', 'get_last_or_current_logged_in_ip' ).data %]
</td>
</tr>
[% END %]
</table>
<div id="extended_stats" style="display: none"></div>
<!-- this is a status value not text, if you change it, translate it, etc it will break the functionality. If it is displayed then this system need refactored to separate the human text from the computer status -->
<div id="extended_stats_state" class="hide">hidden</div>
<div id="content-stats-end">
<div id="extended_stats_loading_icon" style="display: none"></div>
<a href="#" id="toggle_extended_stats">[% locale.maketext("Expand Stats") %]</a>
</div>
</div><!-- end content-stats -->