feat(ui) - sessions - widget - data reload

This commit is contained in:
Shekar Siri 2022-06-17 15:48:05 +02:00 committed by rjshrjndrn
parent e813cd593f
commit 9867a5b8bc
2 changed files with 9 additions and 5 deletions

View file

@ -86,7 +86,7 @@ function WidgetChart(props: Props) {
prevMetricRef.current = metric;
const payload = isWidget ? { ...params } : { ...metricParams, ...metric.toJson() };
debounceRequest(metric, payload, isWidget);
}, [period, depsString, _metric.page]);
}, [period, depsString, _metric.page, metric.metricType, metric.metricOf, metric.viewType]);
const renderChart = () => {
const { metricType, viewType, metricOf } = metric;

View file

@ -1,4 +1,3 @@
export default class Error {
sessionId: string = ''
messageId: string = ''
@ -14,6 +13,7 @@ export default class Error {
chart: any = []
sessions: number = 0
users: number = 0
firstOccurrence: string = ''
lastOccurrence: string = ''
timestamp: string = ''
@ -23,7 +23,6 @@ export default class Error {
fromJSON(json: any) {
this.sessionId = json.sessionId
this.messageId = json.messageId
this.timestamp = json.timestamp
this.errorId = json.errorId
this.projectId = json.projectId
this.source = json.source
@ -31,15 +30,20 @@ export default class Error {
this.message = json.message
this.time = json.time
this.function = json.function
this.chart = json.chart
this.stack0InfoString = getStck0InfoString(json.stack || [])
this.chart = json.chart
this.sessions = json.sessions
this.users = json.users
this.firstOccurrence = json.firstOccurrence
this.lastOccurrence = json.lastOccurrence
this.timestamp = json.timestamp
return this
}
}
function getStck0InfoString(stack) {
function getStck0InfoString(stack: any) {
const stack0 = stack[0];
if (!stack0) return "";
let s = stack0.function || "";