Tranga-Website/Website/modules/interfaces/IProgressToken.tsx
glax 7364a20d5d Add Progressbar to jobs
Add Cancel-Buttons to running jobs
Auto-update Queue
2024-10-20 21:20:18 +02:00

21 lines
530 B
TypeScript

export default interface IProgressToken{
cancellationRequested: boolean;
increments: number;
incrementsCompleted: number;
progress: number;
lastUpdate: Date;
executionStarted: Date;
timeRemaining: string;
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 "";
}