X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=www%2Fgadgets%2Fsitemonitor.py;h=3ec6231a8486a1cb1bf5df0585e11dac0a856785;hb=a1d795311ad8facac7399e73123d53e6c8e72c9d;hp=a52fec514ac97764187ecb496fabb3b82ecf190e;hpb=b548c69db3d1f302b4d0d08377f0231eb3c4fd58;p=monitor.git diff --git a/www/gadgets/sitemonitor.py b/www/gadgets/sitemonitor.py index a52fec5..3ec6231 100755 --- a/www/gadgets/sitemonitor.py +++ b/www/gadgets/sitemonitor.py @@ -6,7 +6,7 @@ cgitb.enable() print "Content-Type: text/html\r\n" import time -from unified_model import * +from monitor.model import * from monitor import database from HyperText.HTML import A, BR, IMG, TABLE, TR, TH, TD, EM, quote_body, CENTER from HyperText.Documents import Document @@ -108,7 +108,8 @@ def main(): fb = database.dbLoad("findbad") lb2hn = database.dbLoad("plcdb_lb2hn") - pf = database.dbLoad("node_persistflags") + # todo: pull from HistoryNodeRecord table instead + #pf = database.dbLoad("node_persistflags") # SETUP header t = TABLE(border="0", cellspacing="0", cellpadding="0") @@ -135,7 +136,8 @@ def main(): url = 'http://www.planet-lab.org/db/nodes/index.php?nodepattern=%s' % host td = TD(A(host, target='_blank', href=url), bgcolor=color) r.append(td) - lc = pf[host].last_changed + #lc = pf[host].last_changed + lc=-1 td = TD(diff_time(lc)) r.append(td) t.append(r)