Updated lint errors and lint fix
Some checks failed
CI/CD Pipeline - Build, Test, and Deploy / 🔒 Security Scan (push) Successful in 9m31s
CI/CD Pipeline - Build, Test, and Deploy / 🏗️ Build & Push Image (push) Has been skipped
CI/CD Pipeline - Build, Test, and Deploy / 🛡️ Image Security Scan (push) Has been skipped
CI/CD Pipeline - Build, Test, and Deploy / 🚀 Deploy to Development (push) Has been skipped
CI/CD Pipeline - Build, Test, and Deploy / 🧪 Test & Lint (push) Failing after 5m0s
CI/CD Pipeline - Build, Test, and Deploy / 🏭 Deploy to Production (push) Has been skipped
CI/CD Pipeline - Build, Test, and Deploy / 🧹 Cleanup (push) Successful in 1s
Some checks failed
CI/CD Pipeline - Build, Test, and Deploy / 🔒 Security Scan (push) Successful in 9m31s
CI/CD Pipeline - Build, Test, and Deploy / 🏗️ Build & Push Image (push) Has been skipped
CI/CD Pipeline - Build, Test, and Deploy / 🛡️ Image Security Scan (push) Has been skipped
CI/CD Pipeline - Build, Test, and Deploy / 🚀 Deploy to Development (push) Has been skipped
CI/CD Pipeline - Build, Test, and Deploy / 🧪 Test & Lint (push) Failing after 5m0s
CI/CD Pipeline - Build, Test, and Deploy / 🏭 Deploy to Production (push) Has been skipped
CI/CD Pipeline - Build, Test, and Deploy / 🧹 Cleanup (push) Successful in 1s
This commit is contained in:
@ -111,7 +111,7 @@ app.get('/', (req, res) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Error handler
|
// Error handler
|
||||||
app.use((err, req, res, next) => {
|
app.use((err, req, res, _next) => {
|
||||||
console.error('💥 Error:', err);
|
console.error('💥 Error:', err);
|
||||||
res.status(500).json({ error: err.message });
|
res.status(500).json({ error: err.message });
|
||||||
});
|
});
|
||||||
|
|||||||
@ -220,7 +220,7 @@ class MonitoringDashboard {
|
|||||||
const container = document.getElementById('api-metrics');
|
const container = document.getElementById('api-metrics');
|
||||||
|
|
||||||
const requestCounters = data.counters.filter(c => c.name === 'http_requests_total');
|
const requestCounters = data.counters.filter(c => c.name === 'http_requests_total');
|
||||||
const responseCounters = data.counters.filter(c => c.name === 'http_responses_total');
|
// const _responseCounters = data.counters.filter(c => c.name === 'http_responses_total');
|
||||||
const durationHistograms = data.histograms.filter(h => h.name === 'http_request_duration_ms');
|
const durationHistograms = data.histograms.filter(h => h.name === 'http_request_duration_ms');
|
||||||
|
|
||||||
let html = '<div class="metrics-grid">';
|
let html = '<div class="metrics-grid">';
|
||||||
@ -303,7 +303,7 @@ class MonitoringDashboard {
|
|||||||
|
|
||||||
updateStatus(status, text) {
|
updateStatus(status, text) {
|
||||||
const indicator = document.getElementById('status-indicator');
|
const indicator = document.getElementById('status-indicator');
|
||||||
const dot = document.getElementById('status-dot');
|
// const _dot = document.getElementById('status-dot');
|
||||||
const statusText = document.getElementById('status-text');
|
const statusText = document.getElementById('status-text');
|
||||||
|
|
||||||
indicator.className = `status-indicator ${status}`;
|
indicator.className = `status-indicator ${status}`;
|
||||||
@ -367,6 +367,7 @@ class MonitoringDashboard {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Global functions for buttons
|
// Global functions for buttons
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
async function refreshData() {
|
async function refreshData() {
|
||||||
const dashboard = window.dashboard;
|
const dashboard = window.dashboard;
|
||||||
if (dashboard) {
|
if (dashboard) {
|
||||||
@ -374,6 +375,7 @@ async function refreshData() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
async function testAPI() {
|
async function testAPI() {
|
||||||
try {
|
try {
|
||||||
const response = await fetch('/api/test');
|
const response = await fetch('/api/test');
|
||||||
@ -392,6 +394,7 @@ async function testAPI() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
async function downloadMetrics() {
|
async function downloadMetrics() {
|
||||||
try {
|
try {
|
||||||
const response = await fetch('/api/metrics');
|
const response = await fetch('/api/metrics');
|
||||||
|
|||||||
Reference in New Issue
Block a user