static/js/control.js
/**
 * Initiate data table based on data.
 * @function initDataTable
 */
Initiate data table based on data.
Initiate data table based on data .
function initDataTable(columns, types) {
  var table = document.getElementById('data-table');
  table.innerHTML = '';
  var header = table.createTHead();
  var row = header.insertRow(-1);
  for (var i = 0; i < columns.length; i++) {
    var cell = row.insertCell(-1);
    cell.setAttribute('data-index', i);
    cell.setAttribute('data-column', columns[i]);
    cell.setAttribute('data-type', types[i]);
    cell.innerHTML = columns[i];
  }
  table.appendChild(document.createElement('tbody'));
}
function initDataTable ( columns , types ) { var table = document . getElementById ( 'data-table' ) ; table . innerHTML = '' ; var header = table . createTHead ( ) ; var row = header . insertRow ( - 1 ) ; for ( var i = 0 ; i < columns . length ; i ++ ) { var cell = row . insertCell ( - 1 ) ; cell . setAttribute ( 'data-index' , i ) ; cell . setAttribute ( 'data-column' , columns [ i ] ) ; cell . setAttribute ( 'data-type' , types [ i ] ) ; cell . innerHTML = columns [ i ] ; } table . appendChild ( document . createElement ( 'tbody' ) ) ; }
Initiate data table based on data.
Initiate data table based on data .