Skip to content

Commit

Permalink
PMM-12847 Fix product tour (#710)
Browse files Browse the repository at this point in the history
* PMM-12847 Fix product tour

* PMM-12847 fix prettier issue

* PMM-12847 Fix menu control

* PMM-12742 Add pmm config menu item and icon

* PMM-12742 fix navmenu for access roles

* PMM-12742 fix access roles menu item

* PMM-12742 Fix navIndex of deep child

* PMM-12742 Change menu item nav

* PMM-12742 Run prettier

* PMM-12847 Change for new pmm menu item

* PMM-12742 Fix PMM dump header

* PMM-12847 Update main menu toggle logic

* PMM-12847 fix according to g10.4

* PMM-12847 remove async
  • Loading branch information
YashSartanpara1 authored Apr 10, 2024
1 parent 90a475f commit 094500f
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export function MegaMenuItem({ link, activeItem, level = 0, onClick }: Props) {
/>
)}
</div>
<div className={styles.collapsibleSectionWrapper}>
<div className={styles.collapsibleSectionWrapper} aria-label={link.text}>
<MegaMenuItemText
isActive={isActive}
onClick={() => {
Expand Down
16 changes: 8 additions & 8 deletions public/app/percona/tour/steps/alerting/alerting.steps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const getAlertingTourSteps = (isAdmin = false): TourStep[] => [
...(isAdmin
? [
{
selector: '[aria-label="Tab Fired alerts"]',
selector: '[aria-label="Fired alerts"]',
mutationObservables: ['.page-body'],
resizeObservables: ['.page-body'],
content: (
Expand All @@ -20,7 +20,7 @@ export const getAlertingTourSteps = (isAdmin = false): TourStep[] => [
),
},
{
selector: '[aria-label="Tab Alert rule templates"]',
selector: '[aria-label="Alert rule templates"]',
content: (
<SidebarStep title={Messages.alertRuleTemplates.title}>
<p>{Messages.alertRuleTemplates.effortlessly}</p>
Expand All @@ -31,7 +31,7 @@ export const getAlertingTourSteps = (isAdmin = false): TourStep[] => [
]
: []),
{
selector: '[aria-label="Tab Alert rules"]',
selector: '[aria-label="Alert rules"]',
content: (
<SidebarStep title={Messages.alertRules.title}>
<p>{Messages.alertRules.rules}</p>
Expand All @@ -41,7 +41,7 @@ export const getAlertingTourSteps = (isAdmin = false): TourStep[] => [
),
},
{
selector: '[aria-label="Tab Contact points"]',
selector: '[aria-label="Contact points"]',
content: (
<SidebarStep title={Messages.contactPoints.title}>
<p>{Messages.contactPoints.define}</p>
Expand All @@ -50,7 +50,7 @@ export const getAlertingTourSteps = (isAdmin = false): TourStep[] => [
),
},
{
selector: '[aria-label="Tab Notification policies"]',
selector: '[aria-label="Notification policies"]',
content: (
<SidebarStep title={Messages.notificationPolicies.title}>
<p>{Messages.notificationPolicies.routed}</p>
Expand All @@ -59,7 +59,7 @@ export const getAlertingTourSteps = (isAdmin = false): TourStep[] => [
),
},
{
selector: '[aria-label="Tab Silences"]',
selector: '[aria-label="Silences"]',
content: (
<SidebarStep title={Messages.silences.title}>
<p>{Messages.silences.create}</p>
Expand All @@ -68,7 +68,7 @@ export const getAlertingTourSteps = (isAdmin = false): TourStep[] => [
),
},
{
selector: '[aria-label="Tab Alert groups"]',
selector: '[aria-label="Alert groups"]',
content: (
<SidebarStep title={Messages.alertGroups.title}>
<p>{Messages.alertGroups.alert}</p>
Expand All @@ -79,7 +79,7 @@ export const getAlertingTourSteps = (isAdmin = false): TourStep[] => [
...(isAdmin
? [
{
selector: '[aria-label="Tab Admin"]',
selector: '[aria-label="Admin"]',
content: (
<SidebarStep title={Messages.admin.title}>
<p>{Messages.admin.configure}</p>
Expand Down
6 changes: 3 additions & 3 deletions public/app/percona/tour/steps/product/product.messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const Messages = {
docs: 'Integrated Alerting documentation',
},
configPanel: {
title: 'Configuration Panel',
title: 'PMM Configuration Panel',
services:
"Here you can check Services, Agents and Nodes in your PMM's Inventory, and add new instances for monitoring: PostgreSQL, MySQL, MongoDB, HAProxy, etc.",
settings:
Expand All @@ -48,8 +48,8 @@ export const Messages = {
settingsDocsLink: 'here',
},
serverAdmin: {
title: 'Server Admin',
userManagement: 'In the Server Admin panel you can assign and control user management for PMM:',
title: 'Administration',
userManagement: 'In the Administration panel you can assign and control user management for PMM:',
addEditRemove: 'Add, edit, and remove users.',
grant: 'Grant or Revoke admin privileges for a user.',
manageOrg: 'Manage organizations to which the user belongs and their assigned role.',
Expand Down
16 changes: 8 additions & 8 deletions public/app/percona/tour/steps/product/product.steps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const getProductTourSteps = (
activeServices?: ServiceType[]
): TourStep[] => [
{
selector: '.dropdown > [aria-label="Dashboards"]',
selector: '[aria-label="Dashboards"]',
content: (
<SidebarStep title={Messages.dashboards.title}>
<p>{Messages.dashboards.browse}</p>
Expand All @@ -25,7 +25,7 @@ export const getProductTourSteps = (
},
getPMMDashboardsStep(activeServices || []),
{
selector: '.dropdown > [aria-label="Query Analytics (QAN)"]',
selector: '[aria-label="Query Analytics (QAN)"]',
content: (
<SidebarStep title={Messages.qan.title}>
<p>{Messages.qan.queries}</p>
Expand All @@ -36,7 +36,7 @@ export const getProductTourSteps = (
...(isPmmAdmin
? [
{
selector: '.dropdown > [aria-label="Explore"]',
selector: '[aria-label="Explore"]',
content: (
<SidebarStep title={Messages.explore.title}>
<p>{Messages.explore.data}</p>
Expand All @@ -48,7 +48,7 @@ export const getProductTourSteps = (
]
: []),
{
selector: '.dropdown > [aria-label="Alerting"]',
selector: '[aria-label="Alerting"]',
content: (
<SidebarStep title={Messages.alerting.title}>
<p>
Expand All @@ -71,7 +71,7 @@ export const getProductTourSteps = (
...(isPmmAdmin && !!settings?.sttEnabled
? [
{
selector: '.dropdown > [aria-label="Advisors"]',
selector: '[aria-label="Advisors"]',
content: (
<SidebarStep title={Messages.advisors.title}>
<p>{Messages.advisors.pmmIncludes}</p>
Expand All @@ -90,7 +90,7 @@ export const getProductTourSteps = (
...(isPmmAdmin && !!settings?.backupEnabled
? [
{
selector: '.dropdown > [aria-label="Backup"]',
selector: '[aria-label="Backup"]',
content: (
<SidebarStep title={Messages.backup.title}>
<p>{Messages.backup.feature}</p>
Expand All @@ -104,7 +104,7 @@ export const getProductTourSteps = (
...(isPmmAdmin
? [
{
selector: '.dropdown > [aria-label="Configuration"]',
selector: '[aria-label="PMM Configuration"]',
content: (
<SidebarStep title={Messages.configPanel.title}>
<p>{Messages.configPanel.services}</p>
Expand All @@ -120,7 +120,7 @@ export const getProductTourSteps = (
),
},
{
selector: '.dropdown > [aria-label="Server admin"]',
selector: '[aria-label="Administration"]',
content: (
<SidebarStep title={Messages.serverAdmin.title}>
<p>{Messages.serverAdmin.userManagement}</p>
Expand Down
6 changes: 3 additions & 3 deletions public/app/percona/tour/steps/product/product.utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const getPMMDashboardsStep = (services: ServiceType[]): TourStep => {
};

const getStep = (ariaLabel: string, navMenuId: string): TourStep => ({
selector: '#navbar-menu-portal-container [role="dialog"]',
selector: '.scrollbar-view [role="dialog"]',
content: (
<SidebarStep title={Messages.pmmDashboards.title}>
<p>{Messages.pmmDashboards.grafanaTechnology}</p>
Expand All @@ -33,7 +33,7 @@ const getStep = (ariaLabel: string, navMenuId: string): TourStep => ({
</SidebarStep>
),
navMenuId,
highlightedSelectors: [`.dropdown > [aria-label="${ariaLabel}"]`, '#navbar-menu-portal-container [role="dialog"]'],
resizeObservables: ['#navbar-menu-portal-container'],
highlightedSelectors: [`[aria-label="${ariaLabel}"]`, '.scrollbar-view [role="dialog"]'],
resizeObservables: ['.scrollbar-view'],
position: 'right',
});

0 comments on commit 094500f

Please sign in to comment.