diff options
Diffstat (limited to 'sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/receiveLevelHandler.ts')
-rw-r--r-- | sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/receiveLevelHandler.ts | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/receiveLevelHandler.ts b/sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/receiveLevelHandler.ts index adb70b120..91595cc58 100644 --- a/sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/receiveLevelHandler.ts +++ b/sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/receiveLevelHandler.ts @@ -18,7 +18,7 @@ import { createExternal, IExternalTableState } from '../../../../framework/src/components/material-table/utilities'; import { createSearchDataHandler } from '../../../../framework/src/utilities/elasticSearch'; -import { ReceiveLevelDataType, ReceiveLevelResult } from '../models/receiveLevelDataType'; +import { ReceiveLevelDataType } from '../models/receiveLevelDataType'; import { getFilter } from '../utils/tableUtils'; export interface IReceiveLevelState extends IExternalTableState<ReceiveLevelDataType> { } @@ -26,32 +26,7 @@ export interface IReceiveLevelState extends IExternalTableState<ReceiveLevelData /** * Creates elastic search material data fetch handler for receiveLevel from historicalperformance database. */ -const receiveLevelSearchHandler = createSearchDataHandler<ReceiveLevelResult, ReceiveLevelDataType>( - getFilter, - null, - (hit) => ({ - _id: hit._id, - radioSignalId: hit._source["radio-signal-id"], - scannerId: hit._source["scanner-id"], - utcTimeStamp: hit._source["time-stamp"], - suspectIntervalFlag: hit._source["suspect-interval-flag"], - rxLevelMin: hit._source["performance-data"]["rx-level-min"], - rxLevelAvg: hit._source["performance-data"]["rx-level-avg"], - rxLevelMax: hit._source["performance-data"]["rx-level-max"], - }), - (pmDataEntry: string) => { - switch (pmDataEntry) { - case "radioSignalId": - return "radio-signal-id"; - case "scannerId": - return "scanner-id"; - case "utcTimeStamp": - return "time-stamp" - case "suspectIntervalFlag": - return "suspect-interval-flag"; - } - return pmDataEntry - }); +const receiveLevelSearchHandler = createSearchDataHandler<ReceiveLevelDataType>(getFilter, null); export const { actionHandler: receiveLevelActionHandler, |