From 8827aef3aa0fb97b9f4e2d0d37bd235c75ff1f51 Mon Sep 17 00:00:00 2001 From: Andrew Azores Date: Fri, 10 Feb 2023 17:31:28 -0500 Subject: [PATCH] feat(dashboard): implement embedded chart cards (#856) * feat(dashboard): add basic embedded chart cards * refactor iframe src construction * add logical controller for all grafana chart cards * release subscriptions when no controller subscribers * cleanup * replace px count with em * wrap content in CardBody * slow refresh rate * add refresh and popout buttons, style plainly * add TODO * refactor, simplify controller timing * cleanup controller instantiation and resource handling. button handling. recording creation integration with recording form. * use embedded grafana builtin refresh capability * cleanup, fix bug with no-recording target selection * fixup! cleanup, fix bug with no-recording target selection Signed-off-by: Andrew Azores * add leniency for loading no-longer-known card types from storage * refactor cleanup * reset iframe on target change to force data refresh * add TODO * update empty state * re-add a refresh button to reset chart card * only apply negative margin on wider cards * cleanup * react to recording start/stop/delete * require recording to be running * extract min refresh to settings * break circular dep * add checkbox for restarting existing recordings * add basic snapshot test * fix settings test * add more tests Signed-off-by: Andrew Azores * fix imports * rebase fixup Signed-off-by: Andrew Azores * use consistent card height * fix array key warnings * add missing set state call * use function form set state * remove redundant nullsafe nav check * use array destructuring * remove redundant first operator * remove more redundant nullsafe navs * replace with