diff --git a/public/components/getting_started/components/getting_started_collectData.tsx b/public/components/getting_started/components/getting_started_collectData.tsx index 9b86de445d..81e15af379 100644 --- a/public/components/getting_started/components/getting_started_collectData.tsx +++ b/public/components/getting_started/components/getting_started_collectData.tsx @@ -31,7 +31,7 @@ import nginxJson from '../getting_started_artifacts/nginx/nginx-1.0.0.json'; import javaJson from '../getting_started_artifacts/java_client/java_client-1.0.0.json'; import { IntegrationCards } from './getting_started_integrationCards'; -import { uploadAssets } from './utils'; +import { UploadAssets } from './utils'; interface CollectAndShipDataProps { isOpen: boolean; @@ -267,7 +267,7 @@ export const CollectAndShipData: React.FC = ({ { - await uploadAssets(specificMethod); + await UploadAssets(specificMethod); }} fill > diff --git a/public/components/getting_started/components/utils.tsx b/public/components/getting_started/components/utils.tsx index f671422495..dd0e741525 100644 --- a/public/components/getting_started/components/utils.tsx +++ b/public/components/getting_started/components/utils.tsx @@ -5,6 +5,7 @@ import { coreRefs } from '../../../framework/core_refs'; import { uploadBundle } from '../../integrations/components/upload_flyout'; +import { useToast } from '../../../../public/components/common/toast'; const fetchAssets = async (tutorialId: string, assetFilter?: 'dashboards' | 'indexPatterns') => { const assetFilterParam = assetFilter ? `${assetFilter}/` : ''; @@ -20,7 +21,8 @@ const fetchAssets = async (tutorialId: string, assetFilter?: 'dashboards' | 'ind return responeData; }; -export const uploadAssets = async (tutorialId: string) => { +export const UploadAssets = async (tutorialId: string) => { + const { setToast } = useToast(); try { const responeData = await fetchAssets(tutorialId); @@ -31,10 +33,11 @@ export const uploadAssets = async (tutorialId: string) => { if (error) { console.error(error.message); } else { - console.log('Bundle uploaded successfully'); + setToast('Created saved object assets successfully', 'success'); } } catch (err) { console.error(err.message); + setToast('Failed to create saved object assets', 'danger'); } }; diff --git a/public/components/trace_analytics/components/dashboard/dashboard_content.tsx b/public/components/trace_analytics/components/dashboard/dashboard_content.tsx index 338cd0d09f..f1390f6788 100644 --- a/public/components/trace_analytics/components/dashboard/dashboard_content.tsx +++ b/public/components/trace_analytics/components/dashboard/dashboard_content.tsx @@ -31,6 +31,7 @@ import { ThroughputPlt } from '../common/plots/throughput_plt'; import { DashboardProps } from './dashboard'; import { DashboardTable } from './dashboard_table'; import { TopGroupsPage } from './top_groups_page'; +import { coreRefs } from '../../../../../public/framework/core_refs'; export function DashboardContent(props: DashboardProps) { const { @@ -66,6 +67,7 @@ export function DashboardContent(props: DashboardProps) { const [loading, setLoading] = useState(false); const [showTimeoutToast, setShowTimeoutToast] = useState(false); const { setToast } = useToast(); + const isNavGroupEnabled = coreRefs?.chrome?.navGroup.getNavGroupEnabled(); useEffect(() => { if (showTimeoutToast === true && (!toasts || toasts.length === 0)) { @@ -79,7 +81,12 @@ export function DashboardContent(props: DashboardProps) { }, [showTimeoutToast]); useEffect(() => { - chrome.setBreadcrumbs([parentBreadcrumb, ...childBreadcrumbs]); + if (isNavGroupEnabled) { + chrome.setBreadcrumbs([...childBreadcrumbs]); + } else { + chrome.setBreadcrumbs([parentBreadcrumb, ...childBreadcrumbs]); + } + const validFilters = getValidFilterFields(mode, page, attributesFilterFields); setFilters([ ...filters.map((filter) => ({