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/temperature15minHandler.ts | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/temperature15minHandler.ts (limited to 'sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/temperature15minHandler.ts') diff --git a/sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/temperature15minHandler.ts b/sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/temperature15minHandler.ts new file mode 100644 index 000000000..20fb57035 --- /dev/null +++ b/sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/temperature15minHandler.ts @@ -0,0 +1,29 @@ +import { createExternal, IExternalTableState } from '../../../../framework/src/components/material-table/utilities'; +import { createSearchDataHandler } from '../../../../framework/src/utilities/elasticSearch'; + + +import { TemperatureDataType, Temperature, TemperatureResult } from '../models/temperatureDataType'; + +export interface ITemperature15minState extends IExternalTableState { } + +/** + * Creates elastic search material data fetch handler for Temperature from historicalperformance15min database. + */ +const temperatureSearchHandler = createSearchDataHandler( + "sdnperformance/historicalperformance15min", + null, + (hit) => ({ + _id: hit._id, + ...hit._source, + ...hit._source["performance-data"] + }), + (name) => `${name}`); + +export const { + actionHandler: temperature15minActionHandler, + createActions: createTemperature15minActions, + createProperties: createTemperature15minProperties, + createPreActions: createTemperature15minPreActions, + reloadAction: temperature15minReloadAction, +} = createExternal(temperatureSearchHandler, appState => appState.performanceHistory.temperature15min); + -- cgit 1.2.3-korg