-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into fix/ml-conditionals-cypress
- Loading branch information
Showing
90 changed files
with
1,605 additions
and
569 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
const { resolve } = require('path'); | ||
|
||
const del = require('del'); | ||
const { run, withProcRunner } = require('@kbn/dev-utils'); | ||
|
||
const ROOT_DIR = resolve(__dirname, '..'); | ||
const BUILD_DIR = resolve(ROOT_DIR, 'target'); | ||
|
||
run( | ||
async ({ log, flags }) => { | ||
await withProcRunner(log, async (proc) => { | ||
log.info('Deleting old output'); | ||
await del(BUILD_DIR); | ||
|
||
const cwd = ROOT_DIR; | ||
|
||
log.info(`Starting babel${flags.watch ? ' in watch mode' : ''}`); | ||
await proc.run(`babel`, { | ||
cmd: 'babel', | ||
args: [ | ||
'src', | ||
'--no-babelrc', | ||
'--presets', | ||
require.resolve('@kbn/babel-preset/node_preset'), | ||
'--extensions', | ||
'.ts,.js', | ||
'--copy-files', | ||
'--out-dir', | ||
BUILD_DIR, | ||
...(flags.watch ? ['--watch'] : ['--quiet']), | ||
...(!flags['source-maps'] || !!process.env.CODE_COVERAGE | ||
? [] | ||
: ['--source-maps', 'inline']), | ||
], | ||
wait: true, | ||
cwd, | ||
}); | ||
|
||
log.success('Complete'); | ||
}); | ||
}, | ||
{ | ||
description: 'Simple build tool for @kbn/es package', | ||
flags: { | ||
boolean: ['watch', 'source-maps'], | ||
help: ` | ||
--watch Run in watch mode | ||
--source-maps Include sourcemaps | ||
`, | ||
}, | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
src/plugins/maps_legacy/public/components/legacy_map_deprecation_message.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { EuiButton, EuiCallOut, EuiLink } from '@elastic/eui'; | ||
import { FormattedMessage } from '@kbn/i18n/react'; | ||
import { i18n } from '@kbn/i18n'; | ||
|
||
interface Props { | ||
isMapsAvailable: boolean; | ||
onClick: (e: React.MouseEvent<HTMLButtonElement>) => Promise<void>; | ||
visualizationLabel: string; | ||
} | ||
|
||
export function LegacyMapDeprecationMessage(props: Props) { | ||
const getMapsMessage = !props.isMapsAvailable ? ( | ||
<FormattedMessage | ||
id="maps_legacy.defaultDistributionMessage" | ||
defaultMessage="To get Maps, upgrade to the {defaultDistribution} of Elasticsearch and Kibana." | ||
values={{ | ||
defaultDistribution: ( | ||
<EuiLink | ||
color="accent" | ||
external | ||
href="https://www.elastic.co/downloads/kibana" | ||
target="_blank" | ||
> | ||
default distribution | ||
</EuiLink> | ||
), | ||
}} | ||
/> | ||
) : null; | ||
|
||
const button = props.isMapsAvailable ? ( | ||
<div> | ||
<EuiButton onClick={props.onClick} size="s"> | ||
<FormattedMessage id="maps_legacy.openInMapsButtonLabel" defaultMessage="View in Maps" /> | ||
</EuiButton> | ||
</div> | ||
) : null; | ||
|
||
return ( | ||
<EuiCallOut | ||
className="hide-for-sharing" | ||
data-test-subj="deprecatedVisInfo" | ||
size="s" | ||
title={i18n.translate('maps_legacy.legacyMapDeprecationTitle', { | ||
defaultMessage: '{label} will migrate to Maps in 8.0.', | ||
values: { label: props.visualizationLabel }, | ||
})} | ||
> | ||
<p> | ||
<FormattedMessage | ||
id="maps_legacy.legacyMapDeprecationMessage" | ||
defaultMessage="With Maps, you can add multiple layers and indices, plot individual documents, symbolize features from data values, add heatmaps, grids, and clusters, and more. {getMapsMessage}" | ||
values={{ getMapsMessage }} | ||
/> | ||
</p> | ||
{button} | ||
</EuiCallOut> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.