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_.

19 lines (16 loc) 533 B
import { IStateHistory, StateHistory } from '@/models/StateHistory' export type IRunHistory = { intervalStart: Date, intervalEnd: Date, states: IStateHistory[], } export class RunHistory implements IRunHistory { public readonly intervalStart: Date public readonly intervalEnd: Date public readonly states: StateHistory[] public constructor(run: IRunHistory) { this.intervalStart = run.intervalStart this.intervalEnd = run.intervalEnd this.states = run.states.map((state) => new StateHistory(state)) } }