Standar logs messages

This commit is contained in:
VP-002 U 2019-11-15 12:06:14 -05:00
parent 9aa051d7b8
commit e6603ab742

View File

@ -246,7 +246,7 @@ function getWindowsDNSsuffixes() {
});
const primaryDNS = longPrimaryDNS[0].substring(longPrimaryDNS[0].lastIndexOf(":")+1);
dnsSuffixes.primaryDNS = primaryDNS.trim();
if(!dnsSuffixes.primaryDNS) dnsSuffixes.primaryDNS = 'not defined';
if(!dnsSuffixes.primaryDNS) dnsSuffixes.primaryDNS = 'Not defined';
}
if(index > 1) {
if(index % 2 == 0){
@ -338,7 +338,7 @@ function getWindowsIEEE8021x(connectionType, iface, ifaces) {
if(state8021x.includes('Disabled')){
i8021x.state = "Disabled";
i8021x.protocol = "Not Configured";
i8021x.protocol = "Not defined";
return i8021x;
} else {
const protocol8021x = arrayIface8021xInfo.find((element) => {
@ -366,7 +366,7 @@ function getWindowsIEEE8021x(connectionType, iface, ifaces) {
} catch (error) {
// console.log('Entro al catch del wireless');
i8021x.state = "Disabled";
i8021x.protocol = "Not configured";
i8021x.protocol = "Not defined";
return i8021x;
}
@ -514,7 +514,7 @@ function getLinuxIfaceDNSsuffix(connectionName) {
const result = execSync(cmd).toString();
const resultFormat = result.replace(/\s+/g,' ').trim();
const dnsSuffix = resultFormat.split(" ").slice(1).toString();
return dnsSuffix == '--' ? '': dnsSuffix;
return dnsSuffix == '--' ? 'Not defined': dnsSuffix;
} catch (e) {
return 'Unknown';
}
@ -534,16 +534,16 @@ function getLinuxIfaceAuth8021x(connectionName) {
return authenticationProtocol == '--' ? '': authenticationProtocol;
} catch (e) {
return 'Not configured';
return 'Not defined';
}
} else {
return 'Not configured';
return 'Not defined';
}
}
function getLinuxIfaceState8021x(authenticationProtocol) {
if(authenticationProtocol) {
if(authenticationProtocol == 'Not configured'){
if(authenticationProtocol == 'Not defined'){
return 'Disabled';
}
return 'Enabled';
@ -678,7 +678,6 @@ function networkInterfaces(callback) {
echo -n "wirelessspeed: "; iw dev ${iface} link 2>&1 \| grep bitrate; echo;`;
let lines = [];
try {
const connectionName = getLinuxIfaceConnectionName(iface);
dhcp = getLinuxIfaceDHCPstatus(connectionName);