mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Dashboard: migrate version history list (#29970)
* refactor(dashboard): remove redundant directive code from SaveDashboardAsButton * feat(dashboard): initial commit of rendering version history with react * feat(dashboard): append versions, use historySrv, UI as functional components * feat(dashboard): initial commit of versions settings diff view * refactor(historylist): remove code related to listing versions * refactor(dashboard): use angular directive to render version comparison * refactor(dashboard): clean up versions settings * refactor(dashboard): move version history UI components into own files * refactor(dashboard): update typings for version history react components * feat(dashboard): initial commit of react revert dashboard modal * test(dashboardsettings): clean up historylistctrl tests * chore(dashboardsettings): remove unused state variable * test(dashboardsettings): initial commit of VersionSettings component tests * feat(grafana-ui): add className concatenation on Checkbox label * Apply suggestions from code review Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com> * test(dashboardsettings): add more tests for Versions Settings react component * test(dashboardsettings): add test to assert latest badge in Version history table * fix(dashboardsettings): pass string to getDiff instead of react event object * test(dashboardsettings): remove failing test from versions settings * Moved scroll area to content, and fixed colors * Update public/app/features/dashboard/components/DashboardSettings/VersionsSettings.test.tsx Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com> * style(dashboardsettings): add new lines to versions settings tests Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com> Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
This commit is contained in:
@@ -0,0 +1,112 @@
|
||||
export const versions = [
|
||||
{
|
||||
id: 249,
|
||||
dashboardId: 74,
|
||||
parentVersion: 10,
|
||||
restoredFrom: 0,
|
||||
version: 11,
|
||||
created: '2021-01-15T14:44:44+01:00',
|
||||
createdBy: 'admin',
|
||||
message: 'Another day another change...',
|
||||
},
|
||||
{
|
||||
id: 247,
|
||||
dashboardId: 74,
|
||||
parentVersion: 9,
|
||||
restoredFrom: 0,
|
||||
version: 10,
|
||||
created: '2021-01-15T10:19:17+01:00',
|
||||
createdBy: 'admin',
|
||||
message: '',
|
||||
},
|
||||
{
|
||||
id: 246,
|
||||
dashboardId: 74,
|
||||
parentVersion: 8,
|
||||
restoredFrom: 0,
|
||||
version: 9,
|
||||
created: '2021-01-15T10:18:12+01:00',
|
||||
createdBy: 'admin',
|
||||
message: '',
|
||||
},
|
||||
{
|
||||
id: 245,
|
||||
dashboardId: 74,
|
||||
parentVersion: 7,
|
||||
restoredFrom: 0,
|
||||
version: 8,
|
||||
created: '2021-01-15T10:11:16+01:00',
|
||||
createdBy: 'admin',
|
||||
message: '',
|
||||
},
|
||||
{
|
||||
id: 239,
|
||||
dashboardId: 74,
|
||||
parentVersion: 6,
|
||||
restoredFrom: 0,
|
||||
version: 7,
|
||||
created: '2021-01-14T15:14:25+01:00',
|
||||
createdBy: 'admin',
|
||||
message: '',
|
||||
},
|
||||
{
|
||||
id: 237,
|
||||
dashboardId: 74,
|
||||
parentVersion: 5,
|
||||
restoredFrom: 0,
|
||||
version: 6,
|
||||
created: '2021-01-14T14:55:29+01:00',
|
||||
createdBy: 'admin',
|
||||
message: '',
|
||||
},
|
||||
{
|
||||
id: 236,
|
||||
dashboardId: 74,
|
||||
parentVersion: 4,
|
||||
restoredFrom: 0,
|
||||
version: 5,
|
||||
created: '2021-01-14T14:28:01+01:00',
|
||||
createdBy: 'admin',
|
||||
message: '',
|
||||
},
|
||||
{
|
||||
id: 218,
|
||||
dashboardId: 74,
|
||||
parentVersion: 3,
|
||||
restoredFrom: 0,
|
||||
version: 4,
|
||||
created: '2021-01-08T10:45:33+01:00',
|
||||
createdBy: 'admin',
|
||||
message: '',
|
||||
},
|
||||
{
|
||||
id: 217,
|
||||
dashboardId: 74,
|
||||
parentVersion: 2,
|
||||
restoredFrom: 0,
|
||||
version: 3,
|
||||
created: '2021-01-05T15:41:33+01:00',
|
||||
createdBy: 'admin',
|
||||
message: '',
|
||||
},
|
||||
{
|
||||
id: 216,
|
||||
dashboardId: 74,
|
||||
parentVersion: 1,
|
||||
restoredFrom: 0,
|
||||
version: 2,
|
||||
created: '2021-01-05T15:01:50+01:00',
|
||||
createdBy: 'admin',
|
||||
message: '',
|
||||
},
|
||||
{
|
||||
id: 215,
|
||||
dashboardId: 74,
|
||||
parentVersion: 1,
|
||||
restoredFrom: 0,
|
||||
version: 1,
|
||||
created: '2021-01-05T14:59:15+01:00',
|
||||
createdBy: 'admin',
|
||||
message: '',
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user