diff --git a/xCAT-UI/css/style.css b/xCAT-UI/css/style.css index da94e778b..dde8a8f42 100644 --- a/xCAT-UI/css/style.css +++ b/xCAT-UI/css/style.css @@ -663,4 +663,5 @@ div.cleanblue button:hover { .monitornodediv{ width : 240px; height : 120px; + margin : 0px 0px 15px 0px; } \ No newline at end of file diff --git a/xCAT-UI/js/monitor/rmcmon.js b/xCAT-UI/js/monitor/rmcmon.js index 1a53fc9e0..f915bc694 100644 --- a/xCAT-UI/js/monitor/rmcmon.js +++ b/xCAT-UI/js/monitor/rmcmon.js @@ -22,7 +22,7 @@ function loadRmcMon(){ else{ $('#rmcMonConfig').hide(); } - }); + }); rmcMonTab.append(configButton); //add configure div @@ -33,7 +33,8 @@ function loadRmcMon(){ loadRmcMonConfigure(); //add the content of the rmcmon, id = 'rmcMonTab' - rmcMonTab.append("
"); + rmcMonTab.append("
"); + $('#nodeDetail').hide(); //check the software work status by platform(linux and aix) $.ajax( { @@ -284,7 +285,7 @@ function parseRmcData(returnData){ globalErrNodes[nodeName] = nodeStatus; globalFinishNodesNum ++; if (globalFinishNodesNum == globalAllNodesNum){ - showNodeDetail(); + showDetail(); } continue; } @@ -310,14 +311,14 @@ function parseRmcData(returnData){ globalNodesDetail[data.msg] = tempObject; globalFinishNodesNum++; if (globalFinishNodesNum == globalAllNodesNum){ - showNodeDetail(); + showDetail(); } } }); } } -function showNodeDetail(){ +function showDetail(){ var nodeChat; var select; @@ -356,6 +357,8 @@ function showNodeDetail(){ var type = $('#sortType').val(); showAllNodes(attr, type); }); + + filterButton.trigger('click'); } function showAllNodes(attrName, type){ @@ -415,6 +418,51 @@ function showAllNodes(attrName, type){ $.plot(nodeChat, [tempArray]); tempTd.append('
' + sortArray[sortIndex]['name'] + '
'); + tempTd.css('cursor', 'pointer'); + tempTd.bind('click', function(){ + showNode($('center', $(this)).html()); + }); + } +} + +function showNode(nodeName){ + var nodeTable = $('
'); + var backButton = createButton('Go back to all nodes'); + var nodeRow; + var parseNum = 0; + + $('#rmcmonDetail').hide(); + $('#nodeDetail').empty().show(); + $('#nodeDetail').append('

' + nodeName +' Detail


'); + $('#nodeDetail').append(backButton); + backButton.bind('click', function(){ + $('#nodeDetail').hide(); + $('#rmcmonDetail').show(); + }); + + + $('#nodeDetail').append(nodeTable); + + for(var attr in globalNodesDetail[nodeName]){ + var tempTd = $(''); + var attrChat = $('
'); + if (0 == parseNum % 4){ + nodeRow = $(''); + nodeTable.append(nodeRow); + } + nodeRow.append(tempTd); + parseNum++; + + //data + tempTd.append(attrChat); + var tempData = globalNodesDetail[nodeName][attr].split(','); + var tempArray = []; + for (var i in tempData){ + tempArray.push([i, tempData[i]]); + } + + $.plot(attrChat, [tempArray]); + attrChat.append('
' + attr +'
'); } }