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

14 lines (12 loc) 563 B
import { UiFlowRunHistoryResponse } from '@/models/api/UiFlowRunHistoryResponse' import { UiFlowRunHistory } from '@/models/UiFlowRunHistory' import { MapFunction } from '@/services/Mapper' export const mapUiFlowRunHistoryResponseToUiFlowRunHistory: MapFunction<UiFlowRunHistoryResponse, UiFlowRunHistory> = function(source) { return { id: source.id, stateType: this.map('ServerStateType', source.state_type, 'StateType'), timestamp: this.map('string', source.timestamp, 'Date'), duration: source.duration, lateness: source.lateness, } }