Merge branch 'feature/api_runners_online' into 'master'
Add online attribute to runner api entity Closes #25774 See merge request gitlab-org/gitlab-ce!11750
This commit is contained in:
commit
9f58dd6119
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Add online and status attribute to runner api entity
|
||||||
|
merge_request: 11750
|
||||||
|
author:
|
||||||
|
type: added
|
|
@ -30,14 +30,18 @@ Example response:
|
||||||
"description": "test-1-20150125",
|
"description": "test-1-20150125",
|
||||||
"id": 6,
|
"id": 6,
|
||||||
"is_shared": false,
|
"is_shared": false,
|
||||||
"name": null
|
"name": null,
|
||||||
|
"online": true,
|
||||||
|
"status": "online"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"active": true,
|
"active": true,
|
||||||
"description": "test-2-20150125",
|
"description": "test-2-20150125",
|
||||||
"id": 8,
|
"id": 8,
|
||||||
"is_shared": false,
|
"is_shared": false,
|
||||||
"name": null
|
"name": null,
|
||||||
|
"online": false,
|
||||||
|
"status": "offline"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
@ -69,28 +73,36 @@ Example response:
|
||||||
"description": "shared-runner-1",
|
"description": "shared-runner-1",
|
||||||
"id": 1,
|
"id": 1,
|
||||||
"is_shared": true,
|
"is_shared": true,
|
||||||
"name": null
|
"name": null,
|
||||||
|
"online": true,
|
||||||
|
"status": "online"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"active": true,
|
"active": true,
|
||||||
"description": "shared-runner-2",
|
"description": "shared-runner-2",
|
||||||
"id": 3,
|
"id": 3,
|
||||||
"is_shared": true,
|
"is_shared": true,
|
||||||
"name": null
|
"name": null,
|
||||||
|
"online": false
|
||||||
|
"status": "offline"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"active": true,
|
"active": true,
|
||||||
"description": "test-1-20150125",
|
"description": "test-1-20150125",
|
||||||
"id": 6,
|
"id": 6,
|
||||||
"is_shared": false,
|
"is_shared": false,
|
||||||
"name": null
|
"name": null,
|
||||||
|
"online": true
|
||||||
|
"status": "paused"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"active": true,
|
"active": true,
|
||||||
"description": "test-2-20150125",
|
"description": "test-2-20150125",
|
||||||
"id": 8,
|
"id": 8,
|
||||||
"is_shared": false,
|
"is_shared": false,
|
||||||
"name": null
|
"name": null,
|
||||||
|
"online": false,
|
||||||
|
"status": "offline"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
@ -122,6 +134,8 @@ Example response:
|
||||||
"is_shared": false,
|
"is_shared": false,
|
||||||
"contacted_at": "2016-01-25T16:39:48.066Z",
|
"contacted_at": "2016-01-25T16:39:48.066Z",
|
||||||
"name": null,
|
"name": null,
|
||||||
|
"online": true,
|
||||||
|
"status": "online",
|
||||||
"platform": null,
|
"platform": null,
|
||||||
"projects": [
|
"projects": [
|
||||||
{
|
{
|
||||||
|
@ -176,6 +190,8 @@ Example response:
|
||||||
"is_shared": false,
|
"is_shared": false,
|
||||||
"contacted_at": "2016-01-25T16:39:48.066Z",
|
"contacted_at": "2016-01-25T16:39:48.066Z",
|
||||||
"name": null,
|
"name": null,
|
||||||
|
"online": true,
|
||||||
|
"status": "online",
|
||||||
"platform": null,
|
"platform": null,
|
||||||
"projects": [
|
"projects": [
|
||||||
{
|
{
|
||||||
|
@ -327,14 +343,18 @@ Example response:
|
||||||
"description": "test-2-20150125",
|
"description": "test-2-20150125",
|
||||||
"id": 8,
|
"id": 8,
|
||||||
"is_shared": false,
|
"is_shared": false,
|
||||||
"name": null
|
"name": null,
|
||||||
|
"online": false,
|
||||||
|
"status": "offline"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"active": true,
|
"active": true,
|
||||||
"description": "development_runner",
|
"description": "development_runner",
|
||||||
"id": 5,
|
"id": 5,
|
||||||
"is_shared": true,
|
"is_shared": true,
|
||||||
"name": null
|
"name": null,
|
||||||
|
"online": true
|
||||||
|
"status": "paused"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
@ -364,7 +384,9 @@ Example response:
|
||||||
"description": "test-2016-02-01",
|
"description": "test-2016-02-01",
|
||||||
"id": 9,
|
"id": 9,
|
||||||
"is_shared": false,
|
"is_shared": false,
|
||||||
"name": null
|
"name": null,
|
||||||
|
"online": true,
|
||||||
|
"status": "online"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -862,6 +862,8 @@ module API
|
||||||
expose :active
|
expose :active
|
||||||
expose :is_shared
|
expose :is_shared
|
||||||
expose :name
|
expose :name
|
||||||
|
expose :online?, as: :online
|
||||||
|
expose :status
|
||||||
end
|
end
|
||||||
|
|
||||||
class RunnerDetails < Runner
|
class RunnerDetails < Runner
|
||||||
|
|
Loading…
Reference in New Issue