Mailinglist Archive: yast-commit (2114 mails)

< Previous Next >
[yast-commit] <web-client> master : select first configured device
  • From: Michal Zugec <mzugec@xxxxxxx>
  • Date: Wed, 16 Sep 2009 16:15:53 +0200
  • Message-id: <E1Mo1ta-0001mu-N9@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit a84b3f5702fea8f693313bb586cf404d68355b58
Author: Michal Zugec <mzugec@xxxxxxx>
Date: Wed Sep 16 16:15:53 2009 +0200

select first configured device
---
.../network/app/controllers/network_controller.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/plugins/network/app/controllers/network_controller.rb
b/plugins/network/app/controllers/network_controller.rb
index 4f2b713..2e62adc 100644
--- a/plugins/network/app/controllers/network_controller.rb
+++ b/plugins/network/app/controllers/network_controller.rb
@@ -17,7 +17,7 @@ class NetworkController < ApplicationController
def index

@ifcs = load_proxy "org.opensuse.yast.modules.yapi.network.interfaces",
:all
- @iface = params[:interface] || @ifcs[0].id #FIXME: first configured
interface
+ @iface = params[:interface] || @ifcs.find {|i| i.bootproto!=nil}.id ||
@ifcs[0].id

ifc = load_proxy "org.opensuse.yast.modules.yapi.network.interfaces",
@iface
return false unless ifc
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages