Commit 11df2e55 authored by Leigh Stoller's avatar Leigh Stoller

Change to admin menu (datasets).

parent 8c306943
......@@ -742,6 +742,21 @@ class Logfile
function gid_idx() { return $this->field("gid_idx"); }
}
#
# Do we have a storage pool?
#
function HaveStoragePool()
{
global $TBOPSPID;
$experiment = Experiment::LookupByPidEid($TBOPSPID, "storage-pool");
if ($experiment) {
return $experiment->PCCount();
}
return 0;
}
#
#
# DB Interface.
#
......
......@@ -614,6 +614,9 @@ function WRITEADMINMENU() {
global $PROTOGENI;
global $login_status;
# Do we have a storage pool? The we support datasets.
$havestoragepool = HaveStoragePool();
# Optional ADMIN menu.
if ($login_status & CHECKLOGIN_LOGGEDIN && ISADMIN()) {
NavMenuSection("administration", "Administration");
......@@ -643,7 +646,7 @@ function WRITEADMINMENU() {
NavMenuButton("Show Shared Node Pool",
"$TBBASE/showpool.php");
if ($TBMAINSITE) {
if ($havestoragepool) {
NavMenuButton("Local Datasets",
"$TBBASE/list-datasets.php?all=1");
NavMenuButton("Remote Datasets",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment