diff --git a/amt-0.2.0.js b/amt-0.2.0.js index 511d5d8..cc1563a 100644 --- a/amt-0.2.0.js +++ b/amt-0.2.0.js @@ -962,15 +962,14 @@ args = { }, */ function execArgumentsToXml(args) { - if(args === undefined || args === null) return null; - + if ((args === undefined) || (args === null)) return null; var result = ''; - for(var argName in args) { + for (var argName in args) { var arg = args[argName]; - if(!arg) continue; - if(arg['__parameterType'] === 'reference') result += referenceToXml(argName, arg); - else result += instanceToXml(argName, arg); - //if(arg['__isInstance']) result += instanceToXml(argName, arg); + if (!arg) continue; + if (arg['__parameterType'] === 'reference') { result += referenceToXml(argName, arg); } + else { result += instanceToXml(argName, arg); } + //if (arg['__isInstance']) result += instanceToXml(argName, arg); } return result; } @@ -988,25 +987,28 @@ function execArgumentsToXml(args) { */ function instanceToXml(instanceName, inInstance) { - if(inInstance === undefined || inInstance === null) return null; + if (inInstance === undefined || inInstance === null) return null; var hasNamespace = !!inInstance['__namespace']; var startTag = hasNamespace ? ''; - for(var prop in inInstance) { - if (!inInstance.hasOwnProperty(prop) || prop.indexOf('__') === 0) continue; - - if (typeof inInstance[prop] === 'function' || Array.isArray(inInstance[prop]) ) continue; - - if (typeof inInstance[prop] === 'object') { - //result += startTag + prop +'>' + instanceToXml('prop', inInstance[prop]) + endTag + prop +'>'; - console.error('only convert one level down...'); - } - else { - result += startTag + prop +'>' + inInstance[prop].toString() + endTag + prop +'>'; - } + if (typeof inInstance == 'string') { + result += inInstance; + } else { + for (var prop in inInstance) { + if (!inInstance.hasOwnProperty(prop) || prop.indexOf('__') === 0) continue; + + if (typeof inInstance[prop] === 'function' || Array.isArray(inInstance[prop])) continue; + + if (typeof inInstance[prop] === 'object') { + //result += startTag + prop +'>' + instanceToXml('prop', inInstance[prop]) + endTag + prop +'>'; + console.error('only convert one level down...'); + } else { + result += startTag + prop + '>' + inInstance[prop].toString() + endTag + prop + '>'; + } + } } result += ''; return result; diff --git a/index.html b/index.html index 488bf79..16e90ac 100644 --- a/index.html +++ b/index.html @@ -7783,7 +7783,23 @@

Software KVM

function removeWifiEntryResponse(stack, name, response, status, tag) { if (methodcheck(response)) return; - amtstack.Enum('CIM_WiFiEndpointSettings', function(stack, name, responses, status) { if (status == 200) { xxWireless['CIM_WiFiEndpointSettings'].responses = responses; showWirelessInfo(); } } ); + // ###BEGIN###{!NetAuth} + amtstack.BatchEnum('', ['CIM_WiFiEndpointSettings'], function (stack, name, responses, status) { + if (status == 200) { + xxWireless['CIM_WiFiEndpointSettings'].responses = responses['CIM_WiFiEndpointSettings'].responses; + showWirelessInfo(); + } + }); + // ###END###{!NetAuth} + // ###BEGIN###{NetAuth} + amtstack.BatchEnum('', ['CIM_WiFiEndpointSettings', 'CIM_IEEE8021xSettings'], function (stack, name, responses, status) { + if (status == 200) { + xxWireless['CIM_WiFiEndpointSettings'].responses = responses['CIM_WiFiEndpointSettings'].responses; + xxWireless['CIM_IEEE8021xSettings'].responses = responses['CIM_IEEE8021xSettings'].responses; + showWirelessInfo(); + } + }); + // ###END###{NetAuth} } function showWifiNewProfile() { @@ -7858,14 +7874,8 @@

Software KVM

if (Q('idx_d12password').value != '') { sc['Password'] = Q('idx_d12password').value; } if (Q('idx_d12domain').value != '') { sc['Domain'] = Q('idx_d12domain').value; } if (Q('idx_d12protocol').value > 3) { sc['ProtectedAccessCredential'] = Q('idx_d12pac').value; sc['PACPassword'] = Q('idx_d12pacpassword').value; } - if (parseInt(Q('idx_d12clientcert').value) >= 0) { - // TODO: DOES NOT WORK - netAuthSettingsClientCert = '/wsman' + amtstack.CompleteName('AMT_PublicKeyCertificate') + '' + xxCertificates[parseInt(Q('idx_d12clientcert').value)]['InstanceID'] + ''; - } - if (parseInt(Q('idx_d12servercert').value) >= 0) { - // TODO: DOES NOT WORK - netAuthSettingsServerCaCert = '/wsman' + amtstack.CompleteName('AMT_PublicKeyCertificate') + '' + xxCertificates[parseInt(Q('idx_d12servercert').value)]['InstanceID'] + ''; - } + if (parseInt(Q('idx_d12clientcert').value) >= 0) { netAuthSettingsClientCert = '
http://schemas.xmlsoap.org/ws/2004/08/addressing
http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyCertificate' + xxCertificates[parseInt(Q('idx_d12clientcert').value)]['InstanceID'] + ''; } + if (parseInt(Q('idx_d12servercert').value) >= 0) { netAuthSettingsServerCaCert = '
http://schemas.xmlsoap.org/ws/2004/08/addressing
http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyCertificate' + xxCertificates[parseInt(Q('idx_d12servercert').value)]['InstanceID'] + ''; } } // ###END###{NetAuth} amtstack.AMT_WiFiPortConfigurationService_AddWiFiSettings(