diff options
| author | Nicolas Braud-Santoni <nicoo@ffgraz.net> | 2016-08-07 16:39:42 +0200 | 
|---|---|---|
| committer | Nicolas Braud-Santoni <nicoo@ffgraz.net> | 2016-08-07 16:39:42 +0200 | 
| commit | b6ca062670b342344df08b53fb216db619ef42bc (patch) | |
| tree | 7680ac6b407239f6b7272c937e42f688b8de542c /app/views/node/_pshow.rhtml | |
Import legacy manman source
Copied from www.ffgraz.net
Diffstat (limited to 'app/views/node/_pshow.rhtml')
| -rw-r--r-- | app/views/node/_pshow.rhtml | 54 | 
1 files changed, 54 insertions, 0 deletions
| diff --git a/app/views/node/_pshow.rhtml b/app/views/node/_pshow.rhtml new file mode 100644 index 0000000..df7b132 --- /dev/null +++ b/app/views/node/_pshow.rhtml @@ -0,0 +1,54 @@ + +<% @nodes.each do |node| %> +<table border="1" width="600"> +  <tr> +    <td width="120"><strong>Name</strong></td> +    <td colspan="5"><%= node.name %></td> +  </tr> +  <tr> +    <td><strong>Kommentar</strong></td> +    <td colspan="5"><%= node.comment %></td> +  </tr> +  <tr> +  <% if node.person %> +    <td><strong>Administrator</strong></td> +    <td colspan="5"><%= node.person.email %></td> +  <% end %> +  <tr> +    <td rowspan="<%= node.ip.length()+1 %>"><strong>Interfaces</strong></td> +    <td><strong>Name</strong></td> +    <td><strong>IP</strong></td> +    <td><strong>Netmask</strong></td> +    <td colspan="2"><strong>Link</strong></td> +    <% node.ip.each do |ip| %> +      <tr> +        <td><%= ip.name %></td> +        <td><%= link_to ip.ip, "http://#{ip.ip}" %></td> +	<% if ip.nets != nil %> +	  <% if ip.nets.netmask != '255.255.255.255' %> +	    <td><%= ip.nets.netmask %></td> +	  <% else %> +	    <td><%= '255.255.0.0' %></td> +	  <% end %> +	<% else %> +	<td><%= ip.net_id %></td> +	<% end %> +	<td><%= link_to "intern", "http://#{ip.name}.#{node.name}.#{node.location.name}.graz.funkfeuer.at" %> | <%= link_to "extern", "http://#{ip.name}.#{node.name}.#{node.location.name}.ext.graz.funkfeuer.at" %></td> +      </tr> +    <% end %> +  </tr> +  <tr> +    <td><strong>Smokeping</strong></td> +    <% if node.smokeping %> +      <td colspan="5">enabled</td> +    <% else %> +      <td colspan="5">disabled</td> +    <% end %> +  </tr> +</table> +<p> +  <%= link_to 'Edit', { :controller =>'node', :action => 'edit' , :id => node.id } %> |  +  <%= link_to 'Destroy', { :controller => 'node', :action => 'destroy', :id => node.id } %> +</p> +<p></p> +<% end %> | 
