Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate kibana.defaultAppId setting #67635

Merged
merged 3 commits into from
Jun 3, 2020
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
2 changes: 1 addition & 1 deletion docs/setup/docker.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Some example translations are shown here:
[horizontal]
**Environment Variable**:: **Kibana Setting**
`SERVER_NAME`:: `server.name`
`KIBANA_DEFAULTAPPID`:: `kibana.defaultAppId`
`SERVER_BASEPATH`:: `server.basePath`
`MONITORING_ENABLED`:: `monitoring.enabled`

In general, any setting listed in <<settings>> can be
Expand Down
4 changes: 3 additions & 1 deletion docs/setup/settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,9 @@ on the {kib} index at startup. {kib} users still need to authenticate with
| Enables use of interpreter in Visualize. *Default: `true`*

| `kibana.defaultAppId:`
| The default application to load. *Default: `"home"`*
| *deprecated* This setting is deprecated and will get removed in Kibana 8.0.
Please use the `defaultRoute` advanced setting instead.
The default application to load. *Default: `"home"`*

| `kibana.index:`
| {kib} uses an index in {es} to store saved searches, visualizations, and
Expand Down
20 changes: 19 additions & 1 deletion src/plugins/kibana_legacy/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@
* under the License.
*/

import { CoreSetup, CoreStart, PluginConfigDescriptor } from 'kibana/server';
import {
ConfigDeprecationLogger,
CoreSetup,
CoreStart,
PluginConfigDescriptor,
} from 'kibana/server';
import { get } from 'lodash';

import { configSchema, ConfigSchema } from '../config';

Expand All @@ -29,6 +35,18 @@ export const config: PluginConfigDescriptor<ConfigSchema> = {
deprecations: ({ renameFromRoot }) => [
// TODO: Remove deprecation once defaultAppId is deleted
renameFromRoot('kibana.defaultAppId', 'kibana_legacy.defaultAppId', true),
(completeConfig: Record<string, any>, rootPath: string, log: ConfigDeprecationLogger) => {
if (
get(completeConfig, 'kibana.defaultAppId') === undefined &&
get(completeConfig, 'kibana_legacy.defaultAppId') === undefined
) {
return completeConfig;
}
log(
`kibana.defaultAppId is deprecated and will be removed in 8.0. Please use the \`defaultRoute\` advanced setting instead`
);
return completeConfig;
},
],
};

Expand Down