Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { management } from 'ui/management';
import { i18n } from '@kbn/i18n';
import chrome from 'ui/chrome';
import { metadata } from 'ui/metadata';
import { take } from 'rxjs/operators';
import { JOBS_LIST_PATH } from './management_urls';
import { setDependencyCache } from '../util/dependency_cache';
import './jobs_list';
Expand All @@ -31,11 +32,11 @@ type PluginsSetupExtended = typeof npSetup.plugins & {
};

const plugins = npSetup.plugins as PluginsSetupExtended;
const licencingSubscription = plugins.licensing.license$.subscribe(license => {
// only need to register once
const licensing = plugins.licensing.license$.pipe(take(1));
licensing.subscribe(license => {
if (license.check(PLUGIN_ID, MINIMUM_FULL_LICENSE).state === LICENSE_CHECK_STATE.Valid) {
initManagementSection();
// unsubscribe, we only want to register the plugin once.
licencingSubscription.unsubscribe();
}
});

Expand Down
3 changes: 1 addition & 2 deletions x-pack/test/functional/apps/lens/lens_reporting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const listingTable = getService('listingTable');

// FLAKY: https://github.com/elastic/kibana/issues/59229
describe.skip('lens reporting', () => {
describe('lens reporting', () => {
before(async () => {
await esArchiver.loadIfNeeded('lens/reporting');
});
Expand Down