diff --git a/static/builddetails.js b/static/builddetails.js index f25cf6d..831bc68 100644 --- a/static/builddetails.js +++ b/static/builddetails.js @@ -33,21 +33,21 @@ bt.buildDetails.columns = [ bt.buildDetails.createdRow = function (row, data) { $('td', row).filter((i) => i < 2) - .wrapInner(``); + .wrapInner(``); }; bt.buildDetails.init = function () { var buildNo = window.location.pathname.slice(-2).replaceAll("/", ""); $('.table').dataTable({ ajax: { - url: `/json/pkgsbreakingmostothers/${buildNo}`, + url: `${bt.basePath}json/pkgsbreakingmostothers/${buildNo}`, dataSrc: "" }, columns: bt.buildDetails.columns, // createdRow: bt.buildDetails.createdRow, order: [[3, 'desc']], createdRow: function (row, data, dataIndex) { - $('td:eq(1)', row).wrapInner(''); + $('td:eq(1)', row).wrapInner(``); $('td:eq(2)', row).addClass(classes[data.BuildStatus]); } }); diff --git a/static/builds.js b/static/builds.js index 94eb44c..0f27bea 100644 --- a/static/builds.js +++ b/static/builds.js @@ -21,13 +21,13 @@ bt.builds.columns = [ bt.builds.createdRow = function (row, data) { $('td', row).filter(function (i) { return i < 3 }) - .wrapInner(``); + .wrapInner(``); }; bt.builds.init = function () { $('.table').dataTable({ ajax: { - url: "/json/allbuilds/", + url: `${bt.BasePath}json/allbuilds/`, dataSrc: "" }, columns: bt.builds.columns, diff --git a/templates/table_builds.html b/templates/table_builds.html index d238ca7..b06b347 100644 --- a/templates/table_builds.html +++ b/templates/table_builds.html @@ -1,12 +1,12 @@ - {{.Date}} + {{.Date}} - {{.Branch}} + {{.Branch}} - {{.Platform}} + {{.Platform}} {{.NumFailed}} failed / diff --git a/templates/templates.go b/templates/templates.go index e273696..c03dfd5 100644 --- a/templates/templates.go +++ b/templates/templates.go @@ -78,7 +78,14 @@ func TableBegin(w io.Writer, columns ...string) { } func TableBuilds(w io.Writer, b *ddao.Build) { - t.ExecuteTemplate(w, "table_builds.html", b) + s := struct { + *ddao.Build + bp + }{ + Build: b, + bp: bp{}, + } + t.ExecuteTemplate(w, "table_builds.html", s) } func TablePkgs(w io.Writer, rows []ddao.GetResultsInCategoryRow) {