Skip to content

Commit

Permalink
Merge branch 'release-1.1.3' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleconroy committed Jul 22, 2010
2 parents 28ce84f + 1c4a727 commit 80e812f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
10 changes: 9 additions & 1 deletion models.py
Expand Up @@ -248,7 +248,11 @@ def rest(self, base_url):
class Event(db.Model):

start = db.DateTimeProperty(required=True, auto_now_add=True)

# We want this to be required, but it would break all current installs
# Instead, we handle it in the rest method
informational = db.BooleanProperty(default=False)

status = db.ReferenceProperty(Status, required=True)
message = db.TextProperty(required=True)
service = db.ReferenceProperty(Service, required=True,
Expand All @@ -273,10 +277,14 @@ def rest(self, base_url):

stamp = mktime(self.start.timetuple())
m["timestamp"] = format_date_time(stamp)
m["informational"] = self.informational
m["status"] = self.status.rest(base_url)
m["message"] = str(self.message)
m["url"] = base_url + self.resource_url()

if self.informational:
m["informational"] = self.informational
else:
m["informational"] = False

return m

Expand Down
Binary file added static/favicon.ico
Binary file not shown.
7 changes: 4 additions & 3 deletions static/js/common.js
Expand Up @@ -326,10 +326,11 @@ stashboard.fillIndex = function() {
var rightNow = new Date();
rightNow.setHours(0);
rightNow.setMinutes(0);
rightNow.setSeconds(0);
rightNow.setMilliseconds(0);

var endDate = new Date(rightNow.getTime() - 86400000);
var startDate = new Date(endDate.getTime() - 86400000 * 4);
var endDate = new Date(rightNow.getTime());
var startDate = new Date(endDate.getTime() - 86400000 * 5);
var url = "/api/v1/services/" + data.id + "/events";
url += "?start=" + stashboard.rfc1123(startDate);
url += "&end=" + stashboard.rfc1123(endDate);
Expand All @@ -353,7 +354,7 @@ stashboard.fillIndex = function() {
for (i=0; i < events.length; i++) {
var e = events[i];
var evtDate = new Date(e.timestamp);
calendar[evtDate.getDate()] = e.informatoinal || e.status.level !== "NORMAL";
calendar[evtDate.getDate()] = e.informational || e.status.level !== "NORMAL";
}

for (i= days.length-1; i >= 0; i--) {
Expand Down

0 comments on commit 80e812f

Please sign in to comment.