Add cancel
This commit is contained in:
@@ -21,14 +21,26 @@ namespace LeafWeb.Core.Entities
|
||||
public LeafInputStatusType CurrentStatus { get; set; }
|
||||
public virtual ICollection<LeafInputStatus> StatusHistory { get; set; }
|
||||
|
||||
public bool IsInProgress => CurrentStatus == LeafInputStatusType.Starting
|
||||
|| CurrentStatus == LeafInputStatusType.Running
|
||||
|| CurrentStatus == LeafInputStatusType.Finishing;
|
||||
|
||||
public bool IsComplete => CurrentStatus == LeafInputStatusType.Complete;
|
||||
public bool IsDeletable => !IsInProgress;
|
||||
public bool IsPending => CurrentStatus == LeafInputStatusType.Pending;
|
||||
public bool IsStarting => CurrentStatus == LeafInputStatusType.Starting;
|
||||
public bool IsRunning => CurrentStatus == LeafInputStatusType.Running;
|
||||
public bool IsFinishing => CurrentStatus == LeafInputStatusType.Finishing;
|
||||
public bool IsComplete => CurrentStatus == LeafInputStatusType.Complete;
|
||||
public bool IsException => CurrentStatus == LeafInputStatusType.Exception;
|
||||
public bool IsCancelPending => CurrentStatus == LeafInputStatusType.CancelPending;
|
||||
public bool IsCancelling => CurrentStatus == LeafInputStatusType.Cancelling;
|
||||
public bool IsCancelled => CurrentStatus == LeafInputStatusType.Cancelled;
|
||||
|
||||
public bool IsInProgress => IsStarting
|
||||
|| IsRunning
|
||||
|| IsFinishing
|
||||
|| IsCancelPending
|
||||
|| IsCancelling;
|
||||
public bool IsDeletable => !IsInProgress;
|
||||
public bool HasOutputFiles => OutputFiles.Any();
|
||||
public bool IsCancellable =>
|
||||
IsRunning
|
||||
|| IsPending;
|
||||
|
||||
[Required(ErrorMessage = "Name required")]
|
||||
public string Name { get; set; }
|
||||
|
||||
@@ -7,6 +7,9 @@ namespace LeafWeb.Core.Entities
|
||||
Running = 2,
|
||||
Finishing = 3,
|
||||
Complete = 4,
|
||||
Exception = 5
|
||||
Exception = 5,
|
||||
CancelPending = 6,
|
||||
Cancelling = 7,
|
||||
Cancelled = 8
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user