IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
UI settings service
editUI settings service
editThe UI settings service is available both server and client side.
Server side usage
editThe program interface to UI settings. It makes it possible for Kibana plugins to extend Kibana UI Settings Management with custom settings.
See:
import { schema } from '@kbn/config-schema'; import type { CoreSetup,Plugin } from 'kibana/server'; export class MyPlugin implements Plugin { public setup(core: CoreSetup) { core.uiSettings.register({ custom: { value: '42', schema: schema.string(), }, }); const router = core.http.createRouter(); router.get({ path: 'my_plugin/{id}', validate: …, }, async (context, request, response) => { const customSetting = await context.uiSettings.client.get('custom'); … }); } }