mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Custom ssh,telnet port with oxidized (#15255)
* Custom ssh,telnet,http port with oxidized * Lint fixes * copy paste minors
This commit is contained in:
@@ -1492,12 +1492,20 @@ function list_oxidized(Illuminate\Http\Request $request)
|
||||
|
||||
/** @var Device $device */
|
||||
foreach ($devices as $device) {
|
||||
$device['device_id'] = DeviceCache::getByHostname($device->hostname)->device_id;
|
||||
$output = [
|
||||
'hostname' => $device->hostname,
|
||||
'os' => $device->os,
|
||||
'ip' => $device->ip,
|
||||
];
|
||||
|
||||
$custom_ssh_port = get_dev_attrib($device, 'override_device_ssh_port');
|
||||
if (! empty($custom_ssh_port)) {
|
||||
$output['ssh_port'] = $custom_ssh_port;
|
||||
}
|
||||
$custom_telnet_port = get_dev_attrib($device, 'override_device_telnet_port');
|
||||
if (! empty($custom_telnet_port)) {
|
||||
$output['telnet_port'] = $custom_telnet_port;
|
||||
}
|
||||
// Pre-populate the group with the default
|
||||
if (Config::get('oxidized.group_support') === true && ! empty(Config::get('oxidized.default_group'))) {
|
||||
$output['group'] = Config::get('oxidized.default_group');
|
||||
|
@@ -15,6 +15,24 @@ echo '
|
||||
' . dynamic_override_config('checkbox', 'override_Oxidized_disable', $device) . '
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="override_ssh" class="col-sm-4 control-label">Override default ssh port</label>
|
||||
<div class="col-sm-8">
|
||||
' . dynamic_override_config('text', 'override_device_ssh_port', $device) . '
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="override_telnet" class="col-sm-4 control-label">Override default telnet port</label>
|
||||
<div class="col-sm-8">
|
||||
' . dynamic_override_config('text', 'override_device_telnet_port', $device) . '
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="override_http" class="col-sm-4 control-label">Override default http port</label>
|
||||
<div class="col-sm-8">
|
||||
' . dynamic_override_config('text', 'override_device_http_port', $device) . '
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="unixagent" class="col-sm-4 control-label">Unix agent port</label>
|
||||
<div class="col-sm-8">
|
||||
@@ -22,7 +40,7 @@ echo '
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="unixagent" class="col-sm-4 control-label">Enable RRD Tune for all ports?</label>
|
||||
<label for="rrdtool_tune" class="col-sm-4 control-label">Enable RRD Tune for all ports?</label>
|
||||
<div class="col-sm-8">
|
||||
' . dynamic_override_config('checkbox', 'override_rrdtool_tune', $device) . '
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user