chg: [users] Added help text if punchcard is empty and updated README

pull/90/head
mokaddem 2019-05-02 09:47:06 +02:00
parent e7f05d00ab
commit 4f52a80341
2 changed files with 19 additions and 9 deletions

View File

@ -135,6 +135,10 @@ optional arguments:
a soft method to delete only keys used by MISP-Dashboard. a soft method to delete only keys used by MISP-Dashboard.
``` ```
## Notes about ZMQ
The misp-dashboard being stateless in regards to MISP, it can only process data that it received. Meaning that if your MISP is not publishing all notifications to its ZMQ, the misp-dashboard will not have them.
The most revelant example could be the user login punchcard. If your MISP doesn't have the option ``Plugin.ZeroMQ_audit_notifications_enable`` set to ``true``, the punchcard will be empty.
# zmq_subscriber options # zmq_subscriber options
```usage: zmq_subscriber.py [-h] [-n ZMQNAME] [-u ZMQURL] ```usage: zmq_subscriber.py [-h] [-n ZMQNAME] [-u ZMQURL]

View File

@ -79,15 +79,21 @@ function updateDatePunch(ignore1, igonre2, org) { //date picker sets ( String da
punchcardWidget.refresh(); punchcardWidget.refresh();
highlight_punchDay(); highlight_punchDay();
} else { } else {
punchcardWidget = $('#punchcard').punchcard({ var data_max = Math.max.apply(Math, data.flat());
data: data, if (data_max === 0) { // no data, MISP's audit notification could be disabled
singular: 'login', $('#punchcard').text('No login or MISP\'s audit notification is disabled.');
plural: 'logins', } else {
timezones: ['local'], $('#punchcard').empty();
timezoneIndex:0 punchcardWidget = $('#punchcard').punchcard({
}); data: data,
punchcardWidget = punchcardWidget.data("plugin_" + "punchcard"); singular: 'login',
highlight_punchDay(); plural: 'logins',
timezones: ['local'],
timezoneIndex:0
});
punchcardWidget = punchcardWidget.data("plugin_" + "punchcard");
highlight_punchDay();
}
} }
}); });
} }