From 47fc603b864b52a70157515f29ec741dd9192f3a Mon Sep 17 00:00:00 2001 From: Herbert Eiselt Date: Fri, 7 Jun 2019 17:55:16 +0200 Subject: SDNR align ODLUX Add missing chart view to UX Performance app Issue-ID: SDNC-790 Signed-off-by: Herbert Eiselt Change-Id: I6f5af1e01d2246927b8d05f826f629c7dd5f59a5 Signed-off-by: Herbert Eiselt --- .../src/handlers/transmissionPower15minHandler.ts | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/transmissionPower15minHandler.ts (limited to 'sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/transmissionPower15minHandler.ts') diff --git a/sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/transmissionPower15minHandler.ts b/sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/transmissionPower15minHandler.ts new file mode 100644 index 000000000..e6ba90f10 --- /dev/null +++ b/sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/transmissionPower15minHandler.ts @@ -0,0 +1,29 @@ +import { createExternal, IExternalTableState } from '../../../../framework/src/components/material-table/utilities'; +import { createSearchDataHandler } from '../../../../framework/src/utilities/elasticSearch'; + + +import { TransmissionPowerDataType, TransmissionPower, TransmissionPowerResult } from '../models/transmissionPowerDataType'; + +export interface ITransmissionPower15minState extends IExternalTableState { } + +/** + * Creates elastic search material data fetch handler for Transmission power from historicalperformance15min database. + */ +const transmissionPowerSearchHandler = createSearchDataHandler( + "sdnperformance/historicalperformance15min", + null, + (hit) => ({ + _id: hit._id, + ...hit._source, + ...hit._source["performance-data"] + }), + (name) => `${name}`); + +export const { + actionHandler: transmissionPower15minActionHandler, + createActions: createTransmissionPower15minActions, + createProperties: createTransmissionPower15minProperties, + createPreActions: createTransmissionPower15minPreActions, + reloadAction: transmissionPower15minReloadAction, +} = createExternal(transmissionPowerSearchHandler, appState => appState.performanceHistory.transmissionPower15min); + -- cgit 1.2.3-korg