This is an automated email from the ASF dual-hosted git repository.
zihaoxiang pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new ac1eacafe0 [Fix][UI] ensure number type field has number type value in
alarm-instance-manage (#16089)
ac1eacafe0 is described below
commit ac1eacafe0e013626071c9e84caaea19655e0e9e
Author: rockfang <[email protected]>
AuthorDate: Thu May 30 11:21:14 2024 +0800
[Fix][UI] ensure number type field has number type value in
alarm-instance-manage (#16089)
---
.../src/views/security/alarm-instance-manage/use-form.ts | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git
a/dolphinscheduler-ui/src/views/security/alarm-instance-manage/use-form.ts
b/dolphinscheduler-ui/src/views/security/alarm-instance-manage/use-form.ts
index 5e14148f2d..0a003daf43 100644
--- a/dolphinscheduler-ui/src/views/security/alarm-instance-manage/use-form.ts
+++ b/dolphinscheduler-ui/src/views/security/alarm-instance-manage/use-form.ts
@@ -115,6 +115,15 @@ export function useForm() {
state.detailForm.warningType = record.warningType
if (record.pluginInstanceParams)
state.json = JSON.parse(record.pluginInstanceParams)
+ // ensure number type field has number type value
+ state.json.forEach((item: any) => {
+ if (item.validate && item.validate.length) {
+ const numberTypeItem = item.validate.find(
+ (v: any) => v.type === 'number'
+ )
+ if (numberTypeItem) item.value = +item.value
+ }
+ })
}
return {