Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into nls/bounded-tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
smith committed Jul 9, 2020
2 parents 0786190 + a32b9e8 commit 6982972
Show file tree
Hide file tree
Showing 348 changed files with 9,996 additions and 1,888 deletions.
12 changes: 12 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,18 @@ module.exports = {
},
},

/**
* Enterprise Search overrides
*/
{
files: ['x-pack/plugins/enterprise_search/**/*.{ts,tsx}'],
excludedFiles: ['x-pack/plugins/enterprise_search/**/*.{test,mock}.{ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
'@typescript-eslint/no-explicit-any': 'error',
},
},

/**
* disable jsx-a11y for kbn-ui-framework
*/
Expand Down
5 changes: 5 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,11 @@ x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @elastic/kib
# Design
**/*.scss @elastic/kibana-design

# Enterprise Search
/x-pack/plugins/enterprise_search/ @elastic/app-search-frontend @elastic/workplace-search-frontend
/x-pack/test/functional_enterprise_search/ @elastic/app-search-frontend @elastic/workplace-search-frontend
/x-pack/plugins/enterprise_search/**/*.scss @elastic/ent-search-design

# Elasticsearch UI
/src/plugins/dev_tools/ @elastic/es-ui
/src/plugins/console/ @elastic/es-ui
Expand Down
Binary file modified docs/management/images/management-license.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 10 additions & 11 deletions docs/management/managing-licenses.asciidoc
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
[[managing-licenses]]
== License Management

When you install the default distribution of {kib}, you receive a basic license
with no expiration date. For the full list of free features that are included in
the basic license, refer to https://www.elastic.co/subscriptions[the subscription page].
When you install the default distribution of {kib}, you receive free features
with no expiration date. For the full list of features, refer to
{subscriptions}.

If you want to try out the full set of platinum features, you can activate a
30-day trial license. To view the
status of your license, start a trial, or install a new license, open the menu, then go to *Stack Management > {es} > License Management*.
If you want to try out the full set of features, you can activate a free 30-day
trial. To view the status of your license, start a trial, or install a new
license, open the menu, then go to *Stack Management > {es} > License Management*.

NOTE: You can start a trial only if your cluster has not already activated a
trial license for the current major product version. For example, if you have
already activated a trial for 6.0, you cannot start a new trial until
7.0. You can, however, contact `info@elastic.co` to request an extended trial
license.
7.0. You can, however, request an extended trial at {extendtrial}.

When you activate a new license level, new features appear in *Stack Management*.

[role="screenshot"]
image::images/management-license.png[]

At the end of the trial period, the platinum features operate in a
<<license-expiration,degraded mode>>. You can revert to a basic license,
extend the trial, or purchase a subscription.
At the end of the trial period, some features operate in a
<<license-expiration,degraded mode>>. You can revert to Basic, extend the trial,
or purchase a subscription.

TIP: If {security-features} are enabled, unless you have a trial license,
you must configure Transport Layer Security (TLS) in {es}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export const schema = Joi.object()

browser: Joi.object()
.keys({
type: Joi.string().valid('chrome', 'firefox', 'ie', 'msedge').default('chrome'),
type: Joi.string().valid('chrome', 'firefox', 'msedge').default('chrome'),

logPollingMs: Joi.number().default(100),
acceptInsecureCerts: Joi.boolean().default(false),
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/core/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,12 @@ export const DEFAULT_APP_CATEGORIES: Readonly<{
euiIconType: string;
order: number;
};
enterpriseSearch: {
id: string;
label: string;
order: number;
euiIconType: string;
};
observability: {
id: string;
label: string;
Expand Down
6 changes: 6 additions & 0 deletions src/core/server/server.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,12 @@ export const DEFAULT_APP_CATEGORIES: Readonly<{
euiIconType: string;
order: number;
};
enterpriseSearch: {
id: string;
label: string;
order: number;
euiIconType: string;
};
observability: {
id: string;
label: string;
Expand Down
12 changes: 10 additions & 2 deletions src/core/utils/default_app_categories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,28 @@ export const DEFAULT_APP_CATEGORIES = Object.freeze({
euiIconType: 'logoKibana',
order: 1000,
},
enterpriseSearch: {
id: 'enterpriseSearch',
label: i18n.translate('core.ui.enterpriseSearchNavList.label', {
defaultMessage: 'Enterprise Search',
}),
order: 2000,
euiIconType: 'logoEnterpriseSearch',
},
observability: {
id: 'observability',
label: i18n.translate('core.ui.observabilityNavList.label', {
defaultMessage: 'Observability',
}),
euiIconType: 'logoObservability',
order: 2000,
order: 3000,
},
security: {
id: 'security',
label: i18n.translate('core.ui.securityNavList.label', {
defaultMessage: 'Security',
}),
order: 3000,
order: 4000,
euiIconType: 'logoSecurity',
},
management: {
Expand Down
2 changes: 2 additions & 0 deletions src/plugins/apm_oss/server/tutorial/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { APM_STATIC_INDEX_PATTERN_ID } from '../../common/index_pattern_constant
const apmIntro = i18n.translate('apmOss.tutorial.introduction', {
defaultMessage: 'Collect in-depth performance metrics and errors from inside your applications.',
});
const moduleName = 'apm';

export const tutorialProvider = ({
indexPatternTitle,
Expand Down Expand Up @@ -68,6 +69,7 @@ export const tutorialProvider = ({
name: i18n.translate('apmOss.tutorial.specProvider.name', {
defaultMessage: 'APM',
}),
moduleName,
category: TutorialsCategory.OTHER,
shortDescription: apmIntro,
longDescription: i18n.translate('apmOss.tutorial.specProvider.longDescription', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ import {
ViewMode,
ContainerOutput,
EmbeddableInput,
SavedObjectEmbeddableInput,
} from '../../../embeddable/public';
import { NavAction, SavedDashboardPanel } from '../types';

Expand Down Expand Up @@ -431,7 +432,7 @@ export class DashboardAppController {
.getIncomingEmbeddablePackage();
if (incomingState) {
if ('id' in incomingState) {
container.addNewEmbeddable<EmbeddableInput>(incomingState.type, {
container.addOrUpdateEmbeddable<SavedObjectEmbeddableInput>(incomingState.type, {
savedObjectId: incomingState.id,
});
} else if ('input' in incomingState) {
Expand All @@ -440,7 +441,7 @@ export class DashboardAppController {
const explicitInput = {
savedVis: input,
};
container.addNewEmbeddable<EmbeddableInput>(incomingState.type, explicitInput);
container.addOrUpdateEmbeddable<EmbeddableInput>(incomingState.type, explicitInput);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import {
} from '../../../../kibana_react/public';
import { PLACEHOLDER_EMBEDDABLE } from './placeholder';
import { PanelPlacementMethod, IPanelPlacementArgs } from './panel/dashboard_panel_placement';
import { EmbeddableStateTransfer } from '../../../../embeddable/public';
import { EmbeddableStateTransfer, EmbeddableOutput } from '../../../../embeddable/public';

export interface DashboardContainerInput extends ContainerInput {
viewMode: ViewMode;
Expand Down Expand Up @@ -159,29 +159,55 @@ export class DashboardContainer extends Container<InheritedChildInput, Dashboard
[placeholderPanelState.explicitInput.id]: placeholderPanelState,
},
});
newStateComplete.then((newPanelState: Partial<PanelState>) => {
const finalPanels = { ...this.input.panels };
delete finalPanels[placeholderPanelState.explicitInput.id];
const newPanelId = newPanelState.explicitInput?.id
? newPanelState.explicitInput.id
: uuid.v4();
finalPanels[newPanelId] = {
...placeholderPanelState,
...newPanelState,
gridData: {
...placeholderPanelState.gridData,
i: newPanelId,
},
newStateComplete.then((newPanelState: Partial<PanelState>) =>
this.replacePanel(placeholderPanelState, newPanelState)
);
}

public replacePanel(
previousPanelState: DashboardPanelState<EmbeddableInput>,
newPanelState: Partial<PanelState>
) {
// TODO: In the current infrastructure, embeddables in a container do not react properly to
// changes. Removing the existing embeddable, and adding a new one is a temporary workaround
// until the container logic is fixed.
const finalPanels = { ...this.input.panels };
delete finalPanels[previousPanelState.explicitInput.id];
const newPanelId = newPanelState.explicitInput?.id ? newPanelState.explicitInput.id : uuid.v4();
finalPanels[newPanelId] = {
...previousPanelState,
...newPanelState,
gridData: {
...previousPanelState.gridData,
i: newPanelId,
},
explicitInput: {
...newPanelState.explicitInput,
id: newPanelId,
},
};
this.updateInput({
panels: finalPanels,
lastReloadRequestTime: new Date().getTime(),
});
}

public async addOrUpdateEmbeddable<
EEI extends EmbeddableInput = EmbeddableInput,
EEO extends EmbeddableOutput = EmbeddableOutput,
E extends IEmbeddable<EEI, EEO> = IEmbeddable<EEI, EEO>
>(type: string, explicitInput: Partial<EEI>) {
if (explicitInput.id && this.input.panels[explicitInput.id]) {
this.replacePanel(this.input.panels[explicitInput.id], {
type,
explicitInput: {
...newPanelState.explicitInput,
id: newPanelId,
...explicitInput,
id: uuid.v4(),
},
};
this.updateInput({
panels: finalPanels,
lastReloadRequestTime: new Date().getTime(),
});
});
} else {
this.addNewEmbeddable<EEI, EEO, E>(type, explicitInput);
}
}

public render(dom: HTMLElement) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,9 @@ export const FormRow = ({
titleWrapped = title;
}

if (!children && !field) {
throw new Error('You need to provide either children or a field to the FormRow');
}

return (
<EuiDescribedFormGroup title={titleWrapped} description={description} fullWidth>
{children ? children : <Field field={field!} {...rest} />}
{children ? children : field ? <Field field={field!} {...rest} /> : null}
</EuiDescribedFormGroup>
);
};
Expand Down
16 changes: 13 additions & 3 deletions src/plugins/home/public/application/application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,19 @@
import React from 'react';
import { render, unmountComponentAtNode } from 'react-dom';
import { i18n } from '@kbn/i18n';
import { ScopedHistory } from 'kibana/public';
import { ScopedHistory, CoreStart } from 'kibana/public';
import { KibanaContextProvider } from '../../../kibana_react/public';
// @ts-ignore
import { HomeApp } from './components/home_app';
import { getServices } from './kibana_services';

import './index.scss';

export const renderApp = async (element: HTMLElement, history: ScopedHistory) => {
export const renderApp = async (
element: HTMLElement,
coreStart: CoreStart,
history: ScopedHistory
) => {
const homeTitle = i18n.translate('home.breadcrumbs.homeTitle', { defaultMessage: 'Home' });
const { featureCatalogue, chrome } = getServices();

Expand All @@ -36,7 +41,12 @@ export const renderApp = async (element: HTMLElement, history: ScopedHistory) =>

chrome.setBreadcrumbs([{ text: homeTitle }]);

render(<HomeApp directories={directories} />, element);
render(
<KibanaContextProvider services={{ ...coreStart }}>
<HomeApp directories={directories} />
</KibanaContextProvider>,
element
);

// dispatch synthetic hash change event to update hash history objects
// this is necessary because hash updates triggered by using popState won't trigger this event naturally.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,23 @@ class TutorialUi extends React.Component {
}
};

renderModuleNotices() {
const notices = getServices().tutorialService.getModuleNotices();
if (notices.length && this.state.tutorial.moduleName) {
return (
<EuiFlexGroup direction="column" gutterSize="none">
{notices.map((ModuleNotice, index) => (
<EuiFlexItem key={index}>
<ModuleNotice moduleName={this.state.tutorial.moduleName} />
</EuiFlexItem>
))}
</EuiFlexGroup>
);
} else {
return null;
}
}

render() {
let content;
if (this.state.notFound) {
Expand Down Expand Up @@ -382,6 +399,7 @@ class TutorialUi extends React.Component {
isBeta={this.state.tutorial.isBeta}
/>

{this.renderModuleNotices()}
<EuiSpacer />
<div className="eui-textCenter">{this.renderInstructionSetsToggle()}</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jest.mock('../../kibana_services', () => ({
chrome: {
setBreadcrumbs: () => {},
},
tutorialService: {
getModuleNotices: () => [],
},
}),
}));
jest.mock('../../../../../kibana_react/public', () => {
Expand Down
Loading

0 comments on commit 6982972

Please sign in to comment.