main.mako 24.3 KB
Newer Older
echel0n's avatar
echel0n committed
1
2
3
<%!
    import datetime
    import re
echel0n's avatar
echel0n committed
4
    from hashlib import md5
echel0n's avatar
echel0n committed
5
6
7
8
    from time import time

    import sickrage
    from sickrage.core.updaters import tz_updater
9
    from sickrage.core.helpers import pretty_filesize, memory_usage
echel0n's avatar
echel0n committed
10
%>
11
12
13

<%namespace file="../includes/modals.mako" import="mainModals"/>

echel0n's avatar
echel0n committed
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html>
<head>
    <title>${_('SiCKRAGE')} - ${title}</title>

    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->

    <meta charset="utf-8">
    <meta name="robots" content="noindex, nofollow">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=0.5, user-scalable=no">

29
    % if sickrage.app.config.theme_name == "dark":
echel0n's avatar
echel0n committed
30
        <meta name="theme-color" content="#15528F">
31
    % elif sickrage.app.config.theme_name == "light":
echel0n's avatar
echel0n committed
32
33
34
35
36
37
38
39
40
41
        <meta name="theme-color" content="#333333">
    % endif

    <meta name="msapplication-TileColor" content="#ffffff">
    <meta name="msapplication-TileImage" content="${srWebRoot}/images/ico/ms-icon-144x144.png">
    <meta name="msapplication-config" content="${srWebRoot}/images/ico/browserconfig.xml">

    <meta data-var="srPID" data-content="${srPID}">
    <meta data-var="srDefaultPage" data-content="${srDefaultPage}">
    <meta data-var="srWebRoot" data-content="${srWebRoot}">
42
43
    <meta data-var="themeSpinner" data-content="${('', '-dark')[sickrage.app.config.theme_name == 'dark']}">
    <meta data-var="anonURL" data-content="${sickrage.app.config.anon_redirect}">
44
45
    <meta data-var="srLocale" data-content="${srLocale}">
    <meta data-var="srLocaleDir" data-content="${srLocaleDir}">
46
47
48
49
50
51
52
53
54
55
56
57
58
59
    <meta data-var="sickrage.ANIME_SPLIT_HOME" data-content="${sickrage.app.config.anime_split_home}">
    <meta data-var="sickrage.COMING_EPS_LAYOUT" data-content="${sickrage.app.config.coming_eps_layout}">
    <meta data-var="sickrage.COMING_EPS_SORT" data-content="${sickrage.app.config.coming_eps_sort}">
    <meta data-var="sickrage.DATE_PRESET" data-content="${sickrage.app.config.date_preset}">
    <meta data-var="sickrage.FILTER_ROW" data-content="${sickrage.app.config.filter_row}">
    <meta data-var="sickrage.FUZZY_DATING" data-content="${sickrage.app.config.fuzzy_dating}">
    <meta data-var="sickrage.HISTORY_LAYOUT" data-content="${sickrage.app.config.history_layout}">
    <meta data-var="sickrage.HOME_LAYOUT" data-content="${sickrage.app.config.home_layout}">
    <meta data-var="sickrage.POSTER_SORTBY" data-content="${sickrage.app.config.poster_sortby}">
    <meta data-var="sickrage.POSTER_SORTDIR" data-content="${sickrage.app.config.poster_sortdir}">
    <meta data-var="sickrage.ROOT_DIRS" data-content="${sickrage.app.config.root_dirs}">
    <meta data-var="sickrage.SORT_ARTICLE" data-content="${sickrage.app.config.sort_article}">
    <meta data-var="sickrage.TIME_PRESET" data-content="${sickrage.app.config.time_preset}">
    <meta data-var="sickrage.TRIM_ZERO" data-content="${sickrage.app.config.trim_zero}">
60
    <meta data-var="sickrage.VIEW_CHANGELOG" data-content="${sickrage.app.config.view_changelog}">
61
    <meta data-var="sickrage.FANART_BACKGROUND" data-content="${sickrage.app.config.fanart_background}">
echel0n's avatar
echel0n committed
62
    <meta data-var="sickrage.FANART_BACKGROUND_OPACITY"
63
          data-content="${sickrage.app.config.fanart_background_opacity}">
echel0n's avatar
echel0n committed
64
65
    <%block name="metas" />

echel0n's avatar
echel0n committed
66
    <link rel="icon" type="image/png" sizes="32x32" href="${srWebRoot}/images/favicon.png">
echel0n's avatar
echel0n committed
67

68
69
    <link rel="stylesheet" type="text/css" href="${srWebRoot}/css/core.min.css"/>
    <%block name="css" />
echel0n's avatar
echel0n committed
70
71
</head>
<body data-controller="${controller}" data-action="${action}">
72
73
74
    ${mainModals()}
    <%block name="modals" />

echel0n's avatar
echel0n committed
75
    % if current_user:
echel0n's avatar
echel0n committed
76
77
78
79
80
        <%
            numCombined = numErrors + numWarnings
            if numCombined:
                toolsBadgeClass = ''
                if numErrors:
echel0n's avatar
echel0n committed
81
                    toolsBadgeClass = 'badge-danger'
echel0n's avatar
echel0n committed
82
                elif numWarnings:
echel0n's avatar
echel0n committed
83
                    toolsBadgeClass = 'badge-warning'
echel0n's avatar
echel0n committed
84

echel0n's avatar
echel0n committed
85
                toolsBadge = '<span class="badge badge-pill ' + toolsBadgeClass + '" style="float:right;margin-bottom:-10px;">' + str(numCombined) + '</span>'
echel0n's avatar
echel0n committed
86
87
88
89
            else:
                toolsBadge = ''
        %>

echel0n's avatar
echel0n committed
90
91
92
93
94
95
96
97
98
        % if current_user and sickrage.app.newest_version_string:
            <div class="alert alert-success alert-dismissible fade show text-center m-0 rounded-0">
                <strong>${sickrage.app.newest_version_string}</strong>
                <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
        % endif

99
        <nav class="navbar navbar-expand-lg navbar-dark navbar-default py-0">
echel0n's avatar
echel0n committed
100
            <div class="container-fluid">
echel0n's avatar
echel0n committed
101
                <a class="navbar-brand" href="${srWebRoot}/home/">
echel0n's avatar
echel0n committed
102
                    <img alt="SiCKRAGE" src="${srWebRoot}/images/logo.png" style="width: 400px;height: 50px;"/>
echel0n's avatar
echel0n committed
103
104
105
106
107
108
109
                </a>
                <button class="navbar-toggler" type="button" data-toggle="collapse"
                        data-target="#navbarSupportedContent"
                        aria-controls="navbarSupportedContent" aria-expanded="false"
                        aria-label="{{ __('Toggle navigation') }}">
                    <span class="navbar-toggler-icon"></span>
                </button>
echel0n's avatar
echel0n committed
110
                <div align="center" class="collapse navbar-collapse" id="navbarSupportedContent">
echel0n's avatar
echel0n committed
111
112
                    <!-- Left Side Of Navbar -->
                    <ul class="navbar-nav mr-auto">
echel0n's avatar
echel0n committed
113
114
115
                        <li>
                            <div class="input-group input-group-lg">
                                <div class="input-group-prepend">
116
                                    <div class="input-group-text bg-dark text-white-50" style="border: none">
echel0n's avatar
echel0n committed
117
118
119
                                        <i class="fas fa-search"></i>
                                    </div>
                                </div>
120
                                <input id="quicksearch" class="form-control bg-dark text-white-50"
echel0n's avatar
echel0n committed
121
                                       style="width:350px;border: none;" type="search">
122
                                <div class="input-group-append">
123
                                    <div class="input-group-text bg-dark text-white-50" style="border: none">
124
                                        <i id="quicksearch-icon"></i>
125
126
                                    </div>
                                </div>
echel0n's avatar
echel0n committed
127
128
                            </div>
                        </li>
echel0n's avatar
echel0n committed
129
130
131
132
133
                    </ul>

                    <!-- Right Side Of Navbar -->
                    <ul class="navbar-nav align-items-center ml-auto">
                        <li class="nav-item dropdown${('', ' active')[topmenu == 'home']}">
echel0n's avatar
echel0n committed
134
                            <a id="navbarHome" class="nav-link dropdown-toggle" href="#" role="button"
echel0n's avatar
echel0n committed
135
                               aria-haspopup="true" data-toggle="dropdown" aria-expanded="false">
echel0n's avatar
echel0n committed
136
137
138
                                <span>
                                    ${_('Shows')}
                                </span>
echel0n's avatar
echel0n committed
139
                            </a>
echel0n's avatar
echel0n committed
140
141
                            <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarHome">
                                <a class="dropdown-item" href="${srWebRoot}/home/">
echel0n's avatar
echel0n committed
142
                                    <i class="fas fa-home"></i>&nbsp;${_('Show List')}
echel0n's avatar
echel0n committed
143
144
                                </a>
                                <a class="dropdown-item" href="${srWebRoot}/home/addShows/">
echel0n's avatar
echel0n committed
145
                                    <i class="fas fa-tv"></i>&nbsp;${_('Add Shows')}
echel0n's avatar
echel0n committed
146
147
                                </a>
                                <a class="dropdown-item" href="${srWebRoot}/home/postprocess/">
echel0n's avatar
echel0n committed
148
                                    <i class="fas fa-folder-open"></i>&nbsp;${_('Manual Post-Processing')}
echel0n's avatar
echel0n committed
149
                                </a>
150
                                % if sickrage.app.config.shows_recent:
echel0n's avatar
echel0n committed
151
                                    <div class="dropdown-divider"></div>
152
                                % for recentShow in sickrage.app.config.shows_recent:
echel0n's avatar
echel0n committed
153
154
                                    <a class="dropdown-item"
                                       href="${srWebRoot}/home/displayShow/?show=${recentShow['indexerid']}">
echel0n's avatar
echel0n committed
155
                                        <i class="fas fa-tv"></i>&nbsp;${recentShow['name']|trim,h}
echel0n's avatar
echel0n committed
156
                                    </a>
echel0n's avatar
echel0n committed
157
158
                                % endfor
                                % endif
echel0n's avatar
echel0n committed
159
                            </div>
echel0n's avatar
echel0n committed
160
161
                        </li>

echel0n's avatar
echel0n committed
162
163
164
165
166
167
                        <li class="nav-item dropdown${('', ' active')[topmenu == 'manage']}">
                            <a id="navbarManage" class="nav-link dropdown-toggle" href="#" role="button"
                               aria-haspopup="true" data-toggle="dropdown" aria-expanded="false">
                            <span>
                                ${_('Manage')}
                            </span>
echel0n's avatar
echel0n committed
168
                            </a>
echel0n's avatar
echel0n committed
169
170
                            <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarSystem">
                                <a class="dropdown-item" href="${srWebRoot}/manage/">
echel0n's avatar
echel0n committed
171
                                    <i class="fas fa-diagnoses"></i>&nbsp;${_('Mass Update')}
echel0n's avatar
echel0n committed
172
173
                                </a>
                                <a class="dropdown-item" href="${srWebRoot}/manage/backlogOverview/">
echel0n's avatar
echel0n committed
174
                                    <i class="fas fa-backward"></i>&nbsp;${_('Backlog Overview')}
echel0n's avatar
echel0n committed
175
176
                                </a>
                                <a class="dropdown-item" href="${srWebRoot}/manage/manageQueues/">
echel0n's avatar
echel0n committed
177
                                    <i class="fas fa-list"></i>&nbsp;${_('Manage Queues')}
echel0n's avatar
echel0n committed
178
179
                                </a>
                                <a class="dropdown-item" href="${srWebRoot}/manage/episodeStatuses/">
echel0n's avatar
echel0n committed
180
                                    <i class="fas fa-th-list"></i>&nbsp;${_('Episode Status Management')}
echel0n's avatar
echel0n committed
181
                                </a>
182
                                % if sickrage.app.config.use_trakt and sickrage.app.config.trakt_oauth_token != "":
echel0n's avatar
echel0n committed
183
                                    <a class="dropdown-item" href="${srWebRoot}/home/syncTrakt/">
echel0n's avatar
echel0n committed
184
                                        <i class="fas fa-sync"></i>&nbsp;${_('Sync Trakt')}
echel0n's avatar
echel0n committed
185
                                    </a>
echel0n's avatar
echel0n committed
186
                                % endif
187
                                % if sickrage.app.config.use_plex and sickrage.app.config.plex_server_host != "":
echel0n's avatar
echel0n committed
188
                                    <a class="dropdown-item" href="${srWebRoot}/home/updatePLEX/">
echel0n's avatar
echel0n committed
189
                                        <i class="fas fa-sync"></i>&nbsp;${_('Update PLEX')}
echel0n's avatar
echel0n committed
190
                                    </a>
echel0n's avatar
echel0n committed
191
                                % endif
192
                                % if sickrage.app.config.use_kodi and sickrage.app.config.kodi_host != "":
echel0n's avatar
echel0n committed
193
                                    <a class="dropdown-item" href="${srWebRoot}/home/updateKODI/">
echel0n's avatar
echel0n committed
194
                                        <i class="fas fa-sync"></i>&nbsp;${_('Update KODI')}
echel0n's avatar
echel0n committed
195
                                    </a>
echel0n's avatar
echel0n committed
196
                                % endif
197
                                % if sickrage.app.config.use_emby and sickrage.app.config.emby_host != "" and sickrage.app.config.emby_apikey != "":
echel0n's avatar
echel0n committed
198
                                    <a class="dropdown-item" href="${srWebRoot}/home/updateEMBY/">
echel0n's avatar
echel0n committed
199
                                        <i class="fas fa-sync"></i>&nbsp;${_('Update Emby')}
echel0n's avatar
echel0n committed
200
                                    </a>
echel0n's avatar
echel0n committed
201
202
                                % endif
                                % if torrent_webui_url:
echel0n's avatar
echel0n committed
203
                                    <a class="dropdown-item" href="${torrent_webui_url}" target="_blank">
echel0n's avatar
echel0n committed
204
                                        <i class="fas fa-video"></i>&nbsp;${_('Manage Torrents')}
205
                                    </a>
echel0n's avatar
echel0n committed
206
207
                                % endif
                                <a class="dropdown-item" href="${srWebRoot}/manage/failedDownloads/">
echel0n's avatar
echel0n committed
208
                                    <i class="fas fa-first-aid"></i>&nbsp;${_('Failed Downloads')}
echel0n's avatar
echel0n committed
209
                                </a>
210
                                % if sickrage.app.config.use_subtitles:
echel0n's avatar
echel0n committed
211
                                    <a class="dropdown-item" href="${srWebRoot}/manage/subtitleMissed/">
echel0n's avatar
echel0n committed
212
                                        <i class="fas fa-question"></i>&nbsp;${_('Missed Subtitle Management')}
echel0n's avatar
echel0n committed
213
                                    </a>
echel0n's avatar
echel0n committed
214
                                % endif
echel0n's avatar
echel0n committed
215
                            </div>
echel0n's avatar
echel0n committed
216
217
                        </li>

echel0n's avatar
echel0n committed
218
219
                        <li id="navbarSchedule" class="nav-item ${('', ' active')[topmenu == 'schedule']}">
                            <a class="nav-link" href="${srWebRoot}/schedule/">${_('Schedule')}</a>
echel0n's avatar
echel0n committed
220
221
                        </li>

echel0n's avatar
echel0n committed
222
223
                        <li id="navbarHistory" class="nav-item ${('', ' active')[topmenu == 'history']}">
                            <a class="nav-link" href="${srWebRoot}/history/">${_('History')}</a>
echel0n's avatar
echel0n committed
224
225
                        </li>

echel0n's avatar
echel0n committed
226
227
228
                        <li class="nav-item dropdown${('', ' active')[topmenu == 'config']}">
                            <a id="navbarConfig" class="nav-link" href="${srWebRoot}/config/" role="button"
                               aria-haspopup="true" data-toggle="dropdown" aria-expanded="false">
echel0n's avatar
echel0n committed
229
                                <span class="d-none d-sm-block dropdown-toggle d-md-none">
echel0n's avatar
echel0n committed
230
231
232
                                    ${_('Config')}
                                </span>
                                <span class="d-sm-none d-md-block">
echel0n's avatar
echel0n committed
233
                                    <i class="fas fa-2x fa-cogs"></i>
echel0n's avatar
echel0n committed
234
                                </span>
echel0n's avatar
echel0n committed
235
236
                            </a>

echel0n's avatar
echel0n committed
237
238
                            <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarConfig">
                                <a class="dropdown-item" href="${srWebRoot}/config/">
239
                                    <i class="fas fa-info"></i>&nbsp;${_('Help and Info')}
echel0n's avatar
echel0n committed
240
241
                                </a>
                                <a class="dropdown-item" href="${srWebRoot}/config/general/">
echel0n's avatar
echel0n committed
242
                                    <i class="fas fa-wrench"></i>&nbsp;${_('General')}
echel0n's avatar
echel0n committed
243
244
                                </a>
                                <a class="dropdown-item" href="${srWebRoot}/config/backuprestore/">
245
                                    <i class="fas fa-upload"></i>&nbsp;${_('Backup and Restore')}
echel0n's avatar
echel0n committed
246
247
                                </a>
                                <a class="dropdown-item" href="${srWebRoot}/config/search/">
248
                                    <i class="fas fa-binoculars"></i>&nbsp;${_('Search Clients')}
echel0n's avatar
echel0n committed
249
250
                                </a>
                                <a class="dropdown-item" href="${srWebRoot}/config/providers/">
251
                                    <i class="fas fa-share-alt"></i>&nbsp;${_('Search Providers')}
echel0n's avatar
echel0n committed
252
253
                                </a>
                                <a class="dropdown-item" href="${srWebRoot}/config/subtitles/">
echel0n's avatar
echel0n committed
254
                                    <i class="fas fa-closed-captioning"></i>&nbsp;${_('Subtitles Settings')}
echel0n's avatar
echel0n committed
255
256
                                </a>
                                <a class="dropdown-item" href="${srWebRoot}/config/qualitySettings/">
257
                                    <i class="fas fa-wrench"></i>&nbsp;${_('Quality Settings')}
echel0n's avatar
echel0n committed
258
259
                                </a>
                                <a class="dropdown-item" href="${srWebRoot}/config/postProcessing/">
echel0n's avatar
echel0n committed
260
                                    <i class="fas fa-folder-open"></i>&nbsp;${_('Post Processing')}
echel0n's avatar
echel0n committed
261
262
                                </a>
                                <a class="dropdown-item" href="${srWebRoot}/config/notifications/">
263
                                    <i class="fas fa-bell"></i>&nbsp;${_('Notifications')}
echel0n's avatar
echel0n committed
264
265
                                </a>
                                <a class="dropdown-item" href="${srWebRoot}/config/anime/">
266
                                    <i class="fas fa-eye"></i>&nbsp;${_('Anime')}
echel0n's avatar
echel0n committed
267
268
269
                                </a>
                            </div>
                        </li>
echel0n's avatar
echel0n committed
270

echel0n's avatar
echel0n committed
271
                        <li class="nav-item dropdown${('', ' active')[topmenu == 'system']}">
echel0n's avatar
echel0n committed
272
                            <a id="navbarSystem" class="nav-link" href="#" role="button"
echel0n's avatar
echel0n committed
273
                               aria-haspopup="true" data-toggle="dropdown" aria-expanded="false">
echel0n's avatar
echel0n committed
274
                                <span class="d-none d-sm-block dropdown-toggle d-md-none">
echel0n's avatar
echel0n committed
275
276
277
                                    ${_('Tools')}
                                </span>
                                <span class="d-sm-none d-md-block">
278
279
                                    <img class="rounded-circle shadow"
                                         src="https://gravatar.com/avatar/${md5(current_user['email']).hexdigest()}?d=mm&s=40"/>
echel0n's avatar
echel0n committed
280
                                    ${toolsBadge}
echel0n's avatar
echel0n committed
281
                                </span>
echel0n's avatar
echel0n committed
282
                            </a>
echel0n's avatar
echel0n committed
283
284
285

                            <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarSystem">
                                <a class="dropdown-item" href="${srWebRoot}/IRC/">
286
                                    <i class="fas fa-hashtag"></i>&nbsp;${_('IRC')}
echel0n's avatar
echel0n committed
287
288
                                </a>
                                <a class="dropdown-item" href="#" id="changelog">
289
                                    <i class="fas fa-globe"></i>&nbsp;${_('Changelog')}
echel0n's avatar
echel0n committed
290
291
292
                                </a>
                                <a class="dropdown-item" href="https://www.sickrage.ca/forums/donate" rel="noreferrer"
                                   onclick="window.open('${sickrage.app.config.anon_redirect}' + this.href); return false;">
echel0n's avatar
echel0n committed
293
                                    <i class="fas fa-donate"></i>&nbsp;${_('Donate')}
echel0n's avatar
echel0n committed
294
295
                                </a>
                                <div class="dropdown-divider"></div>
echel0n's avatar
echel0n committed
296
                                %if numErrors:
echel0n's avatar
echel0n committed
297
                                    <a class="dropdown-item" href="${srWebRoot}/logs/">
298
                                        <i class="fas fa-exclamation-circle"></i>&nbsp;${_('View Errors')}
echel0n's avatar
echel0n committed
299
                                        <span class="badge badge-danger">${numErrors}</span>
echel0n's avatar
echel0n committed
300
                                    </a>
echel0n's avatar
echel0n committed
301
302
                                %endif
                                %if numWarnings:
echel0n's avatar
echel0n committed
303
304
                                    <a class="dropdown-item"
                                       href="${srWebRoot}/logs/?level=${sickrage.app.log.WARNING}">
305
                                        <i class="fas fa-exclamation-triangle"></i>&nbsp;${_('View Warnings')}
echel0n's avatar
echel0n committed
306
                                        <span class="badge badge-warning">${numWarnings}</span>
echel0n's avatar
echel0n committed
307
                                    </a>
echel0n's avatar
echel0n committed
308
309
                                %endif
                                <a class="dropdown-item" href="${srWebRoot}/logs/viewlog/">
echel0n's avatar
echel0n committed
310
                                    <i class="fas fa-file-archive"></i>&nbsp;${_('View Log')}
echel0n's avatar
echel0n committed
311
312
313
                                </a>
                                <div class="dropdown-divider"></div>
                                <a class="dropdown-item" href="${srWebRoot}/home/updateCheck?pid=${srPID}">
314
                                    <i class="fas fa-check-square"></i>&nbsp;${_('Check For Updates')}
echel0n's avatar
echel0n committed
315
316
317
                                </a>
                                <a class="dropdown-item" href="${srWebRoot}/home/restart/?pid=${srPID}"
                                   class="confirm restart">
318
                                    <i class="fas fa-redo"></i>&nbsp;${_('Restart')}
echel0n's avatar
echel0n committed
319
320
321
                                </a>
                                <a class="dropdown-item" href="${srWebRoot}/home/shutdown/?pid=${srPID}"
                                   class="confirm shutdown">
322
                                    <i class="fas fa-power-off"></i>&nbsp;${_('Shutdown')}
echel0n's avatar
echel0n committed
323
324
                                </a>
                                <a class="dropdown-item" href="${srWebRoot}/unlink" class="confirm logout">
325
                                    <i class="fas fa-unlink"></i>&nbsp;${_('Unlink Account')}
echel0n's avatar
echel0n committed
326
327
                                </a>
                                <a class="dropdown-item" href="${srWebRoot}/logout" class="confirm logout">
328
                                    <i class="fas fa-sign-out-alt"></i>&nbsp;${_('Logout')}
echel0n's avatar
echel0n committed
329
330
331
                                </a>
                                <div class="dropdown-divider"></div>
                                <a class="dropdown-item" href="${srWebRoot}/home/status/">
332
                                    <i class="fas fa-server"></i>&nbsp;${_('Server Status')}
echel0n's avatar
echel0n committed
333
334
                                </a>
                            </div>
echel0n's avatar
echel0n committed
335
336
337
338
339
340
341
                        </li>
                    </ul>
                </div>
            </div>
        </nav>
    % endif

echel0n's avatar
echel0n committed
342
<div class="container-fluid mb-3">
343
    % if submenu:
echel0n's avatar
echel0n committed
344
        <div class="row submenu">
echel0n's avatar
echel0n committed
345
346
347
            <div class="col">
                <div class="text-center d-print-none">
                    % for menuItem in submenu:
echel0n's avatar
echel0n committed
348
349
350
351
                        <a href="${srWebRoot}${menuItem['path']}"
                           class="btn ${('', ' confirm ')['confirm' in menuItem]} ${menuItem.get('class', '')}">
                            <i class='${menuItem.get('icon', '')}'></i> ${menuItem['title']}
                        </a>
echel0n's avatar
echel0n committed
352
                    % endfor
353
                </div>
echel0n's avatar
echel0n committed
354
            </div>
355
        </div>
echel0n's avatar
echel0n committed
356
357
    % else:
        <%block name="sub_navbar" />
358
    % endif
echel0n's avatar
echel0n committed
359
</div>
echel0n's avatar
echel0n committed
360

echel0n's avatar
echel0n committed
361
<div class="container-fluid" style="opacity: .90">
echel0n's avatar
echel0n committed
362
        <%block name="content" />
echel0n's avatar
echel0n committed
363
</div>
echel0n's avatar
echel0n committed
364

echel0n's avatar
echel0n committed
365
<div class="container-fluid">
echel0n's avatar
echel0n committed
366
    % if current_user:
echel0n's avatar
echel0n committed
367
368
369
370
371
372
373
374
375
376
        <footer class="text-center">
            <div>
                % if overall_stats:
                <%
                    total_size = pretty_filesize(overall_stats['total_size'])
                    ep_downloaded = overall_stats['episodes']['downloaded']
                    ep_snatched = overall_stats['episodes']['snatched']
                    ep_total = overall_stats['episodes']['total']
                    ep_percentage = '' if ep_total == 0 else '(<span class="text-primary">%s%%</span>)' % re.sub(r'(\d+)(\.\d)\d+', r'\1\2', str((float(ep_downloaded)/float(ep_total))*100))
                %>
377
378
                    <span class="text-primary">${overall_stats['shows']['total']}</span> ${_('Shows')}
                    (<span class="text-primary">${overall_stats['shows']['active']}</span> ${_('Active')})
echel0n's avatar
echel0n committed
379
380
381
                    | <span class="text-primary">${ep_downloaded}</span>
                % if ep_snatched:
                    <span class="text-primary">
echel0n's avatar
echel0n committed
382
                        <a href="${srWebRoot}/manage/episodeStatuses?whichStatus=2">+${ep_snatched}</a>
echel0n's avatar
echel0n committed
383
384
385
                    </span>
                ${_('Snatched')}
                % endif
386
387
                    /&nbsp;<span class="text-primary">${ep_total}</span> ${_('Episodes Downloaded')} ${ep_percentage}
                    /&nbsp;<span class="text-primary">${total_size}</span> ${_('Overall Downloaded')}
echel0n's avatar
echel0n committed
388
389
                % endif
            </div>
echel0n's avatar
echel0n committed
390

echel0n's avatar
echel0n committed
391
392
393
394
395
396
397
398
399
400
401
402
403
            <div>
                ${_('Daily Search:')} <span
                    class="text-primary">${str(sickrage.app.scheduler.get_job('DAILYSEARCHER').next_run_time).split('.')[0]}</span>
                |
                ${_('Backlog Search:')} <span
                    class="text-primary">${str(sickrage.app.scheduler.get_job('BACKLOG').next_run_time).split('.')[0]}</span>
                |
                ${_('Memory used:')}
                <span class="text-primary">
                    ${memory_usage()}
                </span> |
                ${_('Load time:')}
                <span class="text-primary">
echel0n's avatar
echel0n committed
404
                        ${"{:10.4f}".format(time() - srStartTime)}s
echel0n's avatar
echel0n committed
405
406
                </span> / Mako:
                <span class="text-primary">
echel0n's avatar
echel0n committed
407
                        ${"{:10.4f}".format(time() - makoStartTime)}s
echel0n's avatar
echel0n committed
408
409
410
411
412
                </span> |
                ${_('Now:')}
                <span class="text-primary">
                    ${str(datetime.datetime.now(sickrage.app.tz)).split('.')[0]}
                </span>
echel0n's avatar
echel0n committed
413
            </div>
echel0n's avatar
echel0n committed
414
        </footer>
echel0n's avatar
echel0n committed
415
416
417
418
419
    % endif

    <script src="${srWebRoot}/js/core.min.js"></script>
    <%block name="scripts" />
</div>
echel0n's avatar
echel0n committed
420
421
422
423
424
425

<a id="back-to-top" href="#" class="btn btn-primary back-to-top" role="button"
   title="Click to return on the top page" data-toggle="tooltip" data-placement="left">
    <span class="fas fa-chevron-up"></span>
</a>

echel0n's avatar
echel0n committed
426
427
</body>
</html>