wait for container station on start, web panel update
This commit is contained in:
@@ -90,7 +90,7 @@ $ContributorsManual = array(
|
||||
<br><br>
|
||||
|
||||
|
||||
<div id="about-github" style="background-color: #d7d7d7; padding: 20px; text-align: center;">
|
||||
<div id="about-github" style="padding: 20px; text-align: center;">
|
||||
<div>
|
||||
<?php echo localize("MODAL_ABOUT_GITHUB"); ?><br>
|
||||
<div style="text-align: center; font-size: 50px;">
|
||||
|
||||
@@ -28,7 +28,7 @@ include_once("/home/httpd/cgi-bin/qpkg/RoonServer/__functions.php");
|
||||
<p class="lead"><?php echo localize("OVERVIEW_TEXT1"); ?><br>
|
||||
<?php echo localize("OVERVIEW_TEXT2"); ?></p>-->
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="col-sm-8">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<span class="fa-stack fa-2x">
|
||||
@@ -39,7 +39,7 @@ include_once("/home/httpd/cgi-bin/qpkg/RoonServer/__functions.php");
|
||||
<p class="card-text">
|
||||
<b><?php echo localize("OVERVIEW_ROONSERVER_PANEL_STATUS"); ?>
|
||||
:</b> <?php if (strlen(isRunning()) > 1 ) {
|
||||
echo '<span data-bs-toggle="tooltip" title="' . localize("OVERVIEW_ROONSERVER_PANEL_CONTAINER_ID") .': ' . isRunning() . '" style="color: green;">' . localize("OVERVIEW_ROONSERVER_PANEL_STATUS_RUNNING") . '</span>';
|
||||
echo '<span data-bs-toggle="tooltip" data-bs-title="' . localize("OVERVIEW_ROONSERVER_PANEL_CONTAINER_ID") .': ' . isRunning() . '" style="color: green;">' . localize("OVERVIEW_ROONSERVER_PANEL_STATUS_RUNNING") . '</span>';
|
||||
} else {
|
||||
echo '<span style="color: red;">' . localize("OVERVIEW_ROONSERVER_PANEL_STATUS_STOPPED") . '</span>';
|
||||
} ?><br>
|
||||
@@ -49,7 +49,7 @@ include_once("/home/httpd/cgi-bin/qpkg/RoonServer/__functions.php");
|
||||
:</b> <?php echo $qpkg_conf['RoonServer']['Version']; ?></span>
|
||||
</p>
|
||||
<h5><?php echo localize("OVERVIEW_ROONSERVER_PANEL_SUBHEAD_DATABASE"); ?></h5>
|
||||
<span data-bs-toggle="tooltip" title="<?php echo $dblocation; ?>">
|
||||
<span data-bs-toggle="tooltip" data-bs-title="<?php echo $dblocation; ?>">
|
||||
<b><?php echo localize("OVERVIEW_ROONSERVER_PANEL_LOCATION"); ?>: </b><?php echo $dblocation; ?>
|
||||
</span>
|
||||
<div class="progress" style="height: 20px;">
|
||||
@@ -59,19 +59,21 @@ include_once("/home/httpd/cgi-bin/qpkg/RoonServer/__functions.php");
|
||||
<?php echo $db_perc . '% ' . localize("OVERVIEW_ROONSERVER_PANEL_SPACE_OF") . ' ' . displayStorage($db_vol_cap) . ' ' . localize("OVERVIEW_ROONSERVER_PANEL_SPACE_USED") . '.'; ?>
|
||||
</p>
|
||||
<div class="row">
|
||||
<span id="log" class="col getModal d-flex justify-content-start">
|
||||
<span id="log" class="col-2 getModal d-flex justify-content-start">
|
||||
<a href="#"
|
||||
class="btn btn-light btn-icon float-left"
|
||||
class="btn btn-outline-danger"
|
||||
data-bs-theme="dark"
|
||||
data-bs-toggle="tooltip"
|
||||
title="<?php echo localize("MODAL_LOGFILES_ICON_TOOLTIP"); ?>">
|
||||
data-bs-title="<?php echo localize("MODAL_LOGFILES_ICON_TOOLTIP"); ?>">
|
||||
<i class="fas fa-ambulance"></i>
|
||||
</a>
|
||||
</span>
|
||||
<span id="setStorage" class="col-6 getModal float-right">
|
||||
<span id="setStorage" class="col-9 getModal ms-auto float-end">
|
||||
<a href="#"
|
||||
class="btn btn-primary"
|
||||
data-bs-theme="dark"
|
||||
data-bs-toggle="tooltip"
|
||||
title="<?php echo localize("OVERVIEW_ROONSERVER_PANEL_CHANGE_DB_LOCATION_TOOLTIP"); ?>">
|
||||
data-bs-title="<?php echo localize("OVERVIEW_ROONSERVER_PANEL_CHANGE_DB_LOCATION_TOOLTIP"); ?>">
|
||||
<?php echo localize("OVERVIEW_ROONSERVER_PANEL_CHANGE_DB_LOCATION"); ?>
|
||||
</a>
|
||||
</span>
|
||||
@@ -79,23 +81,22 @@ include_once("/home/httpd/cgi-bin/qpkg/RoonServer/__functions.php");
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="col-sm-4">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<span class="fa-stack fa-2x">
|
||||
<i class="fa fa-circle fa-stack-2x" style="color: #222222;"></i>
|
||||
<i class="fas fa-cog fa-stack-1x" style="color: #ffffff;"></i>
|
||||
</span>
|
||||
<h5>Settings</h5>
|
||||
<div class=" d-grid gap-3 w-50">
|
||||
|
||||
<h5><?php echo localize("OVERVIEW_OPTIONS_PANEL_TITLE"); ?></h5>
|
||||
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" id="smb_cifs" onchange="changeSettings(this)">
|
||||
<label class="form-check-label justify-content-start" for="flexSwitchCheckChecked">SMB/CIFS mount support</label>
|
||||
</div>
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" id="usb_audio" onchange="changeSettings(this)">
|
||||
<label class="form-check-label justify-content-start" for="flexSwitchCheckChecked">USB audio (DAC)</label>
|
||||
<label class="form-check-label justify-content-start" for="flexSwitchCheckChecked" data-bs-toggle="tooltip" data-bs-title="<?php echo localize("OVERVIEW_OPTIONS_PANEL_USB_AUDIO_TOOLTIP"); ?>">USB audio (DAC)</label>
|
||||
</div>
|
||||
|
||||
<div class="form-check form-switch">
|
||||
@@ -103,14 +104,15 @@ include_once("/home/httpd/cgi-bin/qpkg/RoonServer/__functions.php");
|
||||
<label class="form-check-label justify-content-start text-left" for="flexSwitchCheckChecked">HDMI audio</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<span id="saveOptions" class="getModal">
|
||||
<span id="save" class="getModal">
|
||||
<a href="#"
|
||||
class="btn btn-primary float-right"
|
||||
id="saveButton"
|
||||
class="btn btn-primary float-right disabled"
|
||||
data-bs-toggle="tooltip"
|
||||
onclick="saveOptions()"
|
||||
title="Save Options">
|
||||
Save
|
||||
data-bs-title="Save & Restart"
|
||||
data-bs-theme="dark"
|
||||
><?php echo localize("OVERVIEW_OPTIONS_PANEL_SAVE_BTN"); ?>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
@@ -127,11 +129,6 @@ include_once("/home/httpd/cgi-bin/qpkg/RoonServer/__functions.php");
|
||||
echo "false";
|
||||
} ?>;
|
||||
|
||||
// Enable Tooltips
|
||||
$(function () {
|
||||
document.querySelectorAll('[data-bs-toggle="tooltip"]')
|
||||
});
|
||||
|
||||
// Action when button for Modal is clicked
|
||||
$('.getModal').on('click', function (e) {
|
||||
|
||||
@@ -149,20 +146,42 @@ include_once("/home/httpd/cgi-bin/qpkg/RoonServer/__functions.php");
|
||||
$('#modal').modal('show');
|
||||
return false;
|
||||
});
|
||||
function changeSettings(el) {
|
||||
// add code to guide user to press save next
|
||||
//console.log(el.id + ": " + el.checked);
|
||||
function changeSettings() {
|
||||
var qpkg_options_str = "<?php echo $qpkg_conf_options ?>";
|
||||
var qpkg_options_arr = qpkg_options_str.split(' ');
|
||||
|
||||
var qnap_opt_arr = [];
|
||||
document.getElementById('smb_cifs').checked && qnap_opt_arr.push("smb_cifs");
|
||||
document.getElementById('usb_audio').checked && qnap_opt_arr.push("usb_audio");
|
||||
document.getElementById('hdmi_audio').checked && qnap_opt_arr.push("hdmi_audio");
|
||||
|
||||
console.log(qnap_opt_arr.join(' ') == qpkg_options_arr.join(' '));
|
||||
|
||||
console.log(qnap_opt_arr.join(' ') == qpkg_options_arr.join(' '));
|
||||
|
||||
if ( qnap_opt_arr.join(' ') == qpkg_options_arr.join(' ') ) {
|
||||
$("#saveButton").addClass("disabled");
|
||||
} else {
|
||||
$("#saveButton").removeClass("disabled");
|
||||
}
|
||||
}
|
||||
|
||||
$( document ).ready(function() {
|
||||
var qpkg_options_str = "<?php echo $qpkg_conf_options ?>";
|
||||
var qpkg_options_arr = qpkg_options_str.split(' ');
|
||||
|
||||
for (let conf_option of qpkg_options_arr) {
|
||||
document.getElementById(conf_option).checked = true;
|
||||
}
|
||||
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
|
||||
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
|
||||
|
||||
if ( qpkg_options_str.length > 0 ) {
|
||||
var qpkg_options_arr = qpkg_options_str.split(' ');
|
||||
|
||||
for (let conf_option of qpkg_options_arr) {
|
||||
document.getElementById(conf_option).checked = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Function to download log files
|
||||
function saveOptions () {
|
||||
var qnap_options = "";
|
||||
@@ -170,6 +189,8 @@ function saveOptions () {
|
||||
qnap_options += document.getElementById('usb_audio').checked ? "usb_audio;" : "" ;
|
||||
qnap_options += document.getElementById('hdmi_audio').checked ? "hdmi_audio;" : "" ;
|
||||
|
||||
$("#saveButton").addClass("disabled");
|
||||
|
||||
document.getElementById('smb_cifs').checked
|
||||
var strUrl = '<?php echo NASHOST;?>/cgi-bin/qpkg/RoonServer/ajax/ajax.php?a=setOptions&o=' + qnap_options;
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ include_once("/home/httpd/cgi-bin/qpkg/RoonServer/__functions.php");
|
||||
imageCssClassField: 'faCssClass',
|
||||
uiLibrary: 'bootstrap5',
|
||||
cascadeSelection: false,
|
||||
cascadeCheck: false,
|
||||
selectionType: 'single',
|
||||
icons: {
|
||||
expand: '<i class="fas fa-angle-right" />',
|
||||
@@ -121,10 +122,11 @@ include_once("/home/httpd/cgi-bin/qpkg/RoonServer/__functions.php");
|
||||
<div class="input-group">
|
||||
<span class="input-group-btn">
|
||||
<span class="form form-control"
|
||||
style="background: #F5F5F5; border-radius: 0.25em 0 0 0.25em !important;"
|
||||
style="background: var(--bs-dark-bg-subtle); border-radius: 0.25em 0 0 0.25em !important;"
|
||||
readonly><?php echo localize("MODAL_SETUP_DB_LOCATION"); ?></span>
|
||||
</span>
|
||||
<input id="dblocform" type="text" class="form-control" style="background: #ffffff;" value="<?php
|
||||
<input id="dblocform" type="text" class="form-control" style="background: var(--bs-dark
|
||||
); color: var(--bs-dark-text-emphasis)" value="<?php
|
||||
if (isset($dblocation)) {
|
||||
echo $dblocation;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user