Moved around some properties in the API
This commit is contained in:
parent
99a61f8ca3
commit
c27f1030b6
5 changed files with 35 additions and 28 deletions
|
|
@ -19,6 +19,7 @@
|
|||
"type": "object",
|
||||
"$ref": "#/components/schemas/dataClass"
|
||||
},
|
||||
"dataType": {"type": "string"},
|
||||
"name": {"type": "string"},
|
||||
"id": {"type": "integer"},
|
||||
"map": {
|
||||
|
|
@ -29,7 +30,8 @@
|
|||
"config": {
|
||||
"type": "object",
|
||||
"$ref": "#/components/schemas/configClass"
|
||||
}
|
||||
},
|
||||
"configType": {"type": "string"}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -86,8 +88,6 @@
|
|||
"configClass": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"typeConfig": {"type": "string"},
|
||||
"typeData": {"type": "string"}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -198,7 +198,7 @@
|
|||
"type": "string"
|
||||
},
|
||||
"in": "query",
|
||||
"name": "typeConfig",
|
||||
"name": "configType",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
|
|
@ -206,7 +206,7 @@
|
|||
"type": "string"
|
||||
},
|
||||
"in": "query",
|
||||
"name": "typeData",
|
||||
"name": "dataType",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
|
|
@ -276,7 +276,7 @@
|
|||
"type": "string"
|
||||
},
|
||||
"in": "query",
|
||||
"name": "typeConfig",
|
||||
"name": "configType",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
|
|
@ -284,7 +284,7 @@
|
|||
"type": "string"
|
||||
},
|
||||
"in": "query",
|
||||
"name": "typeData",
|
||||
"name": "dataType",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
// Only update if data has changed
|
||||
row.dataset.deviceId = deviceData.id;
|
||||
row.cells[0].innerHTML = "<a href='?id=" + deviceData.id + "'>" + deviceData.name + "</a>";
|
||||
row.cells[1].innerHTML = deviceData.config?.typeConfig;
|
||||
row.cells[1].innerHTML = deviceData.configType;
|
||||
row.cells[2].innerHTML = deviceData.data?.valueStr;
|
||||
|
||||
row.dataset.timestamp = deviceData.data?.timestamp;
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
$(row.cells[3]).relTimestamp();
|
||||
|
||||
var actionHtml = "";
|
||||
switch (deviceData.config?.typeData) {
|
||||
switch (deviceData.dataType) {
|
||||
case "ColorEventData":
|
||||
actionHtml =
|
||||
'<input type="hidden" name="type" value="color">' +
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue