From c57af2c8cab66756602bd62442b9c61332dd9251 Mon Sep 17 00:00:00 2001 From: IgorA100 Date: Sat, 15 Jun 2024 00:28:53 +0300 Subject: [PATCH] Fix: Added getStat execution error handling (frame.js) --- web/skins/classic/views/js/frame.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/skins/classic/views/js/frame.js b/web/skins/classic/views/js/frame.js index b1b956e73..5fc9da404 100644 --- a/web/skins/classic/views/js/frame.js +++ b/web/skins/classic/views/js/frame.js @@ -54,6 +54,12 @@ function getStat(params) { $j.getJSON(thisUrl + '?view=request&request=stats&raw=true', params) .done(function(data) { $j('#frameStatsTable').empty().append(''); + if (data.result == "Error") { + console.log(`Error running getStat function: ${data.message}`); + statsBtn.prop('disabled', true); + statsBtn.prop('title', 'No statistics available for this frame'); + return; + } if (!data.raw.length) { statsBtn.prop('disabled', true); statsBtn.prop('title', 'No statistics available for this frame');