feat(about): show config directory (#2600)

* feat(about): show config directory

* feat(about): run yarn i18n:extract

* refactor(about): use existing appdata path method

* feat(about): suggested changes

* refactor(logs): rename variable to be more consistent

* feat: suggested changes
pull/2626/head
Danshil Kokil Mungur 3 years ago committed by GitHub
parent d92f169375
commit 0c7373c7e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3042,6 +3042,9 @@ paths:
type: string type: string
nullable: true nullable: true
example: Asia/Tokyo example: Asia/Tokyo
appDataPath:
type: string
example: /app/config
/auth/me: /auth/me:
get: get:
summary: Get logged-in user summary: Get logged-in user

@ -17,6 +17,7 @@ export interface SettingsAboutResponse {
totalRequests: number; totalRequests: number;
totalMediaItems: number; totalMediaItems: number;
tz?: string; tz?: string;
appDataPath: string;
} }
export interface PublicSettingsResponse { export interface PublicSettingsResponse {

@ -26,6 +26,7 @@ import { plexFullScanner } from '../../lib/scanners/plex';
import { getSettings, MainSettings } from '../../lib/settings'; import { getSettings, MainSettings } from '../../lib/settings';
import logger from '../../logger'; import logger from '../../logger';
import { isAuthenticated } from '../../middleware/auth'; import { isAuthenticated } from '../../middleware/auth';
import { appDataPath } from '../../utils/appDataVolume';
import { getAppVersion } from '../../utils/appVersion'; import { getAppVersion } from '../../utils/appVersion';
import notificationRoutes from './notifications'; import notificationRoutes from './notifications';
import radarrRoutes from './radarr'; import radarrRoutes from './radarr';
@ -564,6 +565,7 @@ settingsRoutes.get('/about', async (req, res) => {
totalMediaItems, totalMediaItems,
totalRequests, totalRequests,
tz: process.env.TZ, tz: process.env.TZ,
appDataPath: appDataPath(),
} as SettingsAboutResponse); } as SettingsAboutResponse);
}); });

@ -24,6 +24,7 @@ const messages = defineMessages({
gettingsupport: 'Getting Support', gettingsupport: 'Getting Support',
githubdiscussions: 'GitHub Discussions', githubdiscussions: 'GitHub Discussions',
timezone: 'Time Zone', timezone: 'Time Zone',
appDataPath: 'Data Directory',
supportoverseerr: 'Support Overseerr', supportoverseerr: 'Support Overseerr',
helppaycoffee: 'Help Pay for Coffee', helppaycoffee: 'Help Pay for Coffee',
documentation: 'Documentation', documentation: 'Documentation',
@ -143,6 +144,9 @@ const SettingsAbout: React.FC = () => {
<List.Item title={intl.formatMessage(messages.totalrequests)}> <List.Item title={intl.formatMessage(messages.totalrequests)}>
{intl.formatNumber(data.totalRequests)} {intl.formatNumber(data.totalRequests)}
</List.Item> </List.Item>
<List.Item title={intl.formatMessage(messages.appDataPath)}>
<code>{data.appDataPath}</code>
</List.Item>
{data.tz && ( {data.tz && (
<List.Item title={intl.formatMessage(messages.timezone)}> <List.Item title={intl.formatMessage(messages.timezone)}>
<code>{data.tz}</code> <code>{data.tz}</code>

@ -31,7 +31,7 @@ import Transition from '../../Transition';
const messages = defineMessages({ const messages = defineMessages({
logs: 'Logs', logs: 'Logs',
logsDescription: logsDescription:
'You can also view these logs directly via <code>stdout</code>, or in <code>{configDir}/logs/overseerr.log</code>.', 'You can also view these logs directly via <code>stdout</code>, or in <code>{appDataPath}/logs/overseerr.log</code>.',
time: 'Timestamp', time: 'Timestamp',
level: 'Severity', level: 'Severity',
label: 'Label', label: 'Label',
@ -235,7 +235,7 @@ const SettingsLogs: React.FC = () => {
code: function code(msg) { code: function code(msg) {
return <code className="bg-opacity-50">{msg}</code>; return <code className="bg-opacity-50">{msg}</code>;
}, },
configDir: appData ? appData.appDataPath : '/app/config', appDataPath: appData ? appData.appDataPath : '/app/config',
})} })}
</p> </p>
<div className="mt-2 flex flex-grow flex-row sm:flex-grow-0 sm:justify-end"> <div className="mt-2 flex flex-grow flex-row sm:flex-grow-0 sm:justify-end">

@ -564,6 +564,7 @@
"components.Settings.SettingsAbout.Releases.viewchangelog": "View Changelog", "components.Settings.SettingsAbout.Releases.viewchangelog": "View Changelog",
"components.Settings.SettingsAbout.Releases.viewongithub": "View on GitHub", "components.Settings.SettingsAbout.Releases.viewongithub": "View on GitHub",
"components.Settings.SettingsAbout.about": "About", "components.Settings.SettingsAbout.about": "About",
"components.Settings.SettingsAbout.appDataPath": "Data Directory",
"components.Settings.SettingsAbout.betawarning": "This is BETA software. Features may be broken and/or unstable. Please report any issues on GitHub!", "components.Settings.SettingsAbout.betawarning": "This is BETA software. Features may be broken and/or unstable. Please report any issues on GitHub!",
"components.Settings.SettingsAbout.documentation": "Documentation", "components.Settings.SettingsAbout.documentation": "Documentation",
"components.Settings.SettingsAbout.gettingsupport": "Getting Support", "components.Settings.SettingsAbout.gettingsupport": "Getting Support",
@ -625,7 +626,7 @@
"components.Settings.SettingsLogs.level": "Severity", "components.Settings.SettingsLogs.level": "Severity",
"components.Settings.SettingsLogs.logDetails": "Log Details", "components.Settings.SettingsLogs.logDetails": "Log Details",
"components.Settings.SettingsLogs.logs": "Logs", "components.Settings.SettingsLogs.logs": "Logs",
"components.Settings.SettingsLogs.logsDescription": "You can also view these logs directly via <code>stdout</code>, or in <code>{configDir}/logs/overseerr.log</code>.", "components.Settings.SettingsLogs.logsDescription": "You can also view these logs directly via <code>stdout</code>, or in <code>{appDataPath}/logs/overseerr.log</code>.",
"components.Settings.SettingsLogs.message": "Message", "components.Settings.SettingsLogs.message": "Message",
"components.Settings.SettingsLogs.pauseLogs": "Pause", "components.Settings.SettingsLogs.pauseLogs": "Pause",
"components.Settings.SettingsLogs.resumeLogs": "Resume", "components.Settings.SettingsLogs.resumeLogs": "Resume",

Loading…
Cancel
Save