kibana/x-pack/plugins/cloud/server/config.ts
Ahmad Bamieh 9fe302cf17
[Cloud] move cloud plugin to np (#51789)
* move cloud dir to plugins from legacy

* first iteration moving to NP

* config as observable

* finish plugin

* migrate xpack.cloud.apm.*

* self code review

* remove unused lodash get

* use lodash get to get configs

* export SerializedDatatable

* eslint fix

* eslint fix

* fix setup type

* fix monitoring tests

* fix test mock function

* resolve ELASTIC_SUPPORT_LINK in core

* running check_core_api_changes script

* review feedback

* mock setHelpSupportUrl

* update snapshots
2019-12-05 08:20:28 -05:00

34 lines
937 B
TypeScript

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { schema, TypeOf } from '@kbn/config-schema';
import { PluginConfigDescriptor } from 'kibana/server';
const apmConfigSchema = schema.object({
url: schema.maybe(schema.string()),
secret_token: schema.maybe(schema.string()),
ui: schema.maybe(
schema.object({
url: schema.maybe(schema.string()),
})
),
});
const configSchema = schema.object({
enabled: schema.boolean({ defaultValue: true }),
id: schema.maybe(schema.string()),
apm: schema.maybe(apmConfigSchema),
});
export type CloudConfigType = TypeOf<typeof configSchema>;
export const config: PluginConfigDescriptor<CloudConfigType> = {
exposeToBrowser: {
id: true,
},
schema: configSchema,
};