mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
When on an embedded page, bypass Getting Started gate check (#12040)
* When on an embedded page, bypass Getting Started gate check * Add unit test for embedded page scenario
This commit is contained in:
parent
b994f600e5
commit
05293f1c8d
2 changed files with 15 additions and 0 deletions
|
@ -31,6 +31,16 @@ describe('Getting Started page', () => {
|
|||
set($route, 'current.$$route', {});
|
||||
});
|
||||
|
||||
describe('if the user is on an embedded page', () => {
|
||||
beforeEach(() => {
|
||||
set($route, 'current.params.embed', true);
|
||||
});
|
||||
|
||||
it('should not show the UI chrome', () => {
|
||||
expect(uiChrome.getVisible()).to.be(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('if index patterns exist', () => {
|
||||
beforeEach(() => {
|
||||
config = {
|
||||
|
|
|
@ -75,6 +75,11 @@ function showGettingStartedPage(kbnUrl, isOnGettingStartedPage) {
|
|||
export function gettingStartedGateCheck(getIds, kbnUrl, config, $route) {
|
||||
const currentRoute = get($route, 'current.$$route');
|
||||
const isOnGettingStartedPage = get(currentRoute, 'originalPath') === GETTING_STARTED_ROUTE;
|
||||
const isOnEmbeddedPage = Boolean(get($route, 'current.params.embed', false));
|
||||
|
||||
if (isOnEmbeddedPage) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
return getIds()
|
||||
.then(indexPatterns => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue