From: Mohammad Date: Mon, 9 Nov 2020 14:59:34 +0000 (+0100) Subject: Update Link Calculator X-Git-Tag: 1.1.0~4 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=da4768fe4d28822a91ee7384cbb597cd24435ee6;p=ccsdk%2Ffeatures.git Update Link Calculator Add Worst Month analysis to rain loss, update gui Issue-ID: CCSDK-2888 Signed-off-by: Mohammad Change-Id: Ibac53720f252840bcfd41daa8d5edc7ddde78b0f --- diff --git a/sdnr/wt/odlux/apps/linkCalculationApp/package.json b/sdnr/wt/odlux/apps/linkCalculationApp/package.json index f4fac3b07..22b2a6c0a 100644 --- a/sdnr/wt/odlux/apps/linkCalculationApp/package.json +++ b/sdnr/wt/odlux/apps/linkCalculationApp/package.json @@ -21,7 +21,9 @@ "author": "Mohammad Boroon", "license": "Apache-2.0", "dependencies": { - "@odlux/framework": "*" + "@odlux/framework": "*", + "formik": "^2.1.5", + "yup": "^0.29.3" }, "peerDependencies": { "@types/react": "16.9.19", @@ -36,5 +38,12 @@ "react": "16.12.0", "react-dom": "16.12.0", "react-router-dom": "4.3.1" + }, + "devDependencies": { + "@types/yup": "^0.29.7", + "node-sass": "^4.14.1", + "sass": "^1.26.11", + "sass-loader": "^10.0.2", + "webpack": "^4.44.2" } -} \ No newline at end of file +} diff --git a/sdnr/wt/odlux/apps/linkCalculationApp/src/actions/commonLinkCalculationActions.ts b/sdnr/wt/odlux/apps/linkCalculationApp/src/actions/commonLinkCalculationActions.ts index 09887f27f..e7427e4cc 100644 --- a/sdnr/wt/odlux/apps/linkCalculationApp/src/actions/commonLinkCalculationActions.ts +++ b/sdnr/wt/odlux/apps/linkCalculationApp/src/actions/commonLinkCalculationActions.ts @@ -101,4 +101,18 @@ export class updateAltitudeAction extends Action{ super(); } } +export class UpdateAbsorptionLossAction extends Action{ + constructor( + public absorptionOxygen:number, + public absorptionWater:number, + + ){ + super(); + } +} +export class UpdateWorstMonthRainAction extends Action{ + constructor(public month: string){ + super(); + } +} diff --git a/sdnr/wt/odlux/apps/linkCalculationApp/src/components/connectionInfo.tsx b/sdnr/wt/odlux/apps/linkCalculationApp/src/components/connectionInfo.tsx index cae6fbd9e..e6d82e236 100644 --- a/sdnr/wt/odlux/apps/linkCalculationApp/src/components/connectionInfo.tsx +++ b/sdnr/wt/odlux/apps/linkCalculationApp/src/components/connectionInfo.tsx @@ -36,6 +36,7 @@ const ConnectionInfo: React.FunctionComponent = (props) => { {props.isCalculationServerReachable === false && Calculation data can't be loaded.} : null + )} const mapStateToProps = (state: IApplicationStoreState) => ({ diff --git a/sdnr/wt/odlux/apps/linkCalculationApp/src/handlers/linkCalculationAppRootHandler.ts b/sdnr/wt/odlux/apps/linkCalculationApp/src/handlers/linkCalculationAppRootHandler.ts index 85c013572..012e457e0 100644 --- a/sdnr/wt/odlux/apps/linkCalculationApp/src/handlers/linkCalculationAppRootHandler.ts +++ b/sdnr/wt/odlux/apps/linkCalculationApp/src/handlers/linkCalculationAppRootHandler.ts @@ -21,7 +21,7 @@ import { combineActionHandler } from '../../../../framework/src/flux/middleware' // ** do not remove ** import { IApplicationStoreState } from '../../../../framework/src/store/applicationStore'; import { IActionHandler } from '../../../../framework/src/flux/action';; -import { UpdateLinkIdAction, UpdateFrequencyAction , UpdateLatLonAction, UpdateRainAttAction, UpdateRainValAction, updateHideForm, UpdateFslCalculation, UpdateSiteAction, UpdateDistanceAction, isCalculationServerReachableAction, UpdatePolAction, updateAltitudeAction} from '../actions/commonLinkCalculationActions'; +import { UpdateLinkIdAction, UpdateFrequencyAction , UpdateLatLonAction, UpdateRainAttAction, UpdateRainValAction, updateHideForm, UpdateFslCalculation, UpdateSiteAction, UpdateDistanceAction, isCalculationServerReachableAction, UpdatePolAction, updateAltitudeAction, UpdateAbsorptionLossAction, UpdateWorstMonthRainAction} from '../actions/commonLinkCalculationActions'; declare module '../../../../framework/src/store/applicationStore' { interface IApplicationStoreState { @@ -52,7 +52,10 @@ export type ILinkCalculationAppStateState= { amslA: number, amslB:number, aglA: number, - aglB:number + aglB:number, + absorptionWater:number, + absorptionOxygen: number, + month: string } const initialState: ILinkCalculationAppStateState ={ @@ -74,7 +77,10 @@ const initialState: ILinkCalculationAppStateState ={ amslA: 0, amslB:0, aglA: 0, - aglB:0 + aglB:0, + absorptionWater:0, + absorptionOxygen: 0, + month: '' } @@ -93,7 +99,7 @@ export const LinkCalculationHandler: IActionHandler