mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Remove Has Data check from Alerts page so page is always accessible (#154851)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
13f9d7ac7d
commit
035d28e757
3 changed files with 1 additions and 26 deletions
|
@ -28,7 +28,6 @@ import {
|
|||
useAlertSearchBarStateContainer,
|
||||
} from '../../components/shared/alert_search_bar/containers';
|
||||
import { calculateTimeRangeBucketSize } from '../overview/helpers/calculate_bucket_size';
|
||||
import { getNoDataConfig } from '../../utils/no_data_config';
|
||||
import { getAlertSummaryTimeRange } from '../../utils/alert_summary_widget';
|
||||
import { observabilityAlertFeatureIds } from '../../config/alert_feature_ids';
|
||||
import type { ObservabilityAppServices } from '../../application/types';
|
||||
|
@ -49,7 +48,6 @@ function InternalAlertsPage() {
|
|||
timefilter: { timefilter: timeFilterService },
|
||||
},
|
||||
},
|
||||
docLinks,
|
||||
http,
|
||||
notifications: { toasts },
|
||||
triggersActionsUi: {
|
||||
|
@ -162,25 +160,14 @@ function InternalAlertsPage() {
|
|||
|
||||
const manageRulesHref = http.basePath.prepend('/app/observability/alerts/rules');
|
||||
|
||||
// If there is any data, set hasData to true otherwise we need to wait till all the data is loaded before setting hasData to true or false; undefined indicates the data is still loading.
|
||||
const hasData = hasAnyData === true || (isAllRequestsComplete === false ? undefined : false);
|
||||
|
||||
if (!hasAnyData && !isAllRequestsComplete) {
|
||||
return <LoadingObservability />;
|
||||
}
|
||||
|
||||
const noDataConfig = getNoDataConfig({
|
||||
hasData,
|
||||
basePath: http.basePath,
|
||||
docsLink: docLinks.links.observability.guide,
|
||||
});
|
||||
|
||||
return (
|
||||
<Provider value={alertSearchBarStateContainer}>
|
||||
<ObservabilityPageTemplate
|
||||
noDataConfig={noDataConfig}
|
||||
isPageDataLoaded={isAllRequestsComplete}
|
||||
data-test-subj={noDataConfig ? 'noDataPage' : 'alertsPageWithData'}
|
||||
data-test-subj="alertsPageWithData"
|
||||
pageHeader={{
|
||||
pageTitle: (
|
||||
<>{i18n.translate('xpack.observability.alertsTitle', { defaultMessage: 'Alerts' })} </>
|
||||
|
|
|
@ -41,12 +41,6 @@ export default ({ getService }: FtrProviderContext) => {
|
|||
await esArchiver.unload('x-pack/test/functional/es_archives/observability/alerts');
|
||||
});
|
||||
|
||||
describe('With no data', () => {
|
||||
it('Shows the no data screen', async () => {
|
||||
await observability.alerts.common.getNoDataPageOrFail();
|
||||
});
|
||||
});
|
||||
|
||||
describe('Alerts table', () => {
|
||||
before(async () => {
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/infra/simple_logs');
|
||||
|
|
|
@ -39,12 +39,6 @@ export default ({ getService }: FtrProviderContext) => {
|
|||
await esArchiver.unload('x-pack/test/functional/es_archives/observability/alerts');
|
||||
});
|
||||
|
||||
describe('With no data', () => {
|
||||
it('Shows the no data screen', async () => {
|
||||
await observability.alerts.common.getNoDataPageOrFail();
|
||||
});
|
||||
});
|
||||
|
||||
// FLAKY: https://github.com/elastic/kibana/issues/124681
|
||||
describe.skip('Stat counters', () => {
|
||||
beforeEach(async () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue