picluster/web/functions-current.html
Verita84 48111c89c0 fix
2021-08-25 08:44:55 -06:00

75 lines
2.2 KiB
HTML

<html>
<head>
<script src="/assets/jquery.min.js"></script>
<link rel="stylesheet" href="/assets/jquery-ui.css">
<script src="/assets/jquery-ui.js"></script>
<link rel="stylesheet" href="/assets/picluster-iframe.css">
<script>
function linkFunction(function_value, uuid) {
parent.manage_function = function_value;
parent.manage_function_uuid = uuid;
};
function exec() {
var div = document.getElementById('functions-current-modal-body');
if (div) {
div.innerHTML = div.innerHTML +
'<br><div class="function_searching"><img heigth="200" width="200" src="/assets/images/searching.jpg"><br><font size=+3><label>Searching for containers</label></font></div>';
}
$.get("/nodes?token=" + parent.token, function (data) {
var check_data = data;
if (div) {
div.innerHTML = '';
}
for (var i in check_data.functions.name) {
if ((div) && (check_data.functions.name[i].name)) {
div.innerHTML = div.innerHTML +
'<br><br><p align=left><font size="+0"><img height=20 width=30 src=/assets/images/function.png>' +
'<font size="+1"><b>&nbsp;<a href="/functions-viewer.html" style="text-decoration:none" onclick="linkFunction(\'' +
check_data.functions.name[i].name + '\',\'' + check_data.functions.name[i].uuid + '\')">' + check_data.functions
.name[i].name + '</a></b><br>' + '<font size="+0"><br>' + '&nbsp;<b>Running on Node:&nbsp;</b>' + check_data.functions
.name[i].host + '</b></font><br><br>';
}
if (div) {
div.innerHTML = div.innerHTML + '</ol>';
}
}
});
}
</script>
</head>
<body>
<div id="output" class="modal">
<div class="modal-content modal-large">
<div class="modal-header">
<span class="close">&times;</span>
<h2>PiCluster Functions Awaiting Data Retrieval</h2>
</div>
<div id="functions-current-modal-body" class="modal-body">
<div id="submit_button_div">
</div>
</div>
</div>
</p>
<script>
var output_modal = document.getElementById('output');
var output_span = document.getElementsByClassName("close")[0];
output_span.onclick = function () {
output_modal.style.display = "none";
}
output_modal.style.display = "block";
exec();
</script>
</html>