mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-01-15 11:17:49 +08:00
Fixed uptime in System-->Status and added time zone info.
This commit is contained in:
parent
246c2f3004
commit
f2eb8f1342
3 changed files with 5 additions and 1 deletions
|
@ -5,6 +5,7 @@ import platform
|
|||
|
||||
from flask import jsonify
|
||||
from flask_restful import Resource
|
||||
from tzlocal import get_localzone_name
|
||||
|
||||
from radarr.info import get_radarr_info
|
||||
from sonarr.info import get_sonarr_info
|
||||
|
@ -34,5 +35,6 @@ class SystemStatus(Resource):
|
|||
os.path.dirname(__file__))))})
|
||||
system_status.update({'bazarr_config_directory': args.config_dir})
|
||||
system_status.update({'start_time': startTime})
|
||||
system_status.update({'timezone': get_localzone_name() or 'Undefined'})
|
||||
|
||||
return jsonify(data=system_status)
|
||||
|
|
|
@ -89,7 +89,7 @@ const SystemStatusView: FunctionComponent = () => {
|
|||
interval.start();
|
||||
return interval.stop();
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
}, [interval]);
|
||||
|
||||
useDocumentTitle("Status - Bazarr (System)");
|
||||
|
||||
|
@ -115,6 +115,7 @@ const SystemStatusView: FunctionComponent = () => {
|
|||
{status?.bazarr_config_directory}
|
||||
</Row>
|
||||
<Row title="Uptime">{uptime}</Row>
|
||||
<Row title="Time Zone">{status?.timezone}</Row>
|
||||
</InfoContainer>
|
||||
<InfoContainer title="More Info">
|
||||
<Row title="Home Page">
|
||||
|
|
1
frontend/src/types/system.d.ts
vendored
1
frontend/src/types/system.d.ts
vendored
|
@ -18,6 +18,7 @@ declare namespace System {
|
|||
radarr_version: string;
|
||||
sonarr_version: string;
|
||||
start_time: number;
|
||||
timezone: string;
|
||||
}
|
||||
|
||||
interface Backups {
|
||||
|
|
Loading…
Reference in a new issue