Added ruby manager. Partial

This commit is contained in:
Alexey Berezhok
2024-12-09 23:55:35 +03:00
parent d0da95dfc5
commit 4905975d79
9 changed files with 130 additions and 11 deletions

View File

@@ -0,0 +1,24 @@
<?php
$TAB = "EXTMODULES";
// Main include
include $_SERVER["DOCUMENT_ROOT"] . "/inc/main.php";
// Check user
if ($_SESSION["userContext"] != "admin") {
header("Location: /list/user");
exit();
}
// Data
exec(HESTIA_CMD . "v-ext-modules list json", $output, $return_var);
$data = json_decode(implode("", $output), true);
ksort($data);
unset($output);
// Render page
render_page($user, $TAB, "extmodules");
// Back uri
$_SESSION["back"] = $_SERVER["REQUEST_URI"];

View File

@@ -22,6 +22,7 @@
<div class="units-table-cell u-text-center"><?= _("Module description") ?></div>
<div class="units-table-cell u-text-center"><?= _("Module state") ?></div>
<div class="units-table-cell u-text-center"><?= _("Requirements") ?></div>
<div class="units-table-cell u-text-center"><?= _("Configuration") ?></div>
</div>
<!-- Begin extmodules list item loop -->
@@ -81,10 +82,26 @@
<span class="u-hide-desktop u-text-bold"><?= _("Module state") ?>:</span>
<?= $data[$key]["STATE"] ?>
</div>
<div class="units-table-cell u-text-bold u-text-center-desktop">
<div class="units-table-cell u-text-center-desktop">
<span class="u-hide-desktop"><?= _("Requirements") ?>:</span>
<?= $data[$key]["REQ"] ?>
</div>
<div class="units-table-cell u-text-center-desktop">
<span class="u-hide-desktop"><?= _("Configuration") ?>:</span>
<?php
if (($data[$key]["CONF"]=="yes") && ($status == "enabled")) {
?>
<a href="/extm/<?= urlencode($data[$key]['NAME']) ?>/edit/" title="<?= $data[$key]['NAME'] ?>">
<?= _("Edit") ?>
</a>
<?php
} else {
?>
&nbsp;
<?php
}
?>
</div>
</div>
<?php } ?>
</div>