2024-10-18 19:45:04 +02:00
|
|
|
export default interface IProgressToken{
|
|
|
|
cancellationRequested: boolean;
|
|
|
|
increments: number;
|
|
|
|
incrementsCompleted: number;
|
|
|
|
progress: number;
|
|
|
|
lastUpdate: Date;
|
|
|
|
executionStarted: Date;
|
2024-10-20 21:20:18 +02:00
|
|
|
timeRemaining: string;
|
2024-10-18 19:45:04 +02:00
|
|
|
state: number;
|
2024-10-20 21:20:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
}
|