diff --git a/Tombolo/client-reactjs/src/components/admin/Integrations/asr/DomainModal.jsx b/Tombolo/client-reactjs/src/components/admin/Integrations/asr/DomainModal.jsx
index 6f69ddef..f0ebed22 100644
--- a/Tombolo/client-reactjs/src/components/admin/Integrations/asr/DomainModal.jsx
+++ b/Tombolo/client-reactjs/src/components/admin/Integrations/asr/DomainModal.jsx
@@ -1,13 +1,16 @@
// Package imports
import React, { useEffect } from 'react';
import { useSelector } from 'react-redux';
-import { Modal, Form, Input, Select, message } from 'antd';
+import { Modal, Form, Input, Select, message, Row, Col } from 'antd';
+import { isEmail } from 'validator';
//Local Imports
import { createNewDomain, getDomains, updateDomain } from './asr-integration-util.js';
// Constants
const { Option } = Select;
+const severityThresholds = [0, 1, 2, 3];
+const regions = ['UK', 'USA'];
const DomainModal = ({
domainModalOpen,
@@ -25,7 +28,13 @@ const DomainModal = ({
if (selectedDomain) {
let activityTypesIds = selectedDomain.activityTypes.map((d) => d.id);
activityTypesIds = activityTypesIds.filter((id) => id !== null);
- form.setFieldsValue({ name: selectedDomain.name, monitoringTypeIds: activityTypesIds });
+ form.setFieldsValue({
+ name: selectedDomain.name,
+ region: selectedDomain.region,
+ severityThreshold: selectedDomain.severityThreshold,
+ monitoringTypeIds: activityTypesIds,
+ severityAlertRecipients: selectedDomain.severityAlertRecipients,
+ });
}
}, [selectedDomain]);
@@ -123,14 +132,74 @@ const DomainModal = ({
okText={selectedDomain ? 'Update' : 'Save'}
maskClosable={false}>
-
+ label="Severity E-mail Recipients"
+ name="severityAlertRecipients"
+ required
+ rules={[
+ {
+ validator: (_, value) => {
+ if (!value || value.length === 0) {
+ return Promise.reject(new Error('Please add at least one email!'));
+ }
+ if (value.length > 20) {
+ return Promise.reject(new Error('Too many emails'));
+ }
+ if (!value.every((v) => isEmail(v))) {
+ return Promise.reject(new Error('One or more emails are invalid'));
+ }
+ return Promise.resolve();
+ },
+ },
+ ]}>
+
-
-