comparison mod_server_status/mod_server_status.lua @ 543:d8614cfe8fc9

mod_server_status: useless "space" removed
author Marco Cirillo <maranda@lightwitch.org>
date Tue, 10 Jan 2012 19:52:02 +0000
parents 32d9fd110cb1
children f78a95aa23c4
comparison
equal deleted inserted replaced
542:32d9fd110cb1 543:d8614cfe8fc9
99 for _,n in ipairs(show_hosts) do result.hosts[n] = hosts[name] and "online" or "offline" end 99 for _,n in ipairs(show_hosts) do result.hosts[n] = hosts[name] and "online" or "offline" end
100 end 100 end
101 if show_comps then 101 if show_comps then
102 result.components = {} 102 result.components = {}
103 for _,n in ipairs(show_comps) do 103 for _,n in ipairs(show_comps) do
104 result.components[n] = hosts[name].modules.component and hosts[name].modules.component.connected and "online" or 104 result.components[n] = hosts[name].modules.component and hosts[name].modules.component.connected and "online" or
105 hosts[name] and hosts[name].modules.component == nil and "online" or "offline" 105 hosts[name] and hosts[name].modules.component == nil and "online" or "offline"
106 end 106 end
107 end 107 end
108 108
109 return json_encode(result) 109 return json_encode(result)