From 1c8deb1fccfa4b9e3c0038b2256a835c5325fd9b Mon Sep 17 00:00:00 2001 From: Chris-MS-896 <64865559+Chris-MS-896@users.noreply.github.com> Date: Tue, 22 Dec 2020 21:53:28 -0600 Subject: [PATCH] no message --- src/Explorer/Controls/Settings/SettingsComponent.tsx | 7 ++++++- .../ThroughputInput/ThroughputInputComponentAutoPilotV3.ts | 6 ++++-- .../ThroughputInputComponentAutoscaleV3.html | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/Explorer/Controls/Settings/SettingsComponent.tsx b/src/Explorer/Controls/Settings/SettingsComponent.tsx index 704bebb24..d9cd09f7e 100644 --- a/src/Explorer/Controls/Settings/SettingsComponent.tsx +++ b/src/Explorer/Controls/Settings/SettingsComponent.tsx @@ -801,7 +801,12 @@ export class SettingsComponent extends React.Component this.setState({ autoPilotThroughput: newThroughput }); - private onThroughputChange = (newThroughput: number): void => this.setState({ throughput: newThroughput }); + private onThroughputChange = (newThroughput: number): void => { + if(newThroughput < 400) { + return alert("The value should not small than 400"); + } + this.setState({ throughput: newThroughput }); + } private onAutoPilotSelected = (isAutoPilotSelected: boolean): void => this.setState({ isAutoPilotSelected: isAutoPilotSelected }); diff --git a/src/Explorer/Controls/ThroughputInput/ThroughputInputComponentAutoPilotV3.ts b/src/Explorer/Controls/ThroughputInput/ThroughputInputComponentAutoPilotV3.ts index 8c87897ef..baff1636b 100644 --- a/src/Explorer/Controls/ThroughputInput/ThroughputInputComponentAutoPilotV3.ts +++ b/src/Explorer/Controls/ThroughputInput/ThroughputInputComponentAutoPilotV3.ts @@ -267,8 +267,10 @@ export class ThroughputInputViewModel extends WaitsForTemplateViewModel { return true; }; - public onThroughputChange = (source: any) => { - window.alert("onThroughputChange"); + public onThroughputCheck = (event: any) => { + if(event.value() < 400) { + window.alert("The value should not small than 400"); + } }; private _getSanitizedValue(): number { diff --git a/src/Explorer/Controls/ThroughputInput/ThroughputInputComponentAutoscaleV3.html b/src/Explorer/Controls/ThroughputInput/ThroughputInputComponentAutoscaleV3.html index 14bcff7b2..725b2a905 100644 --- a/src/Explorer/Controls/ThroughputInput/ThroughputInputComponentAutoscaleV3.html +++ b/src/Explorer/Controls/ThroughputInput/ThroughputInputComponentAutoscaleV3.html @@ -152,7 +152,7 @@ required: isManualThroughputInputFieldRequired() }, event:{ - change: onThroughputChange + change: onThroughputCheck }" />