Feature request: Manage (enable/disable) sensors from web ui
It would be nice to be able to see and enable or disable sensors from the web ui.
I'm not sure sensors warrant a new dashboard (like history, packs, triggers...). This could, instead, be part of the packs dashboard. In there, it says there are x actions and x sensors. Maybe the "# sensors" could open something that lists the sensors, sensor metadata, and allows me to enable/disable a sensor. In the same vein, maybe "# actions" would link to the actions page with that pack's actions list visible and the first action selected; and "# rules" could do the same with rules. (aliases and tests are not exposed in the UI, so they wouldn't link to anything yet)
The sensors are available via https://api.stackstorm.com/api/v1/sensortypes The CLI uses the sensortypes endpoint for these:
-
st2 sensor list -
st2 sensor get <ref-or-id> -
st2 sensor enable <ref-or-id> -
st2 sensor disable <ref-or-id>
It would also be nice to link from sensor to trigger instances (as the sensor lists which triggers it adds).
Going from trigger to sensor is not possible because the APIs don't expose that kind of mapping; once the trigger is registered, the sensor isn't the only one that can fire it off (especially with the st2.inject_trigger action). What that would mean, is if there's a sensor misbehaving (firing off too many triggers, you can disable it in the UI and then go diagnose what was going on).
Related to https://github.com/StackStorm/st2/issues/3973