foreman_pipeline / app / views / foreman_pipeline / api / environments / show.json.rabl @ be52ca64
1 |
object @environment => :environment |
---|---|
2 |
|
3 |
extends 'katello/api/v2/common/identifier' |
4 |
|
5 |
attributes :library |
6 |
|
7 |
node :prior do |env| |
8 |
if env.prior |
9 |
{name: env.prior.name, :id => env.prior.id} |
10 |
else |
11 |
nil |
12 |
end |
13 |
end |
14 |
|
15 |
node :successor do |env| |
16 |
if !env.library && env.successor |
17 |
{name: env.successor.name, :id => env.successor.id} |
18 |
else |
19 |
nil |
20 |
end |
21 |
end |
22 |
|
23 |
extends 'katello/api/v2/common/timestamps' |