Files
webgui/plugins/dynamix.docker.manager/log.htm

114 lines
4.3 KiB
HTML

<!DOCTYPE HTML>
<html>
<head>
<style>
@font-face{
font-family:'arimo';font-weight:normal;font-style:normal;
src:url('/webGui/styles/arimo.eot');src:url('/webGui/styles/arimo.eot?#iefix') format('embedded-opentype'),url('/webGui/styles/arimo.woff') format('woff'),url('/webGui/styles/arimo.ttf') format('truetype'),url('/webGui/styles/arimo.svg#arimo') format('svg');
}
@font-face{
font-family:'arimo';font-weight:bold;font-style:normal;
src:url('/webGui/styles/arimo-bold.eot');src:url('/webGui/styles/arimo-bold.eot?#iefix') format('embedded-opentype'),url('/webGui/styles/arimo-bold.woff') format('woff'),url('/webGui/styles/arimo-bold.ttf') format('truetype'),url('/webGui/styles/arimo-bold.svg#arimo-bold') format('svg');
}
@font-face{
font-family:'arimo';font-weight:normal;font-style:italic;
src:url('/webGui/styles/arimo-italic.eot');src:url('/webGui/styles/arimo-italic.eot?#iefix') format('embedded-opentype'),url('/webGui/styles/arimo-italic.woff') format('woff'),url('/webGui/styles/arimo-italic.ttf') format('truetype'),url('/webGui/styles/arimo-italic.svg#arimo-italic') format('svg');
}
@font-face{
font-family:'arimo';font-weight:bold;font-style:italic;
src:url('/webGui/styles/arimo-bold-italic.eot');src:url('/webGui/styles/arimo-bold-italic.eot?#iefix') format('embedded-opentype'),url('/webGui/styles/arimo-bold-italic.woff') format('woff'),url('/webGui/styles/arimo-bold-italic.ttf') format('truetype'),url('/webGui/styles/arimo-bold-italic.svg#arimo-bold-italic') format('svg');
}
@font-face{
font-family:'bitstream';font-weight:normal;font-style:normal;
src:url('/webGui/styles/bitstream.eot');src:url('/webGui/styles/bitstream.eot?#iefix') format('embedded-opentype'),url('/webGui/styles/bitstream.woff') format('woff'),url('/webGui/styles/bitstream.ttf') format('truetype'),url('/webGui/styles/bitstream.svg#bitstream') format('svg');
}
.logLine{font-family:bitstream;font-size:11px;text-align:left;}
legend{font-size:12px;font-weight:bold;}
#content{margin:10;padding:0;}
</style>
<script>
var dots = [];
var span = [];
function show_Wait(id) {
span[id] = document.getElementById("wait" + id);
dots[id] = setInterval(function () {
if ((span[id].innerHTML += '.').length == 18) {
span[id].innerHTML = 'Please wait ';
}
}, 500);
}
function stop_Wait(id) {
span[id].innerHTML = '';
clearInterval( dots[id] );
}
function addLog(logLine) {
var elms = document.getElementsByClassName('logLine');
if (elms.length) {
var el = elms[elms.length-1];
el.innerHTML += logLine + "<br>";
}
window.scrollTo(0, document.body.scrollHeight);
}
function loadLog(container, since) {
var httpRequest = new XMLHttpRequest();
httpRequest.onreadystatechange = function () {
if (httpRequest.readyState === 4 && httpRequest.status === 200) {
parseScript(httpRequest.responseText);
}
};
httpRequest.open('GET', location.protocol+'//'+location.host+location.pathname+'?action=log&container='+encodeURIComponent(container)+'&since='+encodeURIComponent(since));
httpRequest.send();
}
function parseScript(_source) {
var source = _source;
var scripts = [];
while(source.indexOf("<script") > -1 || source.indexOf("</script") > -1) {
var s = source.indexOf("<script");
var s_e = source.indexOf(">", s);
var e = source.indexOf("</script", s);
var e_e = source.indexOf(">", e);
scripts.push(source.substring(s_e+1, e));
source = source.substring(0, s) + source.substring(e_e+1);
}
for (var i=0; i<scripts.length; i++) {
try {
eval(scripts[i]);
} catch(ex) {}
}
return source;
}
function progress(id, prog) {
var elms = document.getElementsByClassName(id+'_progress');
if (elms.length) {
elms[elms.length-1].textContent = prog;
}
}
function addToID(id, m) {
var elms = document.getElementById(id);
if (elms === null) {
addLog('<span id=\"'+id+'\">IMAGE ID ['+id+']: <span class=\"content\">'+m+'</span><span class=\"'+id+'_progress\"></span>. </span>');
} else {
var elms_content = elms.getElementsByClassName("content");
if (!elms_content.length || elms_content[elms_content.length-1].textContent != m) {
elms.innerHTML += '<span class=\"content\">'+m+'</span><span class=\"'+id+'_progress\"></span>. ';
}
}
}
</script>
</head>
<body>
<div id="content"><p class="logLine" id="logBody"></p></div>
</body>
</html>