[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Ovirt-devel] [Patch] Add bridge to NIC model



This patch adds a 'bridge' attribute to the NIC model and UI.

Scott
diff --git a/wui/src/app/views/nic/_list.rhtml b/wui/src/app/views/nic/_list.rhtml
index 9cc1cfd..07f7e44 100644
--- a/wui/src/app/views/nic/_list.rhtml
+++ b/wui/src/app/views/nic/_list.rhtml
@@ -1,11 +1,19 @@
 <table class='listing'>
   <thead>
-  <tr><th class="empty">IP</th><th>MAC</th><th>Usage Type</th><th>Bandwidth</th><th class="empty" colspan="2"></th></tr>
+  <tr>
+    <th class="empty">IP</th>
+    <th>MAC</th>
+    <th>Bridge</th>
+    <th>Usage Type</th>
+    <th>Bandwidth</th>
+    <th class="empty" colspan="2"></th>
+  </tr>
   </thead>
 <% for nic in nics %>
   <tr class="<%= cycle('odd','even', :name => nics) %>">
     <td><%= link_to nic.ip_addr, { :controller => "nic", :action => 'show', :id => nic }, { :class => "show" } %></td>
     <td><%= nic.mac %></td>
+    <td><%= nic.bridge %></td>
     <td><%= nic.usage_type %></td>
     <td><%= nic.bandwidth %></td>
   </tr>
diff --git a/wui/src/db/migrate/003_create_nics.rb b/wui/src/db/migrate/003_create_nics.rb
index b068273..3d1ad0a 100644
--- a/wui/src/db/migrate/003_create_nics.rb
+++ b/wui/src/db/migrate/003_create_nics.rb
@@ -22,6 +22,7 @@ class CreateNics < ActiveRecord::Migration
     create_table :nics do |t|
       t.column :mac,         :string
       t.column :ip_addr,     :string
+      t.column :bridge,      :string
       t.column :usage_type,  :string
       t.column :bandwidth,   :integer
       t.column :host_id,     :integer, :null => false

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]