diff --git a/public/app/percona/backup/components/AddBackupPage/AddBackupPage.messages.ts b/public/app/percona/backup/components/AddBackupPage/AddBackupPage.messages.ts index d9698dcb730db..f829733e2a3ee 100644 --- a/public/app/percona/backup/components/AddBackupPage/AddBackupPage.messages.ts +++ b/public/app/percona/backup/components/AddBackupPage/AddBackupPage.messages.ts @@ -1,3 +1,7 @@ +import { Databases } from 'app/percona/shared/core'; + +import { BackupMode } from '../../Backup.types'; + export const Messages = { serviceName: 'Service name', vendor: 'DB technology', @@ -42,5 +46,17 @@ export const Messages = { scheduleBackupDescription: 'Create a task that takes regular backups of a database, according to the schedule that you specify.', folderTooltip: 'Changing the default folder, if available, is not recommended', - folderTooltipLink: 'https://www.percona.com/doc/percona-monitoring-and-management/2.x/to-be-added', + folderTooltipLink: (vendor: Databases | null, mode: BackupMode) => { + if (vendor === Databases.mysql) { + return 'https://docs.percona.com/percona-monitoring-and-management/get-started/backup/create_mysql_backup.html#folder-field'; + } + + if (vendor === Databases.mongodb) { + return mode === BackupMode.PITR + ? 'https://docs.percona.com/percona-monitoring-and-management/get-started/backup/create_PITR_mongo.html#folder-field' + : 'https://docs.percona.com/percona-monitoring-and-management/get-started/backup/create_mongo_on_demand.html#folder-field'; + } + + return; + }, }; diff --git a/public/app/percona/backup/components/AddBackupPage/AddBackupPage.tsx b/public/app/percona/backup/components/AddBackupPage/AddBackupPage.tsx index 22ebb5423da4b..9fadf1a1ba76f 100644 --- a/public/app/percona/backup/components/AddBackupPage/AddBackupPage.tsx +++ b/public/app/percona/backup/components/AddBackupPage/AddBackupPage.tsx @@ -359,7 +359,7 @@ const AddBackupPage: FC label={Messages.folder} disabled={editing} tooltipText={Messages.folderTooltip} - tooltipLink={Messages.folderTooltipLink} + tooltipLink={Messages.folderTooltipLink(values.vendor, values.mode)} /> {!!backupErrors.length && }