Project

General

Profile

Actions

Bug #1774

closed

show features that the smart proxy has in json output

Added by Corey Osman over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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]}})} 
Actions #1

Updated by Joseph Magen over 11 years ago

  • Status changed from New to Ready For Testing
Actions #2

Updated by Joseph Magen over 11 years ago

  • Target version set to Bug scrub
Actions #3

Updated by Anonymous over 11 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF