function displayAsyncDnsConfig_(hostResolverInfo) {
    // Clear the table.
    $(DnsView.INTERNAL_DNS_CONFIG_TBODY_ID).innerHTML = '';

    // Figure out if the internal DNS resolver is disabled or has no valid
    // configuration information, and update display accordingly.
    var enabled = hostResolverInfo && hostResolverInfo.dns_config !== undefined;
    var noConfig =
        enabled && hostResolverInfo.dns_config.nameservers === undefined;
    $(DnsView.INTERNAL_DNS_ENABLED_SPAN_ID).innerText = enabled;
    setNodeDisplay($(DnsView.INTERNAL_DNS_INVALID_CONFIG_SPAN_ID), noConfig);

    // If the internal DNS resolver is disabled or has no valid configuration,
    // we're done.
    if (!enabled || noConfig)
      return;

    var dnsConfig = hostResolverInfo.dns_config;

    // Display nameservers first.
    var nameserverRow = addNode($(DnsView.INTERNAL_DNS_CONFIG_TBODY_ID), 'tr');
    addNodeWithText(nameserverRow, 'th', 'nameservers');
    addListToNode_(addNode(nameserverRow, 'td'), dnsConfig.nameservers);

    // Add everything else in |dnsConfig| to the table.
    for (var key in dnsConfig) {
      if (key == 'nameservers')
        continue;
      var tr = addNode($(DnsView.INTERNAL_DNS_CONFIG_TBODY_ID), 'tr');
      addNodeWithText(tr, 'th', key);
      var td = addNode(tr, 'td');

      // For lists, display each list entry on a separate line.
      if (typeof dnsConfig[key] == 'object' &&
          dnsConfig[key].constructor == Array) {
        addListToNode_(td, dnsConfig[key]);
        continue;
      }

      addTextNode(td, dnsConfig[key]);
    }
  }
/**
   * Displays information corresponding to the current async DNS configuration.
   * @param {Object} hostResolverInfo The host resolver information.
   */
Displays information corresponding to the current async DNS configuration.
@param {Object} hostResolverInfo The host resolver information.
Displays information corresponding to the current async DNS configuration . @param { Object } hostResolverInfo The host resolver information .
function displayAsyncDnsConfig_(hostResolverInfo) {
    $(DnsView.INTERNAL_DNS_CONFIG_TBODY_ID).innerHTML = '';
    var enabled = hostResolverInfo && hostResolverInfo.dns_config !== undefined;
    var noConfig =
        enabled && hostResolverInfo.dns_config.nameservers === undefined;
    $(DnsView.INTERNAL_DNS_ENABLED_SPAN_ID).innerText = enabled;
    setNodeDisplay($(DnsView.INTERNAL_DNS_INVALID_CONFIG_SPAN_ID), noConfig);
    if (!enabled || noConfig)
      return;
    var dnsConfig = hostResolverInfo.dns_config;
    var nameserverRow = addNode($(DnsView.INTERNAL_DNS_CONFIG_TBODY_ID), 'tr');
    addNodeWithText(nameserverRow, 'th', 'nameservers');
    addListToNode_(addNode(nameserverRow, 'td'), dnsConfig.nameservers);
    for (var key in dnsConfig) {
      if (key == 'nameservers')
        continue;
      var tr = addNode($(DnsView.INTERNAL_DNS_CONFIG_TBODY_ID), 'tr');
      addNodeWithText(tr, 'th', key);
      var td = addNode(tr, 'td');
      if (typeof dnsConfig[key] == 'object' &&
          dnsConfig[key].constructor == Array) {
        addListToNode_(td, dnsConfig[key]);
        continue;
      }
      addTextNode(td, dnsConfig[key]);
    }
  }
function displayAsyncDnsConfig_ ( hostResolverInfo ) { $ ( DnsView . INTERNAL_DNS_CONFIG_TBODY_ID ) . innerHTML = '' ; var enabled = hostResolverInfo && hostResolverInfo . dns_config !== undefined ; var noConfig = enabled && hostResolverInfo . dns_config . nameservers === undefined ; $ ( DnsView . INTERNAL_DNS_ENABLED_SPAN_ID ) . innerText = enabled ; setNodeDisplay ( $ ( DnsView . INTERNAL_DNS_INVALID_CONFIG_SPAN_ID ) , noConfig ) ; if ( ! enabled || noConfig ) return ; var dnsConfig = hostResolverInfo . dns_config ; var nameserverRow = addNode ( $ ( DnsView . INTERNAL_DNS_CONFIG_TBODY_ID ) , 'tr' ) ; addNodeWithText ( nameserverRow , 'th' , 'nameservers' ) ; addListToNode_ ( addNode ( nameserverRow , 'td' ) , dnsConfig . nameservers ) ; for ( var key in dnsConfig ) { if ( key == 'nameservers' ) continue ; var tr = addNode ( $ ( DnsView . INTERNAL_DNS_CONFIG_TBODY_ID ) , 'tr' ) ; addNodeWithText ( tr , 'th' , key ) ; var td = addNode ( tr , 'td' ) ; if ( typeof dnsConfig [ key ] == 'object' && dnsConfig [ key ] . constructor == Array ) { addListToNode_ ( td , dnsConfig [ key ] ) ; continue ; } addTextNode ( td , dnsConfig [ key ] ) ; } }
Displays information corresponding to the current async DNS configuration.
Displays information corresponding to the current async DNS configuration .
// Clear the table. // Figure out if the internal DNS resolver is disabled or has no valid // configuration information, and update display accordingly. // If the internal DNS resolver is disabled or has no valid configuration, // we're done. // Display nameservers first. // Add everything else in |dnsConfig| to the table. // For lists, display each list entry on a separate line.