Added passeneg manager. Part 3

This commit is contained in:
Alexey Berezhok
2024-12-14 23:10:43 +03:00
parent 455223af4b
commit a2988a71d7
4 changed files with 65 additions and 4 deletions

View File

@@ -33,6 +33,13 @@
letsEncryptEnabled: <?= $v_letsencrypt == "yes" || $v_letsencrypt == "on" ? "true" : "false" ?>,
showCertificates: <?= $v_letsencrypt == "yes" || $v_letsencrypt == "on" ? "false" : "true" ?>,
showAdvanced: false,
<?php
if ($passenger_state == "enabled") {
?>
showPassenger: false,
<?php
}
?>
nginxCacheEnabled: <?= $v_nginx_cache == "yes" ? "true" : "false" ?>,
proxySupportEnabled: <?= !empty($v_proxy) ? "true" : "false" ?>,
customDocumentRootEnabled: <?= !empty($v_custom_doc_root) ? "true" : "false" ?>
@@ -457,6 +464,43 @@
</button>
<?php } ?>
</div>
<?php
if ($passenger_state == "enabled") {
?>
<div class="u-mt15 u-mb20">
<button x-on:click="showPassenger = !showPassenger" type="button" class="button button-secondary">
<?= _("Passenger options") ?>
</button>
</div>
<div x-cloak x-show="showPassenger">
<?php if ($_SESSION["userContext"] === "admin") { ?>
<div class="form-check u-mb10">
<input class="form-check-input" type="checkbox" name="v_passenger_enabled" id="v_passenger_enabled">
<label for="v_passenger_enabled">
<?= _("Enable passenger for domain") ?>
</label>
</div>
<div class="u-mb10">
<label for="v_ruby_path" class="form-label">
<?= _("Set ruby path for domain") ?>
</label>
<select class="form-select" name="v_ruby_path" id="v_ruby_path">
<?php
foreach ($rubys as $key => $value) {
echo "\t\t\t\t<option value=\"".htmlentities($value["RUBY"])."\"";
if ((!empty($domain_ruby)) && ( $value["RUBY"] == $domain_ruby[0]["RUBY"] )){
echo ' selected' ;
}
echo ">".htmlentities($value["RUBY"])."</option>\n";
}
?>
</select>
</div>
<?php } ?>
</div>
<?php
}
?>
</div>
</form>