Mailinglist Archive: yast-commit (1914 mails)

< Previous Next >
[yast-commit] <web-client> network : Added interface <select>ion.
  • From: Martin Vidner <mvidner@xxxxxxx>
  • Date: Mon, 7 Sep 2009 14:31:16 +0200
  • Message-id: <E1MkdO1-0006qh-TK@xxxxxxxxxxxxxxxx>
ref: refs/heads/network
commit 1a6eb86bb052c63f66f6158f61d27e406706a24b
Author: Martin Vidner <mvidner@xxxxxxx>
Date: Mon Sep 7 14:16:54 2009 +0200

Added interface <select>ion.
---
.../network/app/controllers/network_controller.rb | 4 +++-
plugins/network/app/views/network/index.html.erb | 11 +++++++++--
2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/plugins/network/app/controllers/network_controller.rb
b/plugins/network/app/controllers/network_controller.rb
index 48f4194..eb67a3d 100644
--- a/plugins/network/app/controllers/network_controller.rb
+++ b/plugins/network/app/controllers/network_controller.rb
@@ -25,7 +25,9 @@ class NetworkController < ApplicationController

# GET /network
def index
- @iface = "eth0"
+ @ifcs = load_proxy "org.opensuse.yast.modules.yapi.network.interfaces",
:all
+ @iface = params[:interface] || @ifcs[0].id
+
ifc = load_proxy "org.opensuse.yast.modules.yapi.network.interfaces",
@iface
return false unless ifc

diff --git a/plugins/network/app/views/network/index.html.erb
b/plugins/network/app/views/network/index.html.erb
index 1d9e1ed..9419b84 100644
--- a/plugins/network/app/views/network/index.html.erb
+++ b/plugins/network/app/views/network/index.html.erb
@@ -4,9 +4,17 @@

<!-- TODO translations -->

+<h3>Interface</h3>
+
+<% form_tag("/network", :method => "get") do |f| %>
+ <!-- (..., :id, :name) -->
+ <%= select_tag(:interface,
+ options_from_collection_for_select(@ifcs, :id, :id)) %>
+ <%= submit_tag("Select") %>
+<% end %>
+
<h3>IP Address</h3>

-<p>Interface: <%=h @iface %></p>
<p>Configuration Mode: <%=h @conf_mode %></p>
<p>IP Address: <%=h @ip %></p>
<p>Netmask: <%=h @netmask %></p>
@@ -22,4 +30,3 @@

<a href="/" class="button"><%=_("Back")%></a>
</div>
-
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages