|
|
@@ -59,7 +59,6 @@ const Easy = (props, ref) => {
|
|
|
const [ahEnable, setAhEnable] = useState(false);
|
|
|
const [alEnable, setAlEnable] = useState(false);
|
|
|
const [allEnable, setAllEnable] = useState(false);
|
|
|
- const [showMore, setShowMore] = useState(false);
|
|
|
const [alarmId, setAlarmId] = useState(-1);
|
|
|
|
|
|
const onModalOk = useMemoizedFn(async () => {
|
|
|
@@ -468,7 +467,7 @@ const Easy = (props, ref) => {
|
|
|
autoComplete="off"
|
|
|
form={form}
|
|
|
// requiredMark={false}
|
|
|
- labelAlign="left"
|
|
|
+ labelAlign="right"
|
|
|
colon={false}
|
|
|
labelCol={{
|
|
|
flex: "84px",
|
|
|
@@ -599,7 +598,7 @@ const Easy = (props, ref) => {
|
|
|
<div>
|
|
|
<Space size={8}>
|
|
|
<div className={styles.itemContainer}>
|
|
|
- {!!ah && <div className={styles.label}>上限</div>}
|
|
|
+ {!!ah && <div className={styles.label}>{TranslateText(["上限", "Upper Limit"])}</div>}
|
|
|
<Form.Item
|
|
|
name="ah_value"
|
|
|
key={ahEnable}
|
|
|
@@ -643,7 +642,7 @@ const Easy = (props, ref) => {
|
|
|
className={styles.itemContainer}
|
|
|
style={{ marginLeft: 8 }}
|
|
|
>
|
|
|
- {!!ahh && <div className={styles.label}>上上限</div>}
|
|
|
+ {!!ahh && <div className={styles.label}>{TranslateText(["上上限", "Ultra Upper Limit"])}</div>}
|
|
|
<Form.Item
|
|
|
name="ahh_value"
|
|
|
key={ahhEnable}
|
|
|
@@ -694,7 +693,7 @@ const Easy = (props, ref) => {
|
|
|
<div style={{ marginTop: 10 }}>
|
|
|
<Space size={8}>
|
|
|
<div className={styles.itemContainer}>
|
|
|
- {!!al && <div className={styles.label}>下限</div>}
|
|
|
+ {!!al && <div className={styles.label}>{TranslateText(["下限", "Lower Limit"])}</div>}
|
|
|
<Form.Item
|
|
|
name="al_value"
|
|
|
key={alEnable}
|
|
|
@@ -739,7 +738,7 @@ const Easy = (props, ref) => {
|
|
|
className={styles.itemContainer}
|
|
|
style={{ marginLeft: 8 }}
|
|
|
>
|
|
|
- {!!all && <div className={styles.label}>下下限</div>}
|
|
|
+ {!!all && <div className={styles.label}>{TranslateText(["下下限", "Ultra Lower Limit"])}</div>}
|
|
|
<Form.Item
|
|
|
name="all_value"
|
|
|
key={allEnable}
|
|
|
@@ -811,27 +810,10 @@ const Easy = (props, ref) => {
|
|
|
</Select.Option>
|
|
|
</Select>
|
|
|
</Form.Item>
|
|
|
- <Form.Item label={TranslateText(["告警开关", "Enable"])} name="status">
|
|
|
+ <Form.Item label={TranslateText(["启用状态", "Enable"])} name="status">
|
|
|
<Switch size={"small"} />
|
|
|
</Form.Item>
|
|
|
-
|
|
|
- {!showMore && (
|
|
|
- <Form.Item
|
|
|
- label={
|
|
|
- <Button
|
|
|
- type="link"
|
|
|
- onClick={() => {
|
|
|
- setShowMore(true);
|
|
|
- }}
|
|
|
- style={{ marginLeft: -16 }}
|
|
|
- >
|
|
|
- {TranslateText(["更多", "More"])}
|
|
|
- <DownOutlined></DownOutlined>
|
|
|
- </Button>
|
|
|
- }
|
|
|
- ></Form.Item>
|
|
|
- )}
|
|
|
-
|
|
|
+
|
|
|
<Form.Item
|
|
|
label={TranslateText(["单位", "Unit"])}
|
|
|
name="unit"
|
|
|
@@ -841,7 +823,6 @@ const Easy = (props, ref) => {
|
|
|
message: TranslateText(["请输入单位", "Please input"]),
|
|
|
},
|
|
|
]}
|
|
|
- style={!showMore ? { display: "none" } : null}
|
|
|
>
|
|
|
<Input
|
|
|
placeholder={TranslateText(["请输入", "Please input"])}
|
|
|
@@ -852,14 +833,13 @@ const Easy = (props, ref) => {
|
|
|
<Form.Item
|
|
|
label={TranslateText(["告警组", "Group"])}
|
|
|
name={"group_id"}
|
|
|
- style={!showMore ? { display: "none" } : null}
|
|
|
>
|
|
|
<Select
|
|
|
style={{ width: 200 }}
|
|
|
options={[
|
|
|
...[
|
|
|
{
|
|
|
- label: "未分组",
|
|
|
+ label: TranslateText(["未分组", "Ungrouped"]),
|
|
|
value: 0,
|
|
|
},
|
|
|
],
|
|
|
@@ -878,7 +858,6 @@ const Easy = (props, ref) => {
|
|
|
name={isDisabled ? "" : "defer_seconds"}
|
|
|
disabled={isDisabled}
|
|
|
label={TranslateText(["延时告警", "Delayed alarm"])}
|
|
|
- style={!showMore ? { display: "none" } : null}
|
|
|
>
|
|
|
<div>
|
|
|
<div
|
|
|
@@ -928,7 +907,7 @@ const Easy = (props, ref) => {
|
|
|
>
|
|
|
{deferUnit === 1
|
|
|
? TranslateText(["秒", "seconds"])
|
|
|
- : TranslateText(["分钟", "minutes"])}{" "}
|
|
|
+ : TranslateText(["分钟", "minutes"])}
|
|
|
{TranslateText(["后报警", "of duration"])}
|
|
|
</span>
|
|
|
</div>
|
|
|
@@ -942,21 +921,6 @@ const Easy = (props, ref) => {
|
|
|
)}
|
|
|
</div>
|
|
|
</Form.Item>
|
|
|
-
|
|
|
- {showMore && (
|
|
|
- <Form.Item
|
|
|
- label={
|
|
|
- <Button
|
|
|
- type="link"
|
|
|
- onClick={() => {
|
|
|
- setShowMore(false);
|
|
|
- }}
|
|
|
- >
|
|
|
- 收起<UpOutlined></UpOutlined>
|
|
|
- </Button>
|
|
|
- }
|
|
|
- ></Form.Item>
|
|
|
- )}
|
|
|
</Form>
|
|
|
</div>
|
|
|
);
|