Skip to content

Commit

Permalink
feat(config): add SNMP LINK TAG configuration option
Browse files Browse the repository at this point in the history
  • Loading branch information
Lea9250 committed May 29, 2024
1 parent 38916aa commit 92d1020
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions files/update/7078.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
INSERT INTO `config` VALUES('SNMP_LINK_TAG',0,'','Link SNMP device to computer TAG');
1 change: 1 addition & 0 deletions plugins/language/en_GB/en_GB.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1732,6 +1732,7 @@
9041 Use for IpDiscover reconciliation (must be an IP address OID)
9042 SNMP devices
9043 An IpDiscover reconciliation field is already set for this type
9044 Link SNMP device to computer TAG

9100 SSL key path
9101 SSL certificat path
Expand Down
1 change: 1 addition & 0 deletions plugins/language/fr_FR/fr_FR.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1727,6 +1727,7 @@
9041 Utiliser comme réconciliation pour l'IpDiscover (doit être une adresse IP)
9042 machines SNMP
9043 Un champ de réconciliation IpDiscover est déjà configuré pour ce type
9044 Lier les équipements SNMP aux TAG ordinateurs

9100 Chemin de la clé SSL
9101 Chemin du certificat SSL
Expand Down
5 changes: 3 additions & 2 deletions require/function_config_generale.php
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ function update_default_value($POST) {
'IPDISCOVER_LINK_TAG_NETWORK','IPDISCOVER_UPDATE_DATE','IPDISCOVER_PURGE_OLD','IPDISCOVER_PURGE_VALIDITY_TIME', 'SECURITY_AUTHENTICATION_BLOCK_IP',
'SECURITY_AUTHENTICATION_NB_ATTEMPT', 'SECURITY_AUTHENTICATION_TIME_BLOCK', 'SECURITY_PASSWORD_ENABLED', 'SECURITY_PASSWORD_MIN_CHAR',
'SECURITY_PASSWORD_FORCE_NB', 'SECURITY_PASSWORD_FORCE_UPPER', 'SECURITY_PASSWORD_FORCE_SPE_CHAR','EXCLUDE_ARCHIVE_COMPUTER',
'SCAN_ARP_BANDWIDTH');
'SCAN_ARP_BANDWIDTH', 'SNMP_LINK_TAG');

//tableau des champs ou il faut interpréter la valeur retourner et mettre à jour tvalue
$array_interprete_tvalue = array('DOWNLOAD_REP_CREAT' => 'DOWNLOAD_REP_CREAT_edit', 'DOWNLOAD_PACK_DIR' => 'DOWNLOAD_PACK_DIR_edit',
Expand Down Expand Up @@ -1112,7 +1112,7 @@ function pageConnexion() {
function pagesnmp() {
global $l;
//which line we need?
$champs = array('SNMP' => 'SNMP', 'SNMP_MIB_DIRECTORY' => 'SNMP_MIB_DIRECTORY');
$champs = array('SNMP' => 'SNMP', 'SNMP_MIB_DIRECTORY' => 'SNMP_MIB_DIRECTORY', 'SNMP_LINK_TAG' => 'SNMP_LINK_TAG');
$values = look_config_default_values($champs);
if (isset($values['tvalue']['SNMP_DIR'])) {
$select_rep_creat = 'CUSTOM';
Expand All @@ -1121,6 +1121,7 @@ function pagesnmp() {
}
ligne('SNMP', $l->g(1137), 'radio', array(1 => 'ON', 0 => 'OFF', 'VALUE' => $values['ivalue']['SNMP'] ?? 0));
ligne('SNMP_MIB_DIRECTORY', $l->g(9010), 'input', array('VALUE' => $values['tvalue']['SNMP_MIB_DIRECTORY'] ?? '', 'SIZE' => "30%", 'MAXLENGTH' => 200));
ligne('SNMP_LINK_TAG', $l->g(9044), 'radio', array(1 => 'ON', 0 => 'OFF', 'VALUE' => $values['ivalue']['SNMP_LINK_TAG'] ?? 0));
}

function pageswol() {
Expand Down
2 changes: 1 addition & 1 deletion var.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
/**
* OCS' MySQL database version
*/
define('GUI_VER', '7077');
define('GUI_VER', '7078');


/**
Expand Down

0 comments on commit 92d1020

Please sign in to comment.