@ -34,193 +34,17 @@ export const itemTypeTranslations = new Map<ItemType, string>(
]
) ;
export enum WidgetCategory {
CHARTS_GRAPHS = 'CHARTS_GRAPHS' ,
GAUGES_INDICATORS = 'GAUGES_INDICATORS' ,
CONTROLS = 'CONTROLS' ,
MAPS_LOCATION = 'MAPS_LOCATION' ,
TABLES_LISTS = 'TABLES_LISTS' ,
CARDS_INFO = 'CARDS_INFO' ,
SCADA = 'SCADA' ,
INPUT_FORMS = 'INPUT_FORMS'
}
export const widgetCategoryTranslations = new Map < WidgetCategory , string > ( [
[ WidgetCategory . CHARTS_GRAPHS , 'iot-hub.category.charts-graphs' ] ,
[ WidgetCategory . GAUGES_INDICATORS , 'iot-hub.category.gauges-indicators' ] ,
[ WidgetCategory . CONTROLS , 'iot-hub.category.controls' ] ,
[ WidgetCategory . MAPS_LOCATION , 'iot-hub.category.maps-location' ] ,
[ WidgetCategory . TABLES_LISTS , 'iot-hub.category.tables-lists' ] ,
[ WidgetCategory . CARDS_INFO , 'iot-hub.category.cards-info' ] ,
[ WidgetCategory . SCADA , 'iot-hub.category.scada' ] ,
[ WidgetCategory . INPUT_FORMS , 'iot-hub.category.input-forms' ]
] ) ;
export enum DashboardCategory {
MONITORING = 'MONITORING' ,
ANALYTICS = 'ANALYTICS' ,
DEVICE_MANAGEMENT = 'DEVICE_MANAGEMENT' ,
USER_MANAGEMENT = 'USER_MANAGEMENT' ,
ASSET_MANAGEMENT = 'ASSET_MANAGEMENT' ,
SCADA = 'SCADA' ,
REPORTING = 'REPORTING' ,
OVERVIEW = 'OVERVIEW' ,
OPERATIONS = 'OPERATIONS'
}
export const dashboardCategoryTranslations = new Map < DashboardCategory , string > ( [
[ DashboardCategory . MONITORING , 'iot-hub.category.monitoring' ] ,
[ DashboardCategory . ANALYTICS , 'iot-hub.category.analytics' ] ,
[ DashboardCategory . DEVICE_MANAGEMENT , 'iot-hub.category.device-management' ] ,
[ DashboardCategory . USER_MANAGEMENT , 'iot-hub.category.user-management' ] ,
[ DashboardCategory . ASSET_MANAGEMENT , 'iot-hub.category.asset-management' ] ,
[ DashboardCategory . SCADA , 'iot-hub.category.scada' ] ,
[ DashboardCategory . REPORTING , 'iot-hub.category.reporting' ] ,
[ DashboardCategory . OVERVIEW , 'iot-hub.category.overview' ] ,
[ DashboardCategory . OPERATIONS , 'iot-hub.category.operations' ]
] ) ;
export enum CalcFieldCategory {
AGGREGATION = 'AGGREGATION' ,
GEOSPATIAL = 'GEOSPATIAL' ,
STATISTICAL = 'STATISTICAL' ,
ENERGY = 'ENERGY' ,
ENVIRONMENTAL = 'ENVIRONMENTAL' ,
PREDICTIVE = 'PREDICTIVE' ,
CUSTOM_FORMULA = 'CUSTOM_FORMULA'
}
export const calcFieldCategoryTranslations = new Map < CalcFieldCategory , string > ( [
[ CalcFieldCategory . AGGREGATION , 'iot-hub.category.aggregation' ] ,
[ CalcFieldCategory . GEOSPATIAL , 'iot-hub.category.geospatial' ] ,
[ CalcFieldCategory . STATISTICAL , 'iot-hub.category.statistical' ] ,
[ CalcFieldCategory . ENERGY , 'iot-hub.category.energy' ] ,
[ CalcFieldCategory . ENVIRONMENTAL , 'iot-hub.category.environmental' ] ,
[ CalcFieldCategory . PREDICTIVE , 'iot-hub.category.predictive' ] ,
[ CalcFieldCategory . CUSTOM_FORMULA , 'iot-hub.category.custom-formula' ]
] ) ;
export enum RuleChainCategory {
DATA_PROCESSING = 'DATA_PROCESSING' ,
ALERTING = 'ALERTING' ,
DEVICE_CONNECTIVITY = 'DEVICE_CONNECTIVITY' ,
INTEGRATION = 'INTEGRATION' ,
ANALYTICS = 'ANALYTICS'
}
export const ruleChainCategoryTranslations = new Map < RuleChainCategory , string > ( [
[ RuleChainCategory . DATA_PROCESSING , 'iot-hub.category.data-processing' ] ,
[ RuleChainCategory . ALERTING , 'iot-hub.category.alerting' ] ,
[ RuleChainCategory . DEVICE_CONNECTIVITY , 'iot-hub.category.device-connectivity' ] ,
[ RuleChainCategory . INTEGRATION , 'iot-hub.category.integration' ] ,
[ RuleChainCategory . ANALYTICS , 'iot-hub.category.analytics' ]
] ) ;
export enum SolutionTemplateCategory {
MONITORING = 'MONITORING' ,
ANALYTICS = 'ANALYTICS' ,
DEVICE_MANAGEMENT = 'DEVICE_MANAGEMENT' ,
ASSET_MANAGEMENT = 'ASSET_MANAGEMENT' ,
ENERGY = 'ENERGY' ,
SMART_CITY = 'SMART_CITY' ,
AGRICULTURE = 'AGRICULTURE' ,
INDUSTRIAL = 'INDUSTRIAL'
}
export const solutionTemplateCategoryTranslations = new Map < SolutionTemplateCategory , string > ( [
[ SolutionTemplateCategory . MONITORING , 'iot-hub.category.monitoring' ] ,
[ SolutionTemplateCategory . ANALYTICS , 'iot-hub.category.analytics' ] ,
[ SolutionTemplateCategory . DEVICE_MANAGEMENT , 'iot-hub.category.device-management' ] ,
[ SolutionTemplateCategory . ASSET_MANAGEMENT , 'iot-hub.category.asset-management' ] ,
[ SolutionTemplateCategory . ENERGY , 'iot-hub.category.energy' ] ,
[ SolutionTemplateCategory . SMART_CITY , 'iot-hub.category.smart-city' ] ,
[ SolutionTemplateCategory . AGRICULTURE , 'iot-hub.category.agriculture' ] ,
[ SolutionTemplateCategory . INDUSTRIAL , 'iot-hub.category.industrial' ]
] ) ;
export enum DeviceCategory {
SENSORS = 'SENSORS' ,
GATEWAYS = 'GATEWAYS' ,
CONTROLLERS = 'CONTROLLERS' ,
ACTUATORS = 'ACTUATORS' ,
TRACKERS = 'TRACKERS' ,
METERS = 'METERS'
}
export const deviceCategoryTranslations = new Map < DeviceCategory , string > ( [
[ DeviceCategory . SENSORS , 'iot-hub.category.sensors' ] ,
[ DeviceCategory . GATEWAYS , 'iot-hub.category.gateways' ] ,
[ DeviceCategory . CONTROLLERS , 'iot-hub.category.controllers' ] ,
[ DeviceCategory . ACTUATORS , 'iot-hub.category.actuators' ] ,
[ DeviceCategory . TRACKERS , 'iot-hub.category.trackers' ] ,
[ DeviceCategory . METERS , 'iot-hub.category.meters' ]
] ) ;
export enum UseCase {
SMART_HOME = 'SMART_HOME' ,
INDUSTRIAL_IOT = 'INDUSTRIAL_IOT' ,
ENERGY_MANAGEMENT = 'ENERGY_MANAGEMENT' ,
FLEET_MANAGEMENT = 'FLEET_MANAGEMENT' ,
AGRICULTURE = 'AGRICULTURE' ,
SMART_CITY = 'SMART_CITY' ,
HEALTHCARE = 'HEALTHCARE' ,
RETAIL = 'RETAIL' ,
WATER_UTILITIES = 'WATER_UTILITIES'
}
export const useCaseTranslations = new Map < UseCase , string > ( [
[ UseCase . SMART_HOME , 'iot-hub.use-case.smart-home' ] ,
[ UseCase . INDUSTRIAL_IOT , 'iot-hub.use-case.industrial-iot' ] ,
[ UseCase . ENERGY_MANAGEMENT , 'iot-hub.use-case.energy-management' ] ,
[ UseCase . FLEET_MANAGEMENT , 'iot-hub.use-case.fleet-management' ] ,
[ UseCase . AGRICULTURE , 'iot-hub.use-case.agriculture' ] ,
[ UseCase . SMART_CITY , 'iot-hub.use-case.smart-city' ] ,
[ UseCase . HEALTHCARE , 'iot-hub.use-case.healthcare' ] ,
[ UseCase . RETAIL , 'iot-hub.use-case.retail' ] ,
[ UseCase . WATER_UTILITIES , 'iot-hub.use-case.water-utilities' ]
] ) ;
export const useCaseValues : string [ ] = [
'Air Quality Monitoring' , 'Asset Tracking' , 'Cold Chain' , 'Drones' ,
'Environment Monitoring' , 'Fleet Tracking' , 'Health Care' , 'Industrial Automation' ,
'Predictive Maintenance' , 'Robotics' , 'SCADA' , 'Smart Building' ,
'Smart City' , 'Smart Energy' , 'Smart Farming' , 'Smart Home' ,
'Smart Metering' , 'Smart Office' , 'Smart Retail' , 'Solar Monitoring' ,
'Tank Level Monitoring' , 'Waste Management'
] ;
export interface ConnectivityGroup {
label : string ;
values : string [ ] ;
}
export const connectivityGroups : ConnectivityGroup [ ] = [
{ label : 'Wireless' , values : [ 'Wi-Fi' , 'Bluetooth' , 'LoRaWAN' , 'Zigbee' , 'Z-Wave' , 'Thread' , 'NB-IoT' , 'LTE-M' , 'Sigfox' , 'NFC' , '2G' , '3G' , '4G' , '5G' , '6LoWPAN' , 'DigiMesh' , 'UWB' ] } ,
{ label : 'Wired' , values : [ 'Ethernet' , 'RS485' , 'RS232' , 'USB' , 'UART' , 'SPI' , 'I2C' , 'CAN' , '1-Wire' , '4-20mA' , '0-10V' , 'M-Bus' , 'IO-Link' , 'IrDA' , 'Power Line Communication' , 'SDI-12' ] } ,
{ label : 'Protocols' , values : [ 'MQTT' , 'HTTP' , 'HTTPS' , 'CoAP' , 'REST' , 'SNMP' , 'Modbus RTU' , 'Modbus TCP' , 'OPC-UA' , 'BACnet' , 'KNX' , 'WebSocket' , 'TCP/IP' , 'UDP' , 'CANopen' , 'DNP3' , 'EtherCAT' , 'Foundation Fieldbus' , 'HART' , 'IEC 61850' , 'PROFINET' , 'Wireless M-Bus' ] }
] ;
export const hardwareTypes : string [ ] = [
'Actuator' , 'AI Accelerator' , 'Analyzer' , 'Camera' , 'Controller' , 'Data Logger' ,
'Development Board' , 'Display' , 'Gateway' , 'Meter' , 'PLC' , 'Relay' ,
'Sensor' , 'Single Board Computer' , 'Tracker'
] ;
export function getCategoriesForType ( type : ItemType ) : Map < string , string > {
switch ( type ) {
case ItemType . WIDGET :
return widgetCategoryTranslations as Map < string , string > ;
case ItemType . DASHBOARD :
return dashboardCategoryTranslations as Map < string , string > ;
case ItemType . SOLUTION_TEMPLATE :
return solutionTemplateCategoryTranslations as Map < string , string > ;
case ItemType . CALCULATED_FIELD :
return calcFieldCategoryTranslations as Map < string , string > ;
case ItemType . RULE_CHAIN :
return ruleChainCategoryTranslations as Map < string , string > ;
case ItemType . DEVICE :
return deviceCategoryTranslations as Map < string , string > ;
default :
return new Map ( ) ;
}
export interface FilterParamInfo {
key : string ;
totalItems : number ;
totalInstallCount : number ;
}
export interface ItemTypeFilterInfo {
types : FilterParamInfo [ ] ;
categories : FilterParamInfo [ ] ;
useCases : FilterParamInfo [ ] ;
vendors : FilterParamInfo [ ] ;
hardwareTypes : FilterParamInfo [ ] ;
connectivities : Record < string , FilterParamInfo [ ] > ;
}