if an existing widget is being edited (as opposed to a widget being created) the /alert/check_alerts endpoint is called and the response compared to the widget's config data - updating it (but not saving it) as required,
ui form updated so only one alert "type" (min/max) can be set for the widget,
removed fade in/out effect as it was leaving the component contents blurry,
small styling tweaks,
updated table to reflect a single alert type (min/max) and to display alert "status",
Frontend/src/components/Widget/AlertWidget.js
uses it's own stored config data initially when loaded,
unless alert is "triggered" it checks for updated status from /alert/check_alerts on a loop until the alert is "triggered",
if response from /alert/check_alerts indicates that the alert has been triggered the widget's config is updated and saved and the new status is displayed,
small styling tweaks,
updated table to reflect a single alert type (min/max) and to display alert "status" ( as per AlertPreview),
updated dimensions to reflect new react-container-dimensions based layout
Frontend/src/reducers/editor.js
updated the default alert widget default config object
Frontend/fcc.config.js
Frontend/package.json
react-container-dimensions
package to dependenciesFrontend/src/actions/editorActions.js
/alert/create_alert
and/alert/update_alert
Frontend/src/components/Editor/config/AlertConfig.js
/alert/check_alerts
endpoint is called and the response compared to the widget'sconfig
data - updating it (but not saving it) as required,Frontend/src/components/Editor/preview/AlertPreview.js
Frontend/src/components/Widget/AlertWidget.js
config
data initially when loaded,/alert/check_alerts
on a loop until the alert is "triggered",/alert/check_alerts
indicates that the alert has been triggered the widget'sconfig
is updated and saved and the new status is displayed,AlertPreview
),react-container-dimensions
based layoutFrontend/src/reducers/editor.js
config
object