Skip to content

Commit

Permalink
[Search][Ent Search deprecation] Removing errors (elastic#202177) (el…
Browse files Browse the repository at this point in the history
…astic#202437)

## Summary

This PR removes all error messages regarding Enterprise Search node. Due
to it will go away in 9.0 and listed in this epic:
elastic/search-team#8231


![image](https://github.com/user-attachments/assets/a71ffe1c-af8e-418c-99b3-fc29856cbf5b)
  • Loading branch information
JoseLuisGJ authored Dec 3, 2024
1 parent 666e771 commit 9e144b1
Show file tree
Hide file tree
Showing 33 changed files with 5 additions and 857 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import { Credentials } from './components/credentials';
import { EngineRouter } from './components/engine';
import { EngineCreation } from './components/engine_creation';
import { EnginesOverview } from './components/engines';
import { ErrorConnecting } from './components/error_connecting';
import { Library } from './components/library';
import { MetaEngineCreation } from './components/meta_engine_creation';
import { RoleMappings } from './components/role_mappings';
Expand All @@ -48,14 +47,6 @@ describe('AppSearch', () => {
expect(wrapper.find(AppSearchUnconfigured)).toHaveLength(1);
});

it('renders ErrorConnecting when Enterprise Search is unavailable', () => {
setMockValues({ errorConnectingMessage: '502 Bad Gateway' });
const wrapper = shallow(<AppSearch />);

const errorConnection = wrapper.find(ErrorConnecting);
expect(errorConnection).toHaveLength(1);
});

it('renders AppSearchConfigured when config.host is set & available', () => {
setMockValues({ errorConnectingMessage: '', config: { host: 'some.url' } });
const wrapper = shallow(<AppSearch />);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { useValues } from 'kea';
import { Routes, Route } from '@kbn/shared-ux-router';

import { InitialAppData } from '../../../common/types';
import { HttpLogic } from '../shared/http';
import { KibanaLogic } from '../shared/kibana';
import { EndpointsHeaderAction } from '../shared/layout/endpoints_header_action';

Expand All @@ -22,7 +21,6 @@ import { Credentials } from './components/credentials';
import { EngineRouter } from './components/engine';
import { EngineCreation } from './components/engine_creation';
import { EnginesOverview } from './components/engines';
import { ErrorConnecting } from './components/error_connecting';
import { KibanaHeaderActions } from './components/layout';
import { Library } from './components/library';
import { MetaEngineCreation } from './components/meta_engine_creation';
Expand All @@ -45,15 +43,10 @@ import {

export const AppSearch: React.FC<InitialAppData> = (props) => {
const { config } = useValues(KibanaLogic);
const { errorConnectingMessage } = useValues(HttpLogic);

const showView = () => {
if (!config.host) {
return <AppSearchUnconfigured />;
} else if (errorConnectingMessage) {
return <ErrorConnecting />;
}

return <AppSearchConfigured {...(props as Required<InitialAppData>)} />;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {
} from '../../../routes';
import { EnterpriseSearchApplicationsPageTemplate } from '../../layout/page_template';

import { SearchApplicationError } from '../search_application_error';
import { SearchApplicationViewLogic } from '../search_application_view_logic';

import { SearchApplicationAPI } from './search_application_api';
Expand All @@ -47,7 +46,6 @@ const DOCUMENTATION_TAB_TITLE = i18n.translate(
defaultMessage: 'Documentation',
}
);
const ConnectTabs: string[] = Object.values(SearchApplicationConnectTabs);
const getTabBreadCrumb = (tabId: string) => {
switch (tabId) {
case SearchApplicationConnectTabs.SEARCHAPI:
Expand Down Expand Up @@ -76,26 +74,6 @@ export const SearchApplicationConnect: React.FC = () => {
);
};

if (!ConnectTabs.includes(connectTabId)) {
return (
<EnterpriseSearchApplicationsPageTemplate
pageChrome={[searchApplicationName, pageTitle]}
pageViewTelemetry={SearchApplicationViewTabs.CONNECT}
isLoading={isLoadingSearchApplication}
pageHeader={{
bottomBorder: false,
className: 'searchApplicationHeaderBackgroundColor',
pageTitle,
rightSideItems: [],
}}
searchApplicationName={searchApplicationName}
hasSchemaConflicts={hasSchemaConflicts}
>
<SearchApplicationError notFound />
</EnterpriseSearchApplicationsPageTemplate>
);
}

return (
<EnterpriseSearchApplicationsPageTemplate
pageChrome={[searchApplicationName, pageTitle, getTabBreadCrumb(connectTabId)]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import {
import { EnterpriseSearchApplicationsPageTemplate } from '../layout/page_template';

import { AddIndicesFlyout } from './add_indices_flyout';
import { SearchApplicationError } from './search_application_error';
import { SearchApplicationIndices } from './search_application_indices';
import { SearchApplicationIndicesLogic } from './search_application_indices_logic';
import { SearchApplicationSchema } from './search_application_schema';
Expand Down Expand Up @@ -62,8 +61,6 @@ const getTabBreadCrumb = (tabId: string) => {
}
};

const ContentTabs: string[] = Object.values(SearchApplicationContentTabs);

export const SearchApplicationContent = () => {
const { searchApplicationName, isLoadingSearchApplication, hasSchemaConflicts } = useValues(
SearchApplicationViewLogic
Expand All @@ -74,26 +71,6 @@ export const SearchApplicationContent = () => {
contentTabId?: string;
}>();

if (!ContentTabs.includes(contentTabId)) {
return (
<EnterpriseSearchApplicationsPageTemplate
pageChrome={[searchApplicationName, pageTitle]}
pageViewTelemetry={SearchApplicationViewTabs.CONTENT}
isLoading={isLoadingSearchApplication}
pageHeader={{
bottomBorder: false,
className: 'searchApplicationHeaderBackgroundColor',
pageTitle,
rightSideItems: [],
}}
searchApplicationName={searchApplicationName}
hasSchemaConflicts={hasSchemaConflicts}
>
<SearchApplicationError notFound />
</EnterpriseSearchApplicationsPageTemplate>
);
}

const onTabClick = (tab: SearchApplicationContentTabs) => () => {
KibanaLogic.values.navigateToUrl(
generateEncodedPath(SEARCH_APPLICATION_CONTENT_PATH, {
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 9e144b1

Please sign in to comment.