2016-11-21 16:26:58 +00:00
|
|
|
export const statusIconClass = (status = '') => {
|
|
|
|
|
const lowerStatus = status.toLowerCase();
|
|
|
|
|
|
|
|
|
|
switch (lowerStatus) {
|
|
|
|
|
case 'online':
|
2016-11-28 19:20:15 +00:00
|
|
|
return 'success-check';
|
2016-11-21 16:26:58 +00:00
|
|
|
case 'offline':
|
2016-11-28 19:20:15 +00:00
|
|
|
return 'offline';
|
2017-01-13 01:18:23 +00:00
|
|
|
case 'mia':
|
|
|
|
|
return 'mia';
|
2016-11-21 16:26:58 +00:00
|
|
|
default:
|
|
|
|
|
return '';
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const platformIconClass = (platform = '') => {
|
2016-12-21 17:25:54 +00:00
|
|
|
if (!platform) return '';
|
|
|
|
|
|
2016-11-21 16:26:58 +00:00
|
|
|
const lowerPlatform = platform.toLowerCase();
|
|
|
|
|
|
|
|
|
|
switch (lowerPlatform) {
|
|
|
|
|
case 'darwin':
|
2016-11-28 19:20:15 +00:00
|
|
|
return 'apple';
|
2016-12-21 17:25:54 +00:00
|
|
|
case 'linux':
|
2017-01-06 15:36:51 +00:00
|
|
|
return 'penguin';
|
2016-11-21 16:26:58 +00:00
|
|
|
default:
|
2016-11-28 19:20:15 +00:00
|
|
|
return lowerPlatform;
|
2016-11-21 16:26:58 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default { platformIconClass, statusIconClass };
|