This is an automated email from the ASF dual-hosted git repository. dpavlov pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git
The following commit(s) were added to refs/heads/master by this push: new 92052d7 IGNITE-10169 Show tests and problems values on graphs instead of the build start date - Fixes #61. 92052d7 is described below commit 92052d7770918cfb54fe36059ca0ebd272ed6607 Author: zzzadruga <zzzadr...@gmail.com> AuthorDate: Sat Nov 10 12:53:44 2018 +0300 IGNITE-10169 Show tests and problems values on graphs instead of the build start date - Fixes #61. Signed-off-by: Dmitriy Pavlov <dpav...@apache.org> --- .../src/main/webapp/comparison.html | 34 ++++++++++++---------- .../src/main/webapp/css/style-1.5.css | 4 +-- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/ignite-tc-helper-web/src/main/webapp/comparison.html b/ignite-tc-helper-web/src/main/webapp/comparison.html index b8d5b70..4a5c37c 100644 --- a/ignite-tc-helper-web/src/main/webapp/comparison.html +++ b/ignite-tc-helper-web/src/main/webapp/comparison.html @@ -208,7 +208,6 @@ } const parseTime = d3.timeParse("%d-%m-%YT%H:%M:%S"), - formatTime = d3.timeFormat("%d-%m-%Y %H:%M:%S"), formatMillisecond = d3.timeFormat(".%L"), formatSecond = d3.timeFormat(":%S"), formatMinute = d3.timeFormat("%H:%M"), @@ -423,7 +422,7 @@ } function getSuiteTestsHtml(results, suite, key) { - if (!results[key].hasOwnProperty(suite) || results[key][suite].length == 0) + if (!results[key].hasOwnProperty(suite) || results[key][suite].length === 0) return ''; let res = '<body><div id="' + suite + key + '"style="cursor: default; margin-left: 10px;">'; @@ -527,13 +526,13 @@ $('#' + stat.name + stat.num).html(stat.min + " - " + stat.median + " - " + stat.max); compareAndHighlight(stat); + } - function time(s) { - let h = parseInt(s / 3600), - m = parseInt((s % 3600) / 60); + function time(s) { + let h = parseInt(s / 3600), + m = parseInt((s % 3600) / 60); - return h + ":" + ((m < 10) ? "0" : "") + m; - } + return h + ":" + ((m < 10) ? "0" : "") + m; } function fillNameForTotalColumn(num, title) { @@ -682,7 +681,7 @@ height = 200 - margin.top - margin.bottom, g = svg.append("g").attr("transform", "translate(" + margin.left + "," + margin.top + ")"); - let buildDate = d3.select("body").append("div").attr("class", "tooltip buildDate").style("opacity", 0), + let value = d3.select("body").append("div").attr("class", "tooltip value").style("opacity", 0), condition = d3.select("body").append("div").attr("class", "tooltip condition").style("opacity", 0), mark = d3.select("body").append("div").attr("class", "tooltip mark").style("opacity", 0); @@ -756,23 +755,26 @@ let graphTd = document.getElementById("graph" + fieldName + num).getBoundingClientRect(), scrollTop = window.pageYOffset || document.documentElement.scrollTop, top = scrollTop + graphTd.top + y(d.stat[fieldName + F]) - 10, - partLeft = graphTd.left + x(d.date), - buildDateNearTheBorder = x(d.date) > (440 - 140); + partLeft = graphTd.left + x(d.date) + 44, + minWidth = 18, interval = 8; + + value.html(' ' + (isDuration ? time(d.stat[fieldName]) : d.stat[fieldName]) + ' '); + + let valueWidth = parseInt(value.style("width")); - buildDate.html(formatTime(d.date)) - .style("left", partLeft + (buildDateNearTheBorder ? -99 : 49) + "px") + value.style("left", partLeft - valueWidth / 2 + "px") .style("top", top + "px" ).transition() .duration(200).style("opacity", .8).style("display", "block"); mark.html('<i class="fas fa-' + (markBuildId === d.buildId ? 'eraser' : 'highlighter') + '"></i>') - .style("left", partLeft + (buildDateNearTheBorder ? 49 : 23) + "px") + .style("left", partLeft + valueWidth / 2 + interval + "px") .style("top", top + "px" ) .attr("onclick", "markBuild(" + d.buildId + "); return false;").transition() .duration(200).style("opacity", .8).style("display", "block"); condition.html('<i class="' + (!d.isValid ? 'fas fa-undo' : 'far fa-trash') + '-alt"></i>') - .style("left", partLeft + (buildDateNearTheBorder ? 75 : -3) + "px") + .style("left", partLeft - minWidth - interval - valueWidth / 2 + "px") .style("top", top + "px" ) .attr("onclick", "setCondition(" + num + ", " + d.buildId + ", " + (isDuration ? d.stat[fieldName + F].getTime() / 1000 : d.stat[fieldName + F]) + @@ -785,8 +787,8 @@ .style("fill", null) .attr("r", 3); - buildDate.transition().duration(2000) - .style("opacity", 0).on("end", function() { buildDate.style("display", "none"); }); + value.transition().duration(2000) + .style("opacity", 0).on("end", function() { value.style("display", "none"); }); condition.transition().duration(2000) .style("opacity", 0).on("end", function() { condition.style("display", "none"); }); diff --git a/ignite-tc-helper-web/src/main/webapp/css/style-1.5.css b/ignite-tc-helper-web/src/main/webapp/css/style-1.5.css index 4bc1dfe..7729192 100644 --- a/ignite-tc-helper-web/src/main/webapp/css/style-1.5.css +++ b/ignite-tc-helper-web/src/main/webapp/css/style-1.5.css @@ -410,8 +410,8 @@ div.tooltip { height: 15px; } -.buildDate { - width: 140px; +.value { + min-width: 18px; background: #12AD5E; }