mirror of
https://github.com/janeczku/calibre-web
synced 2024-11-24 18:47:23 +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
|
return False
|
||||||
|
|
||||||
dbpath = os.path.join(config.config_calibre_dir, "metadata.db")
|
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:
|
try:
|
||||||
conn = engine.connect()
|
conn = engine.connect()
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ $(function() {
|
|||||||
});
|
});
|
||||||
$("#check_for_update").click(function() {
|
$("#check_for_update").click(function() {
|
||||||
var button_text = $("#check_for_update").html();
|
var button_text = $("#check_for_update").html();
|
||||||
$("#check_for_update").html('Checking...');
|
$("#check_for_update").html('...');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
url: window.location.pathname+"/../../get_update_status",
|
url: window.location.pathname+"/../../get_update_status",
|
||||||
|
@ -78,7 +78,14 @@
|
|||||||
<th>Requests</th>
|
<th>Requests</th>
|
||||||
<td>v{{versions['requests']}}</td>
|
<td>v{{versions['requests']}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>SQlite</th>
|
||||||
|
<td>v{{versions['sqlite']}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Pysqlite</th>
|
||||||
|
<td>v{{versions['pysqlite']}}</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
@ -7,7 +7,6 @@ from sqlalchemy.ext.declarative import declarative_base
|
|||||||
from sqlalchemy.orm import *
|
from sqlalchemy.orm import *
|
||||||
from flask_login import AnonymousUserMixin
|
from flask_login import AnonymousUserMixin
|
||||||
import os
|
import os
|
||||||
import traceback
|
|
||||||
import logging
|
import logging
|
||||||
from werkzeug.security import generate_password_hash
|
from werkzeug.security import generate_password_hash
|
||||||
from flask_babel import gettext as _
|
from flask_babel import gettext as _
|
||||||
|
@ -1055,6 +1055,8 @@ def stats():
|
|||||||
versions['tornado'] = tornadoVersion
|
versions['tornado'] = tornadoVersion
|
||||||
versions['iso639'] = iso639Version
|
versions['iso639'] = iso639Version
|
||||||
versions['requests'] = requests.__version__
|
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,
|
return render_title_template('stats.html', bookcounter=counter, authorcounter=authors, versions=versions,
|
||||||
categorycounter=categorys, seriecounter=series, title=_(u"Statistics"))
|
categorycounter=categorys, seriecounter=series, title=_(u"Statistics"))
|
||||||
|
Loading…
Reference in New Issue
Block a user