Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove app analytics #154

Merged
merged 4 commits into from
Oct 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 12 additions & 28 deletions dashboards-observability/public/components/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { CoreStart } from '../../../../src/core/public';
import { observabilityTitle } from '../../common/constants/shared';
import store from '../framework/redux/store';
import { AppPluginStartDependencies } from '../types';
import { Home as ApplicationAnalyticsHome } from './application_analytics/home';
import { renderPageWithSidebar } from './common/side_nav';
import { Home as CustomPanelsHome } from './custom_panels/home';
import { EventAnalytics } from './explorer/event_analytics';
Expand All @@ -41,7 +40,6 @@ export const App = ({
savedObjects,
timestampUtils
}: ObservabilityAppDeps) => {

const { chrome, http, notifications } = CoreStart;
const parentBreadcrumb = {
text: observabilityTitle,
Expand All @@ -59,31 +57,6 @@ export const App = ({
<I18nProvider>
<>
<Switch>
<Route
exact
path={['/', '/application_analytics', '/application_analytics/home']}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what should the default page on app/observability#/ look like?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 Not merging this PR as of now. I tried adding '/' path in trace analytics. But I'll still need to render trace-analytics with sidenav. Otherwise, sidenav doesn't show up at all. Will fix this.

render={(props) => {
chrome.setBreadcrumbs([
parentBreadcrumb,
{
text: 'Application analytics',
href: '#/application_analytics',
},
]);
return renderPageWithSidebar(<ApplicationAnalyticsHome />);
}}
/>
<Route
path={['/trace_analytics', '/trace_analytics/home']}
render={(props) => (
<TraceAnalyticsHome
{...props}
chrome={chrome}
http={http}
parentBreadcrumb={parentBreadcrumb}
/>
)}
/>
<Route
path="/notebooks"
render={(props) => (
Expand Down Expand Up @@ -117,7 +90,7 @@ export const App = ({
}}
/>
<Route
path={['/operational_panels']}
path="/operational_panels"
render={(props) => {
chrome.setBreadcrumbs([parentBreadcrumb, customPanelBreadcrumb]);
return (
Expand All @@ -131,6 +104,17 @@ export const App = ({
);
}}
/>
<Route
path={['/', '/trace_analytics', '/trace_analytics/home']}
render={(props) => (
<TraceAnalyticsHome
{...props}
chrome={chrome}
http={http}
parentBreadcrumb={parentBreadcrumb}
/>
)}
/>
</Switch>
</>
</I18nProvider>
Expand Down

This file was deleted.

19 changes: 7 additions & 12 deletions dashboards-observability/public/components/common/side_nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,43 +38,38 @@ export const renderPageWithSidebar = (BodyComponent: React.ReactNode) => {
name: 'Observability',
id: 0,
items: [
{
name: 'Application analytics',
id: 1,
href: '#/application_analytics/home',
},
{
name: 'Trace analytics',
id: 2,
id: 1,
href: '#/trace_analytics/home',
items: [
{
name: 'Traces',
id: 2.1,
id: 1.1,
href: '#/trace_analytics/traces',
},
{
name: 'Services',
id: 2.2,
id: 1.2,
href: '#/trace_analytics/services',
},
],
},
{
name: 'Event analytics',
id: 3,
id: 2,
href: '#/event_analytics',
},
{
name: 'Operational panels',
id: 4,
id: 3,
href: '#/operational_panels/',
},
{
name: 'Notebooks',
id: 5,
id: 4,
href: '#/notebooks',
}
},
],
},
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const Home = (props: HomeProps) => {
<>
<Route
exact
path={['/trace_analytics', '/trace_analytics/home']}
path={['/', '/trace_analytics', '/trace_analytics/home']}
render={(routerProps) => renderPageWithSidebar(<Dashboard {...commonProps} />)}
/>
<Route
Expand Down