function detectServerDB() {
  var serverForm = $('#addServerForm');
  $.ajax({
    type: 'POST',
    url: 'login/detectDB',
    data: serverForm.serialize()
  }).done(function(data) {
    var selectDbModal = $('#selectServerDbModal');
    if (!data.ok) {
      alert('Cannot query databases used: \n' + data.message);
    }
    else {
      serverForm.closest('.modal').modal('hide');
      var renderData = {
        title: 'Databases found at Redis ' + data.server + ':',
        infoMessage: (data.dbs.used.length === 0 ? 'No databases found' : ''),
        dbs: data.dbs.used,
        connString: serverForm.serialize()
      };
      renderEjs('templates/detectRedisDb.ejs', renderData, $('#selectServerDbContainer'), function() {
        console.log('rendered all databases found inside redis db template');
        selectDbModal.modal('show');
      });
    }
  }).fail(function (jqXHR) {
    alert('Error fetching list of used databases from this host.');
    clearAddServerForm();
    serverForm.parent('.modal').modal('hide');
  });
}
extract json data from add server form and show new modal to allow selection of all dbs
 found at this redis server.
 Only fields for server type, host, port, path and passwords are used. Label and database are ignored.