mirror of
https://github.com/He4eT/simple-spaceapi.git
synced 2026-05-04 17:37:24 +00:00
Sensor: Network Connections
This commit is contained in:
parent
95d6a5f4ac
commit
b758d4e4ec
7 changed files with 132 additions and 0 deletions
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* network-connections-sensor controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::network-connections-sensor.network-connections-sensor');
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* network-connections-sensor router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::network-connections-sensor.network-connections-sensor');
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* network-connections-sensor service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::network-connections-sensor.network-connections-sensor');
|
||||
17
src/components/network/machine.json
Normal file
17
src/components/network/machine.json
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"collectionName": "components_network_machines",
|
||||
"info": {
|
||||
"displayName": "Machine",
|
||||
"icon": "oneToMany"
|
||||
},
|
||||
"options": {},
|
||||
"attributes": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"mac": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
}
|
||||
}
|
||||
}
|
||||
13
types/generated/components.d.ts
vendored
13
types/generated/components.d.ts
vendored
|
|
@ -186,6 +186,18 @@ export interface MembershipPlans extends Struct.ComponentSchema {
|
|||
};
|
||||
}
|
||||
|
||||
export interface NetworkMachine extends Struct.ComponentSchema {
|
||||
collectionName: 'components_network_machines';
|
||||
info: {
|
||||
displayName: 'Machine';
|
||||
icon: 'oneToMany';
|
||||
};
|
||||
attributes: {
|
||||
mac: Schema.Attribute.String & Schema.Attribute.Required;
|
||||
name: Schema.Attribute.String;
|
||||
};
|
||||
}
|
||||
|
||||
export interface StateStateIcon extends Struct.ComponentSchema {
|
||||
collectionName: 'components_state_state_icons';
|
||||
info: {
|
||||
|
|
@ -270,6 +282,7 @@ declare module '@strapi/strapi' {
|
|||
'hackspace.spacefed': HackspaceSpacefed;
|
||||
'location.area': LocationArea;
|
||||
'membership.plans': MembershipPlans;
|
||||
'network.machine': NetworkMachine;
|
||||
'state.state-icon': StateStateIcon;
|
||||
'wind.direction': WindDirection;
|
||||
'wind.elevation': WindElevation;
|
||||
|
|
|
|||
37
types/generated/contentTypes.d.ts
vendored
37
types/generated/contentTypes.d.ts
vendored
|
|
@ -611,6 +611,42 @@ export interface ApiHumiditySensorHumiditySensor
|
|||
};
|
||||
}
|
||||
|
||||
export interface ApiNetworkConnectionsSensorNetworkConnectionsSensor
|
||||
extends Struct.CollectionTypeSchema {
|
||||
collectionName: 'network_connections_sensors';
|
||||
info: {
|
||||
description: '';
|
||||
displayName: 'Sensor: Network Connections';
|
||||
pluralName: 'network-connections-sensors';
|
||||
singularName: 'network-connections-sensor';
|
||||
};
|
||||
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::network-connections-sensor.network-connections-sensor'
|
||||
> &
|
||||
Schema.Attribute.Private;
|
||||
location: Schema.Attribute.String;
|
||||
machines: Schema.Attribute.Component<'network.machine', true>;
|
||||
name: Schema.Attribute.String;
|
||||
publishedAt: Schema.Attribute.DateTime;
|
||||
type: Schema.Attribute.Enumeration<['wifi', 'cable', 'spacenet']>;
|
||||
updatedAt: Schema.Attribute.DateTime;
|
||||
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||
Schema.Attribute.Private;
|
||||
value: Schema.Attribute.Integer & Schema.Attribute.Required;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ApiPowerConsumptionSensorPowerConsumptionSensor
|
||||
extends Struct.CollectionTypeSchema {
|
||||
collectionName: 'power_consumption_sensors';
|
||||
|
|
@ -1348,6 +1384,7 @@ declare module '@strapi/strapi' {
|
|||
'api::event.event': ApiEventEvent;
|
||||
'api::hackspace.hackspace': ApiHackspaceHackspace;
|
||||
'api::humidity-sensor.humidity-sensor': ApiHumiditySensorHumiditySensor;
|
||||
'api::network-connections-sensor.network-connections-sensor': ApiNetworkConnectionsSensorNetworkConnectionsSensor;
|
||||
'api::power-consumption-sensor.power-consumption-sensor': ApiPowerConsumptionSensorPowerConsumptionSensor;
|
||||
'api::power-generation-sensor.power-generation-sensor': ApiPowerGenerationSensorPowerGenerationSensor;
|
||||
'api::radiation-sensor.radiation-sensor': ApiRadiationSensorRadiationSensor;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue