upd
This commit is contained in:
parent
198179443e
commit
5800378d99
@ -54,8 +54,12 @@ function unmount(a, b, c) {
|
|||||||
function displayData(a){
|
function displayData(a){
|
||||||
$("#status").html("<p>"+a.health+"</p>");
|
$("#status").html("<p>"+a.health+"</p>");
|
||||||
if (a.health == 'deadly.') {
|
if (a.health == 'deadly.') {
|
||||||
|
var dead_node = a.deadlyreason["node"];
|
||||||
|
$('#showDeadlyDetails').on('click', openNode(event, dead_node))
|
||||||
$('#showDeadlyDetails').css("display","block");
|
$('#showDeadlyDetails').css("display","block");
|
||||||
|
|
||||||
$('#resolve').css("display","block");
|
$('#resolve').css("display","block");
|
||||||
|
|
||||||
$("#mountFormTrigger").addClass("w3-disabled")
|
$("#mountFormTrigger").addClass("w3-disabled")
|
||||||
} else {
|
} else {
|
||||||
$('#showDeadlyDetails').css("display","none");
|
$('#showDeadlyDetails').css("display","none");
|
||||||
@ -93,7 +97,7 @@ function displayData(a){
|
|||||||
+ selected_node + '", "'
|
+ selected_node + '", "'
|
||||||
+ selected_node_body.mounts[i].mountpoint + '", "'
|
+ selected_node_body.mounts[i].mountpoint + '", "'
|
||||||
+ selected_node_body.mounts[i].block
|
+ selected_node_body.mounts[i].block
|
||||||
+ '")\' >unmount</a><br>Mountpoint: ' + mnt.mountpoint
|
+ '")\' >unmount</a><br>Mountpoint: ' + mnt.mountpoint
|
||||||
+ '<br>Mountopts: ' + mnt.mountopts
|
+ '<br>Mountopts: ' + mnt.mountopts
|
||||||
+ '<br>Fstype: ' + mnt.fstype
|
+ '<br>Fstype: ' + mnt.fstype
|
||||||
+ '<br>Pool: ' + mnt.pool
|
+ '<br>Pool: ' + mnt.pool
|
||||||
@ -146,15 +150,17 @@ function openNode(evt, nodeName) {
|
|||||||
selected_node = nodeName;
|
selected_node = nodeName;
|
||||||
x = document.getElementsByClassName("node");
|
x = document.getElementsByClassName("node");
|
||||||
tablinks = document.getElementsByClassName("tablink");
|
tablinks = document.getElementsByClassName("tablink");
|
||||||
if (selected_node == 'dead') {
|
// if (selected_node == 'dead') {
|
||||||
|
if (selected_node == deadNode):
|
||||||
$('#details').css("border", "2px solid #f44336");
|
$('#details').css("border", "2px solid #f44336");
|
||||||
if ($('#showDeadlyDetails').html() == "Show details") {
|
// if ($('#showDeadlyDetails').html() == "Show details") {
|
||||||
$('#details').css("display", "block");
|
// $('#details').css("display", "block");
|
||||||
$('#showDeadlyDetails').text('Hide details');
|
// $('#showDeadlyDetails').text('Hide details');
|
||||||
} else {
|
// } else {
|
||||||
$('#details').css("display", "none");
|
// $('#details').css("display", "none");
|
||||||
$('#showDeadlyDetails').text('Show details');
|
// $('#showDeadlyDetails').text('Show details');
|
||||||
}
|
// }
|
||||||
|
displayData(a);
|
||||||
} else {
|
} else {
|
||||||
$('#showDeadlyDetails').text('Show details');
|
$('#showDeadlyDetails').text('Show details');
|
||||||
$('#details').css("border", "").css("display", "block"); displayData(a);
|
$('#details').css("border", "").css("display", "block"); displayData(a);
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
<div class="w3-col m9" >
|
<div class="w3-col m9" >
|
||||||
<div class="w3-container" id="statusContainer">
|
<div class="w3-container" id="statusContainer">
|
||||||
<div class="w3-padding w3-display-left" id="status">Status... </div>
|
<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
|
Show details
|
||||||
</a>
|
</a>
|
||||||
<a href="javascript:void(0)" class="w3-right" id="resolve" onClick="resolve()">
|
<a href="javascript:void(0)" class="w3-right" id="resolve" onClick="resolve()">
|
||||||
|
Loading…
Reference in New Issue
Block a user