comparison mod_adhoc_cmd_admin/mod_adhoc_cmd_admin.lua @ 250:67f03b7786af

mod_adhoc: Fix dataform creation mod_adhoc_cmd_admin, mod_adhoc_cmd_modules: adapt to work with fixed mod_adhoc
author Florian Zeitz <florob@babelmonkeys.de>
date Wed, 01 Sep 2010 22:42:58 +0200
parents db1b4c6089b6
children d36160f4961f
comparison
equal deleted inserted replaced
249:50c4348c2494 250:67f03b7786af
284 accountjid = fields.accountjid; 284 accountjid = fields.accountjid;
285 password = usermanager_get_password(user, host); 285 password = usermanager_get_password(user, host);
286 else 286 else
287 return { status = "completed", error = { message = "User does not exist" } }; 287 return { status = "completed", error = { message = "User does not exist" } };
288 end 288 end
289 return { status = "completed", result = { layout = get_user_password_result_layout, data = {accountjid = accountjid, password = password} } }; 289 return { status = "completed", result = { layout = get_user_password_result_layout, values = {accountjid = accountjid, password = password} } };
290 else 290 else
291 return { status = "executing", form = get_user_password_layout }, "executing"; 291 return { status = "executing", form = get_user_password_layout }, "executing";
292 end 292 end
293 end 293 end
294 294
368 end 368 end
369 for resource, session in pairs((hosts[host].sessions[user] and hosts[host].sessions[user].sessions) or {}) do 369 for resource, session in pairs((hosts[host].sessions[user] and hosts[host].sessions[user].sessions) or {}) do
370 resources = resources .. "\n" .. resource; 370 resources = resources .. "\n" .. resource;
371 IPs = IPs .. "\n" .. session.ip; 371 IPs = IPs .. "\n" .. session.ip;
372 end 372 end
373 return { status = "completed", result = {layout = get_user_stats_result_layout, data = {ipaddresses = IPs, rostersize = tostring(rostersize), 373 return { status = "completed", result = {layout = get_user_stats_result_layout, values = {ipaddresses = IPs, rostersize = tostring(rostersize),
374 onlineresources = resources}} }; 374 onlineresources = resources}} };
375 else 375 else
376 return { status = "executing", form = get_user_stats_layout }, "executing"; 376 return { status = "executing", form = get_user_stats_layout }, "executing";
377 end 377 end
378 end 378 end
410 end 410 end
411 users[#users+1] = " - "..resource..": "..status.."("..priority..")"; 411 users[#users+1] = " - "..resource..": "..status.."("..priority..")";
412 end 412 end
413 end 413 end
414 end 414 end
415 return { status = "completed", result = {layout = get_online_users_result_layout, data = {onlineuserjids=t_concat(users, "\n")}} }; 415 return { status = "completed", result = {layout = get_online_users_result_layout, values = {onlineuserjids=t_concat(users, "\n")}} };
416 else 416 else
417 return { status = "executing", form = get_online_users_layout }, "executing"; 417 return { status = "executing", form = get_online_users_layout }, "executing";
418 end 418 end
419 end 419 end
420 420