mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-02-12 17:03:59 +08:00
Implementing page size selection in settings #67
This commit is contained in:
parent
ad4203fb8e
commit
a1a1292b41
11 changed files with 90 additions and 33 deletions
66
bazarr.py
66
bazarr.py
|
@ -1,4 +1,4 @@
|
||||||
bazarr_version = '0.5.4'
|
bazarr_version = '0.5.5'
|
||||||
|
|
||||||
import gc
|
import gc
|
||||||
gc.enable()
|
gc.enable()
|
||||||
|
@ -190,10 +190,11 @@ def series():
|
||||||
page = request.GET.page
|
page = request.GET.page
|
||||||
if page == "":
|
if page == "":
|
||||||
page = "1"
|
page = "1"
|
||||||
offset = (int(page) - 1) * 15
|
page_size = int(get_general_settings()[21])
|
||||||
max_page = int(math.ceil(missing_count / 15.0))
|
offset = (int(page) - 1) * page_size
|
||||||
|
max_page = int(math.ceil(missing_count / (page_size + 0.0)))
|
||||||
|
|
||||||
c.execute("SELECT tvdbId, title, path_substitution(path), languages, hearing_impaired, sonarrSeriesId, poster, audio_language FROM table_shows ORDER BY sortTitle ASC LIMIT 15 OFFSET ?", (offset,))
|
c.execute("SELECT tvdbId, title, path_substitution(path), languages, hearing_impaired, sonarrSeriesId, poster, audio_language FROM table_shows ORDER BY sortTitle ASC LIMIT ? OFFSET ?", (page_size, offset,))
|
||||||
data = c.fetchall()
|
data = c.fetchall()
|
||||||
c.execute("SELECT code2, name FROM table_settings_languages WHERE enabled = 1")
|
c.execute("SELECT code2, name FROM table_settings_languages WHERE enabled = 1")
|
||||||
languages = c.fetchall()
|
languages = c.fetchall()
|
||||||
|
@ -202,7 +203,7 @@ def series():
|
||||||
c.execute("SELECT table_shows.sonarrSeriesId, COUNT(table_episodes.missing_subtitles) FROM table_shows LEFT JOIN table_episodes ON table_shows.sonarrSeriesId=table_episodes.sonarrSeriesId WHERE table_shows.languages IS NOT 'None' GROUP BY table_shows.sonarrSeriesId")
|
c.execute("SELECT table_shows.sonarrSeriesId, COUNT(table_episodes.missing_subtitles) FROM table_shows LEFT JOIN table_episodes ON table_shows.sonarrSeriesId=table_episodes.sonarrSeriesId WHERE table_shows.languages IS NOT 'None' GROUP BY table_shows.sonarrSeriesId")
|
||||||
total_subtitles_list = c.fetchall()
|
total_subtitles_list = c.fetchall()
|
||||||
c.close()
|
c.close()
|
||||||
output = template('series', __file__=__file__, bazarr_version=bazarr_version, rows=data, missing_subtitles_list=missing_subtitles_list, total_subtitles_list=total_subtitles_list, languages=languages, missing_count=missing_count, page=page, max_page=max_page, base_url=base_url, single_language=single_language)
|
output = template('series', __file__=__file__, bazarr_version=bazarr_version, rows=data, missing_subtitles_list=missing_subtitles_list, total_subtitles_list=total_subtitles_list, languages=languages, missing_count=missing_count, page=page, max_page=max_page, base_url=base_url, single_language=single_language, page_size=page_size)
|
||||||
return output
|
return output
|
||||||
|
|
||||||
@route(base_url + 'serieseditor')
|
@route(base_url + 'serieseditor')
|
||||||
|
@ -353,15 +354,16 @@ def movies():
|
||||||
page = request.GET.page
|
page = request.GET.page
|
||||||
if page == "":
|
if page == "":
|
||||||
page = "1"
|
page = "1"
|
||||||
offset = (int(page) - 1) * 15
|
page_size = int(get_general_settings()[21])
|
||||||
max_page = int(math.ceil(missing_count / 15.0))
|
offset = (int(page) - 1) * page_size
|
||||||
|
max_page = int(math.ceil(missing_count / (page_size + 0.0)))
|
||||||
|
|
||||||
c.execute("SELECT tmdbId, title, path_substitution(path), languages, hearing_impaired, radarrId, poster, audio_language FROM table_movies ORDER BY title ASC LIMIT 15 OFFSET ?", (offset,))
|
c.execute("SELECT tmdbId, title, path_substitution(path), languages, hearing_impaired, radarrId, poster, audio_language FROM table_movies ORDER BY title ASC LIMIT ? OFFSET ?", (page_size, offset,))
|
||||||
data = c.fetchall()
|
data = c.fetchall()
|
||||||
c.execute("SELECT code2, name FROM table_settings_languages WHERE enabled = 1")
|
c.execute("SELECT code2, name FROM table_settings_languages WHERE enabled = 1")
|
||||||
languages = c.fetchall()
|
languages = c.fetchall()
|
||||||
c.close()
|
c.close()
|
||||||
output = template('movies', __file__=__file__, bazarr_version=bazarr_version, rows=data, languages=languages, missing_count=missing_count, page=page, max_page=max_page, base_url=base_url, single_language=single_language)
|
output = template('movies', __file__=__file__, bazarr_version=bazarr_version, rows=data, languages=languages, missing_count=missing_count, page=page, max_page=max_page, base_url=base_url, single_language=single_language, page_size=page_size)
|
||||||
return output
|
return output
|
||||||
|
|
||||||
@route(base_url + 'movieseditor')
|
@route(base_url + 'movieseditor')
|
||||||
|
@ -510,8 +512,9 @@ def historyseries():
|
||||||
page = request.GET.page
|
page = request.GET.page
|
||||||
if page == "":
|
if page == "":
|
||||||
page = "1"
|
page = "1"
|
||||||
offset = (int(page) - 1) * 15
|
page_size = int(get_general_settings()[21])
|
||||||
max_page = int(math.ceil(row_count / 15.0))
|
offset = (int(page) - 1) * page_size
|
||||||
|
max_page = int(math.ceil(row_count / (page_size + 0.0)))
|
||||||
|
|
||||||
now = datetime.now()
|
now = datetime.now()
|
||||||
today = []
|
today = []
|
||||||
|
@ -528,11 +531,11 @@ def historyseries():
|
||||||
thisyear.append(datetime.fromtimestamp(stat[0]).date())
|
thisyear.append(datetime.fromtimestamp(stat[0]).date())
|
||||||
stats = [len(today), len(thisweek), len(thisyear), total]
|
stats = [len(today), len(thisweek), len(thisyear), total]
|
||||||
|
|
||||||
c.execute("SELECT table_history.action, table_shows.title, table_episodes.season || 'x' || table_episodes.episode, table_episodes.title, table_history.timestamp, table_history.description, table_history.sonarrSeriesId FROM table_history LEFT JOIN table_shows on table_shows.sonarrSeriesId = table_history.sonarrSeriesId LEFT JOIN table_episodes on table_episodes.sonarrEpisodeId = table_history.sonarrEpisodeId ORDER BY id DESC LIMIT 15 OFFSET ?", (offset,))
|
c.execute("SELECT table_history.action, table_shows.title, table_episodes.season || 'x' || table_episodes.episode, table_episodes.title, table_history.timestamp, table_history.description, table_history.sonarrSeriesId FROM table_history LEFT JOIN table_shows on table_shows.sonarrSeriesId = table_history.sonarrSeriesId LEFT JOIN table_episodes on table_episodes.sonarrEpisodeId = table_history.sonarrEpisodeId ORDER BY id DESC LIMIT ? OFFSET ?", (page_size, offset,))
|
||||||
data = c.fetchall()
|
data = c.fetchall()
|
||||||
c.close()
|
c.close()
|
||||||
data = reversed(sorted(data, key=operator.itemgetter(4)))
|
data = reversed(sorted(data, key=operator.itemgetter(4)))
|
||||||
return template('historyseries', __file__=__file__, bazarr_version=bazarr_version, rows=data, row_count=row_count, page=page, max_page=max_page, stats=stats, base_url=base_url)
|
return template('historyseries', __file__=__file__, bazarr_version=bazarr_version, rows=data, row_count=row_count, page=page, max_page=max_page, stats=stats, base_url=base_url, page_size=page_size)
|
||||||
|
|
||||||
@route(base_url + 'historymovies')
|
@route(base_url + 'historymovies')
|
||||||
def historymovies():
|
def historymovies():
|
||||||
|
@ -545,8 +548,9 @@ def historymovies():
|
||||||
page = request.GET.page
|
page = request.GET.page
|
||||||
if page == "":
|
if page == "":
|
||||||
page = "1"
|
page = "1"
|
||||||
offset = (int(page) - 1) * 15
|
page_size = int(get_general_settings()[21])
|
||||||
max_page = int(math.ceil(row_count / 15.0))
|
offset = (int(page) - 1) * page_size
|
||||||
|
max_page = int(math.ceil(row_count / (page_size + 0.0)))
|
||||||
|
|
||||||
now = datetime.now()
|
now = datetime.now()
|
||||||
today = []
|
today = []
|
||||||
|
@ -563,11 +567,11 @@ def historymovies():
|
||||||
thisyear.append(datetime.fromtimestamp(stat[0]).date())
|
thisyear.append(datetime.fromtimestamp(stat[0]).date())
|
||||||
stats = [len(today), len(thisweek), len(thisyear), total]
|
stats = [len(today), len(thisweek), len(thisyear), total]
|
||||||
|
|
||||||
c.execute("SELECT table_history_movie.action, table_movies.title, table_history_movie.timestamp, table_history_movie.description, table_history_movie.radarrId FROM table_history_movie LEFT JOIN table_movies on table_movies.radarrId = table_history_movie.radarrId ORDER BY id DESC LIMIT 15 OFFSET ?", (offset,))
|
c.execute("SELECT table_history_movie.action, table_movies.title, table_history_movie.timestamp, table_history_movie.description, table_history_movie.radarrId FROM table_history_movie LEFT JOIN table_movies on table_movies.radarrId = table_history_movie.radarrId ORDER BY id DESC LIMIT ? OFFSET ?", (page_size, offset,))
|
||||||
data = c.fetchall()
|
data = c.fetchall()
|
||||||
c.close()
|
c.close()
|
||||||
data = reversed(sorted(data, key=operator.itemgetter(2)))
|
data = reversed(sorted(data, key=operator.itemgetter(2)))
|
||||||
return template('historymovies', __file__=__file__, bazarr_version=bazarr_version, rows=data, row_count=row_count, page=page, max_page=max_page, stats=stats, base_url=base_url)
|
return template('historymovies', __file__=__file__, bazarr_version=bazarr_version, rows=data, row_count=row_count, page=page, max_page=max_page, stats=stats, base_url=base_url, page_size=page_size)
|
||||||
|
|
||||||
@route(base_url + 'wanted')
|
@route(base_url + 'wanted')
|
||||||
def wanted():
|
def wanted():
|
||||||
|
@ -585,13 +589,14 @@ def wantedseries():
|
||||||
page = request.GET.page
|
page = request.GET.page
|
||||||
if page == "":
|
if page == "":
|
||||||
page = "1"
|
page = "1"
|
||||||
offset = (int(page) - 1) * 15
|
page_size = int(get_general_settings()[21])
|
||||||
max_page = int(math.ceil(missing_count / 15.0))
|
offset = (int(page) - 1) * page_size
|
||||||
|
max_page = int(math.ceil(missing_count / (page_size + 0.0)))
|
||||||
|
|
||||||
c.execute("SELECT table_shows.title, table_episodes.season || 'x' || table_episodes.episode, table_episodes.title, table_episodes.missing_subtitles, table_episodes.sonarrSeriesId, path_substitution(table_episodes.path), table_shows.hearing_impaired, table_episodes.sonarrEpisodeId, table_episodes.scene_name FROM table_episodes INNER JOIN table_shows on table_shows.sonarrSeriesId = table_episodes.sonarrSeriesId WHERE table_episodes.missing_subtitles != '[]' ORDER BY table_episodes._rowid_ DESC LIMIT 15 OFFSET ?", (offset,))
|
c.execute("SELECT table_shows.title, table_episodes.season || 'x' || table_episodes.episode, table_episodes.title, table_episodes.missing_subtitles, table_episodes.sonarrSeriesId, path_substitution(table_episodes.path), table_shows.hearing_impaired, table_episodes.sonarrEpisodeId, table_episodes.scene_name FROM table_episodes INNER JOIN table_shows on table_shows.sonarrSeriesId = table_episodes.sonarrSeriesId WHERE table_episodes.missing_subtitles != '[]' ORDER BY table_episodes._rowid_ DESC LIMIT ? OFFSET ?", (page_size, offset,))
|
||||||
data = c.fetchall()
|
data = c.fetchall()
|
||||||
c.close()
|
c.close()
|
||||||
return template('wantedseries', __file__=__file__, bazarr_version=bazarr_version, rows=data, missing_count=missing_count, page=page, max_page=max_page, base_url=base_url)
|
return template('wantedseries', __file__=__file__, bazarr_version=bazarr_version, rows=data, missing_count=missing_count, page=page, max_page=max_page, base_url=base_url, page_size=page_size)
|
||||||
|
|
||||||
@route(base_url + 'wantedmovies')
|
@route(base_url + 'wantedmovies')
|
||||||
def wantedmovies():
|
def wantedmovies():
|
||||||
|
@ -605,13 +610,14 @@ def wantedmovies():
|
||||||
page = request.GET.page
|
page = request.GET.page
|
||||||
if page == "":
|
if page == "":
|
||||||
page = "1"
|
page = "1"
|
||||||
offset = (int(page) - 1) * 15
|
page_size = int(get_general_settings()[21])
|
||||||
max_page = int(math.ceil(missing_count / 15.0))
|
offset = (int(page) - 1) * page_size
|
||||||
|
max_page = int(math.ceil(missing_count / (page_size + 0.0)))
|
||||||
|
|
||||||
c.execute("SELECT title, missing_subtitles, radarrId, path_substitution(path), hearing_impaired, sceneName FROM table_movies WHERE missing_subtitles != '[]' ORDER BY _rowid_ DESC LIMIT 15 OFFSET ?", (offset,))
|
c.execute("SELECT title, missing_subtitles, radarrId, path_substitution(path), hearing_impaired, sceneName FROM table_movies WHERE missing_subtitles != '[]' ORDER BY _rowid_ DESC LIMIT ? OFFSET ?", (page_size, offset,))
|
||||||
data = c.fetchall()
|
data = c.fetchall()
|
||||||
c.close()
|
c.close()
|
||||||
return template('wantedmovies', __file__=__file__, bazarr_version=bazarr_version, rows=data, missing_count=missing_count, page=page, max_page=max_page, base_url=base_url)
|
return template('wantedmovies', __file__=__file__, bazarr_version=bazarr_version, rows=data, missing_count=missing_count, page=page, max_page=max_page, base_url=base_url, page_size=page_size)
|
||||||
|
|
||||||
@route(base_url + 'wanted_search_missing_subtitles')
|
@route(base_url + 'wanted_search_missing_subtitles')
|
||||||
def wanted_search_missing_subtitles_list():
|
def wanted_search_missing_subtitles_list():
|
||||||
|
@ -692,10 +698,11 @@ def save_settings():
|
||||||
settings_general_use_radarr = 'False'
|
settings_general_use_radarr = 'False'
|
||||||
else:
|
else:
|
||||||
settings_general_use_radarr = 'True'
|
settings_general_use_radarr = 'True'
|
||||||
|
settings_page_size = request.forms.get('settings_page_size')
|
||||||
|
|
||||||
before = c.execute("SELECT ip, port, base_url, log_level, path_mapping, use_sonarr, use_radarr, path_mapping_movie FROM table_settings_general").fetchone()
|
before = c.execute("SELECT ip, port, base_url, log_level, path_mapping, use_sonarr, use_radarr, path_mapping_movie FROM table_settings_general").fetchone()
|
||||||
after = (unicode(settings_general_ip), int(settings_general_port), unicode(settings_general_baseurl), unicode(settings_general_loglevel), unicode(settings_general_pathmapping), unicode(settings_general_use_sonarr), unicode(settings_general_use_radarr), unicode(settings_general_pathmapping_movie))
|
after = (unicode(settings_general_ip), int(settings_general_port), unicode(settings_general_baseurl), unicode(settings_general_loglevel), unicode(settings_general_pathmapping), unicode(settings_general_use_sonarr), unicode(settings_general_use_radarr), unicode(settings_general_pathmapping_movie))
|
||||||
c.execute("UPDATE table_settings_general SET ip = ?, port = ?, base_url = ?, path_mapping = ?, log_level = ?, branch=?, auto_update=?, single_language=?, minimum_score=?, use_scenename=?, use_postprocessing=?, postprocessing_cmd=?, use_sonarr=?, use_radarr=?, path_mapping_movie=?", (unicode(settings_general_ip), int(settings_general_port), unicode(settings_general_baseurl), unicode(settings_general_pathmapping), unicode(settings_general_loglevel), unicode(settings_general_branch), unicode(settings_general_automatic), unicode(settings_general_single_language), unicode(settings_general_minimum_score), unicode(settings_general_scenename), unicode(settings_general_use_postprocessing), unicode(settings_general_postprocessing_cmd), unicode(settings_general_use_sonarr), unicode(settings_general_use_radarr), unicode(settings_general_pathmapping_movie)))
|
c.execute("UPDATE table_settings_general SET ip = ?, port = ?, base_url = ?, path_mapping = ?, log_level = ?, branch=?, auto_update=?, single_language=?, minimum_score=?, use_scenename=?, use_postprocessing=?, postprocessing_cmd=?, use_sonarr=?, use_radarr=?, path_mapping_movie=?, page_size=?", (unicode(settings_general_ip), int(settings_general_port), unicode(settings_general_baseurl), unicode(settings_general_pathmapping), unicode(settings_general_loglevel), unicode(settings_general_branch), unicode(settings_general_automatic), unicode(settings_general_single_language), unicode(settings_general_minimum_score), unicode(settings_general_scenename), unicode(settings_general_use_postprocessing), unicode(settings_general_postprocessing_cmd), unicode(settings_general_use_sonarr), unicode(settings_general_use_radarr), unicode(settings_general_pathmapping_movie), unicode(settings_page_size)))
|
||||||
conn.commit()
|
conn.commit()
|
||||||
if after != before:
|
if after != before:
|
||||||
configured()
|
configured()
|
||||||
|
@ -1047,13 +1054,14 @@ def system():
|
||||||
for i, l in enumerate(f, 1):
|
for i, l in enumerate(f, 1):
|
||||||
pass
|
pass
|
||||||
row_count = i
|
row_count = i
|
||||||
max_page = int(math.ceil(row_count / 50.0))
|
page_size = int(get_general_settings()[21])
|
||||||
|
max_page = int(math.ceil(row_count / (page_size + 0.0)))
|
||||||
|
|
||||||
return template('system', __file__=__file__, bazarr_version=bazarr_version, base_url=base_url, task_list=task_list, row_count=row_count, max_page=max_page)
|
return template('system', __file__=__file__, bazarr_version=bazarr_version, base_url=base_url, task_list=task_list, row_count=row_count, max_page=max_page, page_size=page_size)
|
||||||
|
|
||||||
@route(base_url + 'logs/<page:int>')
|
@route(base_url + 'logs/<page:int>')
|
||||||
def get_logs(page):
|
def get_logs(page):
|
||||||
page_size = 50
|
page_size = int(get_general_settings()[21])
|
||||||
begin = (page * page_size) - page_size
|
begin = (page * page_size) - page_size
|
||||||
end = (page * page_size) - 1
|
end = (page * page_size) - 1
|
||||||
logs_complete = []
|
logs_complete = []
|
||||||
|
|
|
@ -49,8 +49,9 @@ def get_general_settings():
|
||||||
movie_default_enabled = general_settings[20]
|
movie_default_enabled = general_settings[20]
|
||||||
movie_default_language = general_settings[21]
|
movie_default_language = general_settings[21]
|
||||||
movie_default_hi = general_settings[22]
|
movie_default_hi = general_settings[22]
|
||||||
|
page_size = general_settings[23]
|
||||||
|
|
||||||
return [ip, port, base_url, path_mappings, log_level, branch, automatic, single_language, minimum_score, use_scenename, use_postprocessing, postprocessing_cmd, use_sonarr, use_radarr, path_mappings_movie, serie_default_enabled, serie_default_language, serie_default_hi, movie_default_enabled,movie_default_language, movie_default_hi]
|
return [ip, port, base_url, path_mappings, log_level, branch, automatic, single_language, minimum_score, use_scenename, use_postprocessing, postprocessing_cmd, use_sonarr, use_radarr, path_mappings_movie, serie_default_enabled, serie_default_language, serie_default_hi, movie_default_enabled,movie_default_language, movie_default_hi, page_size]
|
||||||
|
|
||||||
def path_replace(path):
|
def path_replace(path):
|
||||||
for path_mapping in path_mappings:
|
for path_mapping in path_mappings:
|
||||||
|
@ -127,4 +128,5 @@ serie_default_language = result[16]
|
||||||
serie_default_hi = result[17]
|
serie_default_hi = result[17]
|
||||||
movie_default_enabled = result[18]
|
movie_default_enabled = result[18]
|
||||||
movie_default_language = result[19]
|
movie_default_language = result[19]
|
||||||
movie_default_hi = result[20]
|
movie_default_hi = result[20]
|
||||||
|
page_size = result[21]
|
|
@ -157,6 +157,13 @@ if os.path.exists(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db'))
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
try:
|
||||||
|
c.execute('alter table table_settings_general add column "page_size" "text"')
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
c.execute('UPDATE table_settings_general SET page_size="25"')
|
||||||
|
|
||||||
# Commit change to db
|
# Commit change to db
|
||||||
db.commit()
|
db.commit()
|
||||||
|
|
||||||
|
|
|
@ -89,6 +89,7 @@
|
||||||
%end
|
%end
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
%if page_size != -1:
|
||||||
<div class="ui grid">
|
<div class="ui grid">
|
||||||
<div class="three column row">
|
<div class="three column row">
|
||||||
<div class="column"></div>
|
<div class="column"></div>
|
||||||
|
@ -118,6 +119,7 @@
|
||||||
<div class="right floated right aligned column">Total records: {{row_count}}</div>
|
<div class="right floated right aligned column">Total records: {{row_count}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
%end
|
||||||
</div>
|
</div>
|
||||||
<div id='bottommenu' class="ui fluid inverted bottom fixed five item menu">
|
<div id='bottommenu' class="ui fluid inverted bottom fixed five item menu">
|
||||||
<div class="ui small statistics">
|
<div class="ui small statistics">
|
||||||
|
|
|
@ -104,6 +104,7 @@
|
||||||
%end
|
%end
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
%if page_size != -1:
|
||||||
<div class="ui grid">
|
<div class="ui grid">
|
||||||
<div class="three column row">
|
<div class="three column row">
|
||||||
<div class="column"></div>
|
<div class="column"></div>
|
||||||
|
@ -133,6 +134,7 @@
|
||||||
<div class="right floated right aligned column">Total records: {{row_count}}</div>
|
<div class="right floated right aligned column">Total records: {{row_count}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
%end
|
||||||
</div>
|
</div>
|
||||||
<div id='bottommenu' class="ui fluid inverted bottom fixed five item menu">
|
<div id='bottommenu' class="ui fluid inverted bottom fixed five item menu">
|
||||||
<div class="ui small statistics">
|
<div class="ui small statistics">
|
||||||
|
|
|
@ -104,6 +104,7 @@
|
||||||
%end
|
%end
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
%if page_size != -1:
|
||||||
<div class="ui grid">
|
<div class="ui grid">
|
||||||
<div class="three column row">
|
<div class="three column row">
|
||||||
<div class="column"></div>
|
<div class="column"></div>
|
||||||
|
@ -133,6 +134,7 @@
|
||||||
<div class="right floated right aligned column">Total records: {{missing_count}}</div>
|
<div class="right floated right aligned column">Total records: {{missing_count}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
%end
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ui small modal">
|
<div class="ui small modal">
|
||||||
|
|
|
@ -128,6 +128,7 @@
|
||||||
%end
|
%end
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
%if page_size != -1:
|
||||||
<div class="ui grid">
|
<div class="ui grid">
|
||||||
<div class="three column row">
|
<div class="three column row">
|
||||||
<div class="column"></div>
|
<div class="column"></div>
|
||||||
|
@ -157,6 +158,7 @@
|
||||||
<div class="right floated right aligned column">Total records: {{missing_count}}</div>
|
<div class="right floated right aligned column">Total records: {{missing_count}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
%end
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ui small modal">
|
<div class="ui small modal">
|
||||||
|
|
|
@ -159,6 +159,30 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="middle aligned row">
|
||||||
|
<div class="right aligned four wide column">
|
||||||
|
<label>Page size</label>
|
||||||
|
</div>
|
||||||
|
<div class="five wide column">
|
||||||
|
<select name="settings_page_size" id="settings_page_size" class="ui fluid selection dropdown">
|
||||||
|
<option value="">Page Size</option>
|
||||||
|
<option value="-1">Unlimited</option>
|
||||||
|
<option value="25">25</option>
|
||||||
|
<option value="50">50</option>
|
||||||
|
<option value="100">100</option>
|
||||||
|
<option value="250">250</option>
|
||||||
|
<option value="500">500</option>
|
||||||
|
<option value="1000">1000</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="collapsed center aligned column">
|
||||||
|
<div class="ui basic icon" data-tooltip="How many items to show in a list." data-inverted="">
|
||||||
|
<i class="help circle large icon"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -1278,6 +1302,8 @@
|
||||||
|
|
||||||
$('#settings_loglevel').dropdown('clear');
|
$('#settings_loglevel').dropdown('clear');
|
||||||
$('#settings_loglevel').dropdown('set selected','{{!settings_general[4]}}');
|
$('#settings_loglevel').dropdown('set selected','{{!settings_general[4]}}');
|
||||||
|
$('#settings_page_size').dropdown('clear');
|
||||||
|
$('#settings_page_size').dropdown('set selected','{{!settings_general[23]}}');
|
||||||
$('#settings_providers').dropdown('clear');
|
$('#settings_providers').dropdown('clear');
|
||||||
$('#settings_providers').dropdown('set selected',{{!enabled_providers}});
|
$('#settings_providers').dropdown('set selected',{{!enabled_providers}});
|
||||||
$('#settings_languages').dropdown('clear');
|
$('#settings_languages').dropdown('clear');
|
||||||
|
|
|
@ -91,7 +91,8 @@
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div id="logs"></div>
|
<div id="logs"></div>
|
||||||
|
|
||||||
<div class="ui grid">
|
%if page_size != -1:
|
||||||
|
<div class="ui grid">
|
||||||
<div class="three column row">
|
<div class="three column row">
|
||||||
<div class="column"></div>
|
<div class="column"></div>
|
||||||
<div class="center aligned column">
|
<div class="center aligned column">
|
||||||
|
@ -104,6 +105,7 @@
|
||||||
<div class="right floated right aligned column">Total records: {{row_count}}</div>
|
<div class="right floated right aligned column">Total records: {{row_count}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
%end
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui bottom attached tab segment" data-tab="about">
|
<div class="ui bottom attached tab segment" data-tab="about">
|
||||||
|
@ -131,7 +133,7 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
current_page = page;
|
current_page = page;
|
||||||
|
|
||||||
$("#page").text(current_page);
|
$("#page").text(current_page);
|
||||||
if (current_page == 1) {
|
if (current_page == 1) {
|
||||||
$(".backward, .fast.backward").addClass("disabled");
|
$(".backward, .fast.backward").addClass("disabled");
|
||||||
|
|
|
@ -83,6 +83,7 @@
|
||||||
%end
|
%end
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
%if page_size != -1:
|
||||||
<div class="ui grid">
|
<div class="ui grid">
|
||||||
<div class="three column row">
|
<div class="three column row">
|
||||||
<div class="column"></div>
|
<div class="column"></div>
|
||||||
|
@ -112,6 +113,7 @@
|
||||||
<div class="right floated right aligned column">Total records: {{missing_count}}</div>
|
<div class="right floated right aligned column">Total records: {{missing_count}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
%end
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -90,6 +90,7 @@
|
||||||
%end
|
%end
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
%if page_size != -1:
|
||||||
<div class="ui grid">
|
<div class="ui grid">
|
||||||
<div class="three column row">
|
<div class="three column row">
|
||||||
<div class="column"></div>
|
<div class="column"></div>
|
||||||
|
@ -119,6 +120,7 @@
|
||||||
<div class="right floated right aligned column">Total records: {{missing_count}}</div>
|
<div class="right floated right aligned column">Total records: {{missing_count}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
%end
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue