Skip to content

Commit

Permalink
PMM-13596 Run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
YashSartanpara1 committed Feb 12, 2025
1 parent 7bf68e9 commit d266217
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 63 deletions.
75 changes: 38 additions & 37 deletions public/app/core/components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,43 +17,44 @@ export interface FooterLink {
}

export let getFooterLinks = (): FooterLink[] => {

// @PERCONA
if (isPmmAdmin(config.bootData.user) && config.bootData.user.isGrafanaAdmin) {
return [{
id: 'pmm-dump',
text: 'PMM Dump',
icon: 'brain',
url: '/graph/pmm-dump',
},
{
id: 'pmm-logs',
text: 'PMM Logs',
icon: 'download-alt',
url: '/logs.zip',
target: '_blank',
},
{
target: '_blank',
id: 'pmm-docs',
text: t('nav.help/documentation', 'Documentation'),
icon: 'document-info',
url: 'https://per.co.na/pmm_documentation',
},
{
target: '_blank',
id: 'support',
text: t('nav.help/support', 'Support'),
icon: 'question-circle',
url: 'https://per.co.na/pmm_support',
},
{
target: '_blank',
id: 'community',
text: t('nav.help/community', 'Community'),
icon: 'comments-alt',
url: 'https://per.co.na/pmm_community',
},]
return [
{
id: 'pmm-dump',
text: 'PMM Dump',
icon: 'brain',
url: '/graph/pmm-dump',
},
{
id: 'pmm-logs',
text: 'PMM Logs',
icon: 'download-alt',
url: '/logs.zip',
target: '_blank',
},
{
target: '_blank',
id: 'pmm-docs',
text: t('nav.help/documentation', 'Documentation'),
icon: 'document-info',
url: 'https://per.co.na/pmm_documentation',
},
{
target: '_blank',
id: 'support',
text: t('nav.help/support', 'Support'),
icon: 'question-circle',
url: 'https://per.co.na/pmm_support',
},
{
target: '_blank',
id: 'community',
text: t('nav.help/community', 'Community'),
icon: 'comments-alt',
url: 'https://per.co.na/pmm_community',
},
];
} else {
return [
{
Expand All @@ -77,8 +78,8 @@ export let getFooterLinks = (): FooterLink[] => {
icon: 'comments-alt',
url: 'https://per.co.na/pmm_community',
},
]
};
];
}
};

export function getVersionMeta(version: string) {
Expand Down
54 changes: 28 additions & 26 deletions public/app/routes/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export function getAppRoutes(): RouteDescriptor[] {
? import(/* webpackChunkName: "CorrelationsPage" */ 'app/features/correlations/CorrelationsPage')
: import(
/* webpackChunkName: "CorrelationsFeatureToggle" */ 'app/features/correlations/CorrelationsFeatureToggle'
)
)
),
},
{
Expand Down Expand Up @@ -295,9 +295,9 @@ export function getAppRoutes(): RouteDescriptor[] {
component:
config.licenseInfo.enabledFeatures?.saml || config.ldapEnabled || config.featureToggles.ssoSettingsApi
? SafeDynamicImport(
() =>
import(/* webpackChunkName: "AdminAuthentication" */ '../features/auth-config/AuthProvidersListPage')
)
() =>
import(/* webpackChunkName: "AdminAuthentication" */ '../features/auth-config/AuthProvidersListPage')
)
: () => <Redirect to="/admin" />,
},
{
Expand All @@ -309,8 +309,8 @@ export function getAppRoutes(): RouteDescriptor[] {
roles: () => contextSrv.evaluatePermission([AccessControlAction.SettingsWrite]),
component: config.featureToggles.ssoSettingsApi
? SafeDynamicImport(
() => import(/* webpackChunkName: "AdminAuthentication" */ '../features/auth-config/ProviderConfigPage')
)
() => import(/* webpackChunkName: "AdminAuthentication" */ '../features/auth-config/ProviderConfigPage')
)
: () => <Redirect to="/admin" />,
},
{
Expand Down Expand Up @@ -355,8 +355,8 @@ export function getAppRoutes(): RouteDescriptor[] {
path: '/admin/featuretoggles',
component: config.featureToggles.featureToggleAdminPage
? SafeDynamicImport(
() => import(/* webpackChunkName: "AdminFeatureTogglesPage" */ 'app/features/admin/AdminFeatureTogglesPage')
)
() => import(/* webpackChunkName: "AdminFeatureTogglesPage" */ 'app/features/admin/AdminFeatureTogglesPage')
)
: () => <Redirect to="/admin" />,
},
{
Expand Down Expand Up @@ -398,8 +398,8 @@ export function getAppRoutes(): RouteDescriptor[] {
component: !config.verifyEmailEnabled
? () => <Redirect to="/signup" />
: SafeDynamicImport(
() => import(/* webpackChunkName "VerifyEmailPage"*/ 'app/core/components/Signup/VerifyEmailPage')
),
() => import(/* webpackChunkName "VerifyEmailPage"*/ 'app/core/components/Signup/VerifyEmailPage')
),
pageClass: 'login-page',
chromeless: true,
},
Expand Down Expand Up @@ -790,22 +790,24 @@ export function getAppRoutes(): RouteDescriptor[] {
},
...(isPmmAdmin(config.bootData.user) && config.bootData.user.isGrafanaAdmin
? [
{
path: '/pmm-dump',
roles: () => ['Admin'],
component: SafeDynamicImport(() => import(/* webpackChunkName: "PMMDump" */ 'app/percona/pmm-dump/PMMDump')),
},
{
path: '/pmm-dump/new',
roles: () => ['Admin'],
component: SafeDynamicImport(
() =>
import(
/* webpackChunkName: "BackupInventoryPage" */ 'app/percona/pmm-dump/components/ExportDataset/ExportDataset'
)
),
},
]
{
path: '/pmm-dump',
roles: () => ['Admin'],
component: SafeDynamicImport(
() => import(/* webpackChunkName: "PMMDump" */ 'app/percona/pmm-dump/PMMDump')
),
},
{
path: '/pmm-dump/new',
roles: () => ['Admin'],
component: SafeDynamicImport(
() =>
import(
/* webpackChunkName: "BackupInventoryPage" */ 'app/percona/pmm-dump/components/ExportDataset/ExportDataset'
)
),
},
]
: []),
...getPluginCatalogRoutes(),
...getSupportBundleRoutes(),
Expand Down

0 comments on commit d266217

Please sign in to comment.