Module: check_mk
Branch: master
Commit: b3172bdfb48e6a64f59667bf1766ba73e5d496f4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b3172bdfb48e6a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun May 6 12:17:42 2012 +0200
Fixed command execution in mobile GUI
---
.bugs/614 | 7 +++++--
web/htdocs/mobile.py | 6 +++---
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/.bugs/614 b/.bugs/614
index 8cae906..b6cd858 100644
--- a/.bugs/614
+++ b/.bugs/614
@@ -1,9 +1,9 @@
Title: Error sending commands in Mobile UI
Component: mobile
-State: open
+Class: bug
+State: done
Date: 2012-05-05 13:41:00
Targetversion: 1.1.12
-Class: bug
I am receiving this error in the Check_MK Mobile interface:
@@ -28,3 +28,6 @@ After this, the screen just displays the message: "ERROR showing
view: too
many values to unpack".
The alert remains unacknowledged as well.
+
+2012-05-06 12:17:19: changed state open -> done
+Should work now.
diff --git a/web/htdocs/mobile.py b/web/htdocs/mobile.py
index a4a3c05..87e83af 100644
--- a/web/htdocs/mobile.py
+++ b/web/htdocs/mobile.py
@@ -353,7 +353,7 @@ def show_command_form(view, datasource, rows):
def do_commands(view, what, rows):
command = None
- title = views.core_command(what, rows[0])[1] # just get the title
+ title, executor = views.core_command(what, rows[0])[1:3] # just get the title
r = html.confirm(_("Do you really want to %s the %d %ss?") %
(title, len(rows), what), action=html.req.myfile +
".py#commands")
if r != True:
@@ -361,11 +361,11 @@ def do_commands(view, what, rows):
count = 0
for row in rows:
- nagios_commands, title = views.core_command(what, row)
+ nagios_commands, title, executor = views.core_command(what, row)
for command in nagios_commands:
if type(command) == unicode:
command = command.encode("utf-8")
- html.live.command(command, row["site"])
+ executor(command, row["site"])
count += 1
if command: