Time range for alert transport

Hi,

thank you for the review.

I have changed the following:

  • change label to start time, only on day…
  • Ticked “All devices except in list” and did not select any device => resulted in selecting all devices. Added a control so that it will be impossible to save this.

Top apply the last version of the patch:

echo y | ./scripts/github-remove -d; ./scripts/github-apply 11622

I don’t know why you are not able to select time. Could you open developper console (Ctrl+shift+i on browser) and send me the screenshot of console on the error.

Coud you send me a ./validate.php ?

`$ ./validate.php

Component Version
LibreNMS 1.65
DB Schema 2020_06_30_170000_create_transport_location_map_table (174)
PHP 7.3.14-1~deb10u1
Python 3.7.3
MySQL 10.3.22-MariaDB-0+deb10u1
RRDTool 1.7.1
SNMP NET-SNMP 5.7.3
====================================

[OK] Composer Version: 1.10.8
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
[WARN] Your local git contains modified files, this could prevent automatic updates.
[FIX]:
You can fix this with ./scripts/github-remove
Modified Files:
LibreNMS/Alert/AlertUtil.php
LibreNMS/Alert/RunAlerts.php
includes/html/forms/alert-transports.inc.php
includes/html/forms/show-alert-transport.inc.php
includes/html/modal/alert_schedule.inc.php
includes/html/modal/edit_alert_transport.inc.php
misc/db_schema.yaml`

2020-07-03 10_57_42-LibreNMS

Time selection is now fixed.

To apply the last version of the patch:

echo y | ./scripts/github-remove -d; ./scripts/github-apply 11622

Could you also test the feature ? i.e. no alert transport outside timerange and alert OK during timerange

@1soproni please test the feature

Hi @louis!

I’m on it. Please give me some days as I’m a little busy

Hello @1soproni any news on the test ?

Remark:

Start timerange hour should be stricly inferior to end timerange

Well, what about the night shifts?

I don’t know the reason yet but I don’t get any alert at all.
I can see the device marked with red among the devices, I can also see in the alert history but that’s it. Invesigation ongoing.

@louis I think I made an upgrade from librenms 1.64 to 1.65 after the first patch rollout. After 1.65 upgrade I applied your 2nd and 3rd patch. In this case how can I do the rollback?

Hi @louis
Sorry for the delay.
I just tested it and it seems it works well!
Thanks for your job!

Daily fails. Is it caused by the patch?
Updating to latest codebase FAIL
error: Your local changes to the following files would be overwritten by merge:
misc/db_schema.yaml
Please commit your changes or stash them before you merge.
Aborting
Updating Composer packages OK
Updating SQL-Schema OK
Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK

Hello @1soproni,

daily failed because of the patch.

Well, what about the night shifts?

It is possible with new code. Could you retest the code from Add alert transport restriction to time range and device "map to" by louis-6wind · Pull Request #11622 · librenms/librenms · GitHub

echo y | ./scripts/github-remove -d; ./scripts/github-apply 11622