service monitor fix -- prevent displaying red background for db status and bug in is_db_machine lookup

This commit is contained in:
KeyserSosa
2009-01-26 16:59:29 -08:00
parent 394f04c47c
commit 14241d19a0
2 changed files with 2 additions and 2 deletions

View File

@@ -44,7 +44,7 @@
<%
host_id = host.host.replace('.', '-')
load = host.load()
load_level = min(max(int(load+0.5), 0),5)
load_level = min(max(int(load+0.4), 0),4)
%>
<tr class="load${load_level} title-region" id="${host_id}">
<th>

View File

@@ -40,7 +40,7 @@ def is_db_machine(host):
for ip in ips:
name = socket.gethostbyaddr(ip)[0]
if (name == host or ("." in host and name.endswith("." + host)) or
name.endswith(host + ".")):
name.startswith(host + ".")):
return True
return False