mirror of
https://github.com/janeczku/calibre-web
synced 2024-11-28 12:30:00 +00:00
Additional version info for sqlite database
This commit is contained in:
parent
b876505f22
commit
1a83ad713c
@ -294,7 +294,7 @@ def setup_db():
|
||||
return False
|
||||
|
||||
dbpath = os.path.join(config.config_calibre_dir, "metadata.db")
|
||||
engine = create_engine('sqlite:///{0}'.format(dbpath.encode('utf-8')), echo=False)
|
||||
engine = create_engine('sqlite:///{0}'.format(dbpath.encode('utf-8')), echo=False, isolation_level="SERIALIZABLE")
|
||||
try:
|
||||
conn = engine.connect()
|
||||
|
||||
|
@ -50,7 +50,7 @@ $(function() {
|
||||
});
|
||||
$("#check_for_update").click(function() {
|
||||
var button_text = $("#check_for_update").html();
|
||||
$("#check_for_update").html('Checking...');
|
||||
$("#check_for_update").html('...');
|
||||
$.ajax({
|
||||
dataType: 'json',
|
||||
url: window.location.pathname+"/../../get_update_status",
|
||||
|
@ -78,7 +78,14 @@
|
||||
<th>Requests</th>
|
||||
<td>v{{versions['requests']}}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>SQlite</th>
|
||||
<td>v{{versions['sqlite']}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Pysqlite</th>
|
||||
<td>v{{versions['pysqlite']}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
@ -7,7 +7,6 @@ from sqlalchemy.ext.declarative import declarative_base
|
||||
from sqlalchemy.orm import *
|
||||
from flask_login import AnonymousUserMixin
|
||||
import os
|
||||
import traceback
|
||||
import logging
|
||||
from werkzeug.security import generate_password_hash
|
||||
from flask_babel import gettext as _
|
||||
|
@ -1055,6 +1055,8 @@ def stats():
|
||||
versions['tornado'] = tornadoVersion
|
||||
versions['iso639'] = iso639Version
|
||||
versions['requests'] = requests.__version__
|
||||
versions['pysqlite'] = db.engine.dialect.dbapi.version
|
||||
versions['sqlite'] = db.engine.dialect.dbapi.sqlite_version
|
||||
|
||||
return render_title_template('stats.html', bookcounter=counter, authorcounter=authors, versions=versions,
|
||||
categorycounter=categorys, seriecounter=series, title=_(u"Statistics"))
|
||||
|
Loading…
Reference in New Issue
Block a user