-
Notifications
You must be signed in to change notification settings - Fork 88
RESTful API For Dashboard
Echo edited this page Jun 20, 2018
·
3 revisions
获取指定产品Dashboard Grains 统计 可以传递的参数(os、saltversion、kernelrelease、manufacturer、productname、num_cpus、cpu_model、mem_total)
Request
GET /saltshaker/api/v1.0/dashboard/grains/os?product_id=p-4bc4a5b83bd011e8aa0e000c298454d8
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": {
"legendData": [
"CentOS 7.3.1611"
],
"seriesData": [
{
"name": "CentOS 7.3.1611",
"value": 2
}
]
},
"status": true,
"message": ""
}
Request
GET /saltshaker/api/v1.0/dashboard/title?product_id=p-4bc4a5b83bd011e8aa0e000c298454d8
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": {
"minion": 2,
"job": 5,
"event": 1357
},
"status": true,
"message": ""
}
Request
GET /saltshaker/api/v1.0/dashboard/minion?product_id=p-4bc4a5b83bd011e8aa0e000c298454d8
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": {
"title": [
"Accepted",
"Up",
"Down",
"Rejected",
"Unaccepted"
],
"series": [
{
"value": 2,
"name": "Accepted",
"itemStyle": {
"normal": {
"color": "#f0e334"
}
}
},
{
"value": 2,
"name": "Up",
"itemStyle": {
"normal": {
"color": "#64d572"
}
}
},
{
"value": 0,
"name": "Down",
"itemStyle": {
"normal": {
"color": "#f25e43"
}
}
},
{
"value": 0,
"name": "Rejected",
"itemStyle": {
"normal": {
"color": "#ffd572"
}
}
},
{
"value": 0,
"name": "Unaccepted",
"itemStyle": {
"normal": {
"color": "#2d8cf0"
}
}
}
]
},
"status": true,
"message": ""
}