Actions
Bug #1774
closedshow features that the smart proxy has in json output
Description
I want to see what features the smart proxy has in the json output like the following:
[{"smart_proxy":{"url":"http://172.16.220.140:8443","features":[{"feature_id":5,"name":"Puppet","smart_proxy_id":1},{"feature_id":4,"name":"Puppet CA","smart_proxy_id":1},{"feature_id":1,"name":"TFTP","smart_proxy_id":1}],"name":"test","id":1}}]
Below is the follow code need to make this happen:
format.json {render :json => SmartProxy.all.to_json(:except => [:created_at, :updated_at],:include => {:features => {:only => [:name,:feature_id, :smart_proxy_id]}})}
Updated by Joseph Magen about 12 years ago
- Status changed from New to Ready For Testing
Updated by Anonymous about 12 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset d076d5731d733bbc6210c81d3b11ed7d2ba8b9d7.
Actions