my $sth = $dbh->prepare($sql);
$sth->execute($node->get_id());
- $sql = "DELETE FROM parameters WHERE node_id = ?";
+ $sql = "DELETE FROM stat WHERE node_id = ?";
$sth = $dbh->prepare($sql);
$sth->execute($node->get_id());
Varnish::NodeManager->add_node($node, $inherit_settings);
$status .= "Node " . $node->get_name() . " added successfully.";
+ my $group = Varnish::NodeManager->get_group($param{'group_id'});
+ my $group_name = ($group ? $group->get_name() : "");
log_info("[" . $node->get_name() . "] [Added node]"
. " [name=" . $node->get_name() . "]"
. " [address=" . $node->get_address() . "]"
. " [port=" . $node->get_port() . "]"
- . " [group=" . $param{'group_name'} . "]"
+ . " [group=" . $group_name . "]"
. " [management_port=" . $node->get_management_port() . "]");
}
else {
Varnish::NodeManager->update_node($node);
+ $status .= "Node " . $node->get_name() . " updated successfully.";
+
+ my $group = Varnish::NodeManager->get_group($param{'node_group_id'});
+ my $group_name = ($group ? $group->get_name() : "");
log_info("[" . $node->get_name() . "] [Updated node]"
. " [name=" . $node->get_name() . "]"
. " [address=" . $node->get_address() . "]"
. " [port=" . $node->get_port() . "]"
- . " [group=" . $param{'group_name'} . "]"
+ . " [group=" . $group_name . "]"
. " [management_port=" . $node->get_management_port() . "]");
}
}
</TMPL_IF>
<td class="header">Address</td>
<td class="header">Port</td>
-<td class="header">Management port</td>
+<td class="header">Management<br/>port</td>
<td></td></tr>
<TMPL_LOOP NAME=NODE_INFOS>
<TMPL_IF NAME=__ODD__>
<td><input type="text" name="port" size=5/></td>
<td><input type="text" name="management_port" value="<TMPL_VAR NAME=DEFAULT_MANAGEMENT_PORT>"/></td>
<TMPL_IF NAME=SHOW_INHERIT_SETTINGS>
-<td><input type="checkbox" name="inherit_settings" value="true" <TMPL_IF NAME=INHERIT_SETTINGS>checked</TMPL_IF>></td><td>Group inherit settings</td>
+<td colspan=3> <input type="checkbox" name="inherit_settings" value="true" <TMPL_IF NAME=INHERIT_SETTINGS>checked</TMPL_IF>>Group inherit<br/> settings</td>
</TMPL_IF>
<td>
<input type="hidden" name="group_id" value="<TMPL_VAR NAME=GROUP_ID>"/>