diff --git a/ui/app/alert-config/new.tsx b/ui/app/alert-config/new.tsx index 32d9f777bb..ffaa41f91b 100644 --- a/ui/app/alert-config/new.tsx +++ b/ui/app/alert-config/new.tsx @@ -13,7 +13,7 @@ export interface AlertConfigProps { serviceType: string; authToken: string; channelIdString: string; - slotLagMBAlertThreshold: number; + slotLagGBAlertThreshold: number; openConnectionsAlertThreshold: number; forEdit?: boolean; } @@ -38,8 +38,8 @@ const NewAlertConfig = (alertProps: AlertConfigProps) => { const [channelIdString, setChannelIdString] = useState( alertProps.channelIdString ); - const [slotLagMBAlertThreshold, setSlotLagMBAlertThreshold] = - useState(alertProps.slotLagMBAlertThreshold); + const [slotLagGBAlertThreshold, setSlotLagGBAlertThreshold] = + useState(alertProps.slotLagGBAlertThreshold); const [openConnectionsAlertThreshold, setOpenConnectionsAlertThreshold] = useState(alertProps.openConnectionsAlertThreshold); const [loading, setLoading] = useState(false); @@ -54,7 +54,7 @@ const NewAlertConfig = (alertProps: AlertConfigProps) => { serviceConfig: { auth_token: authToken ?? '', channel_ids: channelIdString?.split(',')!, - slot_lag_mb_alert_threshold: slotLagMBAlertThreshold || 5000, + slot_lag_mb_alert_threshold: slotLagGBAlertThreshold * 1000 || 20000, open_connections_alert_threshold: openConnectionsAlertThreshold || 5, }, }; @@ -132,14 +132,14 @@ const NewAlertConfig = (alertProps: AlertConfigProps) => {
-

Slot Lag Alert Threshold (in MB)

+

Slot Lag Alert Threshold (in GB)

setSlotLagMBAlertThreshold(e.target.valueAsNumber)} + value={slotLagGBAlertThreshold} + onChange={(e) => setSlotLagGBAlertThreshold(e.target.valueAsNumber)} />
diff --git a/ui/app/alert-config/page.tsx b/ui/app/alert-config/page.tsx index a2a90e7dd5..7d76872827 100644 --- a/ui/app/alert-config/page.tsx +++ b/ui/app/alert-config/page.tsx @@ -31,7 +31,7 @@ const AlertConfigPage: React.FC = () => { serviceType: '', authToken: '', channelIdString: '', - slotLagMBAlertThreshold: 5000, + slotLagGBAlertThreshold: 20, openConnectionsAlertThreshold: 5, forEdit: false, }; @@ -48,8 +48,8 @@ const AlertConfigPage: React.FC = () => { serviceType: alertConfig.service_type, authToken: JSON.parse(configJSON)?.auth_token, channelIdString: channelIds.join(','), - slotLagMBAlertThreshold: - JSON.parse(configJSON)?.slot_lag_mb_alert_threshold, + slotLagGBAlertThreshold: + (JSON.parse(configJSON)?.slot_lag_mb_alert_threshold as number) / 1000, openConnectionsAlertThreshold: JSON.parse(configJSON)?.open_connections_alert_threshold, forEdit: true,