This commit is contained in:
Anna Sudnitsina 2018-03-21 16:11:53 +03:00
parent 198179443e
commit 5800378d99
2 changed files with 16 additions and 10 deletions

View File

@ -54,8 +54,12 @@ function unmount(a, b, c) {
function displayData(a){
$("#status").html("<p>"+a.health+"</p>");
if (a.health == 'deadly.') {
var dead_node = a.deadlyreason["node"];
$('#showDeadlyDetails').on('click', openNode(event, dead_node))
$('#showDeadlyDetails').css("display","block");
$('#resolve').css("display","block");
$("#mountFormTrigger").addClass("w3-disabled")
} else {
$('#showDeadlyDetails').css("display","none");
@ -93,7 +97,7 @@ function displayData(a){
+ selected_node + '", "'
+ selected_node_body.mounts[i].mountpoint + '", "'
+ selected_node_body.mounts[i].block
+ '")\' >unmount</a><br>Mountpoint: ' + mnt.mountpoint
+ '")\' >unmount</a><br>Mountpoint: ' + mnt.mountpoint
+ '<br>Mountopts: ' + mnt.mountopts
+ '<br>Fstype: ' + mnt.fstype
+ '<br>Pool: ' + mnt.pool
@ -146,15 +150,17 @@ function openNode(evt, nodeName) {
selected_node = nodeName;
x = document.getElementsByClassName("node");
tablinks = document.getElementsByClassName("tablink");
if (selected_node == 'dead') {
// if (selected_node == 'dead') {
if (selected_node == deadNode):
$('#details').css("border", "2px solid #f44336");
if ($('#showDeadlyDetails').html() == "Show details") {
$('#details').css("display", "block");
$('#showDeadlyDetails').text('Hide details');
} else {
$('#details').css("display", "none");
$('#showDeadlyDetails').text('Show details');
}
// if ($('#showDeadlyDetails').html() == "Show details") {
// $('#details').css("display", "block");
// $('#showDeadlyDetails').text('Hide details');
// } else {
// $('#details').css("display", "none");
// $('#showDeadlyDetails').text('Show details');
// }
displayData(a);
} else {
$('#showDeadlyDetails').text('Show details');
$('#details').css("border", "").css("display", "block"); displayData(a);

View File

@ -39,7 +39,7 @@
<div class="w3-col m9" >
<div class="w3-container" id="statusContainer">
<div class="w3-padding w3-display-left" id="status">Status... </div>
<a href="javascript:void(0)" class="w3-right" id="showDeadlyDetails" onClick="openNode(event, 'dead')">
<a href="javascript:void(0)" class="w3-right" id="showDeadlyDetails">
Show details
</a>
<a href="javascript:void(0)" class="w3-right" id="resolve" onClick="resolve()">