fixes following first code review

This commit is contained in:
Stuart McLean 2018-05-15 10:06:26 +02:00
parent 295169b94f
commit c09c00a1f5

View File

@ -49,17 +49,17 @@ Content-Type: application/json
{ {
"id": 1, "id": 1,
"dashboardId": 1, "dashboardId": 1,
"panelId": 1, "dashboardUId": "ABcdEFghij"
"panelUId": "ABcdEFghij"
"dashboardSlug": "sensors", "dashboardSlug": "sensors",
"panelId": 1,
"name": "fire place sensor", "name": "fire place sensor",
"message": "Someone is trying to break in through the fire place",
"state": "alerting", "state": "alerting",
"message": "Someone is trying to break in through the fire place",
"newStateDate": "2018-05-14T05:55:20+02:00", "newStateDate": "2018-05-14T05:55:20+02:00",
"evalDate": "0001-01-01T00:00:00Z", "evalDate": "0001-01-01T00:00:00Z",
"evalData": null, "evalData": null,
"executionError": "", "executionError": "",
"dashboardUri": "http://grafana.com/dashboard/db/sensors" "url": "http://grafana.com/dashboard/db/sensors"
} }
] ]
``` ```
@ -83,37 +83,27 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
HTTP/1.1 200 HTTP/1.1 200
Content-Type: application/json Content-Type: application/json
{ {
"Id": 1, "id": 1,
"Version": 0, "dashboardId": 1,
"OrgId": 1, "dashboardUId": "ABcdEFghij"
"DashboardId": 55, "dashboardSlug": "sensors",
"PanelId": 2, "panelId": 1,
"Name": "my mem alert", "name": "fire place sensor",
"Message": "", "state": "alerting",
"Severity": "", "message": "Someone is trying to break in through the fire place",
"State": "alerting", "newStateDate": "2018-05-14T05:55:20+02:00",
"Handler": 1, "evalDate": "0001-01-01T00:00:00Z",
"Silenced": false, "evalData": "evalMatches": [
"ExecutionError": " ", {
"Frequency": 60, "metric": "movement",
"EvalData": { "tags": {
"evalMatches": [ "name": "fireplace_chimney"
{ },
"metric": "mem_usage", "value": 98.765
"tags": { }
"name": "server.grafana.com" ],
}, "executionError": "",
"value": 98.765 "url": "http://grafana.com/dashboard/db/sensors"
}
]
},
"NewStateDate": "2018-05-14T17:12:45+02:00",
"StateChanges": 3,
"Created": "2018-05-14T17:01:25+02:00",
"Updated": "2018-05-14T17:11:18+02:00",
"Settings": {
...
}
} }
``` ```