feat(cli): --mes-reportable on template alarm add/update and instance alarm-override set

Claude-Session: https://claude.ai/code/session_01Y5ef34iUUMjmwnMpL9xgmB
This commit is contained in:
Joseph Doherty
2026-09-11 10:08:28 -04:00
parent c259614a78
commit f1a7c34b69
4 changed files with 25 additions and 8 deletions
+7 -4
View File
@@ -265,7 +265,7 @@ scadabridge --url <url> template attribute delete --id <int>
Add an alarm definition to a template.
```sh
scadabridge --url <url> template alarm add --template-id <int> --name <string> --trigger-type <string> --priority <int> [--description <string>] [--trigger-config <json>] [--locked] [--trigger-kind <kind>] [typed-setpoint-flags]
scadabridge --url <url> template alarm add --template-id <int> --name <string> --trigger-type <string> --priority <int> [--description <string>] [--trigger-config <json>] [--locked] [--mes-reportable] [--trigger-kind <kind>] [typed-setpoint-flags]
```
| Option | Required | Description |
@@ -277,6 +277,7 @@ scadabridge --url <url> template alarm add --template-id <int> --name <string> -
| `--description` | no | Description |
| `--trigger-config` | no | Trigger configuration as a JSON string (overrides typed flags when both are supplied) |
| `--locked` | no | Lock the alarm in derived templates |
| `--mes-reportable` | no | Report this alarm to MES (`IsFlaggedForMES` on the alarm-status API). Defaults to `false` |
| `--trigger-kind` | no | Expression-trigger analysis kind: `advisory` (default — non-blocking advisory finding on a blank expression) or `strict` (blank expression is a deploy-blocking error). Ignored for non-`Expression` trigger types. |
| `--attribute` | no | Attribute name the trigger watches (all trigger types except `Expression`) |
| `--match-value` | no | `ValueMatch`: value to compare against |
@@ -298,7 +299,7 @@ Update an alarm definition on a template. An update **replaces** the whole entit
required field below must be supplied with its post-update value, even if unchanged.
```sh
scadabridge --url <url> template alarm update --id <int> --name <string> --trigger-type <string> --priority <int> [--description <string>] [--trigger-config <json>] [--locked] [--trigger-kind <kind>]
scadabridge --url <url> template alarm update --id <int> --name <string> --trigger-type <string> --priority <int> [--description <string>] [--trigger-config <json>] [--locked] [--mes-reportable] [--trigger-kind <kind>]
```
| Option | Required | Description |
@@ -309,7 +310,8 @@ scadabridge --url <url> template alarm update --id <int> --name <string> --trigg
| `--priority` | yes | Alarm priority (0–1000) |
| `--description` | no | Description |
| `--trigger-config` | no | Trigger configuration JSON |
| `--locked` | no | Lock the alarm in derived templates |
| `--locked` | no | Lock the alarm in derived templates. Since `update` replaces the whole entity, omitting `--locked` resets it to `false` |
| `--mes-reportable` | no | Report this alarm to MES (`IsFlaggedForMES` on the alarm-status API). Since `update` replaces the whole entity, omitting `--mes-reportable` resets it to `false` |
| `--trigger-kind` | no | Expression-trigger analysis kind: `advisory` (default) or `strict`. Ignored for non-`Expression` trigger types. **Requires `--trigger-config`** — the kind is written into the trigger-config JSON, so on `update` it has no effect without one (the CLI prints a warning to stderr and continues). |
#### `template alarm delete`
@@ -810,7 +812,7 @@ Label,"Hello, World",
Set (upsert) an alarm override on an instance.
```sh
scadabridge --url <url> instance alarm-override set --instance-id <int> --alarm <string> [--trigger-config <json>] [--priority <int>]
scadabridge --url <url> instance alarm-override set --instance-id <int> --alarm <string> [--trigger-config <json>] [--priority <int>] [--mes-reportable <true|false>]
```
| Option | Required | Description |
@@ -819,6 +821,7 @@ scadabridge --url <url> instance alarm-override set --instance-id <int> --alarm
| `--alarm` | yes | Alarm canonical name (e.g. `TempLevels` or `Pump.TempSensor.Heat`) |
| `--trigger-config` | no | JSON override for TriggerConfiguration (HiLo: partial merge; others: whole-replace) |
| `--priority` | no | Priority override (0–1000) |
| `--mes-reportable` | no | MES-reportable override: `true` or `false`; omit to inherit the template value |
#### `instance alarm-override delete`