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

[Bugfix] Update UI and handle new navigation #416

Merged
merged 8 commits into from
Sep 5, 2024
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
33 changes: 8 additions & 25 deletions public/components/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,21 @@
*/

import React from 'react';
import { FormattedMessage, I18nProvider } from '@osd/i18n/react';
import { I18nProvider } from '@osd/i18n/react';
import { HashRouter as Router, Route, Switch } from 'react-router-dom';

import {
EuiPage,
EuiPageBody,
EuiPageContentBody,
EuiPageContentHeader,
EuiPageContentHeaderSection,
} from '@elastic/eui';
import CSS from 'csstype';
import { i18n } from '@osd/i18n';
import { EuiPage, EuiPageBody, EuiPageContentBody } from '@elastic/eui';
import {
CoreStart,
CoreSystem,
ChromeBreadcrumb,
IUiSettingsClient,
} from '../../../../src/core/public';
import { NavigationPublicPluginStart } from '../../../../src/plugins/navigation/public';

import { CreateReport } from './report_definitions/create/create_report_definition';
import { Main } from './main/main';
import { ReportDetails } from './main/report_details/report_details';
import { ReportDefinitionDetails } from './main/report_definition_details/report_definition_details';
import { EditReportDefinition } from './report_definitions/edit/edit_report_definition';
import { i18n } from '@osd/i18n';

export interface CoreInterface {
http: CoreStart['http'];
Expand All @@ -44,29 +34,18 @@ interface ReportsDashboardsAppDeps {
chrome: CoreStart['chrome'];
}

const styles: CSS.Properties = {
float: 'left',
width: '100%',
maxWidth: '1600px',
};

export const ReportsDashboardsApp = ({
basename,
notifications,
http,
navigation,
chrome,
}: ReportsDashboardsAppDeps) => {
// Render the application DOM.
return (
<Router basename={'/' + basename}>
<I18nProvider>
<div style={styles}>
<div>
<EuiPage>
<EuiPageBody>
<EuiPageContentHeader>
<EuiPageContentHeaderSection></EuiPageContentHeaderSection>
</EuiPageContentHeader>
<EuiPageContentBody>
<Switch>
<Route
Expand All @@ -78,6 +57,7 @@ export const ReportsDashboardsApp = ({
{ defaultMessage: 'Report Details' }
)}
httpClient={http}
chrome={chrome}
{...props}
setBreadcrumbs={chrome.setBreadcrumbs}
/>
Expand All @@ -92,6 +72,7 @@ export const ReportsDashboardsApp = ({
{ defaultMessage: 'Report Definition Details' }
)}
httpClient={http}
chrome={chrome}
{...props}
setBreadcrumbs={chrome.setBreadcrumbs}
/>
Expand All @@ -106,6 +87,7 @@ export const ReportsDashboardsApp = ({
{ defaultMessage: 'Create Report' }
)}
httpClient={http}
chrome={chrome}
{...props}
setBreadcrumbs={chrome.setBreadcrumbs}
/>
Expand Down Expand Up @@ -136,6 +118,7 @@ export const ReportsDashboardsApp = ({
httpClient={http}
{...props}
setBreadcrumbs={chrome.setBreadcrumbs}
chrome={chrome}
/>
)}
/>
Expand Down
Loading
Loading