X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=planetlab%2Fpub%2Fslices.php;h=24a719c18dd3120fd4c62671095992c84da7eb36;hb=62119ec9e5cb3eae1eb8f331da3221a1bc4da495;hp=e0f16919febac060b03ebee6a1b87fe32f072600;hpb=9c2c95763677a4f5045bc039f680e56752861f4b;p=plewww.git diff --git a/planetlab/pub/slices.php b/planetlab/pub/slices.php index e0f1691..24a719c 100644 --- a/planetlab/pub/slices.php +++ b/planetlab/pub/slices.php @@ -12,12 +12,10 @@ require_once 'plc_session.php'; global $adm; -// Get sorting functions -require_once 'plc_sorts.php'; - // 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'; @@ -61,9 +59,8 @@ comment on, then click Provide Feedback.

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; } @@ -94,8 +91,12 @@ if (isset($_REQUEST['active'])) { } 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 - sort_slices($slices); + usort($slices, '__cmp_slices'); } $class = "";