fix(ui) - viewtype change for sessions and jsErrors
This commit is contained in:
parent
1083066b3c
commit
f6160e7288
1 changed files with 6 additions and 0 deletions
|
|
@ -101,6 +101,8 @@ export default class MetricStore {
|
|||
merge(obj: any, updateChangeFlag: boolean = true) {
|
||||
const type = obj.metricType;
|
||||
|
||||
console.log('iobj', obj)
|
||||
|
||||
// handle metricType change
|
||||
if (obj.hasOwnProperty('metricType') && type !== this.instance.metricType) {
|
||||
this.instance.series.forEach((s: any, i: number) => {
|
||||
|
|
@ -109,6 +111,10 @@ export default class MetricStore {
|
|||
this.changeType(type);
|
||||
}
|
||||
|
||||
if (obj.hasOwnProperty('metricOf') && obj.metricOf !== this.instance.metricOf && (obj.metricOf === 'sessions' || obj.metricOf === 'jsErrors')) {
|
||||
obj.viewType = 'table'
|
||||
}
|
||||
|
||||
// handle metricValue change
|
||||
if (obj.hasOwnProperty('metricValue') && obj.metricValue !== this.instance.metricValue) {
|
||||
if (Array.isArray(obj.metricValue) && obj.metricValue.length > 1) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue