git://git.onelab.eu
/
plewww.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
comment out inclusion of _gen_planetflow.php
[plewww.git]
/
planetlab
/
pub
/
slices.php
diff --git
a/planetlab/pub/slices.php
b/planetlab/pub/slices.php
index
2d709df
..
24a719c
100644
(file)
--- a/
planetlab/pub/slices.php
+++ b/
planetlab/pub/slices.php
@@
-14,7
+14,8
@@
global $adm;
// Get PlanetFlow stats
global $planetflow, $active_bytes;
// Get PlanetFlow stats
global $planetflow, $active_bytes;
-include_once '_gen_planetflow.php';
+// Thierry : this is not found at PlanetLab Europe
+//include_once '_gen_planetflow.php';
// Print header
require_once 'plc_drupal.php';
// Print header
require_once 'plc_drupal.php';
@@
-58,9
+59,8
@@
comment on, then click <b>Provide Feedback</b>.</p>
<?php
// Get all sites
<?php
// Get all sites
-$sites = array();
-foreach ($adm->GetSites(NULL, array('abbreviated_name', 'site_id'))
- as $site) {
+$sites = $adm->GetSites(NULL, array('abbreviated_name', 'site_id'));
+if (!empty($sites)) foreach ($sites as $site) {
$sites[$site['site_id']] = $site;
}
$sites[$site['site_id']] = $site;
}
@@
-91,8
+91,12
@@
if (isset($_REQUEST['active'])) {
}
usort($slices, '__cmp_slices_by_bytes');
} else {
}
usort($slices, '__cmp_slices_by_bytes');
} else {
+ // slice sort on name
+ function __cmp_slices($a, $b) {
+ return strcasecmp($a['name'], $b['name']);
+ }
// Alphabetically sort slices
// Alphabetically sort slices
-
sort_slices($slices
);
+
usort($slices, '__cmp_slices'
);
}
$class = "";
}
$class = "";