This is an automated email from the ASF dual-hosted git repository.
gongchao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hertzbeat.git
The following commit(s) were added to refs/heads/master by this push:
new 115f7b40c [bugfix] Fixed an issue of ssl linkage port on the
monitoring editing page (#2350)
115f7b40c is described below
commit 115f7b40c57695c2730bda4a852945796a02d13c
Author: Kerwin Bryant <[email protected]>
AuthorDate: Tue Jul 23 22:56:03 2024 +0800
[bugfix] Fixed an issue of ssl linkage port on the monitoring editing page
(#2350)
Co-authored-by: tomsun28 <[email protected]>
---
.../monitor/monitor-form/monitor-form.component.ts | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git
a/web-app/src/app/routes/monitor/monitor-form/monitor-form.component.ts
b/web-app/src/app/routes/monitor/monitor-form/monitor-form.component.ts
index 60feb69cf..43fea4505 100644
--- a/web-app/src/app/routes/monitor/monitor-form/monitor-form.component.ts
+++ b/web-app/src/app/routes/monitor/monitor-form/monitor-form.component.ts
@@ -140,15 +140,15 @@ export class MonitorFormComponent implements OnChanges {
onParamBooleanChanged(booleanValue: boolean, field: string) {
// For SSL port linkage, port 80 by default is not enabled, but port 443
by default is enabled
if (field === 'ssl') {
- this.params.forEach(param => {
- if (param.field === 'port') {
- if (booleanValue) {
- param.paramValue = '443';
- } else {
- param.paramValue = '80';
- }
+ const portParam = this.params.find(param => param.field === 'port');
+ if (portParam) {
+ if (booleanValue && (portParam.paramValue == null ||
parseInt(portParam.paramValue) === 80)) {
+ portParam.paramValue = 443;
}
- });
+ if (!booleanValue && (portParam.paramValue == null ||
parseInt(portParam.paramValue) === 443)) {
+ portParam.paramValue = 80;
+ }
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]