feat(ui) - cards - keys and dashboardId fix
This commit is contained in:
parent
08e300cb7f
commit
0373544f7e
4 changed files with 16 additions and 7 deletions
|
|
@ -77,7 +77,7 @@ function DashboardView(props: Props) {
|
|||
<Loader loading={loading}>
|
||||
<div style={{ maxWidth: '1300px', margin: 'auto' }}>
|
||||
{/* @ts-ignore */}
|
||||
<DashboardHeader renderReport={props.renderReport} siteId={siteId} />
|
||||
<DashboardHeader renderReport={props.renderReport} siteId={siteId} dashboardId={dashboardId} />
|
||||
|
||||
<DashboardWidgetGrid
|
||||
siteId={siteId}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ function DashboardWidgetGrid(props: Props) {
|
|||
</div>
|
||||
</div>
|
||||
<div className="grid grid-cols-4 p-8 gap-2">
|
||||
<MetricTypeList dashboardId={dashboardId} siteId={siteId} />
|
||||
<MetricTypeList dashboardId={parseInt(dashboardId)} siteId={siteId} />
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ export default class MetricStore {
|
|||
}
|
||||
|
||||
updateKey(key: string, value: any) {
|
||||
console.log('up');
|
||||
// @ts-ignore
|
||||
this[key] = value;
|
||||
}
|
||||
|
|
@ -60,9 +59,19 @@ export default class MetricStore {
|
|||
|
||||
changeType(value: string) {
|
||||
const obj: any = { metricType: value};
|
||||
if (value === TABLE || value === TIMESERIES) {
|
||||
obj['viewType'] = 'table';
|
||||
}
|
||||
if (value === TIMESERIES) {
|
||||
obj['viewType'] = 'lineChart';
|
||||
}
|
||||
if (value === ERRORS || value === RESOURCE_MONITORING || value === PERFORMANCE || value === WEB_VITALS) {
|
||||
obj['viewType'] = 'chart';
|
||||
}
|
||||
|
||||
if (value === FUNNEL) {
|
||||
obj['metricOf'] = 'sessionCount';
|
||||
}
|
||||
this.instance.update(obj)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ export enum FilterKey {
|
|||
USER_DEVICE = 'userDevice',
|
||||
PLATFORM = 'platform',
|
||||
DURATION = 'duration',
|
||||
REFERRER = 'preferrer',
|
||||
REFERRER = 'referrer',
|
||||
USER_COUNTRY = 'userCountry',
|
||||
JOURNEY = 'journey',
|
||||
REQUEST = 'request',
|
||||
|
|
@ -249,8 +249,8 @@ export enum FilterKey {
|
|||
ERRORS_PER_DOMAINS = 'errorsPerDomains',
|
||||
ERRORS_PER_TYPE = 'errorsPerType',
|
||||
CALLS_ERRORS = 'callsErrors',
|
||||
DOMAINS_ERRORS_4XX = 'domainsErrors4xx',
|
||||
DOMAINS_ERRORS_5XX = 'domainsErrors5xx',
|
||||
DOMAINS_ERRORS_4XX = 'domainsErrors4Xx',
|
||||
DOMAINS_ERRORS_5XX = 'domainsErrors5Xx',
|
||||
IMPACTED_SESSIONS_BY_JS_ERRORS = 'impactedSessionsByJsErrors',
|
||||
|
||||
// Performance
|
||||
|
|
@ -272,7 +272,7 @@ export enum FilterKey {
|
|||
BREAKDOWN_OF_LOADED_RESOURCES = 'resourcesCountByType',
|
||||
MISSING_RESOURCES = 'missingResources',
|
||||
RESOURCE_TYPE_VS_RESPONSE_END = 'resourceTypeVsResponseEnd',
|
||||
RESOURCE_FETCH_TIME = 'resourceFetchTime',
|
||||
RESOURCE_FETCH_TIME = 'resourcesLoadingTime',
|
||||
SLOWEST_RESOURCES = 'slowestResources',
|
||||
|
||||
CLICKMAP_URL = 'clickMapUrl',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue