2024-02-08 17:49:47 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
2024-02-08 18:19:24 +00:00
|
|
|
<title>PiXelTube Web Interface</title>
|
2024-02-08 21:20:13 +00:00
|
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='bootstrap/css/bootstrap.min.css')}}">
|
2024-02-08 17:49:47 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
2024-02-08 18:19:24 +00:00
|
|
|
|
|
|
|
<div class="container mt-5">
|
|
|
|
<h1 class="mb-4">PiXelTube Web Interface</h1>
|
|
|
|
|
|
|
|
<!-- Tube List Table -->
|
|
|
|
<table class="table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th scope="col">Tube ID</th>
|
|
|
|
<th scope="col">Universe</th>
|
|
|
|
<th scope="col">DMX Address</th>
|
|
|
|
<th scope="col">Actions</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody id="tubeList">
|
|
|
|
<!-- Tube information will be dynamically added here -->
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<!-- Tube Settings Modal -->
|
|
|
|
<div class="modal fade" id="tubeSettingsModal" tabindex="-1" role="dialog" aria-labelledby="tubeSettingsModalLabel"
|
|
|
|
aria-hidden="true">
|
|
|
|
<div class="modal-dialog" role="document">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<h5 class="modal-title" id="tubeSettingsModalLabel">Tube Settings</h5>
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
<form id="tubeSettingsForm">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="universeInput">Universe:</label>
|
|
|
|
<input type="number" class="form-control" id="universeInput" required>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="dmxAddressInput">DMX Address:</label>
|
|
|
|
<input type="number" class="form-control" id="dmxAddressInput" required>
|
|
|
|
</div>
|
|
|
|
<button type="submit" class="btn btn-primary">Save Changes</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-02-08 17:49:47 +00:00
|
|
|
</div>
|
|
|
|
|
2024-02-08 18:19:24 +00:00
|
|
|
</div>
|
2024-02-08 17:49:47 +00:00
|
|
|
|
2024-02-08 18:19:24 +00:00
|
|
|
<!-- Include Bootstrap JS and jQuery (assuming you've downloaded them locally) -->
|
2024-02-08 21:20:13 +00:00
|
|
|
<script src="{{ url_for('static', filename='jquery.min.js')}}"></script>
|
|
|
|
<script src="{{ url_for('static', filename='bootstrap/js/bootstrap.bundle.min.js')}}"></script>
|
2024-02-08 18:19:24 +00:00
|
|
|
<script>
|
2024-02-09 16:40:47 +00:00
|
|
|
// Function to handle tube toggle switch changes
|
|
|
|
function handleTubeToggle(tubeId) {
|
|
|
|
// Replace this with your actual logic to handle the toggle switch change
|
|
|
|
console.log(`Tube ${tubeId} toggle switched`);
|
|
|
|
}
|
2024-02-08 17:49:47 +00:00
|
|
|
|
2024-02-09 16:40:47 +00:00
|
|
|
// Function to handle master toggle switch change
|
|
|
|
function handleMasterToggle() {
|
|
|
|
// Replace this with your actual logic to handle the master toggle switch change
|
|
|
|
console.log('Master toggle switched');
|
|
|
|
}
|
2024-02-08 18:19:24 +00:00
|
|
|
|
2024-02-09 16:40:47 +00:00
|
|
|
// Function to handle settings modal open
|
|
|
|
function openSettingsModal(tubeId) {
|
|
|
|
// Replace this with your actual logic to open the settings modal for the specified tube
|
|
|
|
console.log(`Opening settings modal for Tube ${tubeId}`);
|
|
|
|
}
|
2024-02-08 18:19:24 +00:00
|
|
|
|
2024-02-09 16:40:47 +00:00
|
|
|
// Assign event listeners to the toggle switches
|
|
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
|
|
// Replace 'toggleTube1', 'toggleTube2', etc., with the actual IDs of your toggle switches
|
|
|
|
document.getElementById('toggleTube1').addEventListener('change', function () {
|
|
|
|
handleTubeToggle(1);
|
|
|
|
});
|
2024-02-08 18:19:24 +00:00
|
|
|
|
2024-02-09 16:40:47 +00:00
|
|
|
// Add more event listeners for additional toggle switches
|
2024-02-08 18:19:24 +00:00
|
|
|
|
2024-02-09 16:40:47 +00:00
|
|
|
// Assign event listener for the master toggle switch
|
|
|
|
document.getElementById('masterToggle').addEventListener('change', handleMasterToggle);
|
|
|
|
|
|
|
|
// Assign event listeners for settings buttons to open respective modals
|
|
|
|
// Replace 'settingsModalTube1', 'settingsModalTube2', etc., with the actual IDs of your modal buttons
|
|
|
|
document.getElementById('settingsModalTube1').addEventListener('click', function () {
|
|
|
|
openSettingsModal(1);
|
|
|
|
});
|
|
|
|
|
|
|
|
// Add more event listeners for additional settings buttons
|
2024-02-08 18:19:24 +00:00
|
|
|
});
|
|
|
|
</script>
|
2024-02-08 17:49:47 +00:00
|
|
|
</body>
|
|
|
|
</html>
|