add first version of dashboard

This commit is contained in:
Christopher 2020-10-23 14:16:07 +02:00
parent 250103d69f
commit 3b4dabbfa6
2 changed files with 33 additions and 0 deletions

33
pages/dashboard.php Normal file
View File

@ -0,0 +1,33 @@
<?php
if(isset($_SESSION['LOGIN']))
{
if($_SESSION['LOGIN'] == 'true')
{
$dockerClient = new Docker();
$allContainers = $dockerClient->getAllContainers();
$container = NULL;
foreach($allContainers as $thisContainer)
{
if($thisContainer->Id == $_REQUEST['CONATINER'] || $thisContainer->Names[0] == ("/".$_REQUEST['CONATINER']))
$container = $thisContainer
}
if($container == NULL)
die("unknown container");
$HTML = new HTML();
$HTML->setHTMLTitle($container->Names[0]);
$HTML->importHTML("style/default/dashboard.html");
$HTML->build();
echo $HTML->ausgabe();
}else{
die("Login is not valid!");
}
}else{
die("Access denied!");
}
?>