mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Configurable device display name (#13528)
* Configurable device display name You can just set the display name in device settings. It also accepts simple template format with the variables: hostname, sysName, sysName_fallback, ip Default controlled by device_display_default, (set from old force_hostname_to_sysname and force_ip_to_sysname settings * remove second argument to format_hostname() * Style fixes * Update schema * update phpstan baseline * Improved settings strings (and add for translation)
This commit is contained in:
@@ -874,6 +874,19 @@
|
||||
"ifAlias": "ifAlias"
|
||||
}
|
||||
},
|
||||
"device_display_default": {
|
||||
"group": "webui",
|
||||
"section": "device",
|
||||
"order": 1,
|
||||
"default": null,
|
||||
"type": "select",
|
||||
"options": {
|
||||
"{{ $hostname }}": "hostname",
|
||||
"{{ $sysName_fallback }}": "sysName_fallback",
|
||||
"{{ $sysName }}": "sysName",
|
||||
"{{ $ip }}": "ip"
|
||||
}
|
||||
},
|
||||
"device_perf_purge": {
|
||||
"default": 7,
|
||||
"units": "days",
|
||||
@@ -1597,20 +1610,6 @@
|
||||
"order": 2,
|
||||
"type": "text"
|
||||
},
|
||||
"force_hostname_to_sysname": {
|
||||
"group": "webui",
|
||||
"section": "device",
|
||||
"order": 0,
|
||||
"default": false,
|
||||
"type": "boolean"
|
||||
},
|
||||
"force_ip_to_sysname": {
|
||||
"group": "webui",
|
||||
"section": "device",
|
||||
"order": 1,
|
||||
"default": false,
|
||||
"type": "boolean"
|
||||
},
|
||||
"fping": {
|
||||
"default": "fping",
|
||||
"group": "external",
|
||||
|
@@ -495,6 +495,7 @@ devices:
|
||||
- { Field: inserted, Type: timestamp, 'Null': true, Extra: '', Default: CURRENT_TIMESTAMP }
|
||||
- { Field: hostname, Type: varchar(128), 'Null': false, Extra: '' }
|
||||
- { Field: sysName, Type: varchar(128), 'Null': true, Extra: '' }
|
||||
- { Field: display, Type: varchar(128), 'Null': true, Extra: '' }
|
||||
- { Field: ip, Type: varbinary(16), 'Null': true, Extra: '' }
|
||||
- { Field: overwrite_ip, Type: varchar(40), 'Null': true, Extra: '' }
|
||||
- { Field: community, Type: varchar(255), 'Null': true, Extra: '' }
|
||||
|
Reference in New Issue
Block a user