📚 Reorganized documentation files and renamed for clarity
This commit is contained in:
@ -189,7 +189,16 @@ function getDefaultChartOptions() {
|
||||
async function createJobStatusChart() {
|
||||
try {
|
||||
const response = await fetch(`${API_BASE_URL}/api/stats/charts/job-status`);
|
||||
const data = await validateApiResponse(response, 'Job-Status-Chart-Daten');
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
|
||||
if (data.error) {
|
||||
throw new Error(data.error);
|
||||
}
|
||||
|
||||
const ctx = document.getElementById('job-status-chart');
|
||||
if (!ctx) return;
|
||||
@ -250,7 +259,16 @@ async function createJobStatusChart() {
|
||||
async function createPrinterUsageChart() {
|
||||
try {
|
||||
const response = await fetch(`${API_BASE_URL}/api/stats/charts/printer-usage`);
|
||||
const data = await validateApiResponse(response, 'Drucker-Nutzung-Chart-Daten');
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
|
||||
if (data.error) {
|
||||
throw new Error(data.error);
|
||||
}
|
||||
|
||||
const ctx = document.getElementById('printer-usage-chart');
|
||||
if (!ctx) return;
|
||||
@ -286,7 +304,16 @@ async function createPrinterUsageChart() {
|
||||
async function createJobsTimelineChart() {
|
||||
try {
|
||||
const response = await fetch(`${API_BASE_URL}/api/stats/charts/jobs-timeline`);
|
||||
const data = await validateApiResponse(response, 'Jobs-Timeline-Chart-Daten');
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
|
||||
if (data.error) {
|
||||
throw new Error(data.error);
|
||||
}
|
||||
|
||||
const ctx = document.getElementById('jobs-timeline-chart');
|
||||
if (!ctx) return;
|
||||
|
Reference in New Issue
Block a user