forked from ddrilling/asb_cloud_front
Исправлено отсутствие отправки запроса на слияние телеметрий
This commit is contained in:
parent
fcb264b122
commit
d37ceeb68f
@ -59,14 +59,13 @@ export const TelemetryMerger = memo(() => {
|
||||
|
||||
const mergeTelemetry = useCallback(() => invokeWebApiWrapperAsync(
|
||||
async () => {
|
||||
await new Promise(res => setTimeout(res, 1000))
|
||||
/// await AdminTelemetryService.mergeTelemetries(secondary.id, primary.id)
|
||||
await AdminTelemetryService.mergeTelemetries(secondary.id, primary.id)
|
||||
await updateTelemetry()
|
||||
},
|
||||
setIsMerging,
|
||||
'Не удалось объединить телеметрии',
|
||||
'Объединение телеметрий',
|
||||
), [updateTelemetry])
|
||||
), [updateTelemetry, secondary.id, primary.id])
|
||||
|
||||
useEffect(() => updateTelemetry(), [updateTelemetry])
|
||||
|
||||
@ -76,7 +75,6 @@ export const TelemetryMerger = memo(() => {
|
||||
const secondaryId = parseInt(query.get('secondary') ?? null)
|
||||
const primary = isNaN(primaryId) ? null : telemetry.find((t) => t.id === primaryId)
|
||||
const secondary = isNaN(secondaryId) ? null : telemetry.find((t) => t.id === secondaryId)
|
||||
console.log([primary, secondary])
|
||||
setPrimary(primary)
|
||||
setSecondary(secondary)
|
||||
}, [location, telemetry])
|
||||
|
Loading…
Reference in New Issue
Block a user