Skip to content

Commit

Permalink
Merge pull request #1592 from csordasmarton/detection-status-dates
Browse files Browse the repository at this point in the history
Show detection status dates in tooltip
  • Loading branch information
gyorb authored May 24, 2018
2 parents e5ed344 + 74470df commit c0c6133
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions www/scripts/codecheckerviewer/ListOfBugs.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ function (declare, dom, style, Deferred, ObjectStore, Store, QueryResults,
file : reportData.checkedFile
};

reportData.detectionStatus = {
status : reportData.detectionStatus,
detectedAt : reportData.detectedAt,
fixedAt : reportData.fixedAt
};

//--- Review status ---//

var review = reportData.reviewData;
Expand Down Expand Up @@ -183,11 +189,20 @@ function (declare, dom, style, Deferred, ObjectStore, Store, QueryResults,
+ severity + '"></span>';
}

function detectionStatusFormatter(detectionStatus) {
function detectionStatusFormatter(data) {
var detectionStatus = data.status;

if (detectionStatus !== null) {
var status = util.detectionStatusFromCodeToString(detectionStatus);
var title = 'Status: ' + status;

if (data.detectedAt)
title += '\nDetected at: ' + util.prettifyDate(data.detectedAt);

if (data.fixedAt)
title += '\nFixed at: ' + util.prettifyDate(data.fixedAt);

return '<span title="' + status + '" class="customIcon detection-status-'
return '<span title="' + title + '" class="customIcon detection-status-'
+ status.toLowerCase() + '"></span>';
}

Expand Down

0 comments on commit c0c6133

Please sign in to comment.