Background
On the DashboardListPage, clicking on the 'Create' button will give you a dialog box to create a new empty dashboard. Once you click 'Save', the empty dashboard gets created and the browser will navigate to the DashboardPage to display an empty dashboard. Only users with EDITOR roles will have a enabled 'Create' button.
- [<1 pt] 'Create' Button
- Clicking the 'Create' button opens a dialog box in the center of the screen (we are omitting the dropdown options 'Dashboard from scratch' and 'Dashboard' from template' because 'Dashboard from template' is beyond the scope of this issue). Clicking the 'Create' button will yield the same results as selecting the dropdown option 'Dashboard from scratch'.
- [2 pt] 'Create dashboard' Dialog Box
- Omitting 'Scope' Dropdown because current dashboards only support 'project scope'. All new dashboards will be project-scoped
- 'Select project'
- Dropdown Lists all current projects
- 'Dashboard name'
- Text input that allows users to name their dashboard
- Validate that the dashboard name is not already taken in the selected project
- [1 pt] 'Save' Button
- Creates a new empty dashboard, make request to backend to add new dashboard, navgiate to the DashboardPage
- [<1 pt] 'Cancel' Button
- Changes should be discarded (e.g., changes to Variables, Panels, Panel Group, TimeRange)
- [<1 pt] RBAC - Only users who have 'EDITOR' roles will be able to create a dashboard; otherwise the 'Create' button will be disabled
- Use console SDK hook `useAccessReview` to get RBAC list of actions for the user
- RBAC verbs / actions to look for 'create'
- Disable buttons based on RBAC
- Use console SDK hook `useAccessReview` to get RBAC list of actions for the user
Not in scope
- 'Create' button >> 'Dashboard from template' dropdown option
- 'Create dashboard' Dialog Box >> 'Scope' dropdown
Outcomes
- DashbooardListPage as a 'Create' button that creates an empty dashboard