UNPKG

@prefecthq/prefect-ui-library

Version:

This library is the Vue and Typescript component library for [Prefect 2](https://github.com/PrefectHQ/prefect) and [Prefect Cloud 2](https://www.prefect.io/cloud/). _The components and utilities in this project are not meant to be used independently_.

13 lines (12 loc) 579 B
import { RunHistory } from '@/models/RunHistory' import { MockFunction } from '@/services/Mocker' export const randomFlowRunHistory: MockFunction<RunHistory, [Partial<RunHistory>?]> = function(overrides = {}) { return new RunHistory({ intervalStart: this.create('date'), intervalEnd: this.create('date'), // todo: Make this mock more realistic // mocking this with createMany produces pretty random data that doesn't follow business rules around states states: this.createMany('flowRunStateHistory', this.create('number', [1, 5])), ...overrides, }) }