diff --git a/src/core/server/core_app/assets/favicons/android-chrome-192x192.png b/src/core/server/core_app/assets/favicons/android-chrome-192x192.png deleted file mode 100644 index 18a86e5b95c46..0000000000000 Binary files a/src/core/server/core_app/assets/favicons/android-chrome-192x192.png and /dev/null differ diff --git a/src/core/server/core_app/assets/favicons/android-chrome-256x256.png b/src/core/server/core_app/assets/favicons/android-chrome-256x256.png deleted file mode 100644 index 8238d772ce40b..0000000000000 Binary files a/src/core/server/core_app/assets/favicons/android-chrome-256x256.png and /dev/null differ diff --git a/src/core/server/core_app/assets/favicons/apple-touch-icon.png b/src/core/server/core_app/assets/favicons/apple-touch-icon.png deleted file mode 100644 index 1ffeb0852a170..0000000000000 Binary files a/src/core/server/core_app/assets/favicons/apple-touch-icon.png and /dev/null differ diff --git a/src/core/server/core_app/assets/favicons/browserconfig.xml b/src/core/server/core_app/assets/favicons/browserconfig.xml deleted file mode 100644 index b3930d0f04718..0000000000000 --- a/src/core/server/core_app/assets/favicons/browserconfig.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - #da532c - - - diff --git a/src/core/server/core_app/assets/favicons/favicon-16x16.png b/src/core/server/core_app/assets/favicons/favicon-16x16.png deleted file mode 100644 index 631f5b7c7d74b..0000000000000 Binary files a/src/core/server/core_app/assets/favicons/favicon-16x16.png and /dev/null differ diff --git a/src/core/server/core_app/assets/favicons/favicon-32x32.png b/src/core/server/core_app/assets/favicons/favicon-32x32.png deleted file mode 100644 index bf94dfa995f37..0000000000000 Binary files a/src/core/server/core_app/assets/favicons/favicon-32x32.png and /dev/null differ diff --git a/src/core/server/core_app/assets/favicons/favicon.distribution.png b/src/core/server/core_app/assets/favicons/favicon.distribution.png new file mode 100644 index 0000000000000..9be046aba59b6 Binary files /dev/null and b/src/core/server/core_app/assets/favicons/favicon.distribution.png differ diff --git a/src/core/server/core_app/assets/favicons/favicon.distribution.svg b/src/core/server/core_app/assets/favicons/favicon.distribution.svg new file mode 100644 index 0000000000000..2d02461a0b8f9 --- /dev/null +++ b/src/core/server/core_app/assets/favicons/favicon.distribution.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/core/server/core_app/assets/favicons/favicon.ico b/src/core/server/core_app/assets/favicons/favicon.ico deleted file mode 100644 index db30798a6cf32..0000000000000 Binary files a/src/core/server/core_app/assets/favicons/favicon.ico and /dev/null differ diff --git a/src/core/server/core_app/assets/favicons/favicon.png b/src/core/server/core_app/assets/favicons/favicon.png new file mode 100644 index 0000000000000..cba7a268c6c59 Binary files /dev/null and b/src/core/server/core_app/assets/favicons/favicon.png differ diff --git a/src/core/server/core_app/assets/favicons/favicon.svg b/src/core/server/core_app/assets/favicons/favicon.svg new file mode 100644 index 0000000000000..4ae6524bf0d18 --- /dev/null +++ b/src/core/server/core_app/assets/favicons/favicon.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/core/server/core_app/assets/favicons/manifest.json b/src/core/server/core_app/assets/favicons/manifest.json deleted file mode 100644 index de65106f489b7..0000000000000 --- a/src/core/server/core_app/assets/favicons/manifest.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "", - "short_name": "", - "icons": [ - { - "src": "/android-chrome-192x192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "/android-chrome-256x256.png", - "sizes": "256x256", - "type": "image/png" - } - ], - "theme_color": "#ffffff", - "background_color": "#ffffff", - "display": "standalone" -} diff --git a/src/core/server/core_app/assets/favicons/mstile-150x150.png b/src/core/server/core_app/assets/favicons/mstile-150x150.png deleted file mode 100644 index 82769c1ef242b..0000000000000 Binary files a/src/core/server/core_app/assets/favicons/mstile-150x150.png and /dev/null differ diff --git a/src/core/server/core_app/assets/favicons/safari-pinned-tab.svg b/src/core/server/core_app/assets/favicons/safari-pinned-tab.svg deleted file mode 100644 index 38a64142be0b7..0000000000000 --- a/src/core/server/core_app/assets/favicons/safari-pinned-tab.svg +++ /dev/null @@ -1,34 +0,0 @@ - - - - -Created by potrace 1.11, written by Peter Selinger 2001-2013 - - - - - - - - - - diff --git a/src/core/server/core_app/integration_tests/static_assets.test.ts b/src/core/server/core_app/integration_tests/static_assets.test.ts index ca03c4228221f..45e7b79b5d5e6 100644 --- a/src/core/server/core_app/integration_tests/static_assets.test.ts +++ b/src/core/server/core_app/integration_tests/static_assets.test.ts @@ -34,11 +34,11 @@ describe('Platform assets', function () { }); it('exposes static assets', async () => { - await kbnTestServer.request.get(root, '/ui/favicons/favicon.ico').expect(200); + await kbnTestServer.request.get(root, '/ui/favicons/favicon.svg').expect(200); }); it('returns 404 if not found', async function () { - await kbnTestServer.request.get(root, '/ui/favicons/not-a-favicon.ico').expect(404); + await kbnTestServer.request.get(root, '/ui/favicons/not-a-favicon.svg').expect(404); }); it('does not expose folder content', async function () { diff --git a/src/core/server/rendering/views/template.tsx b/src/core/server/rendering/views/template.tsx index 76af229ac02ba..e4787ee26e12c 100644 --- a/src/core/server/rendering/views/template.tsx +++ b/src/core/server/rendering/views/template.tsx @@ -76,33 +76,11 @@ export const Template: FunctionComponent = ({ Elastic - {/* Favicons (generated from http://realfavicongenerator.net/) */} - - - - - - - + {/* The alternate icon is a fallback for Safari which does not yet support SVG favicons */} + + + {/* Inject stylesheets into the before scripts so that KP plugins with bundled styles will override them */} diff --git a/src/dev/build/build_distributables.ts b/src/dev/build/build_distributables.ts index 1081d5d0d6dbd..4613303808f8e 100644 --- a/src/dev/build/build_distributables.ts +++ b/src/dev/build/build_distributables.ts @@ -61,6 +61,7 @@ export async function buildDistributables(log: ToolingLog, options: BuildOptions */ await run(Tasks.CopySource); await run(Tasks.CopyBinScripts); + await run(Tasks.ReplaceFavicon); await run(Tasks.CreateEmptyDirsAndFiles); await run(Tasks.CreateReadme); await run(Tasks.BuildPackages); diff --git a/src/dev/build/tasks/copy_source_task.ts b/src/dev/build/tasks/copy_source_task.ts index b7dccf7687de8..b659022158193 100644 --- a/src/dev/build/tasks/copy_source_task.ts +++ b/src/dev/build/tasks/copy_source_task.ts @@ -31,6 +31,8 @@ export const CopySource: Task = { '!src/**/*.{test,test.mocks,mock}.{js,ts,tsx}', '!src/**/mocks.ts', // special file who imports .mock files '!src/**/{target,__tests__,__snapshots__,__mocks__}/**', + '!src/core/server/core_app/assets/favicons/favicon.distribution.png', + '!src/core/server/core_app/assets/favicons/favicon.distribution.svg', '!src/test_utils/**', '!src/fixtures/**', '!src/cli/repl/**', diff --git a/src/dev/build/tasks/index.ts b/src/dev/build/tasks/index.ts index ec0de7ca84aad..ca10fcca80498 100644 --- a/src/dev/build/tasks/index.ts +++ b/src/dev/build/tasks/index.ts @@ -38,6 +38,7 @@ export * from './transpile_babel_task'; export * from './uuid_verification_task'; export * from './verify_env_task'; export * from './write_sha_sums_task'; +export * from './replace_favicon'; // @ts-expect-error this module can't be TS because it ends up pulling x-pack into Kibana export { InstallChromium } from './install_chromium'; diff --git a/src/dev/build/tasks/replace_favicon.ts b/src/dev/build/tasks/replace_favicon.ts new file mode 100644 index 0000000000000..bdf5764b0f4e7 --- /dev/null +++ b/src/dev/build/tasks/replace_favicon.ts @@ -0,0 +1,36 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { copy, Task } from '../lib'; + +export const ReplaceFavicon: Task = { + description: 'Replacing favicons with built version', + + async run(config, log, build) { + await copy( + config.resolveFromRepo('src/core/server/core_app/assets/favicons/favicon.distribution.png'), + build.resolvePath('src/core/server/core_app/assets/favicons/favicon.png') + ); + + await copy( + config.resolveFromRepo('src/core/server/core_app/assets/favicons/favicon.distribution.svg'), + build.resolvePath('src/core/server/core_app/assets/favicons/favicon.svg') + ); + }, +}; diff --git a/x-pack/plugins/security/server/authorization/__snapshots__/reset_session_page.test.tsx.snap b/x-pack/plugins/security/server/authorization/__snapshots__/reset_session_page.test.tsx.snap index 75886b4573edd..6c6782f800ca6 100644 --- a/x-pack/plugins/security/server/authorization/__snapshots__/reset_session_page.test.tsx.snap +++ b/x-pack/plugins/security/server/authorization/__snapshots__/reset_session_page.test.tsx.snap @@ -1,3 +1,3 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`ResetSessionPage renders as expected 1`] = `"MockedFonts

You do not have permission to access the requested page

Either go back to the previous page or log in as a different user.

"`; +exports[`ResetSessionPage renders as expected 1`] = `"MockedFonts

You do not have permission to access the requested page

Either go back to the previous page or log in as a different user.

"`; diff --git a/x-pack/plugins/security/server/authorization/reset_session_page.tsx b/x-pack/plugins/security/server/authorization/reset_session_page.tsx index 5ab6fe941ae19..196191df4b655 100644 --- a/x-pack/plugins/security/server/authorization/reset_session_page.tsx +++ b/x-pack/plugins/security/server/authorization/reset_session_page.tsx @@ -46,37 +46,15 @@ export function ResetSessionPage({ ))} - - - - - - -