Updated adding devices for distributed poller

This commit is contained in:
laf
2015-03-19 22:06:13 +00:00
parent a1c99a2ff4
commit ab82effa3b
5 changed files with 54 additions and 16 deletions
+16 -1
View File
@@ -51,7 +51,13 @@ if ($_POST['hostname'])
print_error("Unsupported SNMP Version. There was a dropdown menu, how did you reach this error ?");
}
$poller_group = $_POST['poller_group'];
$result = addHost($hostname, $snmpver, $port, $transport,0,$poller_group);
$force_add = $_POST['force_add'];
if ($force_add == 'on') {
$force_add = 1;
} else {
$force_add = 0;
}
$result = addHost($hostname, $snmpver, $port, $transport,0,$poller_group,$force_add);
if ($result)
{
print_message("Device added ($result)");
@@ -195,6 +201,15 @@ if ($config['distributed_poller'] === TRUE) {
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<div class="checkbox">
<label>
<input type="checkbox" name="force_add" id="force_add"> Force add
</label>
</div>
</div>
</div>
');
}