Skip to content

Commit

Permalink
gh-29 Fix typo in settings.json
Browse files Browse the repository at this point in the history
  • Loading branch information
at055612 committed Jan 3, 2019
1 parent 49c257e commit 848441a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions war/vis/SeriesSessionMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,18 +175,22 @@ visualisations.SeriesSessionMap = function(containerNode) {
var seriesCount = data.values.length;

//Determine if the event represents a new session or not
var isNewSession = function(lastEventTime, eventTime, lastSessionText, sessionText) {
var isNewSession = function(
lastEventTime, eventTime, lastSessionText, sessionText) {

if (lastEventTime != null) {
var timeDiff = (eventTime - lastEventTime)
}

if (sessionText && !lastSessionText) {
//No previos session text so assume a new session
return true;
} else if (sessionText && sessionText === openSessionText && lastSessionText && lastSessionText === closeSessionText) {
} else if (sessionText && sessionText === openSessionText
&& lastSessionText && lastSessionText === closeSessionText) {
//OPEN after a CLOSE
return true;
} else if (sessionText && sessionText === closeSessionText && lastSessionText && lastSessionText === closeSessionText) {
} else if (sessionText && sessionText === closeSessionText
&& lastSessionText && lastSessionText === closeSessionText) {
//CLOSE after a CLOSE
return true;
} else if (!lastSessionText && sessionText) {
Expand All @@ -197,6 +201,7 @@ visualisations.SeriesSessionMap = function(containerNode) {
return true;
} else if (!sessionText && timeDiff && timeDiff >= sessionThresholdMillis) {
//time based sessionisation and event is outside the threshold
console.log("timeDiff: " + timeDiff + " +/-: " + (timeDiff - sessionThresholdMillis))
return true;
} else {
return false;
Expand Down

0 comments on commit 848441a

Please sign in to comment.