/* (C) 2013-24 - ntop.org */ const interfaces = [ { is_pcap_interface: true, icon: "" }, { is_packet_interface: true, icon: "" }, { is_zmq_interface: true, icon: "" }, { is_view_interface: true, icon: "" }, { is_dynamic_interface: true, icon: "" }, { is_dropping_interface: true, icon: "" }, { is_recording_interface: true, icon: "" }, ] const getInterfaceIcon = (interface_types) => { for (const [key, value] of Object.entries(interface_types)) { const interface_info = interfaces.find((el) => el[key] ? (el[key] === value) : false) if (interface_info) { return interface_info.icon; } } return '' } const interfaceUtils = function () { return { getInterfaceIcon }; }(); export default interfaceUtils;