Author: eallen
Date: 2008-10-15 13:30:04 -0400 (Wed, 15 Oct 2008)
New Revision: 2642
Modified:
mgmt/trunk/cumin/python/cumin/job.py
mgmt/trunk/cumin/python/cumin/job.strings
mgmt/trunk/cumin/python/cumin/model.py
Log:
Display the last refreshed date/time using javascript instead of ajax.
Modified: mgmt/trunk/cumin/python/cumin/job.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/job.py 2008-10-15 13:21:18 UTC (rev 2641)
+++ mgmt/trunk/cumin/python/cumin/job.py 2008-10-15 17:30:04 UTC (rev 2642)
@@ -770,9 +770,6 @@
self.output = self.OutputFile(app, "job_output")
self.add_child(self.output)
- self.out_time = self.OutTime(app, "out_time")
- self.add_child(self.out_time)
-
def get_args(self, session):
return self.frame.get_args(session)
Modified: mgmt/trunk/cumin/python/cumin/job.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/job.strings 2008-10-15 13:21:18 UTC (rev 2641)
+++ mgmt/trunk/cumin/python/cumin/job.strings 2008-10-15 17:30:04 UTC (rev 2642)
@@ -298,7 +298,7 @@
<div class="rfloat">{first_last}</div>
{file}
</div>
-<div class="sactions refresh_info">{refresh} <h2>Last refresh was
at <span id="out_time">{out_time}</span></h2></div>
+<div class="sactions refresh_info">{refresh} <h2>Last refresh was
at <span id="out_time"></span></h2></div>
<div><textarea name="job_output" id="job_output"
disabled="disabled" rows="20" cols="80">
loading...{job_output}
</textarea>
@@ -322,6 +322,10 @@
if (obj.fetch.tail == "t") {
outputEnd();
}
- wooly.deferredUpdate('call.xml?class=job;id=0;method=gettime', got_out_time,
"out_time");
+ var d = new Date();
+ var out_time = document.getElementById("out_time");
+ if (out_time) {
+ out_time.innerHTML = d.toLocaleString();
+ }
}
}
Modified: mgmt/trunk/cumin/python/cumin/model.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/model.py 2008-10-15 13:21:18 UTC (rev 2641)
+++ mgmt/trunk/cumin/python/cumin/model.py 2008-10-15 17:30:04 UTC (rev 2642)
@@ -1889,9 +1889,6 @@
action = self.Fetch(self, "fetch")
action.navigable = False
- action = self.GetTime(self, "gettime")
- action.navigable = False
-
def get_title(self, session):
return "Job"
@@ -1972,11 +1969,6 @@
wait(predicate, timeout=20)
return self.job_ads
- class GetTime(CuminAction):
- def do_invoke(self, job):
- now = datetime.now()
- return "<time value=\"%s\" />" % fmt_datetime(now,
sec=True)
-
class Fetch(CuminAction):
def do_invoke(self, job, *args):
file, start, end, tail = args