design changes and more
This commit is contained in:
@@ -18,13 +18,13 @@ function check_deployments() {
|
|||||||
console.log(data[k]);
|
console.log(data[k]);
|
||||||
service_name = data[k].name;
|
service_name = data[k].name;
|
||||||
orig_service_name = data[k].orig_name;
|
orig_service_name = data[k].orig_name;
|
||||||
content = data[k].content;
|
version = data[k].version;
|
||||||
installed = data[k].installed;
|
installed = data[k].installed;
|
||||||
if (installed=='true') {
|
if (installed=='true') {
|
||||||
html_data += '<div><a href="#" onclick="reinstall(\''+service_name+'\',\''+service_name+'\')">'+orig_service_name+'</a> - '+content+' - INSTALLED</div>';
|
html_data += '<div><a href="#" onclick="reinstall(\''+service_name+'\',\''+service_name+'\')">'+orig_service_name+'</a> - '+version+' - INSTALLED</div>';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
html_data += '<div><a href="#" onclick="load_template(\''+service_name+'\',\''+service_name+'\')">'+orig_service_name+'</a> - '+content+'</div>';
|
html_data += '<div><a href="#" onclick="load_template(\''+service_name+'\',\''+service_name+'\')">'+orig_service_name+'</a> - '+version+'</div>';
|
||||||
}
|
}
|
||||||
html_data += '<div id="'+service_name+'" class="deployment"></div>';
|
html_data += '<div id="'+service_name+'" class="deployment"></div>';
|
||||||
}
|
}
|
||||||
|
@@ -141,23 +141,24 @@ function show_service($name, $containers) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function show_service_update($name, $update, $uptodate, $error) {
|
function show_service_update($name, $update, $uptodate, $error) {
|
||||||
$str = '<table id="update_'.$name.'">';
|
|
||||||
$str .= "<tr><th>{$name}</th></tr>";
|
|
||||||
|
|
||||||
|
$str = "";
|
||||||
$update = trim($update);
|
$update = trim($update);
|
||||||
if (!empty($update)) {
|
if (!empty($update)) {
|
||||||
$arr = explode(" ",$update);
|
$arr = explode(" ",$update);
|
||||||
foreach ($arr as $container) {
|
foreach ($arr as $container) {
|
||||||
$str .= "<tr><td> </td><td>".$container."</td><td><div id=\"status_".$name."\">UPDATE AVAILABLE</div></td><td><a href=\"javascript:void(0)\" onclick=\"upgrade('{$name}')\">UPDATE</a></td></tr>";
|
$str .= "<tr><td> </td><td>".$container."</td><td><div id=\"status_".$name."\">UPDATE AVAILABLE</div></td><td> </td></tr>";
|
||||||
}
|
}
|
||||||
|
$update_str = "<a href=\"javascript:void(0)\" onclick=\"upgrade('{$name}')\">UPDATE</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$uptodate = trim($uptodate);
|
$uptodate = trim($uptodate);
|
||||||
if (!empty($uptodate)) {
|
if (!empty($uptodate)) {
|
||||||
$arr = explode(" ",$uptodate);
|
$arr = explode(" ",$uptodate);
|
||||||
foreach ($arr as $container) {
|
foreach ($arr as $container) {
|
||||||
$str .= "<tr><td> </td><td>".$container."</td><td><div id=\"status_".$name."\">Already up to date</div></td><td><a href=\"javacript:void(0)\" onclick=\"upgrade('{$name}')\">FORCE UPDATE</a></td></tr>";
|
$str .= "<tr><td> </td><td>".$container."</td><td><div id=\"status_".$name."\">Already up to date</div></td><td> </td></tr>";
|
||||||
}
|
}
|
||||||
|
$update_str = "<a href=\"javacript:void(0)\" onclick=\"upgrade('{$name}')\">FORCE UPDATE</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$error = trim($error);
|
$error = trim($error);
|
||||||
@@ -165,13 +166,15 @@ function show_service_update($name, $update, $uptodate, $error) {
|
|||||||
$arr = explode(" ",$error);
|
$arr = explode(" ",$error);
|
||||||
foreach ($arr as $container) {
|
foreach ($arr as $container) {
|
||||||
//$str .= "<tr><td> </td><td>".$container."</td><td>N/A</td><td></td></tr>";
|
//$str .= "<tr><td> </td><td>".$container."</td><td>N/A</td><td></td></tr>";
|
||||||
$str .= "<tr><td> </td><td>".$container."</td><td><div id=\"status_".$name."\">N/A</div></td><td><a href=\"javascript:void(0)\" onclick=\"upgrade('{$name}')\">TRY UPDATE</a></td></tr>";
|
$str .= "<tr><td> </td><td>".$container."</td><td><div id=\"status_".$name."\">N/A</div></td><td> </td></tr>";
|
||||||
}
|
}
|
||||||
|
$update_str = "<a href=\"javascript:void(0)\" onclick=\"upgrade('{$name}')\">TRY UPDATE</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$str .= '</table>';
|
echo '<table id="update_'.$name.'">';
|
||||||
|
echo "<tr><th>{$name}</th><th> </th><th> </th><th>{$update_str}</th></tr>";
|
||||||
echo $str;
|
echo $str;
|
||||||
|
echo '</table>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// not in use
|
// not in use
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
.hidden {display:none}
|
.hidden {display:none}
|
||||||
fieldset {border: 1px solid #049dff; padding-left: 40px; padding-right: 20px}
|
fieldset {border: 1px solid #049dff; padding-left: 40px; padding-right: 20px; border-radius: 10px; width: 100%}
|
||||||
legend {width: auto;text-align: left !important; padding: 10px; color: #049dff;}
|
legend {width: auto;text-align: left !important; padding: 10px; color: #049dff;}
|
||||||
fieldset.sub_block {border: 1px solid black; margin:-20px 0px 20px -15px}
|
fieldset.sub_block {border: 1px solid black; margin:-20px 0px 20px -15px}
|
||||||
fieldset.sub_block legend {color: black}
|
fieldset.sub_block legend {color: black}
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
<!-- Bootstrap CSS -->
|
<!-- Bootstrap CSS -->
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.2.1/dist/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.2.1/dist/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
|
||||||
<!-- Custom styles for this template -->
|
<!-- Custom styles for this template -->
|
||||||
<link href="installer.css?t=6" rel="stylesheet">
|
<link href="installer.css?t=7" rel="stylesheet">
|
||||||
</head>
|
</head>
|
||||||
<body id="manage" class="text-center">
|
<body id="manage" class="text-center">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
@@ -152,6 +152,6 @@
|
|||||||
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
|
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.14.6/dist/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
|
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.14.6/dist/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.2.1/dist/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.2.1/dist/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
|
||||||
<script src="common.js?t=3"></script>
|
<script src="common.js?t=4"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
70
manage2.html
70
manage2.html
@@ -39,6 +39,9 @@
|
|||||||
label {text-align: left !important;}
|
label {text-align: left !important;}
|
||||||
a, a:hover, a:visited {color: orange}
|
a, a:hover, a:visited {color: orange}
|
||||||
|
|
||||||
|
fieldset {border: 1px solid #ffffff; padding-left: 20px; padding-right: 20px; border-radius: 10px;}
|
||||||
|
legend {width: auto;text-align: left !important; padding: 10px; color: #ffffff;}
|
||||||
|
|
||||||
.profile {
|
.profile {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -101,6 +104,11 @@
|
|||||||
.toggle.active::after {
|
.toggle.active::after {
|
||||||
transform: translateX(20px);
|
transform: translateX(20px);
|
||||||
}
|
}
|
||||||
|
div#themeToggle {
|
||||||
|
position: fixed;
|
||||||
|
top: 10px;
|
||||||
|
right: 10px;
|
||||||
|
}
|
||||||
.buttons {
|
.buttons {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -109,7 +117,8 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.buttons button {
|
.buttons button {
|
||||||
padding: 10px 20px;
|
min-width: 150px;
|
||||||
|
padding: 10px 10px;
|
||||||
background: none;
|
background: none;
|
||||||
border: 1px solid var(--button-border);
|
border: 1px solid var(--button-border);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
@@ -123,6 +132,10 @@
|
|||||||
.container {
|
.container {
|
||||||
clear:both;
|
clear:both;
|
||||||
float:none;
|
float:none;
|
||||||
|
border: 1px solid;
|
||||||
|
border-radius: 10px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
margin: 5px;
|
||||||
}
|
}
|
||||||
.leftside {
|
.leftside {
|
||||||
float:left;
|
float:left;
|
||||||
@@ -131,6 +144,9 @@
|
|||||||
.rightside {
|
.rightside {
|
||||||
float:right;
|
float:right;
|
||||||
width:80%;
|
width:80%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 88vh;
|
||||||
}
|
}
|
||||||
.my-apps {
|
.my-apps {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
@@ -147,6 +163,11 @@
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
.my-apps-container {
|
||||||
|
width:100%;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
.app {
|
.app {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -160,13 +181,21 @@
|
|||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
.innerDiv {
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
footer {
|
footer {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
z-index: 1000;
|
||||||
|
}
|
||||||
.footer-links {
|
.footer-links {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 15px;
|
gap: 15px;
|
||||||
@@ -265,6 +294,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.input-group input {
|
.input-group input {
|
||||||
|
min-width:260px;
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
@@ -368,11 +398,21 @@
|
|||||||
background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpolyline points='1 1 7 7 13 1' style='fill:none;stroke:white;stroke-width:2' /%3E%3C/svg%3E");
|
background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpolyline points='1 1 7 7 13 1' style='fill:none;stroke:white;stroke-width:2' /%3E%3C/svg%3E");
|
||||||
}
|
}
|
||||||
|
|
||||||
.info-container {
|
|
||||||
position: relative;
|
#popup .input-group {
|
||||||
display: inline-block;
|
display: block;
|
||||||
font-family: Arial, sans-serif;
|
}
|
||||||
}
|
|
||||||
|
#popup .row {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-container {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
margin: 5px 0px 0px 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.info-icon {
|
.info-icon {
|
||||||
background-color: #007BFF;
|
background-color: #007BFF;
|
||||||
@@ -507,10 +547,10 @@
|
|||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<div style="text-align:center;">
|
<div style="text-align:center;">
|
||||||
<a href="manage.html" id="refresh_btn">REFRESH</a>
|
<a href="manage2.html" id="refresh_btn">REFRESH</a>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<a href="manage2.html" id="old_btn">OLD DESIGN</a>
|
<a href="manage.html" id="old_btn">OLD DESIGN</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -524,7 +564,7 @@
|
|||||||
<div class="toggle" id="themeToggle"></div>
|
<div class="toggle" id="themeToggle"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="my-apps" id="myAppsContainer"></div>
|
<div class="my-apps"><div id="myAppsContainer" class="my-apps-container"></div></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -600,10 +640,10 @@
|
|||||||
const appDiv = document.createElement('div');
|
const appDiv = document.createElement('div');
|
||||||
appDiv.className = 'app';
|
appDiv.className = 'app';
|
||||||
appDiv.innerHTML = `
|
appDiv.innerHTML = `
|
||||||
<img src="${app.image}" alt="${app.name}" title="${app.orig_name}">${app.orig_name}
|
<img src="${app.image}" alt="${app.name}" title="${app.orig_name} ${app.version}">${app.orig_name}
|
||||||
`;
|
`;
|
||||||
appDiv.addEventListener('click', () => {
|
appDiv.addEventListener('click', () => {
|
||||||
popupText.textContent = `You clicked on ${app.name}!`;
|
popupText.textContent = `You clicked on ${app.name} ${app.version}!`;
|
||||||
if (app.installed=='true') reinstall(app.name, 'popupText');
|
if (app.installed=='true') reinstall(app.name, 'popupText');
|
||||||
else load_template(app.name,'popupText');
|
else load_template(app.name,'popupText');
|
||||||
popup.classList.remove('hidden');
|
popup.classList.remove('hidden');
|
||||||
@@ -656,7 +696,7 @@
|
|||||||
|
|
||||||
function renderVPN() {
|
function renderVPN() {
|
||||||
myAppsContainer.innerHTML = `
|
myAppsContainer.innerHTML = `
|
||||||
<div id="vpn">
|
<div id="vpn" class="innerDiv">
|
||||||
Loading...
|
Loading...
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
@@ -665,7 +705,7 @@
|
|||||||
|
|
||||||
function renderServices() {
|
function renderServices() {
|
||||||
myAppsContainer.innerHTML = `
|
myAppsContainer.innerHTML = `
|
||||||
<div id="services">
|
<div id="services" class="innerDiv">
|
||||||
Loading...
|
Loading...
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
@@ -674,7 +714,7 @@
|
|||||||
|
|
||||||
function renderUpdates() {
|
function renderUpdates() {
|
||||||
myAppsContainer.innerHTML = `
|
myAppsContainer.innerHTML = `
|
||||||
<div id="updates">
|
<div id="updates" class="innerDiv">
|
||||||
Looking for updates... Please wait...
|
Looking for updates... Please wait...
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
20
scan.php
20
scan.php
@@ -144,12 +144,14 @@ switch ($_GET["op"]) {
|
|||||||
else {
|
else {
|
||||||
foreach ($data["DEPLOYMENTS"] as $service_name => $content) {
|
foreach ($data["DEPLOYMENTS"] as $service_name => $content) {
|
||||||
$orig_service_name = $service_name;
|
$orig_service_name = $service_name;
|
||||||
$service_name = strtolower($service_name);
|
$service_name = strtolower($service_name);
|
||||||
//echo base64_decode($content);
|
$version = $content["version"];
|
||||||
|
$icon = $content["icon"];
|
||||||
|
if (empty($icon) || $icon == "null") $icon = "image.png"; // default icon image
|
||||||
if (array_key_exists($service_name,$data["INSTALLED_SERVICES"])) $installed = "true";
|
if (array_key_exists($service_name,$data["INSTALLED_SERVICES"])) $installed = "true";
|
||||||
else $installed = "false";
|
else $installed = "false";
|
||||||
if (!empty($deployments)) $deployments .= ", ";
|
if (!empty($deployments)) $deployments .= ", ";
|
||||||
$deployments .= '{"name": "'.$service_name.'", "orig_name": "'.$orig_service_name.'", "image": "image.png", "content": "'.$content.'", "installed": "'.$installed.'"}';
|
$deployments .= '{"name": "'.$service_name.'", "orig_name": "'.$orig_service_name.'", "image": "'.$icon.'", "version": "'.$version.'", "installed": "'.$installed.'"}';
|
||||||
}
|
}
|
||||||
if (!empty($deployments)) $deployments = "[{$deployments}]";
|
if (!empty($deployments)) $deployments = "[{$deployments}]";
|
||||||
}
|
}
|
||||||
@@ -183,8 +185,8 @@ switch ($_GET["op"]) {
|
|||||||
if ($reinstall) {
|
if ($reinstall) {
|
||||||
//var_dump($template);
|
//var_dump($template);
|
||||||
$letsencrypt = check_letsencrypt();
|
$letsencrypt = check_letsencrypt();
|
||||||
if (empty($letsencrypt)) echo "LETSENCRYPT file doesn't exists...";
|
if (empty($letsencrypt)) echo "LETSENCRYPT file doesn't exists...<br><br>";
|
||||||
elseif ($letsencrypt=="ERROR") echo "LETSENCRYPT file: read JSON error...";
|
elseif ($letsencrypt=="ERROR") echo "LETSENCRYPT file: read JSON error...<br><br>";
|
||||||
else {
|
else {
|
||||||
$domain = "";
|
$domain = "";
|
||||||
foreach ($template->fields as $field) {
|
foreach ($template->fields as $field) {
|
||||||
@@ -194,10 +196,12 @@ switch ($_GET["op"]) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
if (!empty($template->icon)) echo "<div class=\"row\"><img src=\"".$template->icon."\"></div>";
|
echo "<div class=\"row\">";
|
||||||
if (!empty($template->description)) echo "<div class=\"row\"><label>".$template->description."</label></div>";
|
if (!empty($template->icon)) echo "<img src=\"".$template->icon."\">";
|
||||||
|
if (!empty($template->description)) echo "<label style='padding: 10px'>".$template->description."</label>";
|
||||||
|
echo "</div>";
|
||||||
foreach ($template->fields as $field) {
|
foreach ($template->fields as $field) {
|
||||||
if (!empty($field->title)) echo "<div class=\"row\"><b>".$field->title."</b></div>";
|
if (!empty($field->title)) echo "<div class=\"row\"><h3>".$field->title."</h3></div>";
|
||||||
if (isset($field->generated)) {
|
if (isset($field->generated)) {
|
||||||
echo "<input type=\"hidden\" value=\"generated:{$field->generated}\" name=\"{$field->key}\" id=\"{$template->name}_{$field->key}\" class=\"additional_{$template->name}\">";
|
echo "<input type=\"hidden\" value=\"generated:{$field->generated}\" name=\"{$field->key}\" id=\"{$template->name}_{$field->key}\" class=\"additional_{$template->name}\">";
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user