{
- return (
+Modal.Header = ({ title, children }: { title?: string, children?: any }) => {
+ return !!children ? (
+
+ {children}
+
+ ): (
@@ -47,11 +53,22 @@ Modal.Header = ({ title }: { title: string }) => {
};
Modal.Content = ({ children, className = 'p-4' }: { children: any; className?: string }) => {
- return
{children}
;
+ return (
+
+ {children}
+
+ );
};
-Modal.Footer = ({ children, className = ''} : any) => {
- return
{children}
;
-}
+Modal.Footer = ({ children, className = '' }: any) => {
+ return (
+
+ {children}
+
+ );
+};
export default Modal;
diff --git a/frontend/app/constants/card.ts b/frontend/app/constants/card.ts
index 8ce72f8c8..24cddf9b3 100644
--- a/frontend/app/constants/card.ts
+++ b/frontend/app/constants/card.ts
@@ -146,12 +146,6 @@ export const TYPES: CardType[] = [
description: 'Find the adoption of your all features in your app.',
slug: WEB_VITALS,
subTypes: [
- {
- title: 'Resources Count By Type',
- slug: FilterKey.RESOURCES_COUNT_BY_TYPE,
- description: '',
- },
- { title: 'Resources Loading Time', slug: FilterKey.RESOURCES_LOADING_TIME, description: '' },
{
title: 'CPU Load',
slug: FilterKey.AVG_CPU,
diff --git a/frontend/app/mstore/metricStore.ts b/frontend/app/mstore/metricStore.ts
index 24d848d0c..df403bd5e 100644
--- a/frontend/app/mstore/metricStore.ts
+++ b/frontend/app/mstore/metricStore.ts
@@ -3,6 +3,7 @@ import Widget from './types/widget';
import { metricService, errorService } from 'App/services';
import { toast } from 'react-toastify';
import Error from './types/error';
+import { TIMESERIES, TABLE, CLICKMAP, FUNNEL, ERRORS, RESOURCE_MONITORING, PERFORMANCE, WEB_VITALS } from 'App/constants/card';
export default class MetricStore {
isLoading: boolean = false;
@@ -58,7 +59,11 @@ export default class MetricStore {
}
changeType(value: string) {
- this.instance.update({ metricType: value})
+ const obj: any = { metricType: value};
+ if (value === ERRORS || value === RESOURCE_MONITORING || value === PERFORMANCE || value === WEB_VITALS) {
+ obj['viewType'] = 'chart';
+ }
+ this.instance.update(obj)
}
reset(id: string) {
diff --git a/frontend/app/mstore/types/widget.ts b/frontend/app/mstore/types/widget.ts
index b7504c4c6..4f835266d 100644
--- a/frontend/app/mstore/types/widget.ts
+++ b/frontend/app/mstore/types/widget.ts
@@ -7,6 +7,7 @@ import { issueOptions } from 'App/constants/filterOptions';
import { FilterKey } from 'Types/filter/filterType';
import Period, { LAST_24_HOURS } from 'Types/app/period';
import { metricService } from "App/services";
+import { WEB_VITALS } from "App/constants/card";
export default class Widget {
public static get ID_KEY():string { return "metricId" }
@@ -134,7 +135,7 @@ export default class Widget {
thumbnail: this.thumbnail,
config: {
...this.config,
- col: (this.metricType === 'funnel' || this.metricOf === FilterKey.ERRORS || this.metricOf === FilterKey.SESSIONS) ? 4 : 2
+ col: (this.metricType === 'funnel' || this.metricOf === FilterKey.ERRORS || this.metricOf === FilterKey.SESSIONS) ? 4 : (this.metricType === WEB_VITALS ? 1 : 2)
},
}
}
diff --git a/frontend/app/types/filter/filterType.ts b/frontend/app/types/filter/filterType.ts
index 0f0f1bdc8..74dfb6e6d 100644
--- a/frontend/app/types/filter/filterType.ts
+++ b/frontend/app/types/filter/filterType.ts
@@ -269,7 +269,7 @@ export enum FilterKey {
IMPACTED_SESSIONS_BY_SLOW_PAGES = 'impactedSessionsBySlowPages',
// Resources
- BREAKDOWN_OF_LOADED_RESOURCES = 'breakdownOfLoadedResources',
+ BREAKDOWN_OF_LOADED_RESOURCES = 'resourcesCountByType',
MISSING_RESOURCES = 'missingResources',
RESOURCE_TYPE_VS_RESPONSE_END = 'resourceTypeVsResponseEnd',
RESOURCE_FETCH_TIME = 'resourceFetchTime',