11
11
// See the License for the specific language governing permissions and
12
12
// limitations under the License.
13
13
14
- using Synapse . Resources ;
15
-
16
14
namespace Synapse . Dashboard . Extensions ;
17
15
18
16
/// <summary>
@@ -25,31 +23,5 @@ public static class StatusExtensions
25
23
/// </summary>
26
24
/// <param name="status">The status to return the color class for</param>
27
25
/// <returns></returns>
28
- public static string GetColorClass ( this string ? status ) => status switch
29
- {
30
- // commented = same as above, which lead to the error "The pattern is unreachable. It has already been handled by a previous arm of the switch expression or it is impossible to match."
31
- WorkflowInstanceStatusPhase . Running => "accent" ,
32
- //CorrelatorStatusPhase.Running => "accent",
33
- //OperatorStatusPhase.Running => "accent",
34
- CorrelationContextStatus . Active => "accent" ,
35
- //TaskInstanceStatus.Running => "accent",
36
- WorkflowInstanceStatusPhase . Faulted => "danger" ,
37
- //TaskInstanceStatus.Faulted => "danger",
38
- WorkflowInstanceStatusPhase . Cancelled => "warning" ,
39
- //TaskInstanceStatus.Cancelled => "warning",
40
- //CorrelationContextStatus.Cancelled => "warning",
41
- WorkflowInstanceStatusPhase . Completed => "success" ,
42
- //TaskInstanceStatus.Completed => "success",
43
- //CorrelationContextStatus.Completed => "success",
44
- WorkflowInstanceStatusPhase . Waiting => "cinereous" ,
45
- TaskInstanceStatus . Suspended => "icterine" ,
46
- //WorkflowInstanceStatusPhase.Suspended => "icterine",
47
- TaskInstanceStatus . Skipped => "cinereous" ,
48
- WorkflowInstanceStatusPhase . Pending => "mute" ,
49
- //TaskInstanceStatus.Pending => "mute",
50
- CorrelationContextStatus . Inactive => "mute" ,
51
- CorrelatorStatusPhase . Stopped => "secondary" ,
52
- //OperatorStatusPhase.Stopped => "secondary",
53
- _ => ""
54
- } ;
26
+ public static string GetColorClass ( this string ? status ) => $ "status status-{ status ?? "pending" } ";
55
27
}
0 commit comments