Skip to content

Commit

Permalink
[Uptime] Report uptime overview metrics (#191708)
Browse files Browse the repository at this point in the history
## Summary

 Report uptime overview metrics !!

---------

Co-authored-by: kibanamachine <[email protected]>
  • Loading branch information
shahzad31 and kibanamachine authored Aug 30, 2024
1 parent 8ade3da commit 9ea0f06
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { KibanaThemeProvider } from '@kbn/react-kibana-context-theme';
import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app';
import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common';
import { InspectorContextProvider } from '@kbn/observability-shared-plugin/public';
import { PerformanceContextProvider } from '@kbn/ebt-tools';
import { ClientPluginsSetup, ClientPluginsStart } from '../../plugin';
import { UMUpdateBadge } from '../lib/lib';
import {
Expand Down Expand Up @@ -133,19 +134,21 @@ const Application = (props: UptimeAppProps) => {
<UptimeThemeContextProvider darkMode={darkMode}>
<UptimeStartupPluginsContextProvider {...startPlugins}>
<UptimeDataViewContextProvider dataViews={startPlugins.dataViews}>
<div className={APP_WRAPPER_CLASS} data-test-subj="uptimeApp">
<RedirectAppLinks
coreStart={{
application: core.application,
}}
>
<InspectorContextProvider>
<UptimeAlertsFlyoutWrapper />
<PageRouter />
<ActionMenu appMountParameters={appMountParameters} />
</InspectorContextProvider>
</RedirectAppLinks>
</div>
<PerformanceContextProvider>
<div className={APP_WRAPPER_CLASS} data-test-subj="uptimeApp">
<RedirectAppLinks
coreStart={{
application: core.application,
}}
>
<InspectorContextProvider>
<UptimeAlertsFlyoutWrapper />
<PageRouter />
<ActionMenu appMountParameters={appMountParameters} />
</InspectorContextProvider>
</RedirectAppLinks>
</div>
</PerformanceContextProvider>
</UptimeDataViewContextProvider>
</UptimeStartupPluginsContextProvider>
</UptimeThemeContextProvider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import React, { useContext, useEffect, useState } from 'react';
import { useSelector, useDispatch } from 'react-redux';
import { usePageReady } from '@kbn/ebt-tools';
import { getMonitorList } from '../../../state/actions';
import { esKuerySelector, monitorListSelector } from '../../../state/selectors';
import { MonitorListComponent } from './monitor_list';
Expand Down Expand Up @@ -46,6 +47,8 @@ export const MonitorList: React.FC<MonitorListProps> = (props) => {
const monitorList = useSelector(monitorListSelector);
useMappingCheck(monitorList.error);

usePageReady({ isReady: Boolean(monitorList.isLoaded) });

useEffect(() => {
filterCheck(() =>
dispatch(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ import React from 'react';
import { OverviewPageComponent } from './overview';
import { render } from '../lib/helper/rtl_helpers';

jest.mock('@kbn/ebt-tools', () => ({
usePageReady: jest.fn(),
}));

describe('MonitorPage', () => {
it('renders expected elements for valid props', async () => {
const { findByText } = render(<OverviewPageComponent />);
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/observability_solution/uptime/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"@kbn/react-kibana-context-theme",
"@kbn/react-kibana-mount",
"@kbn/deeplinks-observability",
"@kbn/ebt-tools",
],
"exclude": ["target/**/*"]
}

0 comments on commit 9ea0f06

Please sign in to comment.