mirror of
https://github.com/unraid/webgui.git
synced 2026-01-13 13:09:58 -06:00
125 lines
5.5 KiB
HTML
125 lines
5.5 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:10px;color:#505050;margin:0 8px;padding:0;}
|
|
.logLine.spacing{margin:10px;}
|
|
button[type=button],a.button{font-family:arimo;font-size:11px;position:relative;display:inline-block;padding:5px 10px;border:1px solid #E8E8E8;border-radius:5px;margin:7px 14px 0 0;text-decoration:none;white-space:nowrap;cursor:pointer;outline:none;color:#303030;background:-webkit-radial-gradient(#F0F0F0,#C8C8C8);background:linear-gradient(#F0F0F0,#C8C8C8);}
|
|
button:hover[type=button],a.button:hover{border-color:#6AB034;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);color:#FFFFFF;background:-webkit-radial-gradient(#5E9E2E,#8FD956);background:linear-gradient(#5E9E2E,#8FD956);}
|
|
button:active[type=button]{border-color:#6AB034;box-shadow:inset 0 0 8px 4px #548C29,0 1px 0 0 #E0E0E0;}
|
|
p.centered{text-align:center;}
|
|
span.error{color:#D8000C;background-color:#FFBABA;display:block;width:100%;}
|
|
span.warn{color:#9F6000;background-color:#FEEFB3;display:block;width:100%;}
|
|
span.system{color:#00529B;background-color:#BDE5F8;display:block;width:100%;}
|
|
span.array{color:#4F8A10;background-color:#DFF2BF;display:block;width:100%;}
|
|
span.login{color:#D63301;background-color:#FFCCBA;display:block;width:100%;}
|
|
span.label{padding:4px 8px;margin-right:10px;border-radius:4px;display:inline;width:auto;}
|
|
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>
|