Sensor: Network Connections

This commit is contained in:
He4eT 2025-04-02 00:07:32 +02:00
commit b758d4e4ec
7 changed files with 132 additions and 0 deletions

View file

@ -0,0 +1,44 @@
{
"kind": "collectionType",
"collectionName": "network_connections_sensors",
"info": {
"singularName": "network-connections-sensor",
"pluralName": "network-connections-sensors",
"displayName": "Sensor: Network Connections",
"description": ""
},
"options": {
"draftAndPublish": false
},
"attributes": {
"type": {
"type": "enumeration",
"enum": [
"wifi",
"cable",
"spacenet"
]
},
"value": {
"type": "integer",
"required": true
},
"machines": {
"type": "component",
"repeatable": true,
"component": "network.machine"
},
"location": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "text"
},
"lastchange": {
"type": "biginteger"
}
}
}

View file

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

View file

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

View file

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

View file

@ -0,0 +1,17 @@
{
"collectionName": "components_network_machines",
"info": {
"displayName": "Machine",
"icon": "oneToMany"
},
"options": {},
"attributes": {
"name": {
"type": "string"
},
"mac": {
"type": "string",
"required": true
}
}
}