84 lines
3.0 KiB
HTML
84 lines
3.0 KiB
HTML
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Webservice Monitoring</title>
|
|
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
|
<script src="/static/js/tag_nacht.js" defer></script>
|
|
<script src="/static/js/max_time_diff.js" defer></script>
|
|
<script src="/static/js/fuenf_minuten.js" defer></script>
|
|
</head>
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
const startDateInput = document.getElementById('startDate');
|
|
const endDateInput = document.getElementById('endDate');
|
|
const startTimeInput = document.getElementById('startTime');
|
|
const endTimeInput = document.getElementById('endTime');
|
|
|
|
const now = new Date();
|
|
const yesterday = new Date(now);
|
|
yesterday.setDate(now.getDate() - 1);
|
|
|
|
startDateInput.value = yesterday.toISOString().split('T')[0];
|
|
endDateInput.value = now.toISOString().split('T')[0];
|
|
startTimeInput.value = '00:00';
|
|
endTimeInput.value = '23:59';
|
|
});
|
|
</script>
|
|
<body>
|
|
<h1>Webservice Monitoring</h1>
|
|
<div>
|
|
<h2>Tag/Nacht-Aktivität</h2>
|
|
<canvas id="tagNachtChart"></canvas>
|
|
</div>
|
|
<div>
|
|
<h2>Maximale Zeitdifferenz</h2>
|
|
<label for="startDate">Start-Datum:</label>
|
|
<input type="date" id="startDate">
|
|
<label for="endDate">End-Datum:</label>
|
|
<input type="date" id="endDate">
|
|
<label for="startTime">Start-Zeit:</label>
|
|
<input type="time" id="startTime" value="00:00">
|
|
<label for="endTime">End-Zeit:</label>
|
|
<input type="time" id="endTime" value="23:59">
|
|
<button id="calculateButton">Berechne maximale Differenz</button>
|
|
<p id="maxTimeDiff">Please press calculate.</p>
|
|
</div><div id="fiveMinChartSection">
|
|
<h2>5-Minuten-Chart</h2>
|
|
|
|
<!-- Filter spezifisch für den 5-Minuten-Chart -->
|
|
<label for="fiveMinStartDate">Start-Datum:</label>
|
|
<input type="date" id="fiveMinStartDate">
|
|
|
|
<label for="fiveMinEndDate">End-Datum:</label>
|
|
<input type="date" id="fiveMinEndDate">
|
|
|
|
<label for="fiveMinStartTime">Start-Zeit:</label>
|
|
<input type="time" id="fiveMinStartTime" value="00:00">
|
|
|
|
<label for="fiveMinEndTime">End-Zeit:</label>
|
|
<input type="time" id="fiveMinEndTime" value="23:59">
|
|
|
|
<!-- Canvas für den 5-Minuten-Chart -->
|
|
<canvas id="fuenfMinutenChart" width="400" height="200"></canvas>
|
|
</div>
|
|
|
|
<script>
|
|
// Initialisiere die Filterfelder nur für den 5-Minuten-Chart
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
const startDateInput = document.getElementById('fiveMinStartDate');
|
|
const endDateInput = document.getElementById('fiveMinEndDate');
|
|
const now = new Date();
|
|
const yesterday = new Date(now);
|
|
yesterday.setDate(now.getDate() - 1);
|
|
|
|
// Vorauswahl von Start- und Enddatum für den 5-Minuten-Chart
|
|
startDateInput.value = yesterday.toISOString().split('T')[0];
|
|
endDateInput.value = now.toISOString().split('T')[0];
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|