Browse files

Add NEMS Info to UI

  • Loading branch information...
NEMS Linux
NEMS Linux committed Nov 28, 2018
1 parent 63008d5 commit 3ed64725f3ec44f5468382e58e7d533071519d1a
Showing with 37 additions and 0 deletions.
  1. +4 −0 info/.htaccess
  2. +33 −0 info/index.php
@@ -0,0 +1,4 @@
AuthType Basic
AuthName "NEMS System Settings"
AuthUserFile /var/www/htpasswd
Require valid-user
@@ -0,0 +1,33 @@
if (!initialized()) {
if (ver('nems') < 1.3) {
exit('Requires NEMS 1.3+');
$platform = ver('platform');

<div class="container" style="margin-top: 100px; padding-bottom: 100px;">
<h2><b>NEMS</b> Server Overview</h2>
<p style="padding:4px 6px; color: #aaa !important;"><b>Your NEMS Hardware ID:</b> <span class="nems-green"><?= shell_exec('/usr/local/bin/nems-info hwid'); ?></span><br />Your NEMS HWID is a unique, but anonymous identifier for your NEMS Linux server.</p>
<p style="padding:4px 6px; color: #aaa !important;"><b>NEMS Server IP Address:</b> <span class="nems-green"><?= shell_exec('/usr/local/bin/nems-info ip'); ?></span><br />If nems.local is not resolving, you may use the IP address to connect to your NEMS server.</p>
<p style="padding:4px 6px; color: #aaa !important;"><b>NEMS Server Alias:</b> <span class="nems-green"><?= shell_exec('/usr/local/bin/nems-info alias'); ?></span></p>
<p style="padding:4px 6px; color: #aaa !important;"><b>Running As:</b> <span class="nems-green"><?= shell_exec('/usr/local/bin/nems-info username'); ?></span></p>
<p style="padding:4px 6px; color: #aaa !important;"><b>NEMS Version Running:</b> <span class="nems-green"><?= shell_exec('/usr/local/bin/nems-info nemsver'); ?></span></p>
<p style="padding:4px 6px; color: #aaa !important;"><b>NEMS Version Available:</b> <span class="nems-green"><?= shell_exec('/usr/local/bin/nems-info nemsveravail'); ?></span></p>
<p style="padding:4px 6px; color: #aaa !important;"><b>NEMS Platform:</b> <span class="nems-green"><?= shell_exec('/usr/local/bin/nems-info platform-name'); ?></span></p>
<p style="padding:4px 6px; color: #aaa !important;"><b>NEMS Network Interface:</b> <span class="nems-green"><?= shell_exec('/usr/local/bin/nems-info nic'); ?></span></p>
<p style="padding:4px 6px; color: #aaa !important;"><b>Number of Hosts:</b> <span class="nems-green"><?= shell_exec('/usr/local/bin/nems-info hosts'); ?></span></p>
<p style="padding:4px 6px; color: #aaa !important;"><b>Number of Services:</b> <span class="nems-green"><?= shell_exec('/usr/local/bin/nems-info services'); ?></span></p>
<p style="padding:4px 6px; color: #aaa !important;"><b>Authorized for Cloud:</b> <span class="nems-green"><?php if (shell_exec('/usr/local/bin/nems-info cloud') == 1) echo 'Yes'; else echo 'No'; ?></span></p>


0 comments on commit 3ed6472

Please sign in to comment.