Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/kibana into dev/notifyFea…
Browse files Browse the repository at this point in the history
…ture
  • Loading branch information
Dosant committed Aug 31, 2020
2 parents 3e13928 + dc37cca commit 1a58d9f
Show file tree
Hide file tree
Showing 115 changed files with 2,030 additions and 1,389 deletions.
6 changes: 3 additions & 3 deletions src/core/server/ui_settings/integration_tests/lib/servers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ export function getServices() {
httpServerMock.createKibanaRequest()
);

const uiSettings = kbnServer.server.uiSettingsServiceFactory({
savedObjectsClient,
});
const uiSettings = kbnServer.newPlatform.start.core.uiSettings.asScopedToClient(
savedObjectsClient
);

services = {
kbnServer,
Expand Down
2 changes: 0 additions & 2 deletions src/legacy/server/kbn_server.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ import { LegacyConfig, ILegacyService, ILegacyInternals } from '../../core/serve
import { UiPlugins } from '../../core/server/plugins';
import { CallClusterWithRequest, ElasticsearchPlugin } from '../core_plugins/elasticsearch';
import { UsageCollectionSetup } from '../../plugins/usage_collection/server';
import { UiSettingsServiceFactoryOptions } from '../../legacy/ui/ui_settings/ui_settings_service_factory';
import { HomeServerPluginSetup } from '../../plugins/home/server';

// lot of legacy code was assuming this type only had these two methods
Expand Down Expand Up @@ -78,7 +77,6 @@ declare module 'hapi' {
name: string,
factoryFn: (request: Request) => Record<string, any>
) => void;
uiSettingsServiceFactory: (options?: UiSettingsServiceFactoryOptions) => IUiSettingsClient;
logWithMetadata: (tags: string[], message: string, meta: Record<string, any>) => void;
newPlatform: KbnServer['newPlatform'];
}
Expand Down
2 changes: 0 additions & 2 deletions src/legacy/ui/ui_mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@

import { uiAppsMixin } from './ui_apps';
import { uiRenderMixin } from './ui_render';
import { uiSettingsMixin } from './ui_settings';

export async function uiMixin(kbnServer) {
await kbnServer.mixin(uiAppsMixin);
await kbnServer.mixin(uiSettingsMixin);
await kbnServer.mixin(uiRenderMixin);
}
6 changes: 5 additions & 1 deletion src/legacy/ui/ui_render/ui_render_mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { createHash } from 'crypto';
import Boom from 'boom';
import { i18n } from '@kbn/i18n';
import * as UiSharedDeps from '@kbn/ui-shared-deps';
import { KibanaRequest } from '../../../core/server';
import { AppBootstrap } from './bootstrap';
import { getApmConfig } from '../apm';

Expand Down Expand Up @@ -79,7 +80,10 @@ export function uiRenderMixin(kbnServer, server, config) {
auth: authEnabled ? { mode: 'try' } : false,
},
async handler(request, h) {
const uiSettings = request.getUiSettingsService();
const soClient = kbnServer.newPlatform.start.core.savedObjects.getScopedClient(
KibanaRequest.from(request)
);
const uiSettings = kbnServer.newPlatform.start.core.uiSettings.asScopedToClient(soClient);

const darkMode =
!authEnabled || request.auth.isAuthenticated
Expand Down
20 changes: 0 additions & 20 deletions src/legacy/ui/ui_settings/index.js

This file was deleted.

179 changes: 0 additions & 179 deletions src/legacy/ui/ui_settings/integration_tests/ui_settings_mixin.test.ts

This file was deleted.

62 changes: 0 additions & 62 deletions src/legacy/ui/ui_settings/ui_exports_consumer.js

This file was deleted.

55 changes: 0 additions & 55 deletions src/legacy/ui/ui_settings/ui_settings_mixin.js

This file was deleted.

Loading

0 comments on commit 1a58d9f

Please sign in to comment.