diff --git a/sites/eclipse/build/buildlogs/logs.html b/sites/eclipse/build/buildlogs/logs.html index 866354a48b3..0e9943f8b5e 100644 --- a/sites/eclipse/build/buildlogs/logs.html +++ b/sites/eclipse/build/buildlogs/logs.html @@ -58,7 +58,7 @@

Comparator Logs

if (beautifyText) { if (text.startsWith('s') && text.endsWith('.log')) { const firstDash = text.indexOf('_') - text = text.substring(firstDash + 1, text.length - 4).replace('_', ' ') + text = text.substring(firstDash + 1, text.length - 4).replaceAll('_', ' ') } } item.innerHTML = `${text} (${file.size})` diff --git a/sites/eclipse/build/gitLog.html b/sites/eclipse/build/gitLog.html index 1267099f567..52f80fd53e4 100644 --- a/sites/eclipse/build/gitLog.html +++ b/sites/eclipse/build/gitLog.html @@ -11,7 +11,7 @@
- Downloads + Downloads ${label} GIT Log
diff --git a/sites/eclipse/build/index.html b/sites/eclipse/build/index.html index ca336343c5a..35ada23f044 100644 --- a/sites/eclipse/build/index.html +++ b/sites/eclipse/build/index.html @@ -11,7 +11,7 @@
- Downloads + Downloads ${label}
@@ -116,7 +116,7 @@

SWT Binary and Source data.updatesP2RepositoryComposite += `-${buildType}-builds` } if (buildType == 'S') { - data.updatesP2RepositoryComposite += `-I-builds` + data.updatesP2RepositoryComposite += '-I-builds' const timestamp = buildID.substring(buildID.lastIndexOf('-') + 1, buildID.length) data.updatesP2Repository = `${data.updatesP2RepositoryComposite}/I${timestamp.substring(0, 8)}-${timestamp.substring(8, 12)}` } else { @@ -133,7 +133,7 @@

SWT Binary and Source const testJobsFolderURL = getJenkinsTestJobsFolderURL(build) const testResultsOverview = fetchAllJSON(build.expectedTests.map(c => `testresults/${jobNamePrefix}-${c}.json`)) - const testResultsTable = document.getElementById("tests-overview-table") + const testResultsTable = document.getElementById('tests-overview-table') const tBody = testResultsTable.createTBody() testResultsOverview.then(testResults => { let completedTests = 0 @@ -172,7 +172,7 @@

SWT Binary and Source } // Inject resource files - const dataTables = Array.from(mainElement.getElementsByClassName("files-table")) + const dataTables = Array.from(mainElement.getElementsByClassName('files-table')) for (const table of dataTables) { const dataPath = table.getAttribute('data-path') const filesData = getValue(build, dataPath) diff --git a/sites/eclipse/build/tests.html b/sites/eclipse/build/tests.html index eb8f30d9d6c..5d06409099b 100644 --- a/sites/eclipse/build/tests.html +++ b/sites/eclipse/build/tests.html @@ -11,7 +11,7 @@
- Downloads + Downloads ${label} Test Results
@@ -99,9 +99,9 @@

Plugins containing access errors or warnings

const jobNamePrefix = getJenkinsTestJobNamePrefix(build) const testResultsSummaries = fetchAllJSON(build.expectedTests.map(c => `testresults/${jobNamePrefix}-${c}-summary.json`)) - const testResultsTable = document.getElementById("test-results-summary") - const testsHeadlineCell = document.getElementById("tests-header") - const testConfigsHeadline = document.getElementById("test-configurations-headline") + const testResultsTable = document.getElementById('test-results-summary') + const testsHeadlineCell = document.getElementById('tests-header') + const testConfigsHeadline = document.getElementById('test-configurations-headline') const expectedTestConfigsCount = build.expectedTests.length testsHeadlineCell.colSpan = expectedTestConfigsCount const expectedTestsLongNames = [] @@ -149,8 +149,8 @@

Plugins containing access errors or warnings

} function injectCompilerSummaryTable(compilerSummary) { - const generalIssues = document.getElementById("compiler-warnings-summary") - const accessIssues = document.getElementById("compiler-access-summary") + const generalIssues = document.getElementById('compiler-warnings-summary') + const accessIssues = document.getElementById('compiler-access-summary') for (const pluginName in compilerSummary) { const issues = compilerSummary[pluginName] const basicLink = `compilelogs/plugins/${issues.path}` diff --git a/sites/eclipse/overview/index.html b/sites/eclipse/overview/index.html index 29e4fcb1712..31cb255573e 100644 --- a/sites/eclipse/overview/index.html +++ b/sites/eclipse/overview/index.html @@ -51,7 +51,7 @@

Beta Java Builds

TWENTYFOUR_HOURS_AGO.setTime(TWENTYFOUR_HOURS_AGO.getTime() - 24 * 60 * 60 * 1000) contentPostProcessor = (mainElement, contentData) => { - const dataTables = Array.from(mainElement.getElementsByClassName("builds-table")) + const dataTables = Array.from(mainElement.getElementsByClassName('builds-table')) for (const table of dataTables) { const dataPath = table.getAttribute('data-path'); const tableData = dataPath != 'latest' diff --git a/sites/eclipse/page.js b/sites/eclipse/page.js index 5b56f1a8e55..9932405ab7a 100644 --- a/sites/eclipse/page.js +++ b/sites/eclipse/page.js @@ -93,15 +93,15 @@ function getCPUArchLabel(name) { } } -const BUILD_DATE_FORMAT = new Intl.DateTimeFormat("en-GB", { - timeZone: "UTC", - year: "numeric", - month: "short", - day: "2-digit", - weekday: "short", +const BUILD_DATE_FORMAT = new Intl.DateTimeFormat('en-GB', { + timeZone: 'UTC', + year: 'numeric', + month: 'short', + day: '2-digit', + weekday: 'short', hour12: false, - hour: "2-digit", - minute: "2-digit", + hour: '2-digit', + minute: '2-digit', }) function formatBuildDate(date) { @@ -112,7 +112,7 @@ function formatBuildDate(date) { let runtimeFormat = null; if (typeof Intl.DurationFormat !== 'undefined') { try { - runtimeFormat = new Intl.DurationFormat("en", { style: "short" }); + runtimeFormat = new Intl.DurationFormat('en', { style: 'short' }); } catch (e) { // Intl.DurationFormat not available } @@ -126,8 +126,8 @@ function formatRuntime(runtime) { try { const duration = Temporal.Duration.from({ seconds: totalSeconds }); return runtimeFormat.format(duration.round({ - largestUnit: "hours", - smallestUnit: totalSeconds >= 3600 ? "minutes" : "seconds" + largestUnit: 'hours', + smallestUnit: totalSeconds >= 3600 ? 'minutes' : 'seconds' })); } catch (e) { // Fall through to fallback implementation @@ -161,12 +161,12 @@ function fetchAllJSON(urls) { return Promise.all(promises) } -let pageData = null +let _pageData = null function loadPageData(dataPath, dataGenerator = null) { - pageData = fetch(dataPath).then(res => res.json()) + _pageData = fetch(dataPath).then(res => res.json()) if (dataGenerator) { - pageData = pageData.then(dataGenerator) + _pageData = _pageData.then(dataGenerator) } } @@ -189,12 +189,12 @@ function generate() { } const generatedBody = generateBody(); - document.body.replaceChildren(...generatedBody); + document.body.replaceChildren(generatedBody); generateTOCItems(document.body) // assume no headers (for the TOC) are generated dynamically - if (pageData) { - pageData.then(data => { + if (_pageData) { + _pageData.then(data => { const mainElement = document.body.querySelector('main') const contentMain = mainElement.querySelector('main') // This is the main element of the calling html file resolveDataReferences(document, data) @@ -221,12 +221,12 @@ function generateTOCItems(mainElement) { } } -const dataReferencePattern = /\${(?[\w-\.]+)}/g +const dataReferencePattern = /\${(?[\w\-\.]+)}/g function resolveDataReferences(contextElement, contextData) { - const dataElements = Array.from(contextElement.getElementsByClassName("data-ref")) + const dataElements = Array.from(contextElement.getElementsByClassName('data-ref')) for (const element of dataElements) { - element.classList.remove("data-ref") // Prevent multiple processing in subsequent passes with different context (therefore a copy is created from the list) + element.classList.remove('data-ref') // Prevent multiple processing in subsequent passes with different context (therefore a copy is created from the list) element.outerHTML = element.outerHTML.replaceAll(dataReferencePattern, (_match, pathGroup, _offset, _string) => { return getValue(contextData, pathGroup) }) @@ -245,14 +245,14 @@ function getValue(data, path) { } function logException(message, loggedObject) { - document.body.prepend(...toElements(`Failed to generate content: ${message}
`)); + document.body.prepend(toElement(`

Failed to generate content: ${message}

`)); console.log(loggedObject); } function generateBody() { const hasHeadersForTOC = document.querySelector('h1[id], h2[id], h3[id], h4[id]') !== null; const col = hasHeadersForTOC ? 'col-md-18' : ' col-md-24'; - return toElements(` + return toElement(`
${generateHeader()}
@@ -345,7 +345,7 @@ function generateMainContent() { if (main != null) { return main.outerHTML } - return "
The body specifies no content.
"; + return '
The body specifies no content.
'; } function generateHeader() { @@ -444,7 +444,7 @@ function toElements(text) { function toElement(text) { const elements = toElements(text) if (elements.length != 1) { - throw new Error("Not exactly one element: " + elements.length) + throw new Error(`Not exactly one element: ${elements.length}`) } return elements[0] } diff --git a/sites/equinox/build/index.html b/sites/equinox/build/index.html index 6138ebf9624..686d7f99b39 100644 --- a/sites/equinox/build/index.html +++ b/sites/equinox/build/index.html @@ -13,7 +13,7 @@
- Downloads + Downloads ${label}
@@ -72,7 +72,7 @@

Other Information

document.getElementById('build-timestamp').innerHTML = `${formatBuildDate(build.timestamp)} (UTC)` // Inject resource files - const dataTables = Array.from(mainElement.getElementsByClassName("files-table")) + const dataTables = Array.from(mainElement.getElementsByClassName('files-table')) for (const table of dataTables) { const dataPath = table.getAttribute('data-path') const filesData = getValue(build, dataPath) diff --git a/sites/equinox/overview/index.html b/sites/equinox/overview/index.html index 7f2e2f99f61..c60daebb8db 100644 --- a/sites/equinox/overview/index.html +++ b/sites/equinox/overview/index.html @@ -36,7 +36,7 @@

Integration Builds

loadPageData('data.json') contentPostProcessor = (mainElement, contentData) => { - const dataTables = Array.from(mainElement.getElementsByClassName("builds-table")) + const dataTables = Array.from(mainElement.getElementsByClassName('builds-table')) for (const table of dataTables) { const dataPath = table.getAttribute('data-path'); const tableData = dataPath != 'latest'