Skip the history records if the JSON info can't be parsed instead of showing 'No history'. Fixes #7468

This commit is contained in:
Aditya Toshniwal 2022-06-13 11:43:26 +05:30 committed by Akshay Joshi
parent fd1f71587f
commit f615ef30f9
2 changed files with 10 additions and 4 deletions

View File

@ -20,3 +20,4 @@ Bug fixes
********* *********
| `Issue #7411 <https://redmine.postgresql.org/issues/7411>`_ - Fixed an issue where the Database restriction is not working. | `Issue #7411 <https://redmine.postgresql.org/issues/7411>`_ - Fixed an issue where the Database restriction is not working.
| `Issue #7468 <https://redmine.postgresql.org/issues/7468>`_ - Skip the history records if the JSON info can't be parsed instead of showing 'No history'.

View File

@ -392,10 +392,15 @@ export function QueryHistory() {
'trans_id': queryToolCtx.params.trans_id, 'trans_id': queryToolCtx.params.trans_id,
})); }));
respData.data.result.forEach((h)=>{ respData.data.result.forEach((h)=>{
h = JSON.parse(h); try {
h.start_time_orig = h.start_time; h = JSON.parse(h);
h.start_time = new Date(h.start_time); h.start_time_orig = h.start_time;
qhu.current.addEntry(h); h.start_time = new Date(h.start_time);
qhu.current.addEntry(h);
} catch {
/* skip the hist record */
return;
}
}); });
setSelectedItemKey(qhu.current.getNextItemKey()); setSelectedItemKey(qhu.current.getNextItemKey());
} catch (error) { } catch (error) {