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

[Search Application] Update pageTemplate header to grey and rename nav item to "Search preview" #155795

Merged
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import { EngineViewLogic } from '../engine_view_logic';

import { SearchApplicationAPI } from './search_application_api';

import '../search_application_layout.scss';

const pageTitle = i18n.translate(
'xpack.enterpriseSearch.content.searchApplications.connect.pageTitle',
{
Expand Down Expand Up @@ -68,6 +70,8 @@ export const EngineConnect: React.FC = () => {
pageViewTelemetry={EngineViewTabs.CONNECT}
isLoading={isLoadingEngine}
pageHeader={{
bottomBorder: false,
className: 'searchApplicationHeaderBackgroundColor',
pageTitle,
rightSideItems: [],
}}
Expand All @@ -84,6 +88,8 @@ export const EngineConnect: React.FC = () => {
pageViewTelemetry={EngineViewTabs.CONNECT}
isLoading={isLoadingEngine}
pageHeader={{
bottomBorder: false,
className: 'searchApplicationHeaderBackgroundColor',
pageTitle,
rightSideItems: [],
tabs: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ import {
ResultsView,
Sorting,
} from './search_ui_components';
import '../search_application_layout.scss';

class InternalEngineTransporter implements Transporter {
constructor(
Expand Down Expand Up @@ -313,6 +314,8 @@ export const EngineSearchPreview: React.FC = () => {
pageViewTelemetry={EngineViewTabs.PREVIEW}
isLoading={isLoadingEngine}
pageHeader={{
bottomBorder: false,
className: 'searchApplicationHeaderBackgroundColor',
pageTitle: (
<FormattedMessage
id="xpack.enterpriseSearch.content.engine.searchPreview.pageTitle"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export const EngineView: React.FC = () => {
pageChrome={[engineName]}
pageViewTelemetry={tabId}
pageHeader={{
bottomBorder: false,
pageTitle: engineName,
rightSideItems: [],
}}
Expand Down Expand Up @@ -91,6 +92,7 @@ export const EngineView: React.FC = () => {
pageChrome={[engineName]}
pageViewTelemetry={tabId}
pageHeader={{
bottomBorder: false,
pageTitle: engineName,
rightSideItems: [],
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { EngineIndices } from './engine_indices';
import { EngineIndicesLogic } from './engine_indices_logic';
import { EngineSchema } from './engine_schema';
import { EngineViewLogic } from './engine_view_logic';
import './search_application_layout.scss';

const pageTitle = i18n.translate(
'xpack.enterpriseSearch.content.searchApplications.content.pageTitle',
Expand Down Expand Up @@ -78,6 +79,8 @@ export const SearchApplicationContent = () => {
pageViewTelemetry={EngineViewTabs.CONTENT}
isLoading={isLoadingEngine}
pageHeader={{
bottomBorder: false,
className: 'searchApplicationHeaderBackgroundColor',
pageTitle,
rightSideItems: [],
}}
Expand All @@ -103,6 +106,7 @@ export const SearchApplicationContent = () => {
pageViewTelemetry={EngineViewTabs.CONTENT}
isLoading={isLoadingEngine}
pageHeader={{
bottomBorder: false,
breadcrumbs: [
{
color: 'primary',
Expand All @@ -119,6 +123,7 @@ export const SearchApplicationContent = () => {
),
},
],
className: 'searchApplicationHeaderBackgroundColor',
pageTitle,
rightSideItems: [
<EuiButton
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

.searchApplicationHeaderBackgroundColor {
background-color: $euiColorLightestShade;

}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const EnterpriseSearchEnginesPageTemplate: React.FC<
const navItems = useEnterpriseSearchEngineNav(engineName, pageTemplateProps.isEmptyState);
return (
<EnterpriseSearchPageTemplateWrapper
panelled
{...pageTemplateProps}
solutionNav={{
items: navItems,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ describe('useEnterpriseSearchEngineNav', () => {
{
href: `/app/enterprise_search/content/engines/${engineName}/preview`,
id: 'enterpriseSearchEnginePreview',
name: 'Preview',
name: 'Search Preview',
},
{
href: `/app/enterprise_search/content/engines/${engineName}/content`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export const useEnterpriseSearchEngineNav = (engineName?: string, isEmptyState?:
{
id: 'enterpriseSearchEnginePreview',
name: i18n.translate('xpack.enterpriseSearch.nav.engine.previewTitle', {
defaultMessage: 'Preview',
defaultMessage: 'Search Preview',
}),
...generateNavLink({
shouldNotCreateHref: true,
Expand Down