mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* add analytics for folder creation * add interaction tracking for move/delete * add tracking for item clicked in the new browse view * review comments * emit counts instead
26 lines
611 B
TypeScript
26 lines
611 B
TypeScript
import { Chance } from 'chance';
|
|
|
|
import { FolderDTO } from 'app/types';
|
|
|
|
export function mockFolderDTO(seed = 1, partial?: Partial<FolderDTO>): FolderDTO {
|
|
const random = Chance(seed);
|
|
const uid = random.guid();
|
|
return {
|
|
canAdmin: true,
|
|
canDelete: true,
|
|
canEdit: true,
|
|
canSave: true,
|
|
created: new Date(random.timestamp()).toISOString(),
|
|
createdBy: '',
|
|
hasAcl: true,
|
|
id: 1,
|
|
title: random.sentence({ words: 3 }),
|
|
uid,
|
|
updated: new Date(random.timestamp()).toISOString(),
|
|
updatedBy: '',
|
|
url: `/dashboards/f/${uid}`,
|
|
version: 1,
|
|
...partial,
|
|
};
|
|
}
|