Roxen.git / server / config_interface / js / fix-db.js

version» Context lines:

Roxen.git/server/config_interface/js/fix-db.js:5:       This script is referenced in dbs/db_optimizeall.html and dbs/db_repairall.html   */      (function(window, document, R) {    'use strict';       var resTarget = document.querySelector('#result'),    resTargetText = resTarget.querySelector('.text'),    href = resTarget.dataset.dbHref, -  typeStr = resTarget.dataset.progressMsg; +  action = resTarget.dataset.dbAction, +  wizid = resTarget.dataset.wizid, +  typeStr = resTarget.dataset.progressMsg, +  args = [];       if (!href) {    resTarget.innerHTML =    '<div class="notify error">No <code>data-db-href</code> attribute' +    ' found on the result target. Something is really wrong!</div>';       return;    }    -  +  if (action) { +  args.push('action=' + action); +  } +  +  if (wizid) { +  args.push(wizid); +  } +  +  if (args.length) { +  href += '?' + args.join('&'); +  } +     resTargetText.innerHTML = typeStr || 'Doing things...';       R.wget(href,    function(res) {    resTarget.innerHTML = res;    },    function(err) {    resTarget.innerHTML =    '<div class="notify error">' + err + '</div>';    });      }(window, document, rxnlib));