28 lines
617 B
Dart
28 lines
617 B
Dart
/// Mirror of the backend `EAgentStatus` enum.
|
|
///
|
|
/// See the note in `EAgentType.dart` about ordering and [unknown].
|
|
enum EAgentStatus {
|
|
offline,
|
|
idle,
|
|
working,
|
|
error,
|
|
unknown;
|
|
|
|
bool get isOnline => this == EAgentStatus.idle || this == EAgentStatus.working;
|
|
|
|
String get displayName {
|
|
switch (this) {
|
|
case EAgentStatus.offline:
|
|
return 'Offline';
|
|
case EAgentStatus.idle:
|
|
return 'Idle';
|
|
case EAgentStatus.working:
|
|
return 'Working';
|
|
case EAgentStatus.error:
|
|
return 'Error';
|
|
case EAgentStatus.unknown:
|
|
return 'Unknown';
|
|
}
|
|
}
|
|
}
|