summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/faultApp/src/actions
diff options
context:
space:
mode:
authorsai-neetha <sai-neetha.phulmali@highstreet-technologies.com>2023-03-20 08:05:47 +0100
committerhighstreetherbert <herbert.eiselt@highstreet-technologies.com>2023-03-29 19:06:25 +0200
commit15e2d3a29b0d1a304965e34f114a911e5a7abdb3 (patch)
tree711ef5616aceb115a1081cccd152eeae0e87bc79 /sdnr/wt/odlux/apps/faultApp/src/actions
parentac5e2dc8f1ee4d5549f7260374e8164d52b07f55 (diff)
Odlux Update
Add eslint and custom icons update Issue-ID: CCSDK-3871 Signed-off-by: sai-neetha <sai-neetha.phulmali@highstreet-technologies.com> Change-Id: If6b676128cc9cff0437a5dc54f85eaafd3b8c586 Signed-off-by: highstreetherbert <herbert.eiselt@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/odlux/apps/faultApp/src/actions')
-rw-r--r--sdnr/wt/odlux/apps/faultApp/src/actions/clearStuckAlarmsAction.ts23
-rw-r--r--sdnr/wt/odlux/apps/faultApp/src/actions/panelChangeActions.ts3
-rw-r--r--sdnr/wt/odlux/apps/faultApp/src/actions/statusActions.ts38
3 files changed, 33 insertions, 31 deletions
diff --git a/sdnr/wt/odlux/apps/faultApp/src/actions/clearStuckAlarmsAction.ts b/sdnr/wt/odlux/apps/faultApp/src/actions/clearStuckAlarmsAction.ts
index cdcbf64d2..7aac8ba35 100644
--- a/sdnr/wt/odlux/apps/faultApp/src/actions/clearStuckAlarmsAction.ts
+++ b/sdnr/wt/odlux/apps/faultApp/src/actions/clearStuckAlarmsAction.ts
@@ -17,20 +17,21 @@
*/
-import { clearStuckAlarms } from "../services/faultStatusService"
-import { Dispatch } from "../../../../framework/src/flux/store";
-import { FaultApplicationBaseAction } from "./notificationActions";
+import { Dispatch } from '../../../../framework/src/flux/store';
+
+import { clearStuckAlarms } from '../services/faultStatusService';
+import { FaultApplicationBaseAction } from './notificationActions';
export class AreStuckAlarmsCleared extends FaultApplicationBaseAction {
- constructor(public isBusy: boolean) {
- super();
- }
+ constructor(public isBusy: boolean) {
+ super();
+ }
}
export const clearStuckAlarmAsyncAction = (dispatch: Dispatch) => async (nodeNames: string[]) => {
- dispatch(new AreStuckAlarmsCleared(true));
- const result = await clearStuckAlarms(nodeNames).catch(error => { console.error(error); return undefined });
- dispatch(new AreStuckAlarmsCleared(false));
- return result;
-} \ No newline at end of file
+ dispatch(new AreStuckAlarmsCleared(true));
+ const result = await clearStuckAlarms(nodeNames).catch(error => { console.error(error); return undefined; });
+ dispatch(new AreStuckAlarmsCleared(false));
+ return result;
+}; \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/faultApp/src/actions/panelChangeActions.ts b/sdnr/wt/odlux/apps/faultApp/src/actions/panelChangeActions.ts
index 7cf02ac4f..fb29e9c1b 100644
--- a/sdnr/wt/odlux/apps/faultApp/src/actions/panelChangeActions.ts
+++ b/sdnr/wt/odlux/apps/faultApp/src/actions/panelChangeActions.ts
@@ -16,6 +16,7 @@
* ============LICENSE_END==========================================================================
*/
import { Action } from '../../../../framework/src/flux/action';
+
import { PanelId } from '../models/panelId';
export class SetPanelAction extends Action {
@@ -32,5 +33,5 @@ export class RememberCurrentPanelAction extends Action {
export const setPanelAction = (panelId: PanelId) => {
return new SetPanelAction(panelId);
-}
+};
diff --git a/sdnr/wt/odlux/apps/faultApp/src/actions/statusActions.ts b/sdnr/wt/odlux/apps/faultApp/src/actions/statusActions.ts
index 54fea6a5f..8b631b96d 100644
--- a/sdnr/wt/odlux/apps/faultApp/src/actions/statusActions.ts
+++ b/sdnr/wt/odlux/apps/faultApp/src/actions/statusActions.ts
@@ -15,10 +15,11 @@
* the License.
* ============LICENSE_END==========================================================================
*/
-import { FaultApplicationBaseAction } from './notificationActions';
-import { getFaultStateFromDatabase } from '../services/faultStatusService';
import { Dispatch } from '../../../../framework/src/flux/store';
+import { getFaultStateFromDatabase } from '../services/faultStatusService';
+import { FaultApplicationBaseAction } from './notificationActions';
+
export class SetFaultStatusAction extends FaultApplicationBaseAction {
constructor(public criticalFaults: number, public majorFaults: number, public minorFaults: number, public warnings: number,
@@ -32,29 +33,28 @@ export class SetFaultStatusAction extends FaultApplicationBaseAction {
export const refreshFaultStatusAsyncAction = async (dispatch: Dispatch) => {
- dispatch(new SetFaultStatusAction(0, 0, 0, 0, true, 0, 0, 0, 0, 0, 0, 0, 0, true));
+ // dispatch(new SetFaultStatusAction(0, 0, 0, 0, true, 0, 0, 0, 0, 0, 0, 0, 0, true));
const result = await getFaultStateFromDatabase().catch(_ => null);
if (result) {
const statusAction = new SetFaultStatusAction(
- result["Critical"] || 0,
- result["Major"] || 0,
- result["Minor"] || 0,
- result["Warning"] || 0,
+ result.Critical || 0,
+ result.Major || 0,
+ result.Minor || 0,
+ result.Warning || 0,
+ false,
+ result.Connected || 0,
+ result.Connecting || 0,
+ result.Disconnected || 0,
+ result.Mounted || 0,
+ result.UnableToConnect || 0,
+ result.Undefined || 0,
+ result.Unmounted || 0,
+ result.total || 0,
false,
- result["Connected"] || 0,
- result["Connecting"] || 0,
- result["Disconnected"] || 0,
- result["Mounted"] || 0,
- result["UnableToConnect"] || 0,
- result["Undefined"] || 0,
- result["Unmounted"] || 0,
- result["total"] || 0,
- false
);
dispatch(statusAction);
return;
- }
- else {
+ } else {
dispatch(new SetFaultStatusAction(0, 0, 0, 0, false, 0, 0, 0, 0, 0, 0, 0, 0, false));
}
-}
+};