MCPcopy Create free account
hub / github.com/Dispatcharr/Dispatcharr / getEventColor

Function getEventColor

frontend/src/components/SystemEvents.jsx:85–121  ·  view source on GitHub ↗
(eventType)

Source from the content-addressed store, hash-verified

83};
84
85const getEventColor = (eventType) => {
86 switch (eventType) {
87 case 'channel_start':
88 case 'client_connect':
89 case 'recording_start':
90 case 'vod_start':
91 case 'login_success':
92 return 'green';
93 case 'channel_reconnect':
94 return 'yellow';
95 case 'channel_stop':
96 case 'client_disconnect':
97 case 'recording_end':
98 case 'vod_stop':
99 case 'logout':
100 return 'gray';
101 case 'channel_buffering':
102 return 'yellow';
103 case 'channel_failover':
104 case 'channel_error':
105 return 'orange';
106 case 'stream_switch':
107 return 'blue';
108 case 'm3u_refresh':
109 case 'epg_refresh':
110 return 'cyan';
111 case 'm3u_download':
112 case 'epg_download':
113 return 'teal';
114 case 'login_failed':
115 case 'm3u_blocked':
116 case 'epg_blocked':
117 return 'red';
118 default:
119 return 'gray';
120 }
121};
122
123const getSystemEvents = (eventsLimit, offset) => {
124 return API.getSystemEvents(eventsLimit, offset);

Callers 1

EventFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected