/*
(C) 2013-25 - ntop.org
*/
const os = [
{ name: "Unknown", icon: '' },
{ name: "Windows", icon: '' },
{ name: "macOS", icon: '' },
{ name: "iOS", icon: '' },
{ name: "Android", icon: '' },
{ name: "Linux", icon: '' },
{ name: "FreeBSD", icon: '' }
]
const asset_icons = [
{ id: 'unknown', icon: '', name: i18n("device_types.unknown") },
{ id: 'printer', icon: '', name: i18n("device_types.printer") },
{ id: 'video', icon: '', name: i18n("device_types.video") },
{ id: 'workstation', icon: '', name: i18n("device_types.workstation") },
{ id: 'laptop', icon: '', name: i18n("device_types.laptop") },
{ id: 'tablet', icon: '', name: i18n("device_types.tablet") },
{ id: 'phone', icon: '', name: i18n("device_types.phone") },
{ id: 'tv', icon: '', name: i18n("device_types.tv") },
{ id: 'networking', icon: '', name: i18n("device_types.networking") },
{ id: 'wifi', icon: '', name: i18n("device_types.wifi") },
{ id: 'nas', icon: '', name: i18n("device_types.nas") },
{ id: 'multimedia', icon: '', name: i18n("device_types.multimedia") },
{ id: 'iot', icon: '', name: i18n("device_types.iot") },
]
const getOSList = () => {
return icons;
}
const getAssetIconsList = () => {
return asset_icons
}
const getOS = (value) => {
return os[value] || os[0];
}
const getAssetIcon = (value) => {
if(asset_icons[value] != null) {
return asset_icons[value]["icon"];
}
return ''
}
const osUtils = function () {
return {
getOSList,
getAssetIconsList,
getOS,
getAssetIcon
};
}();
export default osUtils;