"History" page - Use faster server side "difference" rendering, show ignored/triggered rows (#3442)
Some checks failed
Build and push containers / metadata (push) Has been cancelled
Build and push containers / build-push-containers (push) Has been cancelled
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Build distribution 📦 (push) Has been cancelled
ChangeDetection.io Container Build Test / Build linux/amd64 (alpine) (push) Has been cancelled
ChangeDetection.io Container Build Test / Build linux/arm64 (alpine) (push) Has been cancelled
ChangeDetection.io Container Build Test / Build linux/amd64 (main) (push) Has been cancelled
ChangeDetection.io Container Build Test / Build linux/arm/v7 (main) (push) Has been cancelled
ChangeDetection.io Container Build Test / Build linux/arm/v8 (main) (push) Has been cancelled
ChangeDetection.io Container Build Test / Build linux/arm64 (main) (push) Has been cancelled
ChangeDetection.io App Test / lint-code (push) Has been cancelled
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Test the built package works basically. (push) Has been cancelled
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Publish Python 🐍 distribution 📦 to PyPI (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-10 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-11 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-12 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-13 (push) Has been cancelled

This commit is contained in:
dgtlmoon
2025-12-15 15:39:07 +01:00
committed by GitHub
parent acfcaf42d4
commit a748a43224
93 changed files with 3748 additions and 1054 deletions

View File

@@ -62,15 +62,12 @@
const textContent = $pre.text();
const lines = textContent.split(/\r?\n/); // Handles both \n and \r\n line endings
// Build a map of line numbers to styles
const lineStyles = {};
// Build a map of line numbers to their configuration index
const lineConfigIndex = {};
configurations.forEach(config => {
const {color, lines: lineNumbers} = config;
lineNumbers.forEach(lineNumber => {
lineStyles[lineNumber] = color;
});
});
configurations.forEach((config, index) =>
config.lines.forEach(lineNumber => lineConfigIndex[lineNumber] = index)
);
// Function to escape HTML characters
function escapeHtml(text) {
@@ -83,11 +80,12 @@
const processedLines = lines.map((line, index) => {
const lineNumber = index + 1; // Line numbers start at 1
const escapedLine = escapeHtml(line);
const color = lineStyles[lineNumber];
const configIndex = lineConfigIndex[lineNumber];
if (color) {
if (configIndex !== undefined) {
const config = configurations[configIndex];
// Wrap the line in a span with inline style
return `<span style="background-color: ${color}">${escapedLine}</span>`;
return `<span title="${config.title}" style="background-color: ${config.color}">${escapedLine}</span>`;
} else {
return escapedLine;
}
@@ -100,6 +98,7 @@
$pre.html(newContent);
});
};
$.fn.miniTabs = function (tabsConfig, options) {
const settings = {
tabClass: 'minitab',