summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/performanceDataHandler.ts
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/performanceDataHandler.ts')
-rw-r--r--sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/performanceDataHandler.ts29
1 files changed, 2 insertions, 27 deletions
diff --git a/sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/performanceDataHandler.ts b/sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/performanceDataHandler.ts
index 51b537fea..131566367 100644
--- a/sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/performanceDataHandler.ts
+++ b/sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/performanceDataHandler.ts
@@ -20,7 +20,7 @@ import * as moment from 'moment';
import { createExternal, IExternalTableState } from '../../../../framework/src/components/material-table/utilities';
import { createSearchDataHandler } from '../../../../framework/src/utilities/elasticSearch';
-import { PerformanceResult, PerformanceDataType } from '../models/performanceDataType';
+import { PerformanceDataType } from '../models/performanceDataType';
import { getFilter } from '../utils/tableUtils';
export interface IPerformanceDataState extends IExternalTableState<PerformanceDataType> { }
@@ -28,32 +28,7 @@ export interface IPerformanceDataState extends IExternalTableState<PerformanceDa
/**
* Creates elastic search material data fetch handler for performance data from historicalperformance15min database.
*/
-const performanceDataSearchHandler = createSearchDataHandler<PerformanceResult, PerformanceDataType>(
- 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"],
- es: hit._source["performance-data"]["es"],
- ses: hit._source["performance-data"]["ses"],
- unavailability: hit._source["performance-data"]["unavailability"],
- }),
- (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 performanceDataSearchHandler = createSearchDataHandler<PerformanceDataType>(getFilter, null);
export const {
actionHandler: performanceDataActionHandler,