-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> * 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 <[email protected]> * fix imports * rebase fixup Signed-off-by: Andrew Azores <[email protected]> * 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 <code> with <Label> * set description empty to remove redundant explanation * rename button * memoize controller context * reduce negative margin for easier dragging and resizing * allow dynamic card height * localize card content * correct tests for localization Signed-off-by: Andrew Azores <[email protected]> * add typedefs for react-test-renderer * remove redundant fragment wrapping * tmp? loading view * refactor cleanup/simplify, also fixes tests * add snapshot for loading state * controller initialization bugfix * use Continuous template instead, seems to generally support most metrics cards Signed-off-by: Andrew Azores <[email protected]> * reset history and perform cleanup between tests * set provider order to match real application * experiment with generic provider render function * move generic function into Common, expect localized view in test * temporarily disable pointer events on iframes while resizing * apply pointer events disabling during drag-and-drop * downgrade to BETA * lint fix --------- Signed-off-by: Andrew Azores <[email protected]>
- Loading branch information
1 parent
2c3fed4
commit 8827aef
Showing
26 changed files
with
1,649 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.