diff options
| author | mo khan <mo@mokhan.ca> | 2015-02-21 22:12:49 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2015-02-21 22:12:49 -0700 |
| commit | 7cd78597d794efcf79090377bbc1909a1d6d3ad9 (patch) | |
| tree | f4f55eb33be3912030c505198e67b1cba9ba2473 /app/views/api/agents | |
| parent | feaf5cfae0f948ceebae4d1ff2c80d84cd76cae0 (diff) | |
| parent | 05b427bd4d9f9c4ea60f9485f06d68de0b689d28 (diff) | |
merge with master
Diffstat (limited to 'app/views/api/agents')
| -rw-r--r-- | app/views/api/agents/create.json.jbuilder | 1 | ||||
| -rw-r--r-- | app/views/api/agents/files/index.json.jbuilder | 4 | ||||
| -rw-r--r-- | app/views/api/agents/files/show.json.jbuilder | 6 | ||||
| -rw-r--r-- | app/views/api/agents/index.json.jbuilder | 4 |
4 files changed, 15 insertions, 0 deletions
diff --git a/app/views/api/agents/create.json.jbuilder b/app/views/api/agents/create.json.jbuilder new file mode 100644 index 0000000..f156cb0 --- /dev/null +++ b/app/views/api/agents/create.json.jbuilder @@ -0,0 +1 @@ +json.extract! @agent, :id, :hostname, :created_at, :updated_at diff --git a/app/views/api/agents/files/index.json.jbuilder b/app/views/api/agents/files/index.json.jbuilder new file mode 100644 index 0000000..6551a44 --- /dev/null +++ b/app/views/api/agents/files/index.json.jbuilder @@ -0,0 +1,4 @@ +json.array!(@files) do |file| + json.extract! agent, :fingerprint, :state + json.url agent_file_url([agent, file], format: :json) +end diff --git a/app/views/api/agents/files/show.json.jbuilder b/app/views/api/agents/files/show.json.jbuilder new file mode 100644 index 0000000..8c6f501 --- /dev/null +++ b/app/views/api/agents/files/show.json.jbuilder @@ -0,0 +1,6 @@ +if @file + json.extract! @file, :fingerprint, :state +else + json.fingerprint @fingerprint + json.state "unknown" +end diff --git a/app/views/api/agents/index.json.jbuilder b/app/views/api/agents/index.json.jbuilder new file mode 100644 index 0000000..65f6f60 --- /dev/null +++ b/app/views/api/agents/index.json.jbuilder @@ -0,0 +1,4 @@ +json.array!(@agents) do |agent| + json.extract! agent, :id, :hostname + json.url agent_url(agent, format: :json) +end |
