Skip to content

Commit

Permalink
PMM-12310 Use shortener for docs links (#680)
Browse files Browse the repository at this point in the history
* PMM-12310 Update docs links to use a shortener

* PMM-12310 Fix import & deprecated link

* PMM-12310 Fix link

* PMM-12310 Fix typo in footer documentation link
  • Loading branch information
matejkubinec authored Aug 17, 2023
1 parent 5614654 commit 1c84473
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2437,7 +2437,7 @@
{
"title": "Detailed descriptions about metrics",
"type": "absolute",
"url": "https://www.percona.com/doc/percona-monitoring-and-management/dashboard.mysql-overview.html#mysql-internal-memory-overview"
"url": "https://per.co.na/mysql_internal_memory_overview"
}
],
"nullPointMode": "null",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2437,7 +2437,7 @@
{
"title": "Detailed descriptions about metrics",
"type": "absolute",
"url": "https://www.percona.com/doc/percona-monitoring-and-management/dashboard.mysql-overview.html#mysql-internal-memory-overview"
"url": "https://per.co.na/mysql_internal_memory_overview"
}
],
"nullPointMode": "null",
Expand Down
6 changes: 3 additions & 3 deletions public/app/core/components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,22 @@ export let getFooterLinks = (): FooterLink[] => {
id: 'pmm-docs',
text: 'Documentation',
icon: 'document-info',
url: 'https://www.percona.com/doc/percona-monitoring-and-management/2.x/index.html?utm_source=pmm_footer',
url: 'https://per.co.na/pmm_documentation',
target: '_blank',
},
{
target: '_blank',
id: 'support',
text: 'Support',
icon: 'question-circle',
url: 'https://www.percona.com/services/support?utm_source=pmm_footer',
url: 'https://per.co.na/pmm_support',
},
{
target: '_blank',
id: 'community',
text: 'Community',
icon: 'comments-alt',
url: 'https://forums.percona.com/c/percona-monitoring-and-management-pmm/percona-monitoring-and-management-pmm-v2?utm_source=pmm_footer',
url: 'https://per.co.na/pmm_community',
},
];
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,7 @@ export class ShareLink extends PureComponent<Props, State> {
{/* @PERCONA */}
{/* We modified this text and link */}
To render a panel image, you must install the&nbsp;
<a
href="https://docs.percona.com/percona-monitoring-and-management/how-to/share-dashboard.html#share-as-a-png-file"
target="_blank"
rel="noopener noreferrer"
className="external-link"
>
<a href="https://per.co.na/share_png" target="_blank" rel="noopener noreferrer" className="external-link">
Image Renderer plugin
</a>
. Please contact your PMM administrator to install the plugin.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
export const SECURITY_CREDENTIALS_DOC_LINK =
'https://www.percona.com/doc/percona-monitoring-and-management/2.x/setting-up/client/aws.html#creating-an-iam-user-with-permission-to-access-amazon-rds-db-instances';
export const IAM_ROLE_DOC_LINK =
'https://www.percona.com/doc/percona-monitoring-and-management/2.x/setting-up/client/aws.html#creating-an-iam-role';
export const SECURITY_CREDENTIALS_DOC_LINK = 'https://per.co.na/iam_user_with_permission';
export const IAM_ROLE_DOC_LINK = 'https://per.co.na/iam_role';
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ export const Messages = {
folderTooltip: 'Changing the default folder, if available, is not recommended',
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';
return 'https://per.co.na/mysql_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';
? 'https://per.co.na/mongo_pitr_folder_field'
: 'https://per.co.na/mongo_folder_field';
}

return;
Expand Down
2 changes: 1 addition & 1 deletion public/app/percona/rbac/AccessRoles/AccessRoles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const AccessRolesPage: FC = () => {
className={styles.link}
target="_blank"
rel="noreferrer noopener"
href="https://docs.percona.com/percona-monitoring-and-management/get-started/roles-and-permissions/index.html"
href="https://per.co.na/roles_permissions"
>
{Messages.subtitle.link}
</a>
Expand Down
29 changes: 13 additions & 16 deletions public/app/percona/settings/Settings.messages.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
export const HOW_TO_DOC_URL = 'https://www.percona.com/doc/percona-monitoring-and-management/2.x/how-to/configure.html';

export const Messages = {
advanced: {
action: 'Apply changes',
retentionLabel: 'Data retention',
retentionTooltip: 'This is the value for how long data will be stored.',
retentionUnits: 'days',
retentionLink: `${HOW_TO_DOC_URL}#data-retention`,
retentionLink: `https://per.co.na/data_retention`,
telemetryLabel: 'Telemetry',
telemetryLink: `${HOW_TO_DOC_URL}#telemetry`,
telemetryLink: `https://per.co.na/telemetry`,
telemetryTooltip: 'Option to send usage data back to Percona to let us make our product better.',
telemetryDisclaimer:
'Disabling Telemetry while Advisors/Percona Alerting is on will prevent PMM from downloading checks and alert templates.',
telemetrySummaryTitle: 'We gather and send the following information to Percona:',
updatesLabel: 'Check for updates',
updatesLink: `${HOW_TO_DOC_URL}#check-for-updates`,
updatesLink: `https://per.co.na/updates`,
updatesTooltip: 'Option to check new versions and ability to update PMM from UI.',
advisorsLabel: 'Advisors',
sttRareIntervalLabel: 'Rare interval',
Expand All @@ -23,28 +21,27 @@ export const Messages = {
sttCheckIntervalsLabel: 'Execution Intervals',
sttCheckIntervalTooltip: 'Interval between check runs',
sttCheckIntervalUnit: 'hours',
advisorsLink: `${HOW_TO_DOC_URL}#advisors`,
advisorsLink: `https://per.co.na/advisors`,
advisorsTooltip: 'Enable Advisors and get updated checks from Percona.',
dbaasLabel: 'Database as a Service (DBaaS)',
azureDiscoverLabel: 'Microsoft Azure monitoring',
azureDiscoverTooltip: 'Option to enable/disable Microsoft Azure DB instanced discovery and monitoring',
azureDiscoverLink: `${HOW_TO_DOC_URL}#microsoft-azure-monitoring`,
azureDiscoverLink: `https://per.co.na/azure_monitoring`,
dbaasTooltip:
'Option to enable/disable DBaaS features. Disabling DBaaS does not suspend or remove running clusters.',
dbaasLink: `${HOW_TO_DOC_URL}#dbaas`,
dbaasLink: `https://per.co.na/dbaas`,
accessControl: 'Access control',
accessControlTooltip: 'Option to enable/disable Access control.',
accessControlLink:
'https://docs.percona.com/percona-monitoring-and-management/get-started/roles-and-permissions/index.html',
accessControlLink: 'https://per.co.na/roles_permissions',
publicAddressLabel: 'Public Address',
publicAddressTooltip: 'Public Address to this PMM server.',
publicAddressButton: 'Get from browser',
alertingLabel: 'Percona Alerting',
alertingTooltip: 'Option to enable/disable Percona Alerting features.',
alertingLink: `${HOW_TO_DOC_URL}#alerting`,
alertingLink: `https://per.co.na/alerting`,
backupLabel: 'Backup Management',
backupTooltip: 'Option to enable/disable Backup Management features.',
backupLink: `${HOW_TO_DOC_URL}#backup-management`,
backupLink: `https://per.co.na/backup_management`,
technicalPreviewLegend: 'Technical preview features',
technicalPreviewDescription:
'These are technical preview features, not recommended to be used in production environments. Read more\n' +
Expand All @@ -57,10 +54,10 @@ export const Messages = {
warningPost: 'but you need to manage and configure alerts.',
action: 'Apply Alertmanager settings',
rulesLabel: 'Prometheus Alerting rules',
rulesLink: `${HOW_TO_DOC_URL}#prometheus-alertmanager-integration`,
rulesLink: `https://per.co.na/alertmanager`,
rulesTooltip: 'Alerting rules in the YAML configuration format.',
urlLabel: 'Alertmanager URL',
urlLink: `${HOW_TO_DOC_URL}#prometheus-alertmanager-integration`,
urlLink: `https://per.co.na/alertmanager`,
urlTooltip: 'The URL of the external Alertmanager to use.',
},
diagnostics: {
Expand All @@ -72,7 +69,7 @@ export const Messages = {
metrics: {
action: 'Apply changes',
label: 'Metrics resolution, sec',
link: `${HOW_TO_DOC_URL}#server-admin-gui-metrics-resolution`,
link: `https://per.co.na/metrics_resolution`,
options: {
rare: 'Rare',
standard: 'Standard',
Expand All @@ -89,7 +86,7 @@ export const Messages = {
ssh: {
action: 'Apply SSH key',
label: 'SSH key',
link: `${HOW_TO_DOC_URL}#ssh-key-details`,
link: `https://per.co.na/ssh_key`,
tooltip: 'Public SSH key to let you login into the server using SSH.',
},
service: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HOW_TO_DOC_URL } from 'app/percona/settings/Settings.messages';

const COMMUNICATION_LINK = `${HOW_TO_DOC_URL}#communication`;
// page is deprecated, so shortener is not needed
const COMMUNICATION_LINK =
'https://docs.percona.com/percona-monitoring-and-management/how-to/integrate-platform.html#communication';

export const Messages = {
fields: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export const URL_DOC =
'https://docs.percona.com/percona-monitoring-and-management/how-to/integrate-platform.html#disconnect-a-pmm-instance';
export const URL_DOC = 'https://per.co.na/disconnect';
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export const PerconaBootstrapper = ({ onReady }: PerconaBootstrapperProps) => {
<p>
{Messages.moreInfo}
<a
href="https://docs.percona.com/percona-monitoring-and-management/index.html"
href="https://per.co.na/pmm_documentation"
target="_blank"
rel="noreferrer noopener"
className={styles.docsLink}
Expand Down
6 changes: 3 additions & 3 deletions public/app/percona/shared/helpers/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ export const translateApiError = (error: ApiErrorCode): ApiVerboseError | undefi
},
[ApiErrorCode.ERROR_CODE_XTRABACKUP_NOT_INSTALLED]: {
message: 'Xtrabackup is not installed.',
link: 'https://www.percona.com/doc/percona-xtrabackup/8.0/installation.html',
link: 'https://per.co.na/install_pxb',
},
[ApiErrorCode.ERROR_CODE_INCOMPATIBLE_XTRABACKUP]: {
message: 'Xtrabackup version is not compatible.',
link: 'https://www.percona.com/doc/percona-xtrabackup/8.0/installation.html',
link: 'https://per.co.na/install_pxb',
},
[ApiErrorCode.ERROR_CODE_INCOMPATIBLE_TARGET_MYSQL]: {
message: 'Target MySQL version is not compatible.',
link: 'https://www.percona.com/doc/percona-xtrabackup/8.0/installation.html',
link: 'https://per.co.na/install_pxb',
},
};

Expand Down
18 changes: 3 additions & 15 deletions public/app/percona/tour/steps/product/product.steps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,7 @@ export const getProductTourSteps = (
<p>{Messages.alerting.howToUse}</p>
<p>
{Messages.alerting.moreInfo}
<a
href="https://docs.percona.com/percona-monitoring-and-management/using/alerting.html"
target="_blank"
rel="noreferrer noopener"
>
<a href="https://per.co.na/alerting" target="_blank" rel="noreferrer noopener">
{Messages.alerting.docs}
</a>
.
Expand All @@ -81,11 +77,7 @@ export const getProductTourSteps = (
<p>{Messages.advisors.pmmIncludes}</p>
<p>
{Messages.advisors.findOutMore}
<a
href="https://docs.percona.com/percona-platform/advisors.html"
target="_blank"
rel="noreferrer noopener"
>
<a href="https://per.co.na/advisors" target="_blank" rel="noreferrer noopener">
{Messages.advisors.docs}
</a>
.
Expand Down Expand Up @@ -138,11 +130,7 @@ export const getProductTourSteps = (
<p>{Messages.configPanel.settings}</p>
<p>
{Messages.configPanel.settingsDocs}{' '}
<a
href="https://docs.percona.com/percona-monitoring-and-management/how-to/configure.html"
target="_blank"
rel="noreferrer noopener"
>
<a href="https://per.co.na/configure" target="_blank" rel="noreferrer noopener">
{Messages.configPanel.settingsDocsLink}
</a>
.
Expand Down

0 comments on commit 1c84473

Please sign in to comment.