security/etpro-telemetry: Fix widget (#4128)

The API returns "sensor_status":"ACTIVE", which is upper case.
The widget logic compares it to "active", which makes the widget fail to show any data. Converting "ACTIVE" to lower case solves that issue.
This commit is contained in:
Monviech
2024-07-29 14:28:49 +02:00
committed by GitHub
parent 0269de844b
commit 743a87984f
@@ -43,7 +43,7 @@ export default class ETProTelemetry extends BaseTableWidget {
async onWidgetTick() {
const data = await this.ajaxCall('/api/diagnostics/proofpoint_et/status');
if (data['sensor_status'] == 'active') {
if (data['sensor_status'].toLowerCase() == 'active') {
$('#etpro_sensor_status').text(data['sensor_status']);
$('#etpro_event_received').text(data['event_received']);
$('#etpro_last_rule_download').text(data['last_rule_download']);