All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 621877f0 authored by Leigh B Stoller's avatar Leigh B Stoller

Add sshurl method.

parent 743bfc28
...@@ -296,7 +296,7 @@ class Node ...@@ -296,7 +296,7 @@ class Node
return 0; return 0;
} }
$row = mysql_fetch_array($query_result); $row = mysql_fetch_array($query_result);
return $row["isremotenode"]; return $row["isvirtnode"];
} }
function NodeStatus() { function NodeStatus() {
...@@ -1390,6 +1390,21 @@ class Node ...@@ -1390,6 +1390,21 @@ class Node
return 0; return 0;
} }
function sshurl($uid) {
global $OURDOMAIN;
$node_id = $this->node_id();
if ($this->IsVirtNode()) {
$pnode_id = $this->phys_nodeid();
$sshdport = $this->sshdport();
return "ssh://${uid}@${pnode_id}.${OURDOMAIN}:$sshdport";
}
else {
return "ssh://${uid}@${node_id}.${OURDOMAIN}";
}
}
} }
# #
......
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