function selectNewServerDbs() {
  var addServerForm = $('#addServerForm');
  var list = $('#selectServerDbModal').find('#selectServerDbList');
  var connectionString = list.data('connstring');
  var selected = list.find('input:checked');

  Promise.all(selected.map(function(item) {
    new Promise(function(resolve, reject) {
      var params = deparam(connectionString);
      params.dbIndex = selected[item].value;
      params.label = $(selected[item]).closest('tr').find('input[type=text]').val();
      $.ajax({
        type: 'POST',
        url: addServerForm[0].action,
        data: $.param(params)
      }).done(function (data) {
        resolve(selected[item].value);
      }).fail(function (err) {
        reject(selected[item].value);
      });
    });
  })).then(function(values) {
    console.log('All database connections requested. Reload now to display then...');
    clearAddServerForm();
    setTimeout(function() {
      $(window).off('beforeunload', 'clearStorage');
      location.reload();
    }, 200);
  });
}
check list of selectServerDbModal and add all selected databases with their display name
 do ajax post call for every selected to "/login" and reload at the end to refresh entire UI