Add more template context for email previews
just to keep things from breaking outright..although this hasn't been given much attention still, numbers may not make total sense
This commit is contained in:
parent
3b14a0b288
commit
c45baaed5e
|
@ -40,17 +40,22 @@ class TempmonBase(object):
|
||||||
|
|
||||||
def sample_data(self, request):
|
def sample_data(self, request):
|
||||||
now = localtime(self.config)
|
now = localtime(self.config)
|
||||||
client = model.TempmonClient(config_key='testclient', hostname='testclient')
|
client = tempmon.Client(config_key='testclient', hostname='testclient')
|
||||||
probe = model.TempmonProbe(config_key='testprobe', description="Test Probe")
|
probe = tempmon.Probe(config_key='testprobe', description="Test Probe",
|
||||||
|
good_max_timeout=45)
|
||||||
client.probes.append(probe)
|
client.probes.append(probe)
|
||||||
return {
|
return {
|
||||||
'client': client,
|
'client': client,
|
||||||
'probe': probe,
|
'probe': probe,
|
||||||
|
'probe_url': '#',
|
||||||
'status': self.enum.TEMPMON_PROBE_STATUS[self.enum.TEMPMON_PROBE_STATUS_ERROR],
|
'status': self.enum.TEMPMON_PROBE_STATUS[self.enum.TEMPMON_PROBE_STATUS_ERROR],
|
||||||
'reading': model.TempmonReading(),
|
'reading': tempmon.Reading(),
|
||||||
'taken': now,
|
'taken': now,
|
||||||
'now': now,
|
'now': now,
|
||||||
'probe_url': '#',
|
'status_since': now.strftime('%I:%M %p'),
|
||||||
|
'status_since_delta': 'now',
|
||||||
|
'recent_minutes': 90,
|
||||||
|
'recent_readings': [],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue