Updated metrics components for compare mode.

This commit is contained in:
Mike Cao 2024-05-23 00:17:20 -07:00
parent 6b03935fca
commit df66acaacf
117 changed files with 602 additions and 513 deletions

View file

@ -85,8 +85,8 @@ async function clickhouseQuery(
limit 500
`,
params,
).then(a => {
return Object.values(a).map(a => {
).then(result => {
return Object.values(result).map((a: any) => {
return {
eventName: a.eventName,
fieldName: a.fieldName,
@ -113,8 +113,8 @@ async function clickhouseQuery(
limit 500
`,
params,
).then(a => {
return Object.values(a).map(a => {
).then(result => {
return Object.values(result).map((a: any) => {
return {
eventName: a.eventName,
fieldName: a.fieldName,

View file

@ -62,8 +62,8 @@ async function clickhouseQuery(
limit 500
`,
params,
).then(a => {
return Object.values(a).map(a => {
).then(result => {
return Object.values(result).map((a: any) => {
return {
fieldName: a.fieldName,
dataType: Number(a.dataType),

View file

@ -68,8 +68,8 @@ async function clickhouseQuery(
) as t
`,
params,
).then(a => {
return Object.values(a).map(a => {
).then(result => {
return Object.values(result).map((a: any) => {
return {
events: Number(a.events),
fields: Number(a.fields),

View file

@ -30,8 +30,8 @@ function clickhouseQuery(
startDate,
endDate,
},
).then(a => {
return Object.values(a).map(a => {
).then(result => {
return Object.values(result).map((a: any) => {
return { websiteId: a.websiteId, count: Number(a.count) };
});
});

View file

@ -92,13 +92,13 @@ async function clickhouseQuery(
`,
params,
).then(result => {
return Object.values(result).map(n => {
return Object.values(result).map((a: any) => {
return {
pageviews: Number(n.pageviews),
visitors: Number(n.visitors),
visits: Number(n.visits),
bounces: Number(n.bounces),
totaltime: Number(n.totaltime),
pageviews: Number(a.pageviews),
visitors: Number(a.visitors),
visits: Number(a.visits),
bounces: Number(a.bounces),
totaltime: Number(a.totaltime),
};
});
});