diff --git a/xCAT-UI/css/demo_table.css b/xCAT-UI/css/demo_table.css index af1f4bb50..0ef5327de 100644 --- a/xCAT-UI/css/demo_table.css +++ b/xCAT-UI/css/demo_table.css @@ -32,8 +32,8 @@ .dataTables_wrapper { position: relative; - min-height: 302px; - _height: 302px; + min-height: 231px; /*mxi1: changed from 302 to 131*/ + _height: 231px; /*mxi1: changed from 302 to 131*/ clear: both; } diff --git a/xCAT-UI/css/main.css b/xCAT-UI/css/main.css index 148a162c1..ff9ccce6d 100644 --- a/xCAT-UI/css/main.css +++ b/xCAT-UI/css/main.css @@ -117,8 +117,9 @@ a.button:active span { } #rangedisplay { - float: left; + float: right; text-align: left; + width: 650px; width: auto; } #nrtree { @@ -279,9 +280,9 @@ padding:10px 2px; color: #ddd; } .mContent { - padding: 10px; + padding: 5px; padding-top: 0px; - margin: 10px; + margin: 5px; margin-top: 0px; text-align: left; color: #555; @@ -302,8 +303,9 @@ padding:10px 2px; color:#6ea1fa; } .nrcmd { - float: right; - text-align: left; + float: left; + text-align: right; + width: 916px; } .mapper span { float: left; @@ -386,30 +388,7 @@ padding:10px 2px; } -#monsetting_tips { - width: 920px; - margin: 5px; - padding: 5px; - float: left; -} -#rmcSrcList { - width: 420px; - margin: 5px; - padding: 5px; - float: left; - background-color:silver; - height: 480px; - overflow-y: scroll; -} - -#rmcScrAttr { - width: 420px; - margin: 5px; - padding: 5px; - float: left; - background-color:silver; -} #options { width: 880px; diff --git a/xCAT-UI/css/monitor.css b/xCAT-UI/css/monitor.css index c3c126368..7087e5b37 100644 --- a/xCAT-UI/css/monitor.css +++ b/xCAT-UI/css/monitor.css @@ -127,7 +127,7 @@ fieldset { } #condresp { - width: 71%; + width: 97%; margin: 5px; padding: 5px; float: left; @@ -135,40 +135,54 @@ fieldset { border: 1px solid orange; } -#assocaition { +#association { margin: 5px; padding: 5px; float:left; display: block; + width: 94%; border: 1px solid lime; } #avail_cond { - width: 33%; - margin: 5px; - padding: 5px; + width: 40%; + margin: 3px; + padding: 3px; float: left; - background-color: #ffee33; + border: 1px solid lime; } -#avail_cond tbody { - overflow-y: scroll; - overflow-x: hide; -} - -#condition .ui-selecting {background: #FECA40;} -#condition .ui-selected { background: #F39814; color: white; } -#condition {list-style-type: none; margin: 0; padding: 0;} - #avail_resp { - width: 60%; - margin: 5px; - padding: 5px; + width: 50%; + margin: 3px; + padding: 3px; float: left; - background-color: #eeffee; + border: 1px solid lime; } -#avail_resp tbody { +/*For the RMC resources and their attributes*/ +#monsetting_tips { + width: 97%; + margin: 3px; + padding: 1px; + float: left; +} + +#rmcSrcList { + width: 48%; + margin: 3px; + padding: 1px; + float: left; + background-color:silver; + height: 480px; overflow-y: scroll; - overflow-x: hide; -} \ No newline at end of file +} + +#rmcSrcAttr { + width: 48%; + margin: 3px; + padding: 1px; + float: left; + background-color:silver; +} +/**/ diff --git a/xCAT-UI/js/monitor.js b/xCAT-UI/js/monitor.js index 6eb19af12..db2ee3e90 100644 --- a/xCAT-UI/js/monitor.js +++ b/xCAT-UI/js/monitor.js @@ -25,7 +25,7 @@ jQuery.fn.customInput = function(){//from http://www.filamentgroup.com/examples/ $(this).addClass('checkedHover'); } }, - function(){ $(this).removeClass('hover checkedHover'); } + function(){$(this).removeClass('hover checkedHover');} ); //bind custom event, trigger it, bind click,focus,blur events @@ -38,7 +38,7 @@ jQuery.fn.customInput = function(){//from http://www.filamentgroup.com/examples/ }; label.addClass('checked'); } - else { label.removeClass('checked checkedHover checkedFocus'); } + else {label.removeClass('checked checkedHover checkedFocus');} }) .trigger('updateState') @@ -51,7 +51,7 @@ jQuery.fn.customInput = function(){//from http://www.filamentgroup.com/examples/ $(this).addClass('checkedFocus'); } }) - .blur(function(){ label.removeClass('focus checkedFocus'); }); + .blur(function(){label.removeClass('focus checkedFocus');}); } }); }; @@ -159,23 +159,31 @@ function appmonSetStat() function mkCondResp() { //get the name of the selected condition + //then, get the selected noderange //then, get the response in "checked" status //then, run the command "mkcondresp" var cond_val = $(':input[name=conditions][checked]').val(); - if(cond_val) { - //get the response in "checked" status - var resps_obj = $(':input[name=responses][checked]'); - if(resps_obj) { - $.each(resps_obj,function(i,n) { - //i is the index - //n is the content - //TODO:add one new php file to handle "mkcondresp" command - $.get("monitor/makecondresp.php", {cond: cond_val, resp: n.value}, function(data) { - $("#devstatus").html(data); - }); + var value="";//the noderange selected from the osi tree + var i=0; + var node_selected = nrtree.selected_arr; + for(; i< node_selected.length; i++) { + value += node_selected[i].attr('id'); + } + //remove the "," at the front + value = value.substr(1); + var resps_obj = $(':input[name=responses][checked]'); + if(cond_val && resps_obj && value) { + $.each(resps_obj,function(i,n) { + //i is the index + //n is the content + //TODO:add one new php file to handle "mkcondresp" command + $.get("monitor/makecondresp.php", {cond: cond_val, resp: n.value, nr: value}, function(data) { + //nothing to do right now. }); - $("#association").load("monitor/updateCondRespTable.php"); - } + }); + $("#notify_me").html("
The associations are created!
"); + $("#notify_me").addClass("ui-state-highlight"); + $("#association table tbody").load("monitor/updateCondRespTable.php"); } } @@ -201,5 +209,17 @@ function control_RMCAssoc(cond, node, resp, action) ); } +/*when one RMC Resource is selected, this function is called to display its attributes*/ +function showRMCAttrib() +{ + var class_val = $('input[name=classGrp]:checked').val(); + if(class_val) { + $.get("monitor/rmc_resource_attr.php", {name: class_val}, function(data) { + $("#rmcSrcAttr").html(data); + }); + } +} + + // for the progress bar myBar.loaded('monitor.js'); \ No newline at end of file diff --git a/xCAT-UI/js/xcat.js b/xCAT-UI/js/xcat.js index 4873043c0..5e1b1dbbd 100644 --- a/xCAT-UI/js/xcat.js +++ b/xCAT-UI/js/xcat.js @@ -400,16 +400,6 @@ function goto_next() } } -function showRMCAttrib() -{ - var class_val = $('input[@name=classGrp][@checked]').val(); - if(class_val) { - $.get("monitor/rmc_resource_attr.php", {name: class_val}, function(data) { - $("#rmcScrAttr").html(data); - }); - } -} - function show_monshow_data(type,range) { //type = "text" or "graph" diff --git a/xCAT-UI/js/xcatauth.js b/xCAT-UI/js/xcatauth.js index be6fdd17b..c0b981fed 100644 --- a/xCAT-UI/js/xcatauth.js +++ b/xCAT-UI/js/xcatauth.js @@ -76,7 +76,7 @@ function openDialog(){ } else { $("#password").focus(); } - }, + } }); $("#username").keydown(function(event) { //When 'enter' is hit while in username, advance to password @@ -86,7 +86,13 @@ function openDialog(){ }); $("#password").keydown(function(event) { //Submit authentication if enter is pressed in password field if (event.keyCode==13) { - authenticate(); + //TODO: it doesn't work on Chrome and Safari + $(".ui-dialog-buttonpane button").each(function() { + if($(this).html() == "Log In") { + $(this).click(); + } + }); + //authenticate(); } }); diff --git a/xCAT-UI/lib/display.php b/xCAT-UI/lib/display.php index 295529114..36e5dce72 100644 --- a/xCAT-UI/lib/display.php +++ b/xCAT-UI/lib/display.php @@ -360,8 +360,8 @@ displayMapper(array('home'=>'main.php', 'control' =>'')); function displayNrTree(){ echo <<You can use ctrl-click to select more than one node grouping,
or expand the noderanges to select individual nodes.
Node | "; - foreach ($headers as $head){ - echo "$head | "; - } - echo "||
---|---|---|---|
$n | "; - echo "$n | "; - foreach($headers as $h){ - if($vals[$h] == ''){ - echo " "; - }else{ - #echo "" . $vals[$h] . " | "; - echo "" . $vals[$h] . " | "; - } - } - echo "
Node | "; + foreach ($headers as $head){ + echo "$head | "; + } + echo "||
---|---|---|---|
$n | "; + echo "$n | "; + foreach($headers as $h){ + if($vals[$h] == ''){ + echo " "; + }else{ + #echo "" . $vals[$h] . " | "; + echo "" . $vals[$h] . " | "; + } + } + echo "
Time | @@ -343,11 +379,6 @@ TOS9; RMCEventLogToTable(); echo "
---|
",implode(' ', $errors), "
"; diff --git a/xCAT-UI/monitor/options.php b/xCAT-UI/monitor/options.php index 73d134a30..497ed0368 100644 --- a/xCAT-UI/monitor/options.php +++ b/xCAT-UI/monitor/options.php @@ -109,9 +109,15 @@ TOS11; echo <<For your convenience, all the available RMC Resources and their attributes will list here
- -TODO
+TODO
+Condition | -Response | -Node | -State | -|
Condition +// | Response +// | Node +// | State +// | Action +// |
---|---|---|---|---|
$cond | "; - echo "$resp | "; - echo "$node | "; - echo "$state | "; - echo "|
$record[3] | +$record[5] | +$record[7] | +TOS6; + //TODO: insert the button here + echo ""; + if($record[7] == "Active") { + echo ""; + }else { + echo ""; } + echo " | "; + echo "|
$cond | "; +// echo "$resp | "; +// echo "$node | "; +// echo "$state | "; +// echo ""; +// if($state == "Active") { +// insertButtons(array('label'=>'DeActivate', 'id'=>'deactivate', 'onclick'=>"control_RMCAssoc(\"$cond\", \"$node\", \"$resp\", \"stop\")")); +// }else if($state == "Not active"){ +// insertButtons(array('label'=>'Activate', 'id'=>'activate', 'onclick'=>"control_RMCAssoc(\"$cond\", \"$node\", \"$resp\", \"start\")")); +// } +// echo " | "; +// echo "