diff --git a/frontend/app/components/Alerts/AlertForm.js b/frontend/app/components/Alerts/AlertForm.js index 852780e9b..da3b74148 100644 --- a/frontend/app/components/Alerts/AlertForm.js +++ b/frontend/app/components/Alerts/AlertForm.js @@ -52,11 +52,22 @@ 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 + }).map(v => { + const labelArr = v.label.split('.') + labelArr.shift() + return { + ...v, + label: labelArr.join('.') + } + }) : allTriggerSeries const instance = alertsStore.instance const deleting = loading diff --git a/frontend/app/components/Assist/AssistSearchField/AssistSearchField.tsx b/frontend/app/components/Assist/AssistSearchActions/AssistSearchActions.tsx similarity index 88% rename from frontend/app/components/Assist/AssistSearchField/AssistSearchField.tsx rename to frontend/app/components/Assist/AssistSearchActions/AssistSearchActions.tsx index 974b72fb7..33f6c23e9 100644 --- a/frontend/app/components/Assist/AssistSearchField/AssistSearchField.tsx +++ b/frontend/app/components/Assist/AssistSearchActions/AssistSearchActions.tsx @@ -1,7 +1,6 @@ import React from 'react'; import { Button } from 'antd'; import { useModal } from 'App/components/Modal'; -import SessionSearchField from 'Shared/SessionSearchField'; import { MODULES } from 'Components/Client/Modules'; import AssistStats from '../../AssistStats'; @@ -9,7 +8,7 @@ import Recordings from '../RecordingsList/Recordings'; import { useStore } from 'App/mstore'; import { observer } from 'mobx-react-lite'; -function AssistSearchField() { +function AssistSearchActions() { const { searchStoreLive, userStore } = useStore(); const modules = userStore.account.settings?.modules ?? []; const isEnterprise = userStore.isEnterprise @@ -27,9 +26,6 @@ function AssistSearchField() { }; return (