feat(ui) - fixes

This commit is contained in:
Shekar Siri 2023-01-03 17:21:37 +01:00
parent e3e7664ee8
commit 1f9f78ca0f
9 changed files with 17 additions and 15 deletions

View file

@ -87,7 +87,7 @@ function ResponseTimeDistribution(props: Props) {
/>
<Bar minPointSize={1} name="Calls" dataKey="count" stackId="a" fill={colors[2]} label="Backend" />
<Tooltip {...Styles.tooltip} labelFormatter={val => 'Page Response Time: ' + val} />
{ metric.data.percentiles.map((item, i) => (
{ metric.data.percentiles && metric.data.percentiles.map((item: any, i: number) => (
<ReferenceLine
key={i}
label={

View file

@ -24,6 +24,7 @@ function SpeedIndexByLocation(props: Props) {
const max = metric.data.chart.reduce((acc: any, item: any) => Math.max(acc, item.value), 0);
const min = metric.data.chart.reduce((acc: any, item: any) => Math.min(acc, item.value), 0);
metric.data.chart.forEach((item: any) => {
if (!item || !item.userCountry) { return }
item.perNumber = positionOfTheNumber(min, max, item.value, 5);
data[item.userCountry.toLowerCase()] = item;
});

View file

@ -83,7 +83,7 @@ function DashboardWidgetGrid(props: Props) {
{smallWidgets.length > 0 && regularWidgets.length > 0 ? (
<div className="font-semibold text-xl py-4 flex items-center gap-2 col-span-4">
<Icon name="grid-horizontal" size={26} />
All Metrics
All Cards
</div>
) : null}

View file

@ -78,6 +78,7 @@ function WidgetForm(props: Props) {
break;
case ERRORS:
case RESOURCE_MONITORING:
case PERFORMANCE:
case WEB_VITALS:
obj.viewType = 'chart';
break;

View file

@ -30,7 +30,7 @@ function WidgetSubDetailsView(props: Props) {
<div>
<Breadcrumb
items={[
{ label: dashboardId ? 'Dashboard' : 'Metrics', to: dashboardId ? withSiteId('/dashboard/' + dashboardId, siteId) : withSiteId('/metrics', siteId) },
{ label: dashboardId ? 'Dashboard' : 'Cards', to: dashboardId ? withSiteId('/dashboard/' + dashboardId, siteId) : withSiteId('/metrics', siteId) },
{ label: widget.name, to: withSiteId(`/metrics/${widget.metricId}`, siteId) },
{ label: issueInstance ? issueInstance.title : 'Sub Details' }
]}

View file

@ -73,7 +73,7 @@ function WidgetView(props: Props) {
<Breadcrumb
items={[
{
label: dashboardName ? dashboardName : 'Metrics',
label: dashboardName ? dashboardName : 'Cards',
to: dashboardId ? withSiteId('/dashboard/' + dashboardId, siteId) : withSiteId('/metrics', siteId),
},
{ label: widget.name },

View file

@ -48,7 +48,7 @@ function FilterList(props: Props) {
<SegmentSelection
primary
name="eventsOrder"
extraSmall={true}
size="small"
onSelect={props.onChangeEventsOrder}
value={{ value: filter.eventsOrder }}
list={[

View file

@ -24,7 +24,7 @@ export const FEATURE_ADOPTION = 'featureAdoption';
export const TYPES: CardType[] = [
{
title: 'Add From Library',
title: 'Add from Library',
icon: 'grid',
description: 'Select a pre existing card from card library',
slug: LIBRARY,
@ -92,9 +92,9 @@ export const TYPES: CardType[] = [
description: 'Retention graph of users / features over a period of time.',
slug: PERFORMANCE,
subTypes: [
{ title: 'Cpu', slug: FilterKey.CPU, description: '' },
{ title: 'CPU', slug: FilterKey.CPU, description: '' },
{ title: 'Crashes', slug: FilterKey.CRASHES, description: '' },
{ title: 'Fps', slug: FilterKey.FPS, description: '' },
{ title: 'FPS', slug: FilterKey.FPS, description: '' },
{ title: 'Pages Dom Build Time', slug: FilterKey.PAGES_DOM_BUILD_TIME, description: '' },
{ title: 'Memory Consumption', slug: FilterKey.MEMORY_CONSUMPTION, description: '' },
{ title: 'Pages Response Time', slug: FilterKey.PAGES_RESPONSE_TIME, description: '' },
@ -104,16 +104,16 @@ export const TYPES: CardType[] = [
description: '',
},
{
title: 'Resources Vs Visually Complete',
title: 'Resources vs Visually Complete',
slug: FilterKey.RESOURCES_VS_VISUALLY_COMPLETE,
description: '',
},
{ title: 'Sessions Per Browser', slug: FilterKey.SESSIONS_PER_BROWSER, description: '' },
{ title: 'Sessions per Browser', slug: FilterKey.SESSIONS_PER_BROWSER, description: '' },
{ title: 'Slowest Domains', slug: FilterKey.SLOWEST_DOMAINS, description: '' },
{ title: 'Speed Location', slug: FilterKey.SPEED_LOCATION, description: '' },
{ title: 'Time To Render', slug: FilterKey.TIME_TO_RENDER, description: '' },
{ title: 'Time to Render', slug: FilterKey.TIME_TO_RENDER, description: '' },
{
title: 'Impacted Sessions By Slow Pages',
title: 'Impacted Sessions by Slow Pages',
slug: FilterKey.IMPACTED_SESSIONS_BY_SLOW_PAGES,
description: '',
},
@ -152,7 +152,7 @@ export const TYPES: CardType[] = [
description: 'Uncover the issues impacting user journeys',
},
{
title: 'DOM Build Time',
title: 'DOM Content Loaded',
slug: FilterKey.AVG_DOM_CONTENT_LOADED,
description: 'Keep a close eye on errors and track their type, origin and domain.',
},
@ -163,7 +163,7 @@ export const TYPES: CardType[] = [
'FInd out which resources are missing and those that may be slowign your web app.',
},
{
title: 'DOM Content Loaded',
title: 'First Meaningful Paint',
slug: FilterKey.AVG_FIRST_CONTENTFUL_PIXEL,
description:
"Optimize your app's performance by tracking slow domains, page resposne times, memory consumption, CPU usage and more.",

View file

@ -135,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 : (this.metricType === WEB_VITALS ? 1 : 2)
col: (this.metricType === 'funnel' || this.metricOf === FilterKey.ERRORS || this.metricOf === FilterKey.SESSIONS || this.metricOf === FilterKey.SLOWEST_RESOURCES || this.metricOf === FilterKey.MISSING_RESOURCES || this.metricOf === FilterKey.PAGES_RESPONSE_TIME_DISTRIBUTION) ? 4 : (this.metricType === WEB_VITALS ? 1 : 2)
},
}
}