Skip to content

Commit

Permalink
fit&finish (#2186) (#2191)
Browse files Browse the repository at this point in the history
increase timeout for CI



Revert "increase timeout for CI"

This reverts commit c86a362.

(cherry picked from commit 0884b42)

Signed-off-by: Hailong Cui <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent cac049d commit 94ece11
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
3 changes: 2 additions & 1 deletion common/constants/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export const observabilityTitle = 'Observability';
export const observabilityPluginOrder = 1500;

export const observabilityOverviewID = 'observability-overview';
export const observabilityOverviewTitle = 'Observability overview';
export const observabilityOverviewTitle = 'Overview';
export const observabilityOverviewTitleWithUseCase = 'Observability overview';
export const observabilityOverviewPluginOrder = 5088;

export const observabilityGettingStartedID = 'observability-gettingStarted';
Expand Down
18 changes: 16 additions & 2 deletions public/components/overview/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
import React, { ReactNode, useEffect, useState } from 'react';
import { HashRouter, Route, Switch } from 'react-router-dom';
import { FormattedMessage } from '@osd/i18n/react';
import { useObservable } from 'react-use';
import { EMPTY } from 'rxjs';
import {
observabilityOverviewTitle,
observabilityOverviewTitleWithUseCase,
} from '../../../common/constants/shared';
import { alertsPluginID, anomalyPluginID } from '../../../common/constants/overview';
import { DashboardSavedObjectsType } from '../../../common/types/overview';
import { setNavBreadCrumbs } from '../../../common/utils/set_nav_bread_crumbs';
Expand All @@ -17,6 +23,7 @@ import { ObsDashboardStateManager } from './components/obs_dashboard_state_manag
import { SelectDashboardFlyout } from './components/select_dashboard_flyout';
import { getObservabilityDashboardsId, setObservabilityDashboardsId } from './components/utils';
import './index.scss';
import { OBSERVABILITY_USE_CASE_ID } from '../../../../../src/core/public';

export const Home = () => {
const [homePage, setHomePage] = useState<ReactNode>(<></>);
Expand Down Expand Up @@ -68,6 +75,8 @@ export const Home = () => {
description: card.description,
title: card.title,
cardProps: {
titleSize: 's',
titleElement: 'h4',
selectable: {
children: (
<FormattedMessage
Expand Down Expand Up @@ -178,18 +187,23 @@ export const Home = () => {
loadHomePage();
}, [dashboardsSavedObjects]);

const currentNavGroup = useObservable(coreRefs?.chrome?.navGroup.getCurrentNavGroup$() || EMPTY);
const isObservabilityUseCase = currentNavGroup?.id === OBSERVABILITY_USE_CASE_ID;

useEffect(() => {
setNavBreadCrumbs(
[],
[
{
text: 'Observability overview',
text: isObservabilityUseCase
? observabilityOverviewTitle
: observabilityOverviewTitleWithUseCase,
href: '#/',
},
]
);
loadDashboardsState();
}, []);
}, [isObservabilityUseCase]);

return (
<div>
Expand Down

0 comments on commit 94ece11

Please sign in to comment.