Skip to content

Commit

Permalink
Remove app analytics (#154)
Browse files Browse the repository at this point in the history
* removing app analytics from sidenav

* removed unused headers

* added trace analytics as default page
  • Loading branch information
ps48 authored Oct 27, 2021
1 parent eaf5fdd commit 8e95476
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 57 deletions.
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']}
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

0 comments on commit 8e95476

Please sign in to comment.