Skip to content

Commit

Permalink
suggestions update
Browse files Browse the repository at this point in the history
  • Loading branch information
afoong committed May 5, 2011
1 parent 1644dd8 commit 44f60a8
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 9 deletions.
9 changes: 7 additions & 2 deletions controllers/indexController.js
Expand Up @@ -37,7 +37,7 @@ var finishedErrCount = function(res) {
//groupCount++;
}

var finishedErrorGroupTime = function(res, gName) {
var finishedErrorGroupTime = function(res, gName, gIds) {
groupsTimes.push(groupTime);

if(groupTimePackage['data'] == undefined) {
Expand All @@ -47,9 +47,14 @@ var finishedErrorGroupTime = function(res, gName) {
if (groupTimePackage['names'] == undefined) {
groupTimePackage['names'] = new Array();
}

if(groupTimePackage['gids'] == undefined){
groupTimePackage['gids'] = new Array();
}

groupTimePackage['data'].push(groupTime);
groupTimePackage['names'].push(gName);
groupTimePackage['gids'].push(gIds);

groupCount++;
if(groupCount >= globGroupCount || (groupCount >= limitedGroupCount && limitedGroupCount > 0))
Expand Down Expand Up @@ -147,7 +152,7 @@ var setGroupTime = function (errorGroup, gID, gMsg, res) {
}
//console.log("\n\n");

finishedErrorGroupTime(res, grpName.join(' ')/* + ' --was-- ' + gMsg*/);
finishedErrorGroupTime(res, grpName.join(' '), idTxt/* + ' --was-- ' + gMsg*/);
}

var setGroup = function (errorGroup, gID, res) {
Expand Down
25 changes: 20 additions & 5 deletions public/javascripts/errNode.js
Expand Up @@ -47,6 +47,10 @@ $(document).ready(function(){
}

document.getElementById('groupName').innerHTML = gName;
document.getElementById('groupID').innerHTML = "You have selected group ID: " + datasets.gids[index];
$('#groupID').show();
$('#overlayGroupID').text(datasets.gids[index]);
$('#overlayGroupName').text(gName);

// first correct the timestamps - they are recorded as the daily
// midnights in UTC+0100, but Flot always displays dates in UTC
Expand Down Expand Up @@ -112,11 +116,11 @@ $(document).ready(function(){
previousPoint = item.dataIndex;

$("#tooltip").remove();
var x = item.datapoint[0].toFixed(2),
y = item.datapoint[1].toFixed(2);
var x = item.datapoint[0],
y = item.datapoint[1];

showTooltip(item.pageX, item.pageY,
"hardcoded ip address 127.0.0.1");
"Error " + y + " of " + (d.length-1) + " made on " + new Date(x).toDateString());
}
}
else {
Expand All @@ -127,7 +131,7 @@ $(document).ready(function(){

$("#placeholder").bind("plotclick", function (event, pos, item) {
if (item) {
$("#clickdata").show().text("If you tracked ip's in MongoDB you could see who made this " + item.datapoint[1] + 'th error @ 127.0.0.1 and punish them accordingly');
$("#clickdata").show().text("The " + item.datapoint[1] + 'th error in this group was created on ' + new Date(item.datapoint[0]));
plot.highlight(item.series, item.datapoint);
}
});
Expand Down Expand Up @@ -228,7 +232,18 @@ $(document).ready(function(){


};


$('#showErrorMessages').click(function() {
$('#errorMessageOverlay').toggle();
/*$(this).children().each(function() {
$(this).show();
});*/
});

$('#closeErrorMessages').click(function() {
$(this).parent().hide();
});

$(".message").click(function() {
$(this).text("");
});
Expand Down
30 changes: 30 additions & 0 deletions public/stylesheets/style.css
Expand Up @@ -55,6 +55,36 @@ div {
float: left;
}

#errorMessageOverlay
{
display: none;
float: left;
position: absolute;
margin: auto;
background-color: #06799F;
z-index: 100;
}

#groupID
{
background-color: #62B4CF;
}

#overlayGroupID, #overlayGroupName
{
color: #0D8800;
}

button
{
margin: 5px;
}

#closeErrorMessages
{
margin-left: 90%;
}

#nextDino
{
clear: both;
Expand Down
16 changes: 14 additions & 2 deletions views/index.jade
Expand Up @@ -7,13 +7,25 @@ h1

div#groupSelect
select#selector
div#groupID.message.bye
div.message.bye Click a message (including this one) to clear it!
div.message.bye Please be patient while the graphs render, there can be a lot of data.

div
button#showAll Show All
button#next Next
button#showAll Reset Time Frame
button#next Next Error Group
button#showErrorMessages Toggle Messages Overlay for Error Group
div#clickdata.message.bye
div#errorMessageOverlay
button#closeErrorMessages [X]
div#errorMessagesInGroup
| Group ID:
span#overlayGroupID
br
| Group Name:
span#overlayGroupName
div#errorMessage work in progress message 1
div#errorMessage work in progress message 2
div#placeholder(style="width:700px;height:300px;")
div
div#overview(style="margin-left:50px;margin-top:20px;width:500px;height:90px")
Expand Down

0 comments on commit 44f60a8

Please sign in to comment.