Changeset 188
- Timestamp:
- 07/30/08 16:03:26 (4 months ago)
- Files:
-
- nethorus/app/controllers/manage_controller.rb (modified) (4 diffs)
- nethorus/app/views/manage/index.html.erb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
nethorus/app/controllers/manage_controller.rb
r181 r188 29 29 30 30 31 # Display a list of entity types that can be managed 32 33 def index 34 end 35 36 31 37 # Display a list of devices to the user that may be managed. 32 38 33 def index 39 def device_index 40 41 @partial = "common/device_search" 34 42 35 43 if params[:site_id] && !params[:site_id].blank? && params[:site_id].to_i != 0 … … 43 51 @sites = Site.find(:all) 44 52 45 respond_to do |format| 46 format.html 47 format.xml 48 end 49 53 render :action => 'index' 54 55 end 56 57 58 # Display a list of re-inventory options 59 60 def inventory_index 61 62 @partial = "manage/inventory" 63 50 64 end 51 65 … … 1082 1096 1083 1097 bridge = device.create_bridge 1098 logger.debug "Creating a new bridge for device id=#{device.id}" 1084 1099 1085 1100 bridge.dot1d_base_bridge_address = purify_mac_address(base_settings['dot1dBaseBridgeAddress']) … … 1102 1117 bridge.dot1d_stp_bridge_forward_delay = stp_settings['dot1dStpBridgeForwardDelay'] 1103 1118 1104 bridge.save 1119 logger.debug "Saving new bridge for device id=#{device.id}" 1120 1121 unless bridge.save 1122 bridge.errors.each_full do |error| 1123 logger.debug error 1124 end 1125 end 1105 1126 1106 1127 nethorus/app/views/manage/index.html.erb
r130 r188 1 1 <h1>Manage</h1> 2 2 3 < p>Choose an element to manage. Elements that appear without a hyperlink for the hostname are not manageable and require an SNMP community string set.</p>3 <% tabs = [ [ 'Devices', 'manage', 'device' ], [ 'Bridges', 'manage', 'bridge' ], [ 'Inventory', 'manage', 'inventory' ] ] %> 4 4 5 <%= render :partial => 'common/device_search' %> 5 <ul class="tabbed"> 6 <% tabs.each do |tab| %> 7 <% if params[:action] == tab[2] %> 8 <li id="selected"><%= link_to tab[0], :controller => tab[1], :action => tab[2] %></li> 9 <% else %> 10 <li><%= link_to tab[0], :controller => tab[1], :action => tab[2] %></li> 11 <% end %> 12 <% end %> 13 </ul> 6 14 7 <br /> 8 9 <%= render :partial => 'common/all_devices' %> 15 <div id="content"> 16 <% if @partial %> 17 <%= render :partial => @partial %> 18 <% else %> 19 <p>Select one of the links above to search for an element.</p> 20 <ul> 21 <li><strong>Devices</strong> will allow management of an individual device.</li> 22 <li><strong>Bridges</strong> will display a list of Ethernet bridges.</li> 23 </ul> 24 <% end %> 25 </div>
