Browse Source

Bug Fixes

pull/1/head
Václav Španinger 1 year ago
parent
commit
181a65a99b
9 changed files with 20 additions and 10 deletions
  1. +1
    -0
      app/views/Automation.php
  2. +1
    -0
      app/views/Log.php
  3. +2
    -1
      app/views/Login.php
  4. +1
    -0
      app/views/Oauth.php
  5. +2
    -1
      app/views/Plugins.php
  6. +2
    -1
      app/views/Server.php
  7. +1
    -0
      app/views/Setting.php
  8. +2
    -0
      app/views/templates/login.phtml
  9. +8
    -7
      app/views/templates/server.phtml

+ 1
- 0
app/views/Automation.php View File

@ -53,6 +53,7 @@ class Automation extends Template
$template = new Template('automation');
$template->prepare('baseDir', BASEDIR);
$template->prepare('baseUrl', BASEURL);
$template->prepare('debugMod', DEBUGMOD);
$template->prepare('title', 'Automation');
$template->prepare('langMng', $langMng);

+ 1
- 0
app/views/Log.php View File

@ -19,6 +19,7 @@ class Log extends Template
$result = $this->logFinder ('../logs/', $result);
$template->prepare('baseDir', BASEDIR);
$template->prepare('baseUrl', BASEURL);
$template->prepare('debugMod', DEBUGMOD);
$template->prepare('logToLiveTime', LOGTIMOUT);
$template->prepare('title', 'Logy');

+ 2
- 1
app/views/Login.php View File

@ -4,7 +4,7 @@ class Login extends Template
function __construct()
{
$userManager = new UserManager();
if ($userManager->isLogin()){
header('Location: ' . BASEURL);
@ -12,6 +12,7 @@ class Login extends Template
$template = new Template('login');
$template->prepare('baseDir', BASEDIR);
$template->prepare('baseUrl', BASEURL);
$template->prepare('title', 'Home');

+ 1
- 0
app/views/Oauth.php View File

@ -8,6 +8,7 @@ class Oauth extends Template
$template = new Template('oauth');
$template->prepare('baseDir', BASEDIR);
$template->prepare('baseUrl', BASEURL);
$template->prepare('title', 'Simple Home - Oauth');
if (isset($_GET['redirect_uri'])) {

+ 2
- 1
app/views/Plugins.php View File

@ -22,9 +22,10 @@ class Plugins extends Template
}
$plugins = Utilities::sortArrayByKey($plugins, 'status', "desc");
$template = new Template('plugins');
$template->prepare('baseDir', BASEDIR);
$template->prepare('baseUrl', BASEURL);
$template->prepare('debugMod', DEBUGMOD);
$template->prepare('title', 'Plugins');
$template->prepare('langMng', $langMng);

+ 2
- 1
app/views/Server.php View File

@ -22,7 +22,7 @@ class Server extends Template
$load = round($loads[0]/($core_nums + 1)*100, 2);
return $load;
}
function __construct()
{
$userManager = new UserManager();
@ -36,6 +36,7 @@ class Server extends Template
$template->prepare('title', 'Server');
$template->prepare('baseDir', BASEDIR);
$template->prepare('baseUrl', BASEURL);
$template->prepare('debugMod', DEBUGMOD);
$template->prepare('langMng', $langMng);

+ 1
- 0
app/views/Setting.php View File

@ -23,6 +23,7 @@ class Setting extends Template
$template = new Template('setting');
$template->prepare('baseDir', BASEDIR);
$template->prepare('baseUrl', BASEURL);
$template->prepare('debugMod', DEBUGMOD);
$template->prepare('title', 'Automation');
$template->prepare('langMng', $langMng);

+ 2
- 0
app/views/templates/login.phtml View File

@ -4,6 +4,8 @@
<?php
$partial = new Partial('head');
$partial->prepare('baseDir',$BASEDIR);
$partial->prepare('baseUrl',$BASEURL);
$partial->render();
?>
<title><?php echo $TITLE ?></title>

+ 8
- 7
app/views/templates/server.phtml View File

@ -3,7 +3,8 @@
<head>
<?php
$partial = new Partial('head');
$partial->prepare('baseDir', $BASEDIR);
$partial->prepare('baseDir', $BASEDIR);
$partial->prepare('baseUrl', $BASEURL);
$partial->render();
?>
<title><?php echo $TITLE ?></title>
@ -23,23 +24,23 @@
<div class="col-md-9 main-body">
<div class="col-12 col-sm-9 mx-auto mt-4">
<h1><?php echo $LANGMNG->get('t_ServerStats'); ?></h1>
<hr>
<hr>
<label>UPTIME: <?php echo $UPTIME;?></label></br>
<label>SERVER TIME: <?php echo $SERVERTIME;?></label></br>
<label>SERVER NAME: <?php echo $NAME;?></label></br>
<label>SERVER ADDRESS: <?php echo $IP;?></label></br>
<hr>
<hr>
<label>CPU: <?php echo $CPU;?></label></br>
<label>CPU Usage: </label><progress value="<?php echo $CPU;?>" max="100"> <?php echo $RAMFREE;?> </progress></br>
<hr>
<hr>
<label>RAM TOTAL: <?php echo $RAMTOTAL;?></label></br>
<label>RAM FREE: <?php echo $RAMFREE;?></label></br>
<label>RAM Usage: </label><progress value="<?php echo explode(" ", $RAMTOTAL)[0] - explode(" ", $RAMFREE)[0];?>" max="<?php echo explode(" ", $RAMTOTAL)[0];?>"> <?php echo $RAMFREE;?> </progress></br>
<hr>
<hr>
<label>DISK TOTAL: <?php echo $DISKTOTAL;?> bytes</label></br>
<label>DISK FREE: <?php echo $DISKFREE;?> bytes</label></br>
<label>DISK Usage: </label><progress value="<?php echo explode(" ", $DISKTOTAL)[0] - explode(" ", $DISKFREE)[0];?>" max="<?php echo explode(" ", $DISKTOTAL)[0];?>"> <?php echo $DISKFREE;?> </progress></br>
<hr>
<hr>
</div>
</div>
@ -49,6 +50,6 @@
$partial->render();
//TODO js do main.js
?>
</body>
</html>

Loading…
Cancel
Save