Commit ceef427b authored by Leigh Stoller's avatar Leigh Stoller

Bug Fix: Allow search by control node IP.

parent c0632cab
......@@ -25,6 +25,7 @@ $optargs = OptionalPageArguments("showall", PAGEARG_BOOLEAN,
"reverse", PAGEARG_BOOLEAN,
"count", PAGEARG_INTEGER,
"datetime", PAGEARG_STRING,
"IP", PAGEARG_STRING,
"node", PAGEARG_NODE);
#
......@@ -44,6 +45,12 @@ if (!isset($reverse)) {
if (!isset($datetime)) {
$datetime = "";
}
if (isset($IP)) {
$node = Node::LookupByIP($IP);
if (! $node) {
USERERROR("Cannot map $IP to a node", 1);
}
}
$node_id = (isset($node) ? $node->node_id() : "");
$opts="node_id=$node_id&count=$count&reverse=$reverse";
......
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