Commit 5f9d4600 authored by Damian Kijańczuk's avatar Damian Kijańczuk

vis.js: Fix desc overflowing the field

Signed-off-by: Damian Kijańczuk's avatarKijanczuk, Damian <damian.kijanczuk@intel.com>
parent dd80cd11
......@@ -800,6 +800,7 @@ async function drawResults(file, target_div, spinner, group_by_run, depth) {
l2 = ref.json.index.builds;
l2filter = buildfilter;
l2ftext = "builds";
ref.hosttextwidth = getmaxtesttextwidth(ctx, l1, {name:l1ftext, filter:l1filter}, file) + 4;
} else {
l2 = ref.json.index.hosts;
l2filter = hostfilter;
......@@ -807,9 +808,17 @@ async function drawResults(file, target_div, spinner, group_by_run, depth) {
l1 = ref.json.index.builds;
l1filter = buildfilter;
l1ftext = "builds";
// Passes only when header contains description
if (ref.json.desc !== undefined) {
ref.hosttextwidth = Math.max(
getmaxtesttextwidth(ctx, l1, {name:l1ftext, filter:l1filter}, file) + 4,
getmaxtesttextwidth(ctx, Object.values(ref.json.desc), {name:l1ftext, filter:l1filter}, file) + 16);
} else {
ref.hosttextwidth = getmaxtesttextwidth(ctx, l1, {name:l1ftext, filter:l1filter}, file) + 4;
}
}
ref.hosttextwidth = getmaxtesttextwidth(ctx, l1, {name:l1ftext, filter:l1filter}, file) + 4;
ref.buildtextwidth = getmaxtesttextwidth(ctx, l2, {name:l2ftext, filter:l2filter}, file) + 4;
var l1ntorender = ref.testlist_filtered[l1ftext].length;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment