mirror of https://git.48k.eu/ogcp
js: prevent js exception in pages without pill control
Add check to test if a pill control has been found and don't try to add mac data to non existent client pill controls.master
parent
17f8b25fe5
commit
2b905ddcaf
|
@ -5,6 +5,11 @@ let updateTimeoutId = null;
|
|||
|
||||
async function show_client_mac(pill_id) {
|
||||
const pill = $('#' +pill_id);
|
||||
|
||||
if (!pill.length) {
|
||||
return
|
||||
}
|
||||
|
||||
const ip = pill.html().split('<br>')[1]
|
||||
|
||||
if (!macs.get(ip)) {
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
<!-- ChartJS -->
|
||||
<script src="{{ url_for('static', filename='AdminLTE/plugins/chart.js/Chart.min.js') }}"></script>
|
||||
|
||||
<script src="{{ url_for('static', filename='js/ogcp.js') }}?v=3"></script>
|
||||
<script src="{{ url_for('static', filename='js/ogcp.js') }}?v=4"></script>
|
||||
|
||||
<script>
|
||||
// error messages
|
||||
|
|
Loading…
Reference in New Issue