Update NsPanelTs.ts

Fix Log output payload -> Json.stringify
This commit is contained in:
Thomas
2023-12-25 14:57:04 +01:00
committed by GitHub
parent 723ecde4cd
commit 1cb974494f

View File

@@ -3008,7 +3008,7 @@ function findPageItem(searching: String): PageItem {
let pageItem = activePage.items.find(e => e.id === searching); let pageItem = activePage.items.find(e => e.id === searching);
if (pageItem !== undefined) { if (pageItem !== undefined) {
if (Debug) log('findPageItem -> pageItem ' + pageItem, 'info'); if (Debug) log('findPageItem -> pageItem ' + JSON.stringify(pageItem), 'info');
return pageItem; return pageItem;
} }
@@ -3018,7 +3018,7 @@ function findPageItem(searching: String): PageItem {
return pageItem === undefined; return pageItem === undefined;
}); });
if (Debug) log('findPageItem -> pageItem SubPage ' + pageItem, 'info'); if (Debug) log('findPageItem -> pageItem SubPage ' + JSON.stringifyy(pageItem), 'info');
return pageItem; return pageItem;
} catch (err) { } catch (err) {
@@ -5320,7 +5320,7 @@ function GenerateMediaPage(page: PageMedia): Payload[] {
}); });
} }
if (Debug) { if (Debug) {
log('GenerateMediaPage payload: ' + out_msgs, 'info'); log('GenerateMediaPage payload: ' + JSON.stringify(out_msgs), 'info');
} }
return out_msgs return out_msgs
} catch (err) { } catch (err) {
@@ -5476,7 +5476,7 @@ function GenerateAlarmPage(page: PageAlarm): Payload[] {
}); });
if (Debug) { if (Debug) {
log('GenerateAlarmPage payload: ' + out_msgs, 'info'); log('GenerateAlarmPage payload: ' + JSON.stringify(out_msgs), 'info');
} }
return out_msgs; return out_msgs;
} }
@@ -5556,7 +5556,7 @@ function GenerateUnlockPage(page: PageUnlock): Payload[] {
}); });
if (Debug) { if (Debug) {
log('GenerateUnlockPage payload: ' + out_msgs, 'info'); log('GenerateUnlockPage payload: ' + JSON.stringify(out_msgs), 'info');
} }
return out_msgs; return out_msgs;
@@ -5671,7 +5671,7 @@ function GenerateQRPage(page: PageQR): Payload[] {
}); });
if (Debug) { if (Debug) {
log('GenerateQRPage payload: ' + out_msgs, 'info'); log('GenerateQRPage payload: ' + JSON.stingify(out_msgs), 'info');
} }
return out_msgs; return out_msgs;
@@ -5816,7 +5816,7 @@ function GeneratePowerPage(page: PagePower): Payload[] {
// 1st to 6th Item // 1st to 6th Item
power_string power_string
}); });
if (Debug) log('GeneratePowerPage payload: ' + out_msgs, 'info'); if (Debug) log('GeneratePowerPage payload: ' + JSON.stringify(out_msgs), 'info');
return out_msgs; return out_msgs;
} catch (err) { } catch (err) {
@@ -5848,7 +5848,7 @@ function GenerateChartPage(page: PageChart): Payload[] {
txt txt
}); });
if (Debug) log('GenerateChartPage payload: ' + out_msgs, 'info'); if (Debug) log('GenerateChartPage payload: ' + JSON.stringify(out_msgs), 'info');
return out_msgs; return out_msgs;
} catch (err) { } catch (err) {
@@ -7935,6 +7935,7 @@ function GenerateDetailPage(type: string, optional: string, pageItem: PageItem):
} }
} }
} }
if (Debug) log('GenerateDetailPage -> payload: ' + JSON.stringify(out_msgs), 'info');
return out_msgs; return out_msgs;
} catch (err) { } catch (err) {