aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/availableLtpsActionHandler.ts
diff options
context:
space:
mode:
authorAijana Schumann <aijana.schumann@highstreet-technologies.com>2020-02-21 12:45:38 +0100
committerAijana Schumann <aijana.schumann@highstreet-technologies.com>2020-02-21 15:31:59 +0100
commita2041a822f0406742edbd7a1074a73f9c838c0bf (patch)
tree0099d9216a43981fd3928eb13c5c44401f3f19ec /sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/availableLtpsActionHandler.ts
parentd20a9b57c30bb74f1485354bba85740a3ffad702 (diff)
Update odlux
Update performance app: fix scrolling bug, reduce loading times, update ui to use tabs instead of panels, change the view to toggle between chart and table to better visualize data, minior bugfixes for other apps Issue-ID: SDNC-1080 Signed-off-by: Aijana Schumann <aijana.schumann@highstreet-technologies.com> Change-Id: I2b5cf3a5f580f4193421bc047e5256d8e9497e6b Signed-off-by: Aijana Schumann <aijana.schumann@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/availableLtpsActionHandler.ts')
-rw-r--r--sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/availableLtpsActionHandler.ts25
1 files changed, 18 insertions, 7 deletions
diff --git a/sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/availableLtpsActionHandler.ts b/sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/availableLtpsActionHandler.ts
index b3b284b42..fd137fe37 100644
--- a/sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/availableLtpsActionHandler.ts
+++ b/sdnr/wt/odlux/apps/performanceHistoryApp/src/handlers/availableLtpsActionHandler.ts
@@ -20,6 +20,7 @@ import { IActionHandler } from '../../../../framework/src/flux/action';
import {
AllAvailableLtpsLoadedAction,
LoadAllAvailableLtpsAction,
+ SetInitialLoadedAction,
} from '../actions/ltpAction';
import { LtpIds } from '../models/availableLtps';
@@ -27,11 +28,13 @@ import { LtpIds } from '../models/availableLtps';
export interface IAvailableLtpsState {
distinctLtps: LtpIds[];
busy: boolean;
+ loadedOnce: boolean;
}
const ltpListStateInit: IAvailableLtpsState = {
distinctLtps: [],
- busy: false
+ busy: false,
+ loadedOnce: false
};
export const availableLtpsActionHandler: IActionHandler<IAvailableLtpsState> = (state = ltpListStateInit, action) => {
@@ -47,14 +50,22 @@ export const availableLtpsActionHandler: IActionHandler<IAvailableLtpsState> = (
state = {
...state,
distinctLtps: action.availableLtps,
- busy: false
- };
- } else {
- state = {
- ...state,
- busy: false
+ busy: false,
+ loadedOnce: true
};
}
+ } else if (action instanceof SetInitialLoadedAction) {
+
+ state = {
+ ...state,
+ loadedOnce: action.initialLoaded
+ };
+ } else {
+ state = {
+ ...state,
+ busy: false
+ };
}
+
return state;
}; \ No newline at end of file