2026-05-19 23:02:31 +02:00
|
|
|
/* ATC Lakehouse — scanlines + noise + architecture link */
|
2026-05-19 22:14:32 +02:00
|
|
|
(function () {
|
2026-05-19 23:02:31 +02:00
|
|
|
var ARCH_URL = 'http://atc-docker01.dell-atc.lan:8080/docs/architecture.html';
|
|
|
|
|
|
2026-05-19 22:14:32 +02:00
|
|
|
function injectOverlays() {
|
|
|
|
|
if (!document.querySelector('.palantir-scanline')) {
|
2026-05-19 23:02:31 +02:00
|
|
|
var scan = document.createElement('div');
|
2026-05-19 22:14:32 +02:00
|
|
|
scan.className = 'palantir-scanline';
|
|
|
|
|
document.body.appendChild(scan);
|
|
|
|
|
}
|
|
|
|
|
if (!document.querySelector('.palantir-noise')) {
|
2026-05-19 23:02:31 +02:00
|
|
|
var noise = document.createElement('div');
|
2026-05-19 22:14:32 +02:00
|
|
|
noise.className = 'palantir-noise';
|
|
|
|
|
document.body.appendChild(noise);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-19 23:02:31 +02:00
|
|
|
function linkLakehouseTitle() {
|
|
|
|
|
document.querySelectorAll('header h1, header p, .greeting, [class*="greeting"]').forEach(function (el) {
|
|
|
|
|
if (el.dataset.atcLinked) return;
|
|
|
|
|
if (/lakehouse/i.test(el.textContent || '')) {
|
|
|
|
|
el.style.cursor = 'pointer';
|
|
|
|
|
el.title = 'Open architecture diagram';
|
|
|
|
|
el.addEventListener('click', function () {
|
|
|
|
|
window.open(ARCH_URL, '_blank');
|
|
|
|
|
});
|
|
|
|
|
el.dataset.atcLinked = '1';
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-19 22:14:32 +02:00
|
|
|
function applyServiceColors() {
|
|
|
|
|
document.querySelectorAll('li.service').forEach(function (card) {
|
2026-05-19 23:02:31 +02:00
|
|
|
var desc = card.querySelector('.service-description');
|
|
|
|
|
var text = desc ? desc.textContent : '';
|
|
|
|
|
var link = card.querySelector('a[href^="http"]');
|
2026-05-19 22:14:32 +02:00
|
|
|
if (text.indexOf('Host:') >= 0 || text.indexOf('Port:') >= 0 || !link) {
|
|
|
|
|
card.classList.add('atc-db-tile');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-19 23:12:41 +02:00
|
|
|
|
|
|
|
|
function showGitSha() {
|
|
|
|
|
if (document.getElementById('atc-git-sha')) return;
|
|
|
|
|
fetch('http://atc-mgt01.dell-atc.lan:3001/api/v1/repos/mo/Lakehouse/commits?limit=1')
|
|
|
|
|
.then(function (r) { return r.json(); })
|
|
|
|
|
.then(function (d) {
|
|
|
|
|
var sha = (d && d[0] && d[0].sha) ? d[0].sha.substring(0, 7) : 'git';
|
|
|
|
|
var el = document.createElement('div');
|
|
|
|
|
el.id = 'atc-git-sha';
|
|
|
|
|
el.textContent = 'Lakehouse ' + sha;
|
|
|
|
|
el.style.cssText = 'position:fixed;bottom:4px;right:8px;font-size:10px;color:#64748b;z-index:9999;font-family:monospace;';
|
|
|
|
|
document.body.appendChild(el);
|
|
|
|
|
})
|
|
|
|
|
.catch(function () {});
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-19 22:14:32 +02:00
|
|
|
function init() {
|
|
|
|
|
injectOverlays();
|
|
|
|
|
applyServiceColors();
|
2026-05-19 23:02:31 +02:00
|
|
|
linkLakehouseTitle();
|
2026-05-19 23:12:41 +02:00
|
|
|
showGitSha();
|
2026-05-19 23:02:31 +02:00
|
|
|
new MutationObserver(linkLakehouseTitle).observe(document.body, { childList: true, subtree: true });
|
2026-05-19 22:14:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (document.readyState === 'loading') {
|
|
|
|
|
document.addEventListener('DOMContentLoaded', init);
|
|
|
|
|
} else {
|
|
|
|
|
init();
|
|
|
|
|
}
|
|
|
|
|
})();
|