diff --git a/docs/settings/banners-settings.asciidoc b/docs/settings/banners-settings.asciidoc index 837b6352ff0df..d61da50018921 100644 --- a/docs/settings/banners-settings.asciidoc +++ b/docs/settings/banners-settings.asciidoc @@ -16,7 +16,7 @@ You can configure the `xpack.banners` settings in your `kibana.yml` file. |=== | `xpack.banners.placement` -| Set to `header` to enable the header banner. Defaults to `disabled`. +| Set to `top` to enable the top banner. Defaults to `disabled`. | `xpack.banners.textContent` | The text to display inside the banner, either plain text or Markdown. diff --git a/x-pack/plugins/banners/README.md b/x-pack/plugins/banners/README.md index 890c194e1bcb0..6ef2d9196f379 100644 --- a/x-pack/plugins/banners/README.md +++ b/x-pack/plugins/banners/README.md @@ -12,7 +12,7 @@ The options are The placement of the banner. The allowed values are: - `disabled` - The banner will be disabled - - `header` - The banner will be displayed in the header + - `top` - The banner will be displayed in the header - `textContent` @@ -31,7 +31,7 @@ The color for the banner's background. Must be a valid hex color `kibana.yml` ```yaml xpack.banners: - placement: 'header' + placement: 'top' textContent: 'Production environment - Proceed with **special levels** of caution' textColor: '#FF0000' backgroundColor: '#CC2211' diff --git a/x-pack/plugins/banners/common/types.ts b/x-pack/plugins/banners/common/types.ts index 0c785f516ddb3..6c16b4e8055bb 100644 --- a/x-pack/plugins/banners/common/types.ts +++ b/x-pack/plugins/banners/common/types.ts @@ -10,7 +10,7 @@ export interface BannerInfoResponse { banner: BannerConfiguration; } -export type BannerPlacement = 'disabled' | 'header'; +export type BannerPlacement = 'disabled' | 'top'; export interface BannerConfiguration { placement: BannerPlacement; diff --git a/x-pack/plugins/banners/public/plugin.test.tsx b/x-pack/plugins/banners/public/plugin.test.tsx index 232bd840ba353..8722d9516b9db 100644 --- a/x-pack/plugins/banners/public/plugin.test.tsx +++ b/x-pack/plugins/banners/public/plugin.test.tsx @@ -51,11 +51,11 @@ describe('BannersPlugin', () => { }); describe('when banner is allowed', () => { - it('registers the header banner if `banner.placement` is `header`', async () => { + it('registers the header banner if `banner.placement` is `top`', async () => { getBannerInfoMock.mockResolvedValue({ allowed: true, banner: createBannerConfig({ - placement: 'header', + placement: 'top', }), }); @@ -82,11 +82,11 @@ describe('BannersPlugin', () => { }); describe('when banner is not allowed', () => { - it('does not register the header banner if `banner.placement` is `header`', async () => { + it('does not register the header banner if `banner.placement` is `top`', async () => { getBannerInfoMock.mockResolvedValue({ allowed: false, banner: createBannerConfig({ - placement: 'header', + placement: 'top', }), }); diff --git a/x-pack/plugins/banners/public/plugin.tsx b/x-pack/plugins/banners/public/plugin.tsx index 57853ece553d8..014d2de58b9ea 100644 --- a/x-pack/plugins/banners/public/plugin.tsx +++ b/x-pack/plugins/banners/public/plugin.tsx @@ -21,7 +21,7 @@ export class BannersPlugin implements Plugin<{}, {}, {}, {}> { start({ chrome, uiSettings, http }: CoreStart) { getBannerInfo(http).then( ({ allowed, banner }) => { - if (allowed && banner.placement === 'header') { + if (allowed && banner.placement === 'top') { chrome.setHeaderBanner({ content: toMountPoint(), }); diff --git a/x-pack/plugins/banners/server/plugin.test.ts b/x-pack/plugins/banners/server/plugin.test.ts index bf5dabc8fc564..b3f8c7be696cd 100644 --- a/x-pack/plugins/banners/server/plugin.test.ts +++ b/x-pack/plugins/banners/server/plugin.test.ts @@ -19,7 +19,7 @@ describe('BannersPlugin', () => { beforeEach(() => { bannerConfig = { - placement: 'header', + placement: 'top', textContent: 'foo', backgroundColor: '#000000', textColor: '#FFFFFF', diff --git a/x-pack/plugins/banners/server/ui_settings.test.ts b/x-pack/plugins/banners/server/ui_settings.test.ts index 0cf447aed71a8..9fae019774336 100644 --- a/x-pack/plugins/banners/server/ui_settings.test.ts +++ b/x-pack/plugins/banners/server/ui_settings.test.ts @@ -45,7 +45,7 @@ describe('registerSettings', () => { it('uses the configuration values as defaults', () => { const config = createConfig({ - placement: 'header', + placement: 'top', backgroundColor: '#FF00CC', textColor: '#AAFFEE', textContent: 'Some text',