Sensor: Network Traffic

This commit is contained in:
He4eT 2025-04-02 01:00:38 +02:00
commit c8f3481c42
9 changed files with 189 additions and 0 deletions

View file

@ -0,0 +1,33 @@
{
"kind": "collectionType",
"collectionName": "sensor_network_traffics",
"info": {
"singularName": "sensor-network-traffic",
"pluralName": "sensor-network-traffics",
"displayName": "Sensor: Network Traffic",
"description": ""
},
"options": {
"draftAndPublish": false
},
"attributes": {
"properties": {
"type": "component",
"repeatable": false,
"component": "network.traffic-properties",
"required": true
},
"name": {
"type": "string"
},
"location": {
"type": "string"
},
"description": {
"type": "text"
},
"lastchange": {
"type": "biginteger"
}
}
}

View file

@ -0,0 +1,7 @@
/**
* sensor-network-traffic controller
*/
import { factories } from '@strapi/strapi'
export default factories.createCoreController('api::sensor-network-traffic.sensor-network-traffic');

View file

@ -0,0 +1,7 @@
/**
* sensor-network-traffic router
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreRouter('api::sensor-network-traffic.sensor-network-traffic');

View file

@ -0,0 +1,7 @@
/**
* sensor-network-traffic service
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreService('api::sensor-network-traffic.sensor-network-traffic');

View file

@ -0,0 +1,17 @@
{
"collectionName": "components_network_bits_per_seconds",
"info": {
"displayName": "Bits per Second",
"icon": "oneToOne"
},
"options": {},
"attributes": {
"value": {
"type": "biginteger",
"required": true
},
"maximum": {
"type": "biginteger"
}
}
}

View file

@ -0,0 +1,14 @@
{
"collectionName": "components_network_packets_per_seconds",
"info": {
"displayName": "Packets per Second",
"icon": "oneToOne"
},
"options": {},
"attributes": {
"value": {
"type": "biginteger",
"required": true
}
}
}

View file

@ -0,0 +1,21 @@
{
"collectionName": "components_network_traffic_properties",
"info": {
"displayName": "Traffic Properties",
"icon": "oneToOne"
},
"options": {},
"attributes": {
"bits_per_second": {
"displayName": "Bits per Second",
"type": "component",
"repeatable": false,
"component": "network.bits-per-second"
},
"packets_per_second": {
"type": "component",
"repeatable": false,
"component": "network.packets-per-second"
}
}
}

View file

@ -198,6 +198,18 @@ export interface MembershipPlans extends Struct.ComponentSchema {
}; };
} }
export interface NetworkBitsPerSecond extends Struct.ComponentSchema {
collectionName: 'components_network_bits_per_seconds';
info: {
displayName: 'Bits per Second';
icon: 'oneToOne';
};
attributes: {
maximum: Schema.Attribute.BigInteger;
value: Schema.Attribute.BigInteger & Schema.Attribute.Required;
};
}
export interface NetworkMachine extends Struct.ComponentSchema { export interface NetworkMachine extends Struct.ComponentSchema {
collectionName: 'components_network_machines'; collectionName: 'components_network_machines';
info: { info: {
@ -210,6 +222,35 @@ export interface NetworkMachine extends Struct.ComponentSchema {
}; };
} }
export interface NetworkPacketsPerSecond extends Struct.ComponentSchema {
collectionName: 'components_network_packets_per_seconds';
info: {
displayName: 'Packets per Second';
icon: 'oneToOne';
};
attributes: {
value: Schema.Attribute.BigInteger & Schema.Attribute.Required;
};
}
export interface NetworkTrafficProperties extends Struct.ComponentSchema {
collectionName: 'components_network_traffic_properties';
info: {
displayName: 'Traffic Properties';
icon: 'oneToOne';
};
attributes: {
bits_per_second: Schema.Attribute.Component<
'network.bits-per-second',
false
>;
packets_per_second: Schema.Attribute.Component<
'network.packets-per-second',
false
>;
};
}
export interface StateStateIcon extends Struct.ComponentSchema { export interface StateStateIcon extends Struct.ComponentSchema {
collectionName: 'components_state_state_icons'; collectionName: 'components_state_state_icons';
info: { info: {
@ -295,7 +336,10 @@ declare module '@strapi/strapi' {
'location.area': LocationArea; 'location.area': LocationArea;
'location.person': LocationPerson; 'location.person': LocationPerson;
'membership.plans': MembershipPlans; 'membership.plans': MembershipPlans;
'network.bits-per-second': NetworkBitsPerSecond;
'network.machine': NetworkMachine; 'network.machine': NetworkMachine;
'network.packets-per-second': NetworkPacketsPerSecond;
'network.traffic-properties': NetworkTrafficProperties;
'state.state-icon': StateStateIcon; 'state.state-icon': StateStateIcon;
'wind.direction': WindDirection; 'wind.direction': WindDirection;
'wind.elevation': WindElevation; 'wind.elevation': WindElevation;

View file

@ -826,6 +826,44 @@ export interface ApiRadiationSensorRadiationSensor
}; };
} }
export interface ApiSensorNetworkTrafficSensorNetworkTraffic
extends Struct.CollectionTypeSchema {
collectionName: 'sensor_network_traffics';
info: {
description: '';
displayName: 'Sensor: Network Traffic';
pluralName: 'sensor-network-traffics';
singularName: 'sensor-network-traffic';
};
options: {
draftAndPublish: false;
};
attributes: {
createdAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
description: Schema.Attribute.Text;
lastchange: Schema.Attribute.BigInteger;
locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<
'oneToMany',
'api::sensor-network-traffic.sensor-network-traffic'
> &
Schema.Attribute.Private;
location: Schema.Attribute.String;
name: Schema.Attribute.String;
properties: Schema.Attribute.Component<
'network.traffic-properties',
false
> &
Schema.Attribute.Required;
publishedAt: Schema.Attribute.DateTime;
updatedAt: Schema.Attribute.DateTime;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
};
}
export interface ApiStateState extends Struct.SingleTypeSchema { export interface ApiStateState extends Struct.SingleTypeSchema {
collectionName: 'states'; collectionName: 'states';
info: { info: {
@ -1492,6 +1530,7 @@ declare module '@strapi/strapi' {
'api::power-consumption-sensor.power-consumption-sensor': ApiPowerConsumptionSensorPowerConsumptionSensor; 'api::power-consumption-sensor.power-consumption-sensor': ApiPowerConsumptionSensorPowerConsumptionSensor;
'api::power-generation-sensor.power-generation-sensor': ApiPowerGenerationSensorPowerGenerationSensor; 'api::power-generation-sensor.power-generation-sensor': ApiPowerGenerationSensorPowerGenerationSensor;
'api::radiation-sensor.radiation-sensor': ApiRadiationSensorRadiationSensor; 'api::radiation-sensor.radiation-sensor': ApiRadiationSensorRadiationSensor;
'api::sensor-network-traffic.sensor-network-traffic': ApiSensorNetworkTrafficSensorNetworkTraffic;
'api::state.state': ApiStateState; 'api::state.state': ApiStateState;
'api::temperature-sensor.temperature-sensor': ApiTemperatureSensorTemperatureSensor; 'api::temperature-sensor.temperature-sensor': ApiTemperatureSensorTemperatureSensor;
'api::total-member-count-sensor.total-member-count-sensor': ApiTotalMemberCountSensorTotalMemberCountSensor; 'api::total-member-count-sensor.total-member-count-sensor': ApiTotalMemberCountSensorTotalMemberCountSensor;