another huge bugfix push, working releast
This commit is contained in:
@ -155,8 +155,8 @@ if (!in_array($mode, $validModes, true)) {
|
||||
/* ---------- API configuration per mode ---------- */
|
||||
$apiConfig = [
|
||||
'cosmostat' => ['bind' => '10.200.27.20', 'port' => '5000'],
|
||||
/*'gali' => ['bind' => '10.200.27.20', 'port' => '5000'], // same as cosmostat*/
|
||||
'drive_health' => ['bind' => '172.25.1.18', 'port' => '5001'], // new API
|
||||
/*'gali' => ['bind' => '10.200.27.20', 'port' => '5000'], // space filler */
|
||||
'drive_health' => ['bind' => '0.0.0.0', 'port' => '5001'], // drive health API
|
||||
];
|
||||
|
||||
/* ---------- Helper: fetch client details ---------- */
|
||||
@ -251,7 +251,7 @@ function renderSidebar(string $mode){
|
||||
?>
|
||||
<nav class="sidebar">
|
||||
<form method="get" id="modeForm">
|
||||
<label for="modeSelect">Mode:</label>
|
||||
<label for="modeSelect"></label>
|
||||
<select class="select-dark" name="mode" id="modeSelect" onchange="this.form.submit()">
|
||||
<?php foreach ($modes as $key => $label): ?><option value="<?= h($key) ?>" <?= $mode === $key ? 'selected' : '' ?>><?= h($label) ?></option>
|
||||
<?php endforeach; ?></select>
|
||||
@ -297,6 +297,13 @@ function renderSidebar(string $mode){
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($mode == 'cosmostat'): ?>
|
||||
|
||||
<input type="hidden" name="host" value="<?= h($selectedId) ?>">
|
||||
<h3>Endpoints</h3>
|
||||
<ol id="endpointList"></ol>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($mode == 'gali'): ?>
|
||||
<h3>Shuttle Gali</h3>
|
||||
<?php endif; ?>
|
||||
@ -473,7 +480,6 @@ function renderMainContent(string $mode){
|
||||
|
||||
</div> <!-- /wrapper -->
|
||||
|
||||
<?php if ($mode != 'drive_health'): ?>
|
||||
<!-- cosmostat javascript -->
|
||||
<script src="socket.io/socket.io.js"></script>
|
||||
<script src="src/system_metrics.js"></script>
|
||||
@ -488,9 +494,7 @@ function renderMainContent(string $mode){
|
||||
help.style.display = help.style.display === 'none' || help.style.display === '' ? 'block' : 'none';
|
||||
});
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($mode == 'drive_health'): ?>
|
||||
<!-- drive health javascript -->
|
||||
<script>
|
||||
// Removal Handler
|
||||
@ -503,7 +507,6 @@ function renderMainContent(string $mode){
|
||||
document.getElementById('remove_hosts_input').value = ids.join(',');
|
||||
});
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user