Adding pamela but I'm dumb and messed up routing
This commit is contained in:
25
app/views/pamela/_form.html.erb
Normal file
25
app/views/pamela/_form.html.erb
Normal file
@@ -0,0 +1,25 @@
|
||||
<%= form_for(@mac) do |f| %>
|
||||
<% if @mac.errors.any? %>
|
||||
<div id="error_explanation">
|
||||
<h2><%= pluralize(@mac.errors.count, "error") %> prohibited this Mac from being saved:</h2>
|
||||
|
||||
<ul>
|
||||
<% @mac.errors.full_messages.each do |msg| %>
|
||||
<li><%= msg %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :user_id, "User" %><br />
|
||||
<%= collection_select(:mac, :user_id, @users, :id, :name) %>
|
||||
</div>
|
||||
<div class="field">
|
||||
<%= f.label :mac, "Mac" %><br />
|
||||
<%= f.text_field :mac %>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<%= f.submit %>
|
||||
</div>
|
||||
<% end %>
|
||||
6
app/views/pamela/edit.html.erb
Normal file
6
app/views/pamela/edit.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<h1>Editing User Certification</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @user_certification %> |
|
||||
<%= link_to 'Back', user_certifications_path %>
|
||||
9
app/views/pamela/index.html.erb
Normal file
9
app/views/pamela/index.html.erb
Normal file
@@ -0,0 +1,9 @@
|
||||
<h2>What machines are on our network?</h2>
|
||||
<% @macs.each do |mac| %>
|
||||
<%= mac.user.name unless mac.user.blank? %>
|
||||
<%= mac.mac %> <!--
|
||||
<%= mac.since %>,
|
||||
<%= mac.refreshed %>,
|
||||
<%= mac.active %>--> |
|
||||
<%= link_to 'Edit', edit_mac_path(mac) %> <br/>
|
||||
<% end %>
|
||||
5
app/views/pamela/new.html.erb
Normal file
5
app/views/pamela/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>New User Certification</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', user_certifications_path %>
|
||||
5
app/views/pamela/scan.html.erb
Normal file
5
app/views/pamela/scan.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
Scanning...
|
||||
<% @log.each do |log| %>
|
||||
<%= log.mac %> =
|
||||
<%= log.ip %><br/>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user