diff options
| author | mo khan <mo@mokhan.ca> | 2015-02-03 22:14:00 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2015-02-03 22:14:00 -0700 |
| commit | 3371919560ef37fac3f59c95ad4cf2f6a472ef57 (patch) | |
| tree | f158207e234353b33298e640bac0510a9782a3bd /app/views/agents | |
| parent | 4827894034d47962bfc6c51472c9ed2617ebf3a9 (diff) | |
add endpoint for cloud lookup.
Diffstat (limited to 'app/views/agents')
| -rw-r--r-- | app/views/agents/files/index.json.jbuilder | 4 | ||||
| -rw-r--r-- | app/views/agents/files/show.json.jbuilder | 3 | ||||
| -rw-r--r-- | app/views/agents/index.html.erb | 3 |
3 files changed, 9 insertions, 1 deletions
diff --git a/app/views/agents/files/index.json.jbuilder b/app/views/agents/files/index.json.jbuilder new file mode 100644 index 0000000..6551a44 --- /dev/null +++ b/app/views/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/agents/files/show.json.jbuilder b/app/views/agents/files/show.json.jbuilder new file mode 100644 index 0000000..88011e6 --- /dev/null +++ b/app/views/agents/files/show.json.jbuilder @@ -0,0 +1,3 @@ +if @file + json.extract! @file, :fingerprint, :state +end diff --git a/app/views/agents/index.html.erb b/app/views/agents/index.html.erb index 3a6b738..a1021ed 100644 --- a/app/views/agents/index.html.erb +++ b/app/views/agents/index.html.erb @@ -9,7 +9,7 @@ <thead> <tr> <th>Hostname</th> - <th colspan="4"></th> + <th colspan="5"></th> </tr> </thead> <tbody> @@ -17,6 +17,7 @@ <tr> <td><%= agent.hostname %></td> <td><%= link_to 'Events', agent_events_path(agent) %></td> + <td><%= link_to 'Files', agent_files_path(agent) %></td> <td><%= link_to 'Show', agent %></td> <td><%= link_to 'Edit', edit_agent_path(agent) %></td> <td><%= link_to 'Destroy', agent, method: :delete, data: { confirm: 'Are you sure?' } %></td> |
