Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dinky
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangpeng
dinky
Commits
b25694d0
Unverified
Commit
b25694d0
authored
Dec 26, 2023
by
gaoyan
Committed by
GitHub
Dec 26, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the alert option is incorrect (#2798)
* fix log error * Fix the alert option is incorrect * Fix the alert option is incorrect
parent
1a3cc6ac
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
35 deletions
+5
-35
constants.ts
...gCenter/AlertRule/AlertRuleList/RuleEditForm/constants.ts
+1
-3
function.tsx
...gCenter/AlertRule/AlertRuleList/RuleEditForm/function.tsx
+3
-1
index.tsx
...tingCenter/AlertRule/AlertRuleList/RuleEditForm/index.tsx
+1
-0
function.ts
dinky-web/src/pages/SettingCenter/AlertRule/function.ts
+0
-31
No files found.
dinky-web/src/pages/SettingCenter/AlertRule/AlertRuleList/RuleEditForm/constants.ts
View file @
b25694d0
...
@@ -59,7 +59,6 @@ export const AlertRules: any = {
...
@@ -59,7 +59,6 @@ export const AlertRules: any = {
jobName
:
{
jobName
:
{
label
:
l
(
'sys.alert.rule.label.taskId'
),
label
:
l
(
'sys.alert.rule.label.taskId'
),
valueType
:
OperatorType
.
NUMBER_VALUE
,
valueType
:
OperatorType
.
NUMBER_VALUE
,
options_enum
:
EqRuleOperator
},
},
duration
:
{
duration
:
{
label
:
l
(
'sys.alert.rule.label.duration'
),
label
:
l
(
'sys.alert.rule.label.duration'
),
...
@@ -82,8 +81,7 @@ export const AlertRules: any = {
...
@@ -82,8 +81,7 @@ export const AlertRules: any = {
},
},
checkpointCostTime
:
{
checkpointCostTime
:
{
label
:
l
(
'sys.alert.rule.label.checkpointTime'
),
label
:
l
(
'sys.alert.rule.label.checkpointTime'
),
valueType
:
OperatorType
.
OPTIONS_SEL
,
valueType
:
OperatorType
.
NUMBER_VALUE
,
valueEnum
:
BOOLEAN_VALUE_ENUM
},
},
isCheckpointFailed
:
{
isCheckpointFailed
:
{
label
:
l
(
'sys.alert.rule.label.checkpointFailed'
),
label
:
l
(
'sys.alert.rule.label.checkpointFailed'
),
...
...
dinky-web/src/pages/SettingCenter/AlertRule/AlertRuleList/RuleEditForm/function.tsx
View file @
b25694d0
...
@@ -62,13 +62,15 @@ export const buildValueItem = (key: string, isSystem: boolean) => {
...
@@ -62,13 +62,15 @@ export const buildValueItem = (key: string, isSystem: boolean) => {
name=
{
'ruleValue'
}
name=
{
'ruleValue'
}
fieldProps=
{
{
precision
:
0
}
}
fieldProps=
{
{
precision
:
0
}
}
placeholder=
{
plh
}
placeholder=
{
plh
}
width=
{
'sm'
}
/>
/>
);
);
case
OperatorType
.
STR_VALUE
:
case
OperatorType
.
STR_VALUE
:
return
<
ProFormText
disabled=
{
isSystem
}
name=
{
'ruleValue'
}
placeholder=
{
plh
}
/>;
return
<
ProFormText
width=
{
'sm'
}
disabled=
{
isSystem
}
name=
{
'ruleValue'
}
placeholder=
{
plh
}
/>;
case
OperatorType
.
OPTIONS_SEL
:
case
OperatorType
.
OPTIONS_SEL
:
return
(
return
(
<
ProFormSelect
<
ProFormSelect
width=
{
'sm'
}
disabled=
{
isSystem
}
disabled=
{
isSystem
}
width=
{
'sm'
}
width=
{
'sm'
}
name=
'ruleValue'
name=
'ruleValue'
...
...
dinky-web/src/pages/SettingCenter/AlertRule/AlertRuleList/RuleEditForm/index.tsx
View file @
b25694d0
...
@@ -195,6 +195,7 @@ const RuleEditForm = (props: AlertRuleFormProps) => {
...
@@ -195,6 +195,7 @@ const RuleEditForm = (props: AlertRuleFormProps) => {
disabled=
{
isSystem
}
disabled=
{
isSystem
}
name=
'ruleOperator'
name=
'ruleOperator'
mode=
{
'single'
}
mode=
{
'single'
}
width=
{
'sm'
}
options=
{
getOperatorOptions
(
ruleKey
.
ruleKey
)
}
options=
{
getOperatorOptions
(
ruleKey
.
ruleKey
)
}
/>
/>
)
}
)
}
...
...
dinky-web/src/pages/SettingCenter/AlertRule/function.ts
deleted
100644 → 0
View file @
1a3cc6ac
/*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
export
const
validationOptions
=
(
value
:
string
)
=>
{
switch
(
value
)
{
case
'jobInstance.status'
:
case
'checkPoints.checkFailed(#key,#checkPoints)'
:
case
'exceptionRule.isException(#key,#exceptions)'
:
return
true
;
case
'checkPoints.checkpointTime(#key,#checkPoints)'
:
return
false
;
default
:
return
false
;
}
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment