Tranga-Website/Website/modules/interfaces/IProgressToken.tsx

21 lines
530 B
TypeScript
Raw Permalink Normal View History

2024-10-18 19:45:04 +02:00
export default interface IProgressToken{
cancellationRequested: boolean;
increments: number;
incrementsCompleted: number;
progress: number;
lastUpdate: Date;
executionStarted: Date;
timeRemaining: string;
2024-10-18 19:45:04 +02:00
state: number;
}
export function GetProgressStateFromNumber(n: number): string {
switch (n){
case 0: return "Running";
case 1: return "Complete";
case 2: return "Standby";
case 3: return "Cancelled";
case 4: return "Waiting";
}
return "";
2024-10-18 19:45:04 +02:00
}