Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions tsp-typescript-client/src/models/timegraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ export interface TimeGraphEntry extends Entry {
const TimeGraphState = createNormalizer<TimeGraphState>({
end: BigInt,
start: BigInt,
label: assertNumber,
tags: assertNumber,
style: OutputElementStyle,
style: assertNumber,
});

/**
Expand All @@ -50,7 +51,7 @@ export interface TimeGraphState {
/**
* Label to apply to the state
*/
label?: string;
label?: number;

/**
* Tags for the state, used when the state pass a filter
Expand All @@ -60,23 +61,40 @@ export interface TimeGraphState {
/**
* Optional information on the style to format this state
*/
style?: OutputElementStyle;
style?: number;
}

export const TimeGraphRow = createNormalizer<TimeGraphRow>({
styles: array(OutputElementStyle),
entryId: assertNumber,
startTime: BigInt,
states: array(TimeGraphState),
});

/**
* Time graph row described by an array of states for a specific entry
*/
export interface TimeGraphRow {
/**
* Labels for the row
*/
labels: string[];

/**
* Styles for the row
*/
styles: OutputElementStyle[]

/**
* Entry Id associated to the state array
*/
entryId: number;

/**
* Start time of the row
*/
startTime: bigint;

/**
* Array of states
*/
Expand Down