Kibana 7.6.0edit

For information about the Kibana 7.6.0 release, review the following information.

Breaking changesedit

Breaking changes can prevent your application from optimal operation and performance. Before you upgrade to 7.6.0, review the breaking changes, then mitigate the impact to your application.

Breaking changes for usersedit

There are no user-facing breaking changes in 7.6.

Breaking changes for plugin developersedit

Kibana no longer crashes when a plugin version does not match the serveredit

#54404

Kibana no longer crashes when a plugin is used against an incompatible Kibana version. A warning is now displayed in the console instead of throwing and crashing.

Generate legacy vars when rendering all applicationsedit

#54768

Rendering any type of application, even ones for the new platform, should still generate legacy vars injected into the page metadata. This ensures these vars are injected for HTTP route rendering as well.

uiSettings image upload field configedit

#54522

In uiSettings, the image upload field required specifying maxSize via the options field. This was in conflict with the stated use and type of options, which is a string[] used to populate select fields. uiOptions has been provided instead, accepting Record<string, any> values.

Replaced map.manifestServiceUrl setting in kibana.yml with map.emsTileApiUrl and map.emsFileApiUrledit

#54399

The undocumented map.manifestServiceUrl setting in kibana.yml has been replaced by map.emsTileApiUrl and map.emsFileApiUrl. These settings configure the base URL for the tile basemap manifest and vector file manifests used in Elastic Maps and the region map and coordinate map.visualizations.

Don’t expose Elasticsearch client as Observableedit

#53824

Elasticsearch clients aren’t exposed via the Observable interface anymore. Elasticsearch client provides a static API that handles all Elasticsearch config updates under the hood, transparent to the end-user.

const client = core.elasticsearch.dataClient;

const data = await client.callAsInternalUser('endpoint');
Reduce license plugin APIedit

#53489

License method isOneOf was superseded by hasAtLeast, which checks the current license is not less than passes minimal required license.

//before

license.isOneOf(['platinum', 'enterprise', 'trial'])

// after

license.hasAtLeast('platinum')
State containersedit

#52384

State containers have now been rewritten and to create state container you use createStateContainer instead of previous createStore. See full documentation.

import { createStateContainer } from 'src/plugins/kibana_utils';

const container = createStateContainer(0, {

  increment: (cnt: number) => (by: number) => cnt + by,

  double: (cnt: number) => () => cnt * 2,

});

container.transitions.increment(5);

container.transitions.double();

console.log(container.get()); // 10
Add pre-response HTTP interceptoredit

#52366

HttpService provides onPreResponse interceptor. Interceptor supports extending a response with custom headers.

 this.registerOnPreResponse((request, preResponseInfo, t) => {

   if(preResponseInfo.statusCode < 300){

     return t.next({

       headers: {

         'x-foo-header': 'bar'

       }

   });

  }

  return t.next()

});
Add server rendering service to enable standalone route renderingedit

#52161

Render a bootstrapped HTML page from a route handler using the RenderingService from your server plugin:

const router = createRouter();

router.get(

  { path: '/', validate: false },

  (context, request, response) =>

    response.ok({

      headers: {

        'content-security-policy': context.core.http.csp.header,

      },

      body: await context.core.rendering.render(),

    })

);
Disabled actionsedit

#51975

Embeddable input now has disabledActions property. Actions with ID listed in disabledActions will not be rendered by embeddable panel in drop down context menu and badge list.

const embeddable = await embeddableFactory.createFromState(

  state,

  {

    // ...

    disabledActions: ['CUSTOM_TIME_RANGE', 'CUSTOM_TIME_RANGE_BADGE'],

  },

  // ...

);
Allow chromeless applications to render via non-/app routesedit

#51527

Allow applications to routable from paths that do not start with /app. This is first enabled via the appRoute flag during UI application registration.

export class MyPlugin implements Plugin {

  setup({ application }) {

    application.register({

      id: 'my-app',

      // App can be accessed via the /my-app route

      appRoute: '/my-app',

      async mount(context, params) {

        const { renderApp } = await import('./application');

        return renderApp(context, params);

      },

    });

  }

}
Add compatibility wrapper for Boom errors thrown from route handleredit

#51157

Added a new handleLegacyErrors method to core HttpService router. The method wraps a RequestHandler to intercept any thrown Boom errors and converts them into proper NP error response.

// plugins/myplugin/server/plugin.ts

import { schema } from '@kbn/config-schema';

import { CoreSetup } from 'src/core/server';

export interface DemoPluginsSetup {};

class Plugin {

  public setup(core: CoreSetup, pluginSetup: DemoPluginSetup) {

    const router = core.http.createRouter();

    router.post(

      {

        path: '/api/myplugin/endpoint',

        validate: false,

      },

      router.wrapErrors((context, req, res) => {

        throw Boom.notFound('not there'); // will be converted into properly interpreted error

      })

    )

  }

}
Move SavedQuery to New Platformedit

#51024

Saved Query Service

Saved query service is now available on the data plugin’s query start contract.

class MyPlugin {

    public start(core: CoreStart, { data }: MyPluginDependencies) {

        const allSavedQueries = data.query.savedQueries.getAllSavedQueries()

    }

}

Saved Query UI Components

The Saved Query management UI components can be imported from data plugin directly.

   import { SavedQueryManagementComponent, SaveQueryForm } from '../../plugins/data/public';

Saved query Management component

Saved Query Management Component

Save query form

Save Query Form
Kibana app migration: Remove old APIsedit

#50881

The following undocumented APIs for scroll search and index document count have been removed:

  • POST /api/kibana/legacy_scroll_continue
  • POST /api/kibana/legacy_scroll_start
  • POST /api/kibana/{id}/_count
ChromeHelpExtensionedit

#50736

The chrome.helpExtension has been updated to where it no longer just accepts a function to spit out any content. Now, the extension looks like:

export interface ChromeHelpExtension {

  appName: string;

  links?: HeaderHelpMenuUIExtraLink[];

  // You can still pass custom content via the `content` key

  content?: (element: HTMLDivElement) => () => void;

}
Allows plugins to define validation schema for "enabled" flagedit

#50286

If you want your plugin to be disabled by default you can specify it via config:

export const config = {

  schema: schema.object({ enabled: schema.boolean({ defaultValue: true }) })

}
Add getStartServices APIedit

#50231

Context is being deprecated on the front-end and replaced by the core.getStartServices() API.

class Plugin {

  setup(core, plugins) {

    core.application.register({

      id: 'myApp',

      title: 'My App',

      // `mount` functions with just one argument will only receive `params`

      async mount(params) {

        const [coreStart, depsStart] = await core.getStartServices();

        const { renderApp } = await import('./application');

        return renderApp(coreStart, depsStart, params);

      }

    });

  }

}
Relocated @kbn/es-query package to data pluginedit

#50182

The @kbn/es-query package has been moved to src/plugins/data and is available under the esQuery namespace on both the client and the server.

// old

import {

  buildEsQuery,

  EsQueryConfig,

  buildQueryFromFilters,

  luceneStringToDsl,

  decorateQuery,

  getEsQueryConfig,

} from '@kbn/es-query';

// new

import { esQuery } from 'src/plugins/data/public'; // or `src/plugins/data/server`

esQuery.buildEsQuery(...);
Migrate share registryedit

#50137

The ui/share registry is removed in favor of the share plugin which exposes a register method in the setup contract. The interface of share menu providers does not change except for the removal of angular dependency injection. The function to render the menu also moves into a function exposed by the share plugin in the start phase instead of a function which has to be called with the menu item providers. The following items have also been renamed:

  • ShowPropsShowShareMenuOptions
  • ShareMenuItemPropsShareContext
  • showShareContextMenutoggleShareContextMenu
Ensure chromeless applications hide left navbar linkedit

#50060

Chromeless applications no longer display a navigation link in the left application menu.

Allow registered applications to hide Kibana chromeedit

#49795

When registering an application, you can now use the chromeless option to hide the Kibana chrome UI when the application is mounted.

application.register({

  id: 'my-app',

  chromeless: true,

  async mount(context, params) {

    /* ... */

  },

});
Remove react references from core Notifications APIsedit

#49573

The core NotificationService and ToastsApi methods are now framework agnostic and no longer accept react components as input. Please use kibana_react's`toMountPoint` utility to convert a react node to a mountPoint.

Shim dev toolsedit

#49349

The ui/registry/dev_tools is removed in favor of the DevTools plugin, which exposes a register method in the setup contract. Registering app works mostly the same as registering apps in core.application.register. Routing will be handled by the id of the dev tool - your dev tool will be mounted when the URL matches /app/kibana#/dev_tools/<YOUR ID>. This API doesn’t support angular, for registering angular dev tools, bootstrap a local module on mount into the given HTML element.

Kibana app migration: Shim dashboardedit

#48913

The route flag requireDefaultIndex making sure there are index patterns and the defaultIndex advanced setting is set was removed.

The same functionality can be achieved by using the helper function ensureDefaultIndexPattern from ui/legacy_compat within the resolve object of a route.

Remove react references from core OverlayService apisedit

#48431

The core OverlayService methods are now framework agnostic and no longer accept react components as input. Please use kibana_react's`toMountPoint` utility to convert a react component to a mountPoint.

For exemple:

core.overlays.openModal(<MyComponent/>)

Becomes:

core.overlays.openModal(toMountPoint(<MyComponent/>))
Supply deprecated req and res properties on IHttpFetchError for legacy compatibilityedit

#48430

Expose deprecated req: Request and res: Response properties on `IHttpFetchError`s to help plugins migrated faster by removing an additional migration burden.

Timelion server APIedit

#47813

The server side AOU of Timelion /api/timelion/run used to accept datemath strings (like now) for the time.from and time.to properties. This PR removes support for datemath, from now on only ISO8601 encoded strings are supported.

Pass along request object to all HTTP interceptorsedit

#47258

Make the Request instance available to all HTTP interceptors, which is now in a read-only state. You may now also under-specify the object returned from HTTP response interceptors to only overwrite specific properties.

Expose whitelisted config values to client-side pluginedit

#50641

New Platform plugins with both a server and client parts can now expose configuration properties to the client-side plugin.

The properties to expose must be whitelisted in the config declaration.

// my_plugin/server/index.ts

const configSchema = schema.object({

  secret: schema.string({ defaultValue: 'Not really a secret :/' }),

  uiProp: schema.string({ defaultValue: 'Accessible from client' }),

});

type ConfigType = TypeOf<typeof configSchema>;

export const config: PluginConfigDescriptor<ConfigType> = {

  exposeToBrowser: {

    uiProp: true,

  },

  schema: configSchema,

};

And can then be accessed in the client-side plugin using the PluginInitializerContext:

// my_plugin/public/index.ts

interface ClientConfigType {

  uiProp: string;

}

export class Plugin implements Plugin<PluginSetup, PluginStart> {

  constructor(private readonly initializerContext: PluginInitializerContext) {}

  public async setup(core: CoreSetup, deps: {}) {

    const config = this.initializerContext.config.get<ClientConfigType>();

    // ...

  }
Allow registering per-app navigation itemsedit

#53136

Allow registering per-app TopNavMenuItems—have a plugin register menu items into another application.

New platform plugin

class MyPlugin {

   public setup(core: CoreSetup, { navigation }: MyPluginSetupDependencies) {

      const customDiscoverExtension = {

         id: 'registered-discover-prop',

         label: 'Registered Discover Button',

         description: 'Registered Discover Demo',

         run() {},

         testId: 'demoDiscoverRegisteredNewButton',

         appName: 'discover',

      };

      navigation.registerMenuItem(customDiscoverExtension);

   }

}

Legacy plugin

const customDiscoverExtension = {

  id: 'registered-discover-prop',

  label: 'Registered Discover Button',

  description: 'Registered Discover Demo',

  run() {},

  testId: 'demoDiscoverRegisteredNewButton',

  appName: 'discover',

};

npSetup.plugins.navigation.registerMenuItem(customDiscoverExtension);
Management API for Kibana Platformedit

#52579

Management API for Kibana Platform implemented. Demonstration code available at test/plugin_functional/plugins/management_test_plugin/public/plugin.tsx

New platform applications can now prompt user with a messageedit

#54221

New platform applications can now prompt a message when users are trying to leave the app, allowing to notify them if some changes are unsaved.

   core.application.register({

      id: 'my-app',

      title: 'MyApp',

      mount: (context, { appBasePath, element, onAppLeave }) => {

        onAppLeave(actions => {

          if(someUnsavedChanges) {

            return actions.confirm(

              'Some changes are unsaved and will be lost. Are you sure you want to leave MyApp?',

              'Leaving application'

            );

          }

          return actions.default();

        });

        const div = document.createElement('div');

        div.innerHTML = '.....';

        element.appendChild(div);

        return () => div.remove();

      },

    });
[NP] Add lifecycle timeoutedit

#54129

Kibana platform deprecates async lifecycles by v8 release. Kibana supports async lifecycles for BWC, but limits their time duration to 30 sec.

Migrate config deprecations and ShieldUser functionality to the New Platformedit

#53768

In the Security Plugin, the Legacy ShieldUser angular service has been removed and replaced with the dedicated method on the Kibana platform plugin setup contract:

Before:

const currentUser = await $injector.get('ShieldUser').getCurrent().$promise;

Now:

Legacy plugin:

import { npSetup } from 'ui/new_platform';

const currentUser = await npSetup.plugins.security.authc.getCurrentUser();

Kibana platform plugin:

// manifest.json

....

[optional]requiredPlugins: ["security"],

....
// my_plugin/public/plugin.ts

public setup(core: CoreSetup, { security }: PluginSetupDependencies) {

    const currentUser = await security.authc.getCurrentUser();

}
NP Migration: Move doc views registry and existing doc views into discover pluginedit

#53465

The ui/registry/doc_views registry is removed in favor of the same functionality exposed through the setup contract of the discover plugin in core_plugins/kibana.

Old way of registering a doc view:

import { addDocView } from 'ui/registry/doc_views';

addDocView({

  title: '',

  order: 10,

  component: MyComponent,

});

New way of registering a doc view:

import { setup } from '../src/legacy/core_plugins/kibana/public/discover';

setup.addDocView({

  title: '',

  order: 10,

  component: MyComponent,

});
bfetchedit

#52888

ajax_stream has been ported to the New Platform. Use fetchStreaming() method of bfetch plugin instead.

import { npStart } from 'ui/new_platform';

const { stream, promise } = npStart.plugins.bfetch.fetchStreaming({ url: 'http://elastic.co' });
Move CSP options to New Platformedit

#52698

The default options used for managing Kibana’s Content Security Policy have been moved into core for the new platform. Relevant items exposed from src/core/server include:

  • CspConfig: TypeScript class for generating CSP configuration. Will generate default configuration for any properties not specified in initialization.
  • CspConfig.DEFAULT: Default CSP configuration.
  • ICspConfig: Interface representing CSP configuration.
Implements config deprecation in New Platformedit

#52251

New platform plugin’s configuration now supports deprecation. Use the deprecations key of a plugin’s config descriptor to register them.

 // my_plugin/server/index.ts

 import { schema, TypeOf } from '@kbn/config-schema';

 import { PluginConfigDescriptor } from 'kibana/server';



 const configSchema = schema.object({

   someNewKey: schema.string({ defaultValue: 'a string' }),

 });



 type ConfigType = TypeOf<typeof configSchema>;



 export const config: PluginConfigDescriptor<ConfigType> = {

   schema: configSchema,

   deprecations: ({ rename, unused }) => [

     rename('someOldKey', 'someNewKey'),

     unused('deprecatedProperty'),

   ],

 };
[Telemetry] Migrate ui_metric plugin to NP under usageCollectionedit

#51972

Migrates ui_metrics to NP under usageCollection.

NP licensing plugin improvementsedit

#51818

Licensing plugin retrieves license data from Elasticsearch and becomes a source of license data for all Kibana plugins on server-side and client-side.

Server-side API

The licensing plugin retrieves license data from Elasticsearch at regular configurable intervals.

  • license$: Observable<ILicense> Provides a steam of license data ILicense. Plugin emits new value whenever it detects changes in license info. If the plugin cannot retrieve a license from Elasticsearch, it will emit an empty license object.
  • refresh: () => Promise<ILicense> allows a plugin to enforce license retrieval.

Client-side API

The licensing plugin retrieves license data from licensing Kibana plugin and does not communicate with Elasticsearch directly.

  • license$: Observable<ILicense> Provides a steam of license data ILicense. Plugin emits new value whenever it detects changes in license info. If the plugin cannot retrieve a license from Kibana, it will emit an empty license object.
  • refresh: () => Promise<ILicense> allows a plugin to enforce license retrieval.
[Cloud] move cloud plugin to New Platformedit

#51789

Fully migrates cloud plugin over to NP. To use the NP contract exposed by the cloud plugin (ex cloudId or isCloudEnabled) follow this quick guide below. Note that all the plugins are already migrated to use the NP plugin in this very same PR.

// plugin/kibana.json

{

  "id": "...",

  "optionalPlugins": ["cloud"]

}

Server side: Check for cloud plugin in the setup function.

// server/plugin.ts

import { get } from 'lodash';

class Plugin {

  setup(core, plugins) {

    const { cloud } = plugins;

    // use `lodash.get` as cloud might not be available if set as an optional plugin.

		const isCloudEnabled = get<boolean>(cloud, 'isCloudEnabled', false);

    // ...

  }

}

Client side: Both cloudId and isCloudEnabled are exposed for the the plugins to consume in the plugins. Until fully transitioned to new platform, your plugins can use npSetup to access the cloud plugin.

import { npSetup } from 'ui/new_platform';

import { get } from 'lodash';

// ...

const { cloud } = npSetup.plugins;

const isCloudEnabled = get<boolean>(cloud, 'isCloudEnabled', false);
[Telemetry] Migrate Usage Collector Set to the new Kibana Platformedit

#51618

Fully migrate (server.usage.collectorSet) to New Platform under (UsageCollection) plugin. To use the UsageCollector plugin to collect server side stats with the NP follow the quick guide below (Note that all the plugins are already migrated to use this new plugin in this very same PR):

Make sure usageCollection is in your optional Plugins:

// plugin/kibana.json

{

  "id": "...",

  "optionalPlugins": ["usageCollection"]

}

Register Usage collector in the setup function:

// server/plugin.ts

class Plugin {

  setup(core, plugins) {

    registerMyPluginUsageCollector(plugins.usageCollection);

  }

}

Create and register a Usage Collector. Ideally collectors would be defined in a separate directory server/collectors/register.ts.

// server/collectors/register.ts

import { UsageCollectionSetup } from 'src/plugins/usage_collection/server';

import { CallCluster } from 'src/legacy/core_plugins/elasticsearch';

export function registerMyPluginUsageCollector(usageCollection?: UsageCollectionSetup): void {

  // usageCollection is an optional dependency, so make sure to return if it is not registered.

  if (!usageCollection) {

    return;

  }

  // create usage collector

  const myCollector = usageCollection.makeUsageCollector({

    type: MY_USAGE_TYPE,

    fetch: async (callCluster: CallCluster) => {

    // query ES and get some data

    // summarize the data into a model

    // return the modeled object that includes whatever you want to track

      return {

        my_objects: {

          total: SOME_NUMBER

        }

      };

    },

  });

  // register usage collector

  usageCollection.registerCollector(myCollector);

}
Move SearchBar to NPedit

#51028

The SearchBar component is now available by importing from the data plugin.

import { SearchBar } from '../../../plugins/data/public';

There is also a stateful version available, that requires much fewer dependencies

export class MyPublicPlugin {

  public start(

    core: CoreStart,

    { data }: MyPublicPluginDependencies

  ) {

    const { SearchBar } = data.ui;

    ...

    return <SearchBar

       ...

    ></SearchBar>

  }

}
Move QueryBarInput to New Platformedit

#51023

  • QueryBarInput was renamed to QueryStringInput and moved to src/plugins/data/public
  • The typeahead UI component can now be used independently of QueryStringInput. It can be imported from src/plugins/data/public.
   import { QueryStringInput, SuggestionsComponent } from '../../plugins\data\public'
Move ApplyFiltersPopover to New Platformedit

#51022

The ApplyFiltersPopover component is no longer exported.

If you wish to open the filter selection popover, use the Actions API from within an embeddable:

 await uiActions.executeTriggerActions(APPLY_FILTER_TRIGGER, {

    embeddable: this,

    filters,

 });
Deprecated the filter-bar directiveedit

#51020

If you need to render a filter bar from angular, use the kbn-top-nav directive with the following configuration:

<kbn-top-nav

  app-name="'my-app'"

  show-search-bar="true"

  show-filter-bar="true"

  show-save-query="false"

  show-date-picker="false"

  filters="filters"

  on-filters-updated="updateFilters"

  index-patterns="[indexPattern]"

>

</kbn-top-nav>

Move FilterBar React component to New Platform

The FilterBar component is now available by importing from the data plugin.

import { FilterBar } from '../../../plugins/data/public';

Move filter related utilities to New Platform

  • IDataPluginServices ⇒ import from data
  • getDisplayValueFromFilterdata.utils
  • buildCustomFilteresFilters.buildCustomFilter
  • buildFilteresFilters.buildFilter
  • getFilterParamsesFilters.getFilterParams
  • getIndexPatternFromFilterutils.getIndexPatternFromFilter
  • getQueryDslFromFilter ⇒ replaced with esFilters.cleanFIlter
  • isFilterable ⇒ import from data
NP Kibana plugin home feature catalogueedit

#50838

The ui/registries/feature_catalogue module has been deprecated for removal in 8.0.

Plugins wishing to migrate may remove their usage of ui/registries/feature_catalogue and rely on either:

// For legacy plugins

import { npSetup } from 'ui/new_platform';

npSetup.plugins.home.featureCatalogue.register(/* same details here */);

// For new plugins: first add 'home` to the list of `optionalPlugins`

// in your kibana.json file. Then access the plugin directly in `setup`:

class MyPlugin {

  setup(core, plugins) {

    if (plugins.home) {

      plugins.home.featureCatalogue.register(/* same details here. */);

    }

  }

}

Note that the old module supported providing a Angular DI function to receive Angular dependencies. This is no longer supported as we migrate away from Angular.

[NP Kibana Migrations ] Kibana plugin homeedit

#50444

The API to register new tutorials was moved to the new platform. You are now able to add new tutorials by creating a plugin in the new platform, adding a dependency to home in its kibana.json and using the tutorials.registerTutorial method in the setup lifecycle:

class MyPlugin {

  setup(core: CoreSetup, plugins: { home: HomeServerPluginSetup }) {

    home.tutorials.registerTutorial(() => ({ /* tutorial definition */ }));

  }

}

It is still possible to register tutorials from within the legacy platform by calling the same method exposed on the server object:

server.newPlatform.setup.plugins.home.tutorials.registerTutorial(() => ({ /* tutorial definition */ }));
Expressions fully migrated to the New Platformedit

#50294

The Expressions service has been moved to the New Platform. Moving forward, any expressions-related code should be consumed via the new plugin’s contracts (src/plugins/expressions).

Use it in your New Platform plugin:

class MyPlugin {

  setup (core, { expressions }) {

    expressions.registerFunction(myFunction);

    // ...

  }

  start (core, { expressions }) {

    expressions.execute(myExpression);

    // ...

  }

}

Or, in your legacy platform plugin, consume it through the ui/new_platform module:

import { npSetup, npStart } from 'ui/new_platform';

npSetup.plugins.expressions.registerFunction(myFunction);

npStart.plugins.expressions.execute(myExpression);

// ...
Move generateFilters to NPedit

#50118

Filter generator is now available as a utility function in the data plugin.

import { generateFilters } from '../plugins/data/public';

const { filterManager } = plugins.data.query;

const filters = generateFilters(filterManager, field, values, negate, indexString);
Move Query type to NPedit

#49636

Moved the data Query type, used to represent a query string in a specific querying language to src/plugins/data.

// previously

import { Query } from `src/legacy/core_plugins/data/public`;

// now

import { Query } from `src/plugins/data/public`;
Move Timefilter service to NPedit

#49491

Moved the timefilter service to New Platform.

Usage in Old Platform:

import { TimeRange } from 'src/plugins/data/public';

import { npSetup, npStart } from 'ui/new_platform';

const { timefilter } = npStart.data.timefilter;

const timeRange: TimeRange = timefilter.getTime();

const refreshInterval: RefreshInterval = timefilter.getRefreshInterval()

Usage in New Platform:

class MyPlugin {

   public setup(core: CoreSetup, { data }: MyPluginSetupDependencies) {

      const timeRange: TimeRange = data.timefilter.timefilter.getTime();

   }

   public start(core: CoreStart, { data }: MyPluginStartDependencies) {

      const newTimeRange = { from: getYesterday(), to: getNow() }

      data.timefilter.timefilter.setTime(newTimeRange);

   }

}
Move Storage to New Platformedit

#49448

Move Storage to kibana_utils.

  • Move Storage class to NP, and introduce the interface IStorageWrapper for when we only pass storage around.
  • Rename places where storage was called store
  • Load the Storage directives only where applicable (not in autoload)
Licensing pluginedit

#49345

Add x-pack plugin for new platform public licensing information. This will eventually replace the licensing information consumed via xpack_main. Upon setup, this plugin exposes an observable API for inspecting and making checks against the license information.

license$.subscribe(license => {

   console.log(license.uid);

   console.log(license.isActive);

   console.log(license.type);

   const { state } = license.check('my-plugin', LICENSE_TYPE.gold);

   if (state !== LICENSE_STATUS.Valid) {

     disableSomething();

   }

});
Migrate ui/registry/feature_catalogue to New Platform pluginedit

#48818

The ui/registries/feature_catalogue module has been deprecated for removal in 8.0.

Plugins wishing to migrate may remove their usage of ui/registries/feature_catalogue and rely on either:

// For legacy plugins

import { npSetup } from 'ui/new_platform';

npSetup.plugins.feature_catalogue.register(/* same details here */);

// For new plugins: first add 'feature_catalogue` to the list of `optionalPlugins`

// in your kibana.json file. Then access the plugin directly in `setup`:

class MyPlugin {

  setup(core, plugins) {

    if (plugins.feature_catalogue) {

      plugins.feature_catalogue.register(/* same details here. */);

    }

  }

}

Note that the old module supported providing a Angular DI function to receive Angular dependencies. This is no longer supported as we migrate away from Angular.

Migrate necessary ui/autoload functionality to NPedit

#48689

The ui/autoload/styles and ui/autoload/settings modules have been removed and are no longer necessary to import in your plugin code. Remove these imports starting in 7.6.

If you still require font awesome, you should import it manually from the npm module:

import 'font-awesome/less/font-awesome';
Provide uiSettings service in NPedit

#48413

New platform plugins can register custom uiSettings via the uiSettings.register method.

// src/plugins/my-plugin/server/plugin.ts

setup(core: CoreSetup){

  core.uiSettings.register({

    'my-plugin:my-setting': {

      name: 'just-work',

      value: true,

      description: 'make it work',

      category: ['my-category'],

    },

  })

}

Access UiSettings client

  • Via RequestHandlerContext on server-side:
(context, req, res) {

  const uiSettingsClient = context.core.uiSettings.client;

  const value = await uiSettings.get('myPlugin:key');

  // ...

}
  • Via core interface in setup/start lifecycles on the client-side:
public start({ uiSettings }) {

  const value = uiSettings.get('myPlugin:key');
Move FilterManager to New Platformedit

#48391

Moved Filter Manager to New Platform.

Usage in Old Platform

import { npSetup, npStart } from 'ui/new_platform';

npStart.data.query.filterManager.getFilters()

...

Usage in New platform

class MyPlugin {

   public setup(core: CoreSetup, { data }: MyPluginSetupDependencies) {

      data.query.filterManager.getFilters();

   }

   public start(core: CoreStart, { data }: MyPluginStartDependencies) {

      data.query.filterManager.getFilters();

   }

}
Migrate ui/doc_title to New platformedit

#48121

Migrate chrome.docTitle to new platform. Plugins can now change the page title using this API.

coreStart.docTitle.change('My Title');
Use NP registry instead of ui/registry/field_formatsedit

#48108

The FieldFormats service has been moved to the data plugin in the New Platform. If your plugin has any imports from ui/registry/field_formats, you’ll need to update your imports as follows:

Use it in your New Platform plugin:

class MyPlugin {

  setup (core, { data }) {

    data.fieldFormats.register(myFieldFormat);

    // ...

  }

  start (core, { data }) {

    data.fieldFormats.getType(myFieldFormatId);

    // ...

  }

}

Or, in your legacy platform plugin, consume it through the ui/new_platform module:

import { npSetup, npStart } from 'ui/new_platform';

npSetup.plugins.data.fieldFormats.register(myFieldFormat);

npStart.plugins.data.fieldFormats.getType(myFieldFormatId);

// ...
ui/management to New Platformedit

#45747

The following interfaces were previously available under ui/management and are now available via import { setup as managementSetup }` from '${correct path to top dir}src/legacy/core_plugins/management/public/legacy';

  • ui/management/saved_objects_management
  • ui/management/index_pattern_creation
  • ui/management/index_pattern_list
ui/public cleanupedit

#43511

Removed / moved modules

In preparation for Kibana’s upcoming new platform, we are in the process of migrating awayfrom the ui/public directory. Over time, the contents of this directory will be either deprecated or housed inside a parent plugin.

If your plugin imports the listed items from the following ui/public modules, you will need to either update your import statements as indicated below, so that you are pulling these modules from their new locations, or copy the relevant code into your plugin.

ui/state_management #51835 #52172 #52280 #53582

The hashUrl and unhashUrl functions no longer rely on states being provided as an argument, therefore getUnhashableStates/getUnhashableStatesProvider have been removed.

// old

import {

  hashUrl,

  unhashUrl,

  getUnhashableStatesProvider, // deprecated

} from 'ui/state_management/state_hashing';

const getUnhashableStates = Private(getUnhashableStatesProvider);

unhashUrl(window.location.href, getUnhashableStates());

hashUrl([new AppState(), globalState], myRedirectUrl);

// new

import { hashUrl, unhashUrl } from '../../plugins/kibana_utils/public'

hashUrl(window.location.href);

unhashUrl(myRedirectUrl);

HashedItemStore was also moved to the kibana_utils plugin.

// old

import { HashedItemStoreSingleton } from 'ui/state_management/state_storage'

// new

import { hashedItemStore } from '../../plugins/kibana_utils/public'

Created new state syncing utilities for syncing state between state containers and different type of state storage (e.g. query params in URL or session storage).

Example app: examples/state_containers_examples

This should become a replacement for AppState and GlobalState in NP.

ui/public/utils cleanup

  • base_object and find_by_param utilities have been removed #52500
  • decode_geo_hash and zoom_to_precision utilities have been moved to ui/vis/maphttps://github.com/elastic/kibana/pull/52615[#52615]
  • range utility has beed moved to ui/vis/editors/default #52615
  • cidr_mask, date_range, geo_utils, ip_range, ordinal_suffix utilities have been moved to ui/agg_types #52744
  • case_conversion #53819
  • keysToSnakeCaseShallow moved to src/legacy/server/status/lib
  • keysToCamelCaseShallow moved to src/legacy/core_plugins/kibana/public/management
  • collection #53819
  • organizeBy moved to `src/legacy/ui/public/indexed_array
  • pushAll was removed
  • diff_object moved to `ui/state_management #53819
  • function was removed #53819
  • key_map moved to ui/directives #53819
  • math moved to ui/vis #53819
  • numeric moved to src/legacy/core_plugins/kibana/public/management #53819
  • parse_interval moved to`src/legacy/core_plugins/data/common` #53819
  • sort_prefix_first moved to x-pack/legacy/plugins/kuery_autocomplete #53819
  • supports moved to src/legacy/core_plugins/tile_map/public #53819
Index Patterns moved to New Platformedit

#43438

The indexPatterns service is now available from the data plugin.

class MyPlugin {

  start(core, data) {

    const indexPatterns = data.indexPatterns.get(indexPatternId);

    ...

  }

}

Type Definitions

  • The IndexPattern type replaces the legacy StaticIndexPattern type
  • IndexPattern was moved to the new plugin.
  • FieldList was moved to the new plugin and the IFieldList type was added.
  • Field was moved to the new plugin, along side the IFieldType type.
    import { IIndexPattern, IFieldType } from 'src/plugins/data/public';

    const indexPattern: IIndexPattern = data.indexPatterns.find(indexPatternId);

    const field: IFieldType[] = indexPattern.fields;

Helper functions

    import { indexPatterns as indexPatternsUtils } from 'src/plugins/data/public';

    const indexPattern: IIndexPattern = indexPatterns.getFromSavedObject(savedObject)

    const isValid = indexPatterns.validateIndexPattern(indexPatternString)

Deletions

  • IndexPatternAlreadyExists
  • NoDefaultIndexPattern
  • NoDefinedIndexPatterns

Known issueedit

  • When you use the default dateFormat:tz: browser setting, the timestamps appear in UTC instead of the local time of the user browser. To use the local time of the user browser, set dateFormat:tz: to the timezone of the user. #57457
  • The server.customResponseHeaders option prevents Kibana from starting if headers are set using a type other than string. To fix this, convert your boolean and number headers to strings. For example, use my-header: "true" instead of my-header: true. #66146

Enhancementsedit

APM
  • Updates apm index pattern #54095
  • Adds service name to jvm #50830
  • Adds filter option to Metadata table #48520
  • Updates Error occurrences graph tooltip to display start and end for bucket period #49638
  • Pagination of top 10 trace samples #51911
  • Makes it possible to link directly to a trace with just the trace.id #51450
  • Transaction page throws unhandled exception if transactions doesn’t have http.request #53760
  • Adds message fields to metadata table #54017
  • Shows errors on the timeline instead of under the transaction #53756
  • Traces with identical transactions names are combined, even though they are from different services #54247
  • Uses indexPatternsService for kuery bar suggestions #49169
  • Migrates server routes to NP #49455
  • Adds service.version filter to transaction views #52748
  • Adds version annotations to timeseries charts #52640
  • Error stack trace improvements #49254
  • Performance comparison charts by user agent (browser) #49582
  • Adds UI Indices runtime configuration #48079
  • Updates apm index pattern #54693
  • Clears cache when updating indices via UI #51767
Canvas
  • Enables Embeddable maps #53971
  • Uses compressed forms in sidebar #49419
Dashboard
  • Redesigns empty screen #53681
  • Adds visualization from dasbhoard empty screen #52670
  • Redesigns empty screen in readonly mode #54073
  • Adds Lens to Dashboard #53110
  • Improves "Create new" UI in dashboard #49189
Discover
  • Refactors discover index pattern selector to Lens ChangeIndexPattern Component #51973
  • Adds nested field support to KQL #47070
  • Supports nested fields in existing filter types #49537
  • Disables/enables filter with click+shift on a filter badge #52751
  • Possibility to filter when testing scripted fields (#35379) #44220
  • Adds label and icon to nested fields in the doc table #54199
Graph
  • Improves error message on graph requests #54230
  • Adds sample data #54558
Lens
  • Allows numeric terms aggs #50177
  • Adds support for scripted fields and default index pattern #53948
  • Loads Lens together with kibana app #50164
  • Disables saving visualization until there are no changes to the document #52982
  • Adds clear layer feature #53627
  • Adds support for scripted fields and aliases to the existence API #54064
Logs
  • Log rate setup index validation #50008
  • Adds categories table to the categorization tab #53004
  • Disables ML job setup form while setup is pending #54705
Machine Learning
  • Updates Anomaly Detection job wizard button styles, page panel and titles #53340
  • Improves processing of groups in data recognizer wizard #49310
  • Indicates missing required privileges for import in File Data Visualizer #50147
  • Stats bar for data frame analytics #49464
  • Adds the job message tab to data frame analytics #50468
  • Reactive time-range selection in Single Metric Viewer #51008
  • Adds Custom URLs and Calendars to the Job wizards #51281
  • Performs cardinality check on enabling the model plot #51915
  • Fetches the latest job messages and enables sorting by time #52388
  • Persists the time range brush when expanded to full width #54020
  • Supports search for partitions on Single Metric Viewer #53879
  • APM modules configs for RUM Javascript and NodeJS #53792
  • Model memory limit calculator enhancements for multi-metric job wizard #54573
  • Data Visualizer redesign #54358
  • Formatting for additional timing and model size stats #55062
  • Adds ML node warning to overview and analytics pages #50766
  • Enables lat_long detector function in advanced wizard #50787
  • Categorization wizard #53009
  • Regression results view #49667
  • Auto-populate model_memory_limit #50714
  • Reruns evaluate endpoint for search bar queries #50991
  • Adds search bar #51235
  • Creates classification jobs via the UI #51619
  • Adds description field to job creation and display in jobs list #52217
  • Creates classification jobs results view #52584
  • Adds excludes input field to form #53856
  • Adds link to docs #54189
  • Uses field caps api to set column type #54543
  • Truncates text in Overview page Latest timestamp column #50004
  • Color Range Legend component #52794
Management
  • Support scheme field when creating a Threshold alert with a Webhook action #53757
  • Adds Mappings Editor to Index Template Wizard #47562
  • SearchProfiler to NP #48795
  • Upgrade Assistant to New Platform Ready #50163
  • License Management to New Platform #51886
  • New Platform (NP) Migration #50908
  • Console with better SQL support #51446
  • Allows User to Cleanup Repository from UI #53047
  • Updates advanced settings text for usage data #52657
Maps
  • Makes grid rectangles the default symbolization for geo grid source #50169
  • Focuses inputs when editor opens popovers #51487
  • Uses style metadata to calculate symbolization bands #51713
  • Better style defaults #52420
  • Vector style UI redesign #53946
  • Allows editing EMS basemap selection #53631
  • Adds text halo color and width style properties #53827
  • Adds labels to sample data maps #54671
  • Adds categorical styling #54408
  • Hides map visualization types with default kibana.yml settings #49103
  • Hides header panel in embeddable panel #50728
Metrics
  • Calculates interval based on the dataset’s period #50194
  • Ports graphql query for snapshot and node details to hapijs #50730
  • Adds ability to filter snapshot view by account and region #53307
  • Adds inventory metadata api with regions and accounts #52660
  • Removes graphql types #54176
  • Adds AWS Metricsets to Inventory Models #49983
Monitoring
  • Fetches shard data more efficiently #54028
  • Displays APM server memory in bytes #54275
Operations
  • Adds support for log rotation #49750
Monitoring
  • h1 elements for accessibility #52276
Platform
  • Allows routes to define some payload config values #50783
  • Moves IndexPatterns into the NP #51199
  • Moves configuration validation to new platform #51880
  • Improves "Browser client is out of date" error message #50296
Reporting
  • Converts main Reporting index to TS #49129
  • Removes any types and references to Hapi #49250
  • Updates some runtime validations #53975
Security
  • Role Mappings UI #53620
  • Adds message to login page #51557
  • Updates Node.js to version 10.18.0 #52865
  • Improves session idle timeout, add session lifespan #49855
  • Adds support for certificates in PKCS#12 (P12) key stores #53810
SIEM
  • New Overview Page #54783
  • Adds DNS histogram #50409
  • Adds alerts table #51959
  • Histogram enhancement #54544
  • Dns histogram enhancement #54902
  • Tests for search_after and bulk index #50129
  • Adds ecs threat properties to rules #51782
  • Sets Signal status open closed REST API #52356
  • Search signals index #52661
  • Adds created_at and updated_at timestamps to rules #53137
  • Rule Status Monitoring #54452
  • Adds filtering abilities to the KQL REST API #49451
  • REST API Additions #50514
  • REST API improvements and changes from UI/UX feedback #50797
  • Adds of risk score, output index, rule copying, and more #51190
  • Adds signal data index per spaces through index naming conventions #52237
  • Adds privileges API endpoint #52707
  • Adds a tags service and optimizes alert_id lookups #52838
  • Adds prepackaging rules capability #53062
  • Adds timeline_id string to rules #53343
  • Bulk REST API for create, update, and delete #53543
  • Import/Export REST endpoints #54332
  • Time gap detection and logging #54547
  • Adds Rules Table #50839
  • Adds Signals Table and additional configuration options to StatefulEventsViewer #52044
  • Adds support for apm-* to the network map #54876
  • HTTP Requests table #49955
  • Adds Authentications histogram #48260
  • Adds hosts and network anomalies histogram #50295
  • Detection engine placeholders #50220
  • Adds SavedQuery in Timeline #49813
  • Adds creation rule #51376
  • Adds edit on rule creation #51670
  • Adds MITRE ATT&CK #52398
  • Details and Edit view for a rule #53252
  • Permission II #54292
  • Adds status to rule details #54812
  • From signals to timeline #54769
  • Detections create prepackage rules #55403
  • Feedback to user about generated encryption key #56464
Uptime
  • Updates snapshot counts #48035
  • Migrates Uptime server routing to new platform #51125
  • Adds tags dropdown to Overview filters group #50837
  • New monitor list expanded row #46567
  • Adds options to disable zoom, hide tool tips, widgets/overlays in embeddable maps #50663
  • New details panel and location map #50518
  • Lists external linking #53098
  • Monitor details page left side title #53529
  • Monitor SSL Certificate Color version for warning #54040

Bug fixesedit

APM
  • Upgrades APM migration script v1 support #52824
  • Adds missing semi-colon to styled component #51436
  • Quick fix for ACM to ensure more than 10 items are displayed #52262
  • Sets no of ticks based on available width for chart #50904
  • Make sure errors per minute are reported correctly #54751
  • Fixes firefox SVG NaN errors when rendering charts #56578
  • Fixes initial error sort field #56577
  • Empty message "No data available" for Labels and User metadata sections missing #49846
Canvas
  • Fixes axisConfig position argument UI #50717
  • Fixes #45896 #50229
  • Fixes bugs with full screen filters #54792
  • Fixes the Copy Post Url link #54831
  • Fixes color and toggle accessibility #54661
Dashboard
  • Removes double handler #53707
  • Decodes url params, so they are not encoded twice #54738
  • Changes background color to align with EUI color #54060
  • Fixes hide edit button for mobile for dashboards #50639
Discover
  • Fixes histogram min interval #53979
  • Improves kql error message handling and avoid fetching twice #54239
  • Fixes double fetch errors #54701
  • Fixes pagination controls should not scroll horizontally for saved search #50764
  • Don’t throw exception when refreshing fields of an index pattern #55836
  • Fixes filter pill label for filters with negated alias #50743
  • Filters scripted fields preview field list to source fields #53826
  • Fixes operator overflowing out popover #50030
Graph
  • Only show explorable fields #54101
Lens
  • Modifies merge tables to use the same logic as auto date #52931
  • Selects Records field when count operation is chosen #53911
  • Shows keyword fields for pre-7.3 index patterns #52410
  • Fixes sorting crash when removing a Y axis that is being used for sorting #52694
  • Shows fields when using index pattern without time field #54804
  • Fixes bugs in Lens filters #56441
Logs
  • Adds missing headers in Logs & metrics #52405
  • Uses the correct icons and labels in the feature cont… #55292
  • Allows Logs/ML integration result access with machine… #55884
  • Fixes the scale of the search markers #55731
Machine Learning
  • Fixes escape special characters for Lucene query language #50494
  • Keeps rule editor flyout open on refresh #53458
  • Fixes counters and percentages for array fields on the Data Visualizer page #55209
  • Fixes tooltip’s persistence on mouse leave #55694
  • Fixes Anomaly Explorer swimlane tooltip issue #55827
  • Fixes the annotation area tooltip offset #55955
  • Fixes info content detector field selection #51914
  • Job validation loading spinner #54450
  • Improves job wizards with datafeed aggregations #55180
  • Fixes missing job_type in job messages search #55330
  • Fixes module setup error for insufficient index pattern privileges #55989
  • Ensures advanced editor can be validated when empty #52831
  • Ensures advanced editor validates model memory unit correctly #54011
  • Ensures result field columns can be deselected and re-selected #54766
  • Only render tablist if it contains tabs #54838
  • Improves handling of text fields #55002
  • Filters out docs with no prediction data from results table #54826
  • Fixes word wrap in Overview page sidebar on IE #50668
  • Fixes lat_long anomalies table links menu and value formatting #50916
  • Fixes loading of Data Visualizer with KQL saved search #51882
  • Corrects URL of the create job tips docs page #53576
  • Displays anomaly actual in chart tooltip when model plot enabled #54364
  • Fixes permissions checks for Data Visualizer create job links #55431
  • Fixes empty table header cell and duplicate ID accessibility issues #54917
  • Accessibility fix for structural markup on table rows #55075
Management
  • Kibana should allow a min_age setting of 0ms in ILM policy phases #53719
  • Adds try/catch when parsing index filter from URI #56051
  • Passes termOrder and hasTermsAgg properties to serializeThresholdWatch function #54391
  • Adds support for capitalized date formats in snapshot names #53751
  • Index Lifecycle Policies show wrong unit in Kibana UI #55228
  • Theme and Mode imports #50473
  • Proxy fallback #50185
  • Fixes load from remote #52814
  • Fixes suggested value for time_zone in range query #53841
  • Handle double quote special case #54474
  • Fixes handling of bad profile data and update tab behavior #55806
  • Fixes icon path in tutorial introduction #49684
  • Fixes index templates editor to support mappings types #55804
Maps
  • Fixes regression preventing maps telemetry from populating & remove task manager logic #52834
  • Categorical palettes #54918
  • Do not re-fetch data on empty filter setting changes #49382
  • Fixes removal of multi fields for tooltip field selection #49816
  • Prevents users from overflowing URL when filtering by shape #50747
  • Only provide visibility check when vector layer has joins #51388
  • Fixes too_many_buckets_exception for top hits #51497
  • Only show styles that apply to layer feature types in legend #52335
  • Fixes tooltips for CCS #52793
  • Passes getFieldFormatter to DynamicTextProperty #53937
  • Expands extent filter to tile boundaries #54276
  • Fixes warning about missing key in react element #55372
  • Fixes join metric field selection bugs #56044
  • Adds mapbox-gl-rtl-text library for RTL languages #54842
  • Ensures the query-object is populated #49917
  • Delays vector tile layer syncing until spritesheet is loaded #48955
  • Sanitizes attribution #52309
  • Only show legend when layer is visible #53781
  • Shows custom color ramps in legend #53780
  • Enforces file-type check in file dialog #55063
Metrics
  • Fixes Metrics Explorer exception when deleting metric #55893
  • Fixes title truncation in Metrics Explorer #55917
  • Passes relevant shouldAllowEdit capabilities into SettingsPage #49781
  • Don’t allow duplicate saved views with the same name #52040
  • Adds aria labels to fields #54510
Monitoring
  • Fixes Logstash pipelines page in multi-cluster environment #50166
  • Improves permissions required around setup mode #50421
  • Adds error state for unstructured logs #53299
  • Ensures setup mode work in a CCS environment #54361
  • Clarifies that these auth settings are for sending data #48437
Operations
  • Adds missing docker settings #56411
  • Prevents xpack.task_manager.index being set to .tasks #52002
Platform
  • Displays changed field formats without requiring hard page refresh. #52874
  • Kibana 7.0.0 URL field formatter doesn’t render relative hyperlinks properly #53265
  • Interpreter conversion of string to number should throw on NaN #27788 #50063
  • Cancels discarded KQL value suggestion requests #51411
  • Performs successful Elasticsearch version check before migrations #51311
Reporting
  • Do not fail the report if request is aborted #52344
  • Fixes map tiles not loading by using Chrome’s Remote Protocol #55137
  • Corrects the docvalue_fields params in the search query Download CSV from Dashboard Panel #52833
Security
  • Uses the server’s basePath when building the SAML ACS #51391
  • Fixes elasticsearch.ssl.alwaysPresentCertificate default #52242
  • Forces line-break if username is a solid long string #50807
  • Fixes infinite redirect loop when multiple cookies are sent #50452
  • Honors configured base path when logging out #50946
SIEM
  • Fixes Empty Source / Destination shown when only ports are populated #50843
  • Removes placeholder from pinned event tooltips #52361
  • Adds filter feature and fixes misc bugs around false values #50999
  • Fixes a bug to allow empty query string when filters are set #51398
  • Adds signal to ECS event.kind and fixes status in signals #51772
Uptime
  • Removes react-router-dom warning in browse #52008
  • Fixes broken functional tests in master #54395
  • Donut chart loader position centered vertically #50219
  • Fixes monitor list pagination arrows #51912
  • Expanded list update most recent error timestamp #51935
  • Feature/monitor details view avoid empty column #51892
  • Feature/expandable row in details ping list #51890
  • Date picker will use commonly used ranges from advance settings #52944
  • Fixes broken Duration chart on Monitor Page #54251
  • Ping List Disable expand row if no body present #54898
  • Fixes Date Range picker stop refresh button #55499
  • Ping histogram uses auto date histogram #55605
  • Uses dynamic index pattern in Uptime #55446
  • Refreshes absolute date ranges for Ping Histogram #56381
Visualizations
  • Adds domain fit option for 0 opacity TSVB line charts #54314
  • Adds default filename when exporting CSV #54003
  • Fixes height of CodeEditor - Safari #56050
  • Fixes missing labels on certain axes and label filter configurations #47563
  • Formats CSV properly #54127
  • Flags nested fields as non-aggregatable #51774

Deprecationsedit

Metrics
  • Deprecates the override fields in settings #54206
Security
  • Additional validation for elasticsearch username #48247