ref: refs/heads/master
commit 0435c2316d2bc76708a0aad3474a76662e590077
Author: Martin Vidner
Date: Fri Aug 14 13:06:45 2009 +0200
Revert "use put method and show its result"
This reverts commit b170d3c150766d2ccf0173ec8fbdad6c5065788b.
---
.../app/controllers/services_controller.rb | 32 ++++++++++++--------
1 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/plugins/services/app/controllers/services_controller.rb b/plugins/services/app/controllers/services_controller.rb
index 9d86f9d..57ebe58 100644
--- a/plugins/services/app/controllers/services_controller.rb
+++ b/plugins/services/app/controllers/services_controller.rb
@@ -43,20 +43,26 @@ class ServicesController < ApplicationController
return unless client_permissions
@service = @client.find(params[:service_id])
- response = @client.put(params[:service_id], :execute => params[:id])
+ @service.execute = params[:id]
+ @service.save
- # we get a hash with exit, stderr, stdout
- ret = Hash.from_xml(response.body)
- ret = ret["hash"]
- logger.debug "returns #{ret.inspect}"
-
- @result_string = ""
- @result_string << ret["stdout"] if ret["stdout"]
- @result_string << ret["stderr"] if ret["stderr"]
- @error_string = ret["exit"].to_s
- if ret["exit"] == 0
- @error_string = _("success")
- end
+# @service.id = @service.link
+# command_id = "commands/" + params[:id]
+# logger.debug "calling #{command_id} with service #{@service.inspect}"
+# response = @service.put(command_id)
+#
+# # we get a hash with exit, stderr, stdout
+# ret = Hash.from_xml(response.body)
+# ret = ret["hash"]
+# logger.debug "returns #{ret.inspect}"
+#
+# @result_string = ""
+# @result_string << ret["stdout"] if ret["stdout"]
+# @result_string << ret["stderr"] if ret["stderr"]
+# @error_string = ret["exit"].to_s # TODO translate exit codes (use YaST?)
+# if ret["exit"] == 0
+# @error_string = _("success")
+# end
render(:partial =>'result')
end
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org