Skip to content

Commit

Permalink
display message on script expression error
Browse files Browse the repository at this point in the history
  • Loading branch information
wakr70 committed Apr 1, 2024
1 parent c008666 commit 92e0631
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion h2-highchart/H2-HighChart.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion h2-highchart/H2-HighChart.js.map

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions h2-highchart/H2-HighChart.src.js
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,11 @@ function setSerienData(p_attr, serieObj) {
return;
}

// no data exists
if (!window.H2buffer.DataAttr[p_attr].buffer_data || !window.H2buffer.DataAttr[p_attr].buffer_data.timestamps) {
return;
}

if (serieObj.options.id.toString().substr(0, 1) === 'C') {

// Set backtime
Expand Down Expand Up @@ -1382,6 +1387,19 @@ function getDataH2(p_series, p_attrID, p_attr, datStart, datEnd) {
success: function(result) {
if (!result.result) {
console.log(result);

if (result.id) {
// find queue entry
let q_i = window.H2buffer.Queue.findIndex(obj => obj[0] === result.id);

// queue clear for this one
window.H2buffer.Queue.splice(q_i, 1);

loadingInfo();
}
if (result.error && result.error.message) {
alert(result.error.message);
}
} else if (result.result) {
bufferSerienData(result.id, result.result);
}
Expand Down

0 comments on commit 92e0631

Please sign in to comment.