Skip to content

Commit

Permalink
Changed manifest for callout and payload config for anomaly detection
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanperry1 committed Dec 7, 2023
1 parent f31d793 commit db550d1
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 32 deletions.
10 changes: 5 additions & 5 deletions samples/anomaly-detection/lib/payload/payload.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ type Payload[T any] struct {
}

type CommonPayload struct {
AssetID string `json:"asset_id"`
AssetName string `json:"asset_name"`
MaintainenceStatus string `json:"maintainence_status"`
AssetID string `json:"assetId"`
AssetName string `json:"assetName"`
MaintainenceStatus string `json:"maintainenceStatus"`
Name string `json:"name"`
SerialNumber string `json:"serialNumber"`
Site string `json:"site"`
SourceTimestamp string `json:"source_timestamp"`
OperatingTime int `json:"operating_time"`
SourceTimestamp string `json:"sourceTimestamp"`
OperatingTime int `json:"operatingTime"`
MachineStatus int `json:"machineStatus"`
Humidity float64 `json:"humidity"`
Temperature float64 `json:"temperature"`
Expand Down
94 changes: 67 additions & 27 deletions samples/http-grpc-callout/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,76 @@ data:
{
"hello": "world"
}
- path: /example
method: POST
- path: /ref_data
method: GET
status: 200
outputs: ["output1"]
response: |
{
"hello": "world1"
}
[
{
"asset_id": "Sea_O1",
"serial_number": "SN001",
"name": "Contoso",
"site": "Seattle",
"maintenance_status": "Done"
},
{
"asset_id": "Red_O1",
"serial_number": "SN002",
"name": "Contoso",
"site": "Redmond",
"maintenance_status": "Upcoming"
},
{
"asset_id": "Tac_O1",
"serial_number": "SN003",
"name": "Contoso",
"site": "Tacoma",
"maintenance_status": "Overdue"
},
{
"asset_id": "Sea_S1",
"serial_number": "SN004",
"name": "Contoso",
"site": "Seattle",
"maintenance_status": "Done"
},
{
"asset_id": "Red_S1",
"serial_number": "SN005",
"name": "Contoso",
"site": "Redmond",
"maintenance_status": "Done"
},
{
"asset_id": "Sea_M1",
"serial_number": "SN007",
"name": "Contoso",
"site": "Seattle",
"maintenance_status": "Done"
},
{
"asset_id": "Red_M1",
"serial_number": "SN008",
"name": "Contoso",
"site": "Redmond",
"maintenance_status": "Overdue"
},
{
"asset_id": "Tac_M1",
"serial_number": "SN009",
"name": "Contoso",
"site": "Tacoma",
"maintenance_status": "Done"
},
{
"asset_id": "Tac_S1",
"serial_number": "SN010",
"name": "Contoso",
"site": "Tacoma",
"maintenance_status": "Upcoming"
}
]
- path: /ts
method: GET
status: 200
Expand All @@ -36,28 +98,6 @@ data:
{
"timestamp": "2023-11-16T8:18:10-08:00"
}
- path: /anomaly
method: GET
status: 200
outputs: ["output1"]
response: |
{
"Payload": {
"assetID": "Tac_S1",
"asset_id": "Tac_S1",
"asset_name": "Tacoma_Slicer_Tacoma_Slicer__asset_0",
"humidity": 82.34915832237789,
"machine_status": 1,
"maintenanceStatus": "Upcoming",
"name": "Contoso",
"operating_time": 5999,
"serialNumber": "SN010",
"site": "Tacoma",
"source_timestamp": "2023-11-02T20:27:09.143Z",
"temperature": 93.56069711661576,
"vibration": 50.98858025013501
}
}
grpc:
port: 3334
outputs: ["output1"]
Expand Down

0 comments on commit db550d1

Please sign in to comment.