mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
29 lines
597 B
JavaScript
29 lines
597 B
JavaScript
export const statusIconClass = (status = '') => {
|
|
const lowerStatus = status.toLowerCase();
|
|
|
|
switch (lowerStatus) {
|
|
case 'online':
|
|
return 'success-check';
|
|
case 'offline':
|
|
return 'offline';
|
|
default:
|
|
return '';
|
|
}
|
|
};
|
|
|
|
export const platformIconClass = (platform = '') => {
|
|
if (!platform) return '';
|
|
|
|
const lowerPlatform = platform.toLowerCase();
|
|
|
|
switch (lowerPlatform) {
|
|
case 'darwin':
|
|
return 'apple';
|
|
case 'linux':
|
|
return 'penguin';
|
|
default:
|
|
return lowerPlatform;
|
|
}
|
|
};
|
|
|
|
export default { platformIconClass, statusIconClass };
|