ui: small ui fixes
This commit is contained in:
parent
6c42bb0952
commit
7e3ae1c22e
5 changed files with 16 additions and 6 deletions
|
|
@ -52,11 +52,15 @@ function AlertForm(props) {
|
|||
onDelete,
|
||||
style = {height: "calc('100vh - 40px')"},
|
||||
} = props;
|
||||
const {alertsStore} = useStore()
|
||||
const {alertsStore, metricStore} = useStore()
|
||||
const {
|
||||
triggerOptions,
|
||||
triggerOptions: allTriggerSeries,
|
||||
loading,
|
||||
} = alertsStore
|
||||
|
||||
const triggerOptions = metricStore.instance.series.length > 0 ? allTriggerSeries.filter(s => {
|
||||
return metricStore.instance.series.findIndex(ms => ms.seriesId === s.value) !== -1
|
||||
}) : allTriggerSeries
|
||||
const instance = alertsStore.instance
|
||||
const deleting = loading
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ echarts.use([BarChart]);
|
|||
|
||||
interface BarChartProps extends DataProps {
|
||||
label?: string;
|
||||
onClick?: (event: any) => void;
|
||||
}
|
||||
|
||||
function ORBarChart(props: BarChartProps) {
|
||||
|
|
@ -71,6 +72,11 @@ function ORBarChart(props: BarChartProps) {
|
|||
dataset: datasets,
|
||||
series,
|
||||
});
|
||||
chart.on('click', (event) => {
|
||||
const index = event.dataIndex;
|
||||
const timestamp = (window as any).__timestampMap?.[chartUuid.current]?.[index];
|
||||
props.onClick?.({ activePayload: [{ payload: { timestamp }}]})
|
||||
})
|
||||
|
||||
return () => {
|
||||
chart.dispose();
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@ import { Avatar, Button, Input, Menu, MenuProps, Progress, Typography } from 'an
|
|||
import { useStore } from '@/mstore';
|
||||
import Project from '@/mstore/types/project';
|
||||
import { observer } from 'mobx-react-lite';
|
||||
import { AppWindowMac, EditIcon, Smartphone } from 'lucide-react';
|
||||
import { PencilIcon } from '.store/lucide-react-virtual-3cff663764/package';
|
||||
import { AppWindowMac, EditIcon, Smartphone, PencilIcon } from 'lucide-react';
|
||||
import ProjectForm from 'Components/Client/Projects/ProjectForm';
|
||||
import { useModal } from 'Components/ModalContext';
|
||||
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ const NewAlert = (props: IProps) => {
|
|||
triggerOptions,
|
||||
loading,
|
||||
} = alertsStore
|
||||
|
||||
const deleting = loading
|
||||
const webhooks = settingsStore.webhooks
|
||||
const fetchWebhooks = settingsStore.fetchWebhooks
|
||||
|
|
|
|||
|
|
@ -49,12 +49,12 @@ export const TYPE_ICONS = {
|
|||
} as const
|
||||
export const TYPE_NAMES = {
|
||||
[LIBRARY]: 'Library',
|
||||
[TIMESERIES]: 'Timeseries',
|
||||
[TIMESERIES]: 'Trend',
|
||||
[TABLE]: 'Table',
|
||||
[HEATMAP]: 'Heatmap',
|
||||
[FUNNEL]: 'Funnel',
|
||||
[ERRORS]: 'Errors',
|
||||
[USER_PATH]: 'User Path',
|
||||
[USER_PATH]: 'Journeys',
|
||||
[RETENTION]: 'Retention',
|
||||
[INSIGHTS]: 'Insights',
|
||||
[PERFORMANCE]: 'Performance',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue