when using sql.html page to run sql directly, for any SELECT * sql, when click run! button for the second time,
the page will show error msg like: DataTables warning: table id={id} - Cannot reinitialise DataTable.
this can be fix by:https://datatables.net/manual/tech-notes/3#retrieve
* Move window.alert() calls to bootstrap modals. Also log errors that occur to console.
* move misc modal to basic template so it's available on all pages.