From 1c474cb648b7fcd0e60ae7289ae8449fde409b67 Mon Sep 17 00:00:00 2001 From: Panos Date: Fri, 22 Oct 2010 14:16:20 -0400 Subject: [PATCH] Resolving conflict with live version of slice.php (+a few minor corrections) --- planetlab/nodes/nodes.php | 21 ++++-------------- planetlab/slices/slice.php | 44 +++++++++++++++++++++----------------- plekit/table/columns.js | 22 +++++++------------ 3 files changed, 36 insertions(+), 51 deletions(-) diff --git a/planetlab/nodes/nodes.php b/planetlab/nodes/nodes.php index 1d6da56..7800b31 100644 --- a/planetlab/nodes/nodes.php +++ b/planetlab/nodes/nodes.php @@ -75,10 +75,11 @@ function node_status ($node) { $first_time_configuration = 'false'; if (plc_is_admin()) - $default_configuration = "ID:f|hostname:f|ST:f|AU:f|SN|DN|LCN|R|L"; + $default_configuration = "ID:f|hostname:f|ST:f|AU:f"; else - $default_configuration = "hostname:f|ST:f|AU:f|SN|LCN|DN|R|L"; + $default_configuration = "hostname:f|ST:f|AU:f"; +//$extra_default = "LCN|DN|R|L|OS|MS|SN"; $column_configuration = ""; $slice_column_configuration = ""; @@ -152,6 +153,7 @@ $extra_columns = array(); $extra_columns[]=array('tagname'=>'sitename', 'header'=>'SN', 'type'=>'string', 'title'=>'Site name', 'fetched'=>true); $extra_columns[]=array('tagname'=>'domain', 'header'=>'DN', 'type'=>'string', 'title'=>'Toplevel domain name', 'fetched'=>true); $extra_columns[]=array('tagname'=>'ipaddress', 'header'=>'IP', 'type'=>'string', 'title'=>'IP Address', 'fetched'=>true); +$extra_columns[]=array('tagname'=>'fcdistro', 'header'=>'OS', 'type'=>'string', 'title'=>'Operating system', 'fetched'=>false); $ConfigureColumns =new PlekitColumns($full_configuration, $fix_columns, $tag_columns, $extra_columns); @@ -363,18 +365,3 @@ include 'plc_footer.php'; ?> - - diff --git a/planetlab/slices/slice.php b/planetlab/slices/slice.php index dedddf1..6da1fb3 100644 --- a/planetlab/slices/slice.php +++ b/planetlab/slices/slice.php @@ -77,6 +77,7 @@ if ($profiling) plc_debug_prof('3: peers',count($peers)); $sites= $api->GetSites( array( $site_id ) ); $site=$sites[0]; $site_name= $site['name']; +$max_slices = $site['max_slices']; if ($profiling) plc_debug_prof('4: sites',count($sites)); //////////////////////////////////////// building blocks for the renew area @@ -158,14 +159,14 @@ EOF; } else { print <<< EOF
-

You must provide a short description, +

You are strongly encouraged to provide a short description, as well as a link to a project website, before renewing it.
Please make sure to provide reasonable details on the kind of traffic, and copyrights if relevant. -Do not provide bogus information; if a complaint is lodged against +Be sure not to provide bogus information; Otherwise, if a complaint is lodged against your slice and your PlanetLab Operations Center is unable to determine what the normal behavior -of your slice is, your slice may be deleted to resolve the complaint.

+of your slice is, your slice may be deleted without your persmission to resolve the complaint.

NOTE: Slices cannot be renewed beyond another $max_renewal_weeks week(s) ($max_renewal_date). @@ -206,18 +207,18 @@ $tabs [] = tab_site($site); // are these the right privileges for deletion ? if ($privileges) { - $tabs["Events"]=array_merge(tablook_event(), - array('url'=>l_event("Slice","slice",$slice_id), - 'bubble'=>"Events for slice $name")); $tabs ['Delete']= array('url'=>l_actions(), 'method'=>'post', 'values'=>array('action'=>'delete-slice','slice_id'=>$slice_id), 'bubble'=>"Delete slice $name", 'confirm'=>"Are you sure to delete slice $name"); - //$tabs["Comon"]=array_merge(tablook_comon(), - //array('url'=>l_comon("slice_id",$slice_id), - //'bubble'=>"Comon page about slice $name")); + $tabs["Events"]=array_merge(tablook_event(), + array('url'=>l_event("Slice","slice",$slice_id), + 'bubble'=>"Events for slice $name")); + $tabs["Comon"]=array_merge(tablook_comon(), + array('url'=>l_comon("slice_id",$slice_id), + 'bubble'=>"Comon page about slice $name")); } plekit_linetabs($tabs); @@ -442,13 +443,15 @@ $extra_columns[]=array('tagname'=>'fcdistro', 'header'=>'OS', 'type'=>'string', //Get user's column configuration -$default_configuration = "hostname:f|ST:f|AU:f|RES:f|R|L|OS|MS"; +$first_time_configuration = false; +$default_configuration = "hostname:f|ST:f|AU:f|RES:f"; +//$extra_default = ""; $column_configuration = ""; $slice_column_configuration = ""; $show_configuration = ""; $show_reservable_message = '1'; -$show_columns_message = true; +$show_columns_message = '1'; //$PersonTags=$api->GetPersonTags (array('person_id'=>$plc->person['person_id'])); @@ -473,6 +476,7 @@ foreach ($PersonTags as $ptag) { $sliceconf_exists = false; if ($column_configuration == "") { + $first_time_configuration = true; $column_configuration = $slice_id.";default"; $sliceconf_exists = true; } @@ -522,7 +526,7 @@ foreach ($show_conf as $ss) { if ($ss =="reservable") $show_reservable_message = '0'; if ($ss =="columns") - $show_columns_message = false; + $show_columns_message = '0'; } //print("res:".$show_reservable_message." - cols:".$show_columns_message); @@ -572,10 +576,10 @@ if (count($reservable_nodes) && $privileges) {

-You have attached one or more reservable nodes to your slice. +You have attached one or more reservable nodes to your slice. Reservable nodes show up with the '$mark' mark. -Your slivers will be available only during timeslots -where you have obtained leases. +Your slivers will be available only during timeslots +where you have obtained leases. You can manage your leases in the tab below.
Please note that as of August 2010 this feature is experimental. @@ -674,7 +678,7 @@ EOF; //////////////////// node configuration panel -if ($show_columns_message) +if ($first_time_configuration) $column_conf_visible = '1'; else $column_conf_visible = '0'; @@ -701,10 +705,10 @@ print(""); //print ("showing column message = ".$show_columns_message); -if ($show_columns_message) -$note_display = ""; -else +if ($show_columns_message == '0') $note_display = "display:none;"; +else +$note_display = ""; print << @@ -724,7 +728,7 @@ $toggle_nodes->end(); $all_sites=$api->GetSites(NULL, array('site_id','login_base')); $site_hash=array(); -foreach ($all_sites as $tmp_site) $site_hash[$tmp_site['site_id']]=$tmp_site['login_base']; +foreach ($all_sites as $site) $site_hash[$site['site_id']]=$site['login_base']; $interface_columns=array('ip','node_id','interface_id'); $interface_filter=array('is_primary'=>TRUE); diff --git a/plekit/table/columns.js b/plekit/table/columns.js index bb225fc..b4dc7f1 100644 --- a/plekit/table/columns.js +++ b/plekit/table/columns.js @@ -806,6 +806,7 @@ function addColumnAjax(column, header) { if (to_load) { + document.getElementById('loading'+column).innerHTML = ""; var url = "/plekit/php/updateColumn.php?slice_id="+slice_id+"&tagName="+t; load_data(column, header, url); } @@ -818,7 +819,6 @@ function addColumn(column, fetch) { var selectedperiod=""; var header=column; - document.getElementById('loading'+column).innerHTML = ""; if (inTypeC(column)!=-1) { @@ -834,11 +834,8 @@ function addColumn(column, fetch) { if (fetch) addColumnAjax(column, header); - else - document.getElementById('loading'+column).innerHTML = ""; addColumnToConfiguration(header); - } @@ -851,7 +848,6 @@ function deleteColumnCells(header) { } - function deleteColumn(column) { var selectedperiod=""; @@ -865,17 +861,8 @@ function deleteColumn(column) { deleteColumnCells(header); deleteColumnFromConfiguration(header); - - //document.getElementById('check'+column).checked = false; } -function scrollList() { -debugfilter("here "+document.getElementById('scrolldiv').focused); -if (event.keyCode == 40) - debugfilter("down"); -else if (event.keyCode == 38) - debugfilter("up"); -} /* @@ -883,6 +870,13 @@ EXTRA //to be used for scrolling the column list with down/up arrows +function scrollList() { +debugfilter("here "+document.getElementById('scrolldiv').focused); +if (event.keyCode == 40) + debugfilter("down"); +else if (event.keyCode == 38) + debugfilter("up"); +} function resetColumns() { -- 2.43.0