diff --git a/www/scripts/codecheckerviewer/ListOfBugs.js b/www/scripts/codecheckerviewer/ListOfBugs.js index be48ded8b1..813eddfd21 100644 --- a/www/scripts/codecheckerviewer/ListOfBugs.js +++ b/www/scripts/codecheckerviewer/ListOfBugs.js @@ -236,7 +236,7 @@ function (declare, dom, style, Deferred, ObjectStore, Store, QueryResults, { name : 'Severity', field : 'severity', cellClasses : 'severity', width : '15%', formatter : severityFormatter }, { name : 'Bug path length', field : 'bugPathLength', cellClasses : 'bug-path-length', width : '15%', formatter : bugPathLengthFormatter }, { name : 'Review status', field : 'reviewStatus', cellClasses : 'review-status', width : '15%', formatter : reviewStatusFormatter }, - { name : 'Detection status', field : 'detectionStatus', cellClasses : 'detection-status', width : '15%', formatter : detectionStatusFormatter } + { name : 'Detection status', field : 'detectionStatus', cellClasses : 'detection-status', width : '15%', formatter : detectionStatusFormatter } ]; this.focused = true; diff --git a/www/scripts/codecheckerviewer/ListOfRuns.js b/www/scripts/codecheckerviewer/ListOfRuns.js index d012228621..f4b77f0a96 100644 --- a/www/scripts/codecheckerviewer/ListOfRuns.js +++ b/www/scripts/codecheckerviewer/ListOfRuns.js @@ -65,10 +65,17 @@ function (declare, dom, ItemFileWriteStore, topic, Dialog, Button, } function versionTagFormatter(param) { - var versionTag = util.createRunTag(param.runName, param.versionTag); + var versionTag = util.createRunTag(param.runName, param.versionTag, + util.getTooltip('versionTag')); + return versionTag ? versionTag.outerHTML : ''; } + function numberOfUnresolvedBugsFormatter (num) { + return '' + + num + '' + } + var ListOfRunsGrid = declare(DataGrid, { constructor : function () { this.store = new ItemFileWriteStore({ @@ -78,12 +85,12 @@ function (declare, dom, ItemFileWriteStore, topic, Dialog, Button, this.structure = [ { name : 'Diff', field : 'diff', styles : 'text-align: center;', formatter : diffBtnFormatter}, { name : 'Name', field : 'name', styles : 'text-align: left;', width : '100%' }, - { name : 'Number of unresolved reports', field : 'numberofbugs', styles : 'text-align: center;', width : '20%' }, + { name : 'Number of unresolved reports', field : 'numberofbugs', formatter: numberOfUnresolvedBugsFormatter, styles : 'text-align: center;', width : '20%' }, { name : 'Storage date', field : 'date', styles : 'text-align: center;', width : '30%' }, { name : 'Analysis duration', field : 'duration', styles : 'text-align: center;' }, { name : 'Check command', field : 'checkcmd', styles : 'text-align: center;' }, - { name : 'Detection status', field : 'detectionstatus', styles : 'text-align: center;', width : '30%' }, - { name : 'Version tag', field : 'versionTag', formatter : versionTagFormatter }, + { name : 'Detection status', field : 'detectionstatus', styles : 'text-align: center;', width : '30%' }, + { name : 'Version tag', field : 'versionTag', formatter : versionTagFormatter }, { name : 'Delete', field : 'del', styles : 'text-align: center;', type : 'dojox.grid.cells.Bool', editable : true } ]; diff --git a/www/scripts/codecheckerviewer/util.js b/www/scripts/codecheckerviewer/util.js index 21b83d6a9d..b065af2aef 100644 --- a/www/scripts/codecheckerviewer/util.js +++ b/www/scripts/codecheckerviewer/util.js @@ -14,6 +14,18 @@ function (locale, dom, style, json) { 'July', 'August', 'September', 'October', 'November', 'December' ]; + var tooltips = { + detectionStatus : "Detection statuses are calculated based on the previous " + + "detection status values when the reports are stored " + + "again with the same run name. When storing the results " + + "of a run from scratch then each report will have " + + "detection status of 'New'.", + numOfUnresolved : "Number of unresolved reports are calculated on the " + + "following way: 'Non unique reports' - 'Resolved' " + + "- 'False positive' - 'Intentional'", + versionTag : "Latest version tag of this run." + }; + return { /** * This function returns the first element of the given array for which the @@ -314,10 +326,15 @@ function (locale, dom, style, json) { * @param runName {string} - Name of the run. * @param tag {string} - Tag of the run. */ - createRunTag : function (runName, tag) { + createRunTag : function (runName, tag, tooltip) { if (!tag) return; - var tagWrapper = dom.create('span', { class : 'tag-wrapper', title: 'Version tag' }); + if (tooltip === undefined) + tooltip = 'Version tag'; + + var tagWrapper = + dom.create('span', { class : 'tag-wrapper', title: tooltip }); + dom.create('span', { class : 'customIcon tag', style : 'color:' + this.strToColor(runName + ':' + tag) @@ -451,6 +468,10 @@ function (locale, dom, style, json) { link.click(); document.body.removeChild(link); + }, + + getTooltip : function (name) { + return tooltips[name] ? tooltips[name] : ''; } }; });