|
|
@@ -3,10 +3,24 @@ import {FormattedMessage} from 'react-intl';
|
|
|
import {Input, Tooltip, Icon, Button} from 'antd';
|
|
|
import {manageUsers} from "../../../../config";
|
|
|
|
|
|
-class NotificationCard extends Component {
|
|
|
|
|
|
+const valueToKey = {
|
|
|
+ 'dingding webhook': 'dingding webhook',
|
|
|
+ 'notification name': 'requestMethod'
|
|
|
+};
|
|
|
+
|
|
|
+const toolTipTitle = {
|
|
|
+ 'dingding webhook': 'its dingding webhook',
|
|
|
+ 'notification name': 'its notification name'
|
|
|
+};
|
|
|
|
|
|
+const youMustFill = {
|
|
|
+ 'dingding webhook': false,
|
|
|
+ 'notification name': false
|
|
|
+};
|
|
|
|
|
|
+
|
|
|
+class NotificationCard extends Component {
|
|
|
render() {
|
|
|
return (
|
|
|
<div>
|
|
|
@@ -15,8 +29,17 @@ class NotificationCard extends Component {
|
|
|
<div className='item'>
|
|
|
<p style={{marginBottom: 10}}>
|
|
|
<span className='item-title'>
|
|
|
- <span><FormattedMessage id="Web hook"/> </span>
|
|
|
- <Tooltip placement="top" title='dingding webhook'>
|
|
|
+ <span>
|
|
|
+ {
|
|
|
+ youMustFill['dingding webhook']?
|
|
|
+ <span style={{color: 'red', display: 'inline', marginRight: 10}}>*</span>
|
|
|
+ :
|
|
|
+ ''
|
|
|
+ }
|
|
|
+ <FormattedMessage id="Web hook"/>
|
|
|
+
|
|
|
+ </span>
|
|
|
+ <Tooltip placement="top" title={toolTipTitle['dingding webhook']}>
|
|
|
<Icon type="question-circle"/>
|
|
|
</Tooltip>
|
|
|
</span>
|
|
|
@@ -24,8 +47,17 @@ class NotificationCard extends Component {
|
|
|
</p>
|
|
|
<p style={{marginBottom: 10}}>
|
|
|
<span className='item-title'>
|
|
|
- <span><FormattedMessage id="Notification Name"/> </span>
|
|
|
- <Tooltip placement="top" title='notification name'>
|
|
|
+ <span>
|
|
|
+ {
|
|
|
+ youMustFill['notification name']?
|
|
|
+ <span style={{color: 'red', display: 'inline', marginRight: 10}}>*</span>
|
|
|
+ :
|
|
|
+ ''
|
|
|
+ }
|
|
|
+ <FormattedMessage id="Notification Name"/>
|
|
|
+
|
|
|
+ </span>
|
|
|
+ <Tooltip placement="top" title={toolTipTitle['notification name']}>
|
|
|
<Icon type="question-circle"/>
|
|
|
</Tooltip>
|
|
|
</span>
|