From ddfd04673dcc7c9adb6d9914d156e19c18f167d2 Mon Sep 17 00:00:00 2001 From: NEZRI Ygal Date: Fri, 7 Jun 2024 15:55:29 +0200 Subject: [PATCH] Back - Fix Ticked ID Bug Fixed a bug related to the Ticket ID that was preventing the creation or modification of a ticket with a free format, enabling smoother integration and precise traceability. --- .../src/components/SiteMonitoring/SuspiciousSites.js | 10 +++++++++- Watcher/Watcher/site_monitoring/models.py | 6 ------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Watcher/Watcher/frontend/src/components/SiteMonitoring/SuspiciousSites.js b/Watcher/Watcher/frontend/src/components/SiteMonitoring/SuspiciousSites.js index f7b5a3b..067eb15 100755 --- a/Watcher/Watcher/frontend/src/components/SiteMonitoring/SuspiciousSites.js +++ b/Watcher/Watcher/frontend/src/components/SiteMonitoring/SuspiciousSites.js @@ -311,11 +311,12 @@ export class SuspiciousSites extends Component { e.preventDefault(); const domain_name = this.inputDomainRef.current.value; const ticket_id = this.inputTicketRef.current.value; + const rtir = this.inputRtirRef.current.value ? this.inputRtirRef.current.value : getMax(this.props.sites, "rtir")+1; const expiry = this.state.day; const ip_monitoring = this.ipMonitoringRef.current.checked; const content_monitoring = this.webContentMonitoringRef.current.checked; const mail_monitoring = this.emailMonitoringRef.current.checked; - const site = expiry ? {domain_name, ticket_id, expiry, ip_monitoring, content_monitoring, mail_monitoring} : {domain_name, ticket_id, rtir, ip_monitoring, content_monitoring, mail_monitoring}; + const site = expiry ? {domain_name, ticket_id, rtir, expiry, ip_monitoring, content_monitoring, mail_monitoring} : {domain_name, ticket_id, rtir, ip_monitoring, content_monitoring, mail_monitoring}; this.props.addSite(site); this.setState({ @@ -355,6 +356,13 @@ export class SuspiciousSites extends Component { placeholder="230509-200a2" defaultValue={this.state.ticketId}/> + ID + + + Expiry Date