Mentions légales du service

Skip to content
Snippets Groups Projects
Commit d4975939 authored by Samir Noir's avatar Samir Noir :cheese:
Browse files

[gen/wiki] put multi NICs links only after the first enabled interface

parent e77c7d91
No related branches found
No related tags found
No related merge requests found
Pipeline #158716 passed
...@@ -308,7 +308,8 @@ def get_hardware(sites) ...@@ -308,7 +308,8 @@ def get_hardware(sites)
}.sort_by{ |e| }.sort_by{ |e|
e['device'] e['device']
} }
hard['network_description'] = network_description.map.with_index do |e, i| nic_c = 0
hard['network_description'] = network_description.map do |e|
s = e['count'] > 1 ? "\n* " : '' s = e['count'] > 1 ? "\n* " : ''
s += e['unavailable_for_experiment'] ? '<span style="color:grey">' : '' s += e['unavailable_for_experiment'] ? '<span style="color:grey">' : ''
if e['name'].nil? or e['name'] == e['device'] if e['name'].nil? or e['name'] == e['device']
...@@ -330,8 +331,9 @@ def get_hardware(sites) ...@@ -330,8 +331,9 @@ def get_hardware(sites)
s += 'driver: ' + e['driver'] if e['driver'] s += 'driver: ' + e['driver'] if e['driver']
if e['unavailable_for_experiment'] if e['unavailable_for_experiment']
s += ' - unavailable for experiment' s += ' - unavailable for experiment'
elsif e['device'] =~ /eth/ && !i.zero? elsif e['device'] =~ /eth/
s += ' [[Advanced_KaVLAN#A_simple_multi_NICs_example|(multi NICs example)]]' s += ' [[Advanced_KaVLAN#A_simple_multi_NICs_example|(multi NICs example)]]' if !nic_c.zero?
nic_c += 1
end end
s += ' - no KaVLAN' if e['no_kavlan'] s += ' - no KaVLAN' if e['no_kavlan']
s += e['unavailable_for_experiment'] ? '</span>' : '' s += e['unavailable_for_experiment'] ? '</span>' : ''
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment