Skip to content

Ticket8731_GUI Changes for configuring Alerts #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions doc/gui/Menu-Bar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ IOC Menu
Start/stop IOCs
Selecting the Start/stop IOCs menu item displays a dialog allowing you to start an IOC or to stop an IOC that is currently running.

Run-Control Menu
----------------
Block Actions Menu
------------------
View run-control settings
Selecting the View Run-Control Settings menu item displays a dialog showing you which blocks (if any) are currently under run-control. You can also assign new run-control settings to blocks and modify or remove existing run-control settings.

Expand All @@ -81,6 +81,11 @@ You can change run-control settings in 3 different ways (2 temporary and 1 perma

The :doc:`Blocks-and-Groups` page describes how blocks under run-control are shown in the GUI.

Alert on blocks settings
1. Selecting the "Alert on blocks settings" menu item displays a dialog showing us blocks in current configuration and the facilitates configuring the alert parameters for individual blocks.
2. The dialog also shows the emails and mobiles configured for receiving the alerts. We can change change these values.
3. We can also send a test message of our choice. This message is changed by the server, once a new alert condition happens.

Preferences Menu
----------------

Expand All @@ -101,4 +106,4 @@ Console Log
Icon Licences
View the licences for the icons used in IBEX
Get help
Displays support telephone numbers and how to get help or report problems.
Displays support telephone numbers and how to get help or report problems.
11 changes: 9 additions & 2 deletions doc/scripting/Alerts-on-Blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ Alerts, like run control, are normally set on floating point (or integer) value
g.alerts.set_range("RunState", -1.0, 3.5, delay_in=5.0, delay_out=300.0)
```
will send an alert if the instrument has been WAITING or VETOING (>3.5) for more than 300 seconds.


## GUI for managing alerts
There is a convenient way to configure alerts details using the IBEX client.
The GUI is available from the top-level menu item "Block Actions", which was previously called Run-control.
<img width="1213" height="691" alt="image" src="https://github.com/user-attachments/assets/58258fe2-1efd-4956-a0d6-ffeb8aebcb05" />

## Sending alert messages directly from scripts
You can also send an immediate alert message from an executing script by doing the following
```python
Expand All @@ -53,8 +58,10 @@ g.alerts.set_email(["a@b", "c@d"])
if bad_thing_happened:
g.alerts.send("Help, a bad thing has happened!")
```
## Sending alert messages from the GUI
Use the Send Message button (highlighted in blue below) in the Alert Settings GUI to send a custom message to the configured emails and/or mobiles.
<img width="1213" height="691" alt="image" src="https://github.com/user-attachments/assets/dbe2304d-ad36-4551-959a-803127ac5745" />

## Future enhancements
* Create GUI for managing alerts, similar to how run control is done now
* Allow saving alerts into a configuration/component