Mailinglist Archive: yast-commit (2080 mails)

< Previous Next >
[yast-commit] <web-client> master : send values from form to resp-api
  • From: Michal Zugec <mzugec@xxxxxxx>
  • Date: Thu, 10 Sep 2009 14:21:57 +0200
  • Message-id: <E1MnBbf-0003Mc-8b@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit c7cc7dac46ab8f3fe0d1e4acce67ce663ec6540b
Author: Michal Zugec <mzugec@xxxxxxx>
Date: Thu Sep 10 14:21:57 2009 +0200

send values from form to resp-api
---
.../network/app/controllers/network_controller.rb | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/plugins/network/app/controllers/network_controller.rb
b/plugins/network/app/controllers/network_controller.rb
index d644539..3c97aa3 100644
--- a/plugins/network/app/controllers/network_controller.rb
+++ b/plugins/network/app/controllers/network_controller.rb
@@ -66,15 +66,24 @@ class NetworkController < ApplicationController
# PUT /users/1
# PUT /users/1.xml
def update
- rt = load_proxy "org.opensuse.yast.modules.yapi.network.routes", "default"
- unless rt
- return false
- end
-
+ rt = load_proxy "org.opensuse.yast.modules.yapi.network.routes", "default"
+ return false unless rt
rt.via = params["default_route"]

+ dns = load_proxy "org.opensuse.yast.modules.yapi.network.dns"
+ return false unless dns
+ dns.nameservers = params["nameservers"]
+ dns.searches = params["searches"]
+
+ hn = load_proxy "org.opensuse.yast.modules.yapi.network.hostname"
+ return false unless hn
+ hn.name = params["name"]
+ hn.domain = params["domain"]
+
begin
rt.save
+ dns.save
+ hn.save
flash[:notice] = _('Settings have been written.')
rescue ActiveResource::ClientError => e
flash[:error] = YaST::ServiceResource.error(e)
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages