mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
chore(NA): upgrades bazel rules nodejs to v5 (#129522)
* chore(NA): upgrade bazel into v5 * chore(NA): initial work to upgrade to rules v5 * chore(NA): remove @elastic/datemath jest unit test for eslint plugin imports * chore(NA): removed packager tsc_wrapped added my mistake
This commit is contained in:
parent
5dbd17760c
commit
eb0ef19583
139 changed files with 183 additions and 179 deletions
|
@ -304,8 +304,8 @@ module.exports = {
|
|||
*/
|
||||
{
|
||||
files: [
|
||||
'packages/elastic-datemath/**/*.{js,mjs,ts,tsx}',
|
||||
'packages/elastic-eslint-config-kibana/**/*.{js,mjs,ts,tsx}',
|
||||
'packages/kbn-datemath/**/*.{js,mjs,ts,tsx}',
|
||||
],
|
||||
rules: {
|
||||
'@kbn/eslint/require-license-header': [
|
||||
|
|
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
|
@ -55,7 +55,7 @@
|
|||
/examples/field_formats_example/ @elastic/kibana-app-services
|
||||
/examples/partial_results_example/ @elastic/kibana-app-services
|
||||
/examples/search_examples/ @elastic/kibana-app-services
|
||||
/packages/elastic-datemath/ @elastic/kibana-app-services
|
||||
/packages/kbn-datemath/ @elastic/kibana-app-services
|
||||
/packages/kbn-interpreter/ @elastic/kibana-app-services
|
||||
/packages/kbn-react-field/ @elastic/kibana-app-services
|
||||
/packages/kbn-es-query/ @elastic/kibana-app-services
|
||||
|
|
|
@ -10,15 +10,16 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
|||
# Fetch Node.js rules
|
||||
http_archive(
|
||||
name = "build_bazel_rules_nodejs",
|
||||
sha256 = "8a7c981217239085f78acc9898a1f7ba99af887c1996ceb3b4504655383a2c3c",
|
||||
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.0.0/rules_nodejs-4.0.0.tar.gz"],
|
||||
sha256 = "523da2d6b50bc00eaf14b00ed28b1a366b3ab456e14131e9812558b26599125c",
|
||||
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.3.1/rules_nodejs-5.3.1.tar.gz"],
|
||||
)
|
||||
|
||||
# Now that we have the rules let's import from them to complete the work
|
||||
load("@build_bazel_rules_nodejs//:index.bzl", "check_rules_nodejs_version", "node_repositories", "yarn_install")
|
||||
# Build Node.js rules dependencies
|
||||
load("@build_bazel_rules_nodejs//:repositories.bzl", "build_bazel_rules_nodejs_dependencies")
|
||||
build_bazel_rules_nodejs_dependencies()
|
||||
|
||||
# Assure we have at least a given rules_nodejs version
|
||||
check_rules_nodejs_version(minimum_version_string = "4.0.0")
|
||||
# Now that we have the rules let's import from them to complete the work
|
||||
load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "yarn_install")
|
||||
|
||||
# Setup the Node.js toolchain for the architectures we want to support
|
||||
#
|
||||
|
@ -38,14 +39,13 @@ node_repositories(
|
|||
node_urls = [
|
||||
"https://nodejs.org/dist/v{version}/{filename}",
|
||||
],
|
||||
yarn_repositories = {
|
||||
yarn_releases = {
|
||||
"1.21.1": ("yarn-v1.21.1.tar.gz", "yarn-v1.21.1", "d1d9f4a0f16f5ed484e814afeb98f39b82d4728c6c8beaafb5abc99c02db6674"),
|
||||
},
|
||||
yarn_version = "1.21.1",
|
||||
yarn_urls = [
|
||||
"https://github.com/yarnpkg/yarn/releases/download/v{version}/{filename}",
|
||||
],
|
||||
package_json = ["//:package.json"],
|
||||
)
|
||||
|
||||
# Run yarn_install rule to take care of dependencies
|
||||
|
|
|
@ -51,7 +51,6 @@ yarn kbn watch
|
|||
[discrete]
|
||||
=== List of Already Migrated Packages to Bazel
|
||||
|
||||
- @elastic/datemath
|
||||
- @elastic/eslint-config-kibana
|
||||
- @elastic/safer-lodash-set
|
||||
- @kbn/ace
|
||||
|
@ -64,6 +63,7 @@ yarn kbn watch
|
|||
- @kbn/config
|
||||
- @kbn/config-schema
|
||||
- @kbn/crypto
|
||||
- @kbn/datemath
|
||||
- @kbn/dev-utils
|
||||
- @kbn/docs-utils
|
||||
- @kbn/es
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
"@elastic/apm-rum-react": "^1.3.4",
|
||||
"@elastic/apm-synthtrace": "link:bazel-bin/packages/elastic-apm-synthtrace",
|
||||
"@elastic/charts": "45.1.1",
|
||||
"@elastic/datemath": "link:bazel-bin/packages/elastic-datemath",
|
||||
"@elastic/datemath": "5.0.3",
|
||||
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@8.2.0-canary.2",
|
||||
"@elastic/ems-client": "8.2.0",
|
||||
"@elastic/eui": "53.0.1",
|
||||
|
@ -140,6 +140,7 @@
|
|||
"@kbn/config": "link:bazel-bin/packages/kbn-config",
|
||||
"@kbn/config-schema": "link:bazel-bin/packages/kbn-config-schema",
|
||||
"@kbn/crypto": "link:bazel-bin/packages/kbn-crypto",
|
||||
"@kbn/datemath": "link:bazel-bin/packages/kbn-datemath",
|
||||
"@kbn/doc-links": "link:bazel-bin/packages/kbn-doc-links",
|
||||
"@kbn/es-query": "link:bazel-bin/packages/kbn-es-query",
|
||||
"@kbn/eslint-plugin-imports": "link:bazel-bin/packages/kbn-eslint-plugin-imports",
|
||||
|
@ -455,7 +456,7 @@
|
|||
"@babel/traverse": "^7.17.3",
|
||||
"@babel/types": "^7.17.0",
|
||||
"@bazel/ibazel": "^0.16.2",
|
||||
"@bazel/typescript": "4.0.0",
|
||||
"@bazel/typescript": "5.3.1",
|
||||
"@cypress/code-coverage": "^3.9.12",
|
||||
"@cypress/snapshot": "^2.1.7",
|
||||
"@cypress/webpack-preprocessor": "^5.6.0",
|
||||
|
@ -545,7 +546,6 @@
|
|||
"@types/delete-empty": "^2.0.0",
|
||||
"@types/ejs": "^3.0.6",
|
||||
"@types/elastic__apm-synthtrace": "link:bazel-bin/packages/elastic-apm-synthtrace/npm_module_types",
|
||||
"@types/elastic__datemath": "link:bazel-bin/packages/elastic-datemath/npm_module_types",
|
||||
"@types/enzyme": "^3.10.8",
|
||||
"@types/eslint": "^7.28.0",
|
||||
"@types/express": "^4.17.13",
|
||||
|
@ -595,6 +595,7 @@
|
|||
"@types/kbn__config": "link:bazel-bin/packages/kbn-config/npm_module_types",
|
||||
"@types/kbn__config-schema": "link:bazel-bin/packages/kbn-config-schema/npm_module_types",
|
||||
"@types/kbn__crypto": "link:bazel-bin/packages/kbn-crypto/npm_module_types",
|
||||
"@types/kbn__datemath": "link:bazel-bin/packages/kbn-datemath/npm_module_types",
|
||||
"@types/kbn__dev-utils": "link:bazel-bin/packages/kbn-dev-utils/npm_module_types",
|
||||
"@types/kbn__doc-links": "link:bazel-bin/packages/kbn-doc-links/npm_module_types",
|
||||
"@types/kbn__docs-utils": "link:bazel-bin/packages/kbn-docs-utils/npm_module_types",
|
||||
|
|
|
@ -11,7 +11,6 @@ filegroup(
|
|||
srcs = [
|
||||
"//packages/elastic-analytics:build",
|
||||
"//packages/elastic-apm-synthtrace:build",
|
||||
"//packages/elastic-datemath:build",
|
||||
"//packages/elastic-eslint-config-kibana:build",
|
||||
"//packages/elastic-safer-lodash-set:build",
|
||||
"//packages/kbn-ace:build",
|
||||
|
@ -30,6 +29,7 @@ filegroup(
|
|||
"//packages/kbn-config-schema:build",
|
||||
"//packages/kbn-config:build",
|
||||
"//packages/kbn-crypto:build",
|
||||
"//packages/kbn-datemath:build",
|
||||
"//packages/kbn-dev-utils:build",
|
||||
"//packages/kbn-doc-links:build",
|
||||
"//packages/kbn-docs-utils:build",
|
||||
|
@ -102,7 +102,6 @@ filegroup(
|
|||
srcs = [
|
||||
"//packages/elastic-analytics:build_types",
|
||||
"//packages/elastic-apm-synthtrace:build_types",
|
||||
"//packages/elastic-datemath:build_types",
|
||||
"//packages/elastic-safer-lodash-set:build_types",
|
||||
"//packages/kbn-ace:build_types",
|
||||
"//packages/kbn-alerts:build_types",
|
||||
|
@ -116,6 +115,7 @@ filegroup(
|
|||
"//packages/kbn-config-schema:build_types",
|
||||
"//packages/kbn-config:build_types",
|
||||
"//packages/kbn-crypto:build_types",
|
||||
"//packages/kbn-datemath:build_types",
|
||||
"//packages/kbn-dev-utils:build_types",
|
||||
"//packages/kbn-doc-links:build_types",
|
||||
"//packages/kbn-docs-utils:build_types",
|
||||
|
|
|
@ -25,7 +25,7 @@ NPM_MODULE_EXTRA_FILES = [
|
|||
]
|
||||
|
||||
RUNTIME_DEPS = [
|
||||
"//packages/elastic-datemath",
|
||||
"//packages/kbn-datemath",
|
||||
"@npm//@elastic/elasticsearch",
|
||||
"@npm//lodash",
|
||||
"@npm//moment",
|
||||
|
@ -36,7 +36,7 @@ RUNTIME_DEPS = [
|
|||
]
|
||||
|
||||
TYPES_DEPS = [
|
||||
"//packages/elastic-datemath:npm_module_types",
|
||||
"//packages/kbn-datemath:npm_module_types",
|
||||
"@npm//@elastic/elasticsearch",
|
||||
"@npm//@types/jest",
|
||||
"@npm//@types/lodash",
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||
* Side Public License, v 1.
|
||||
*/
|
||||
import datemath from '@elastic/datemath';
|
||||
import datemath from '@kbn/datemath';
|
||||
import yargs from 'yargs/yargs';
|
||||
import { Argv } from 'yargs';
|
||||
import { intervalToMs } from './utils/interval_to_ms';
|
||||
|
|
|
@ -2,8 +2,8 @@ load("@npm//@bazel/typescript:index.bzl", "ts_config")
|
|||
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
|
||||
load("//src/dev/bazel:index.bzl", "jsts_transpiler", "ts_project", "pkg_npm", "pkg_npm_types")
|
||||
|
||||
PKG_BASE_NAME = "elastic-datemath"
|
||||
PKG_REQUIRE_NAME = "@elastic/datemath"
|
||||
PKG_BASE_NAME = "kbn-datemath"
|
||||
PKG_REQUIRE_NAME = "@kbn/datemath"
|
||||
|
||||
SOURCE_FILES = glob([
|
||||
"src/index.ts",
|
|
@ -1,5 +1,5 @@
|
|||
# datemath
|
||||
|
||||
Datemath string parser used in Kibana. This is published to NPM for use in a limited number of locations outside of Kibana, but is not regularly updated and may get seriously out of date.
|
||||
Datemath string parser used in Kibana. This is published to NPM under (@elastic/datemath) for use in a limited number of locations outside of Kibana, but is not regularly updated and may get seriously out of date.
|
||||
|
||||
If you file an issue in elastic/kibana we can probably update it for you if needed, though you probably shouldn't depend on this package for anything important.
|
|
@ -20,6 +20,6 @@
|
|||
module.exports = {
|
||||
preset: '@kbn/test',
|
||||
rootDir: '../..',
|
||||
roots: ['<rootDir>/packages/elastic-datemath'],
|
||||
roots: ['<rootDir>/packages/kbn-datemath'],
|
||||
testEnvironment: 'jsdom',
|
||||
};
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@elastic/datemath",
|
||||
"version": "5.0.3",
|
||||
"name": "@kbn/datemath",
|
||||
"version": "5.0.4",
|
||||
"description": "elasticsearch datemath parser, used in kibana",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./target_node/index.js",
|
|
@ -21,7 +21,7 @@ const log = new ToolingLog({
|
|||
});
|
||||
|
||||
it('getFileName', () => {
|
||||
expect(getFileName('@elastic/datemath')).toBe('elastic_datemath');
|
||||
expect(getFileName('@kbn/datemath')).toBe('kbn_datemath');
|
||||
});
|
||||
|
||||
it('test getPluginForPath', () => {
|
||||
|
|
|
@ -63,15 +63,6 @@ describe('standard import formats', () => {
|
|||
});
|
||||
|
||||
it('resolves @elastic/ imports', () => {
|
||||
expect(resolveKibanaImport('@elastic/datemath', pkg('kbn-dev-utils/src')))
|
||||
.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"absolute": <absolute path>/node_modules/@elastic/datemath/target_node/index.js,
|
||||
"nodeModule": "@elastic/datemath",
|
||||
"type": "file",
|
||||
}
|
||||
`);
|
||||
|
||||
expect(resolveKibanaImport('@elastic/eui', pkg('kbn-dev-utils/src'))).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"absolute": <absolute path>/node_modules/@elastic/eui/lib/index.js,
|
||||
|
|
2
packages/kbn-pm/dist/index.js
vendored
2
packages/kbn-pm/dist/index.js
vendored
|
@ -8949,7 +8949,7 @@ const BootstrapCommand = {
|
|||
await time('force install dependencies', async () => {
|
||||
await Object(_utils_bazel__WEBPACK_IMPORTED_MODULE_9__["removeYarnIntegrityFileIfExists"])(Object(path__WEBPACK_IMPORTED_MODULE_0__["resolve"])(kibanaProjectPath, 'node_modules'));
|
||||
await Object(_utils_bazel__WEBPACK_IMPORTED_MODULE_9__["runBazel"])(['clean']);
|
||||
await Object(_utils_bazel__WEBPACK_IMPORTED_MODULE_9__["runBazel"])(['run', '@nodejs//:yarn'], runOffline, {
|
||||
await Object(_utils_bazel__WEBPACK_IMPORTED_MODULE_9__["runBazel"])(['run', '@yarn//:yarn'], runOffline, {
|
||||
env: {
|
||||
SASS_BINARY_SITE: 'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-sass',
|
||||
RE2_DOWNLOAD_MIRROR: 'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2'
|
||||
|
|
|
@ -72,7 +72,7 @@ export const BootstrapCommand: ICommand = {
|
|||
await time('force install dependencies', async () => {
|
||||
await removeYarnIntegrityFileIfExists(resolve(kibanaProjectPath, 'node_modules'));
|
||||
await runBazel(['clean']);
|
||||
await runBazel(['run', '@nodejs//:yarn'], runOffline, {
|
||||
await runBazel(['run', '@yarn//:yarn'], runOffline, {
|
||||
env: {
|
||||
SASS_BINARY_SITE:
|
||||
'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-sass',
|
||||
|
|
|
@ -30,7 +30,7 @@ NPM_MODULE_EXTRA_FILES = [
|
|||
]
|
||||
|
||||
RUNTIME_DEPS = [
|
||||
"//packages/elastic-datemath",
|
||||
"//packages/kbn-datemath",
|
||||
"//packages/kbn-es-query",
|
||||
"//packages/kbn-i18n",
|
||||
"//packages/kbn-securitysolution-io-ts-list-types",
|
||||
|
@ -46,7 +46,7 @@ RUNTIME_DEPS = [
|
|||
]
|
||||
|
||||
TYPES_DEPS = [
|
||||
"//packages/elastic-datemath:npm_module_types",
|
||||
"//packages/kbn-datemath:npm_module_types",
|
||||
"//packages/kbn-es-query:npm_module_types",
|
||||
"//packages/kbn-i18n:npm_module_types",
|
||||
"//packages/kbn-securitysolution-io-ts-list-types:npm_module_types",
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
import { DataViewFieldBase } from '@kbn/es-query';
|
||||
import { checkEmptyValue } from '../check_empty_value';
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ NPM_MODULE_EXTRA_FILES = [
|
|||
]
|
||||
|
||||
RUNTIME_DEPS = [
|
||||
"//packages/elastic-datemath",
|
||||
"//packages/kbn-datemath",
|
||||
"@npm//fp-ts",
|
||||
"@npm//io-ts",
|
||||
"@npm//lodash",
|
||||
|
@ -37,7 +37,7 @@ RUNTIME_DEPS = [
|
|||
]
|
||||
|
||||
TYPES_DEPS = [
|
||||
"//packages/elastic-datemath:npm_module_types",
|
||||
"//packages/kbn-datemath:npm_module_types",
|
||||
"@npm//fp-ts",
|
||||
"@npm//io-ts",
|
||||
"@npm//moment",
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import moment from 'moment';
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
|
||||
export const parseScheduleDates = (time: string): moment.Moment | null => {
|
||||
const isValidDateString = !isNaN(Date.parse(time));
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
load("@npm//@bazel/typescript:index.bzl", "ts_config")
|
||||
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
|
||||
load("@rules_nodejs//nodejs:directory_file_path.bzl", "directory_file_path")
|
||||
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "nodejs_binary")
|
||||
load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project")
|
||||
load("@build_bazel_rules_nodejs//internal/node:node.bzl", "nodejs_binary")
|
||||
load("@build_bazel_rules_nodejs//:index.bzl", "directory_file_path")
|
||||
|
||||
PKG_BASE_NAME = "kbn-type-summarizer"
|
||||
PKG_REQUIRE_NAME = "@kbn/type-summarizer"
|
||||
|
|
|
@ -28,7 +28,6 @@ NPM_MODULE_EXTRA_FILES = [
|
|||
]
|
||||
|
||||
RUNTIME_DEPS = [
|
||||
"//packages/elastic-datemath",
|
||||
"@npm//@babel/runtime",
|
||||
"@npm//@elastic/charts",
|
||||
"@npm//@elastic/eui",
|
||||
|
|
|
@ -28,10 +28,10 @@ NPM_MODULE_EXTRA_FILES = [
|
|||
]
|
||||
|
||||
RUNTIME_DEPS = [
|
||||
"//packages/elastic-datemath",
|
||||
"//packages/elastic-safer-lodash-set",
|
||||
"//packages/kbn-analytics",
|
||||
"//packages/kbn-babel-preset",
|
||||
"//packages/kbn-datemath",
|
||||
"//packages/kbn-flot-charts",
|
||||
"//packages/kbn-i18n",
|
||||
"//packages/kbn-i18n-react",
|
||||
|
@ -42,9 +42,9 @@ RUNTIME_DEPS = [
|
|||
]
|
||||
|
||||
TYPES_DEPS = [
|
||||
"//packages/elastic-datemath:npm_module_types",
|
||||
"//packages/elastic-safer-lodash-set:npm_module_types",
|
||||
"//packages/kbn-analytics:npm_module_types",
|
||||
"//packages/kbn-datemath:npm_module_types",
|
||||
"//packages/kbn-i18n:npm_module_types",
|
||||
"//packages/kbn-i18n-react:npm_module_types",
|
||||
"//packages/kbn-monaco:npm_module_types",
|
||||
|
|
|
@ -56,6 +56,7 @@ const externals = {
|
|||
numeral: '__kbnSharedDeps__.ElasticNumeral',
|
||||
'@elastic/numeral': '__kbnSharedDeps__.ElasticNumeral',
|
||||
'@elastic/charts': '__kbnSharedDeps__.ElasticCharts',
|
||||
'@kbn/datemath': '__kbnSharedDeps__.KbnDatemath',
|
||||
'@elastic/eui': '__kbnSharedDeps__.ElasticEui',
|
||||
'@elastic/eui/lib/services': '__kbnSharedDeps__.ElasticEuiLibServices',
|
||||
'@elastic/eui/lib/services/format': '__kbnSharedDeps__.ElasticEuiLibServicesFormat',
|
||||
|
|
|
@ -41,7 +41,7 @@ export const ElasticEui = require('@elastic/eui');
|
|||
export const ElasticEuiLibServices = require('@elastic/eui/lib/services');
|
||||
export const ElasticEuiLibServicesFormat = require('@elastic/eui/lib/services/format');
|
||||
export const ElasticEuiChartsTheme = require('@elastic/eui/dist/eui_charts_theme');
|
||||
export const ElasticDatemath = require('@elastic/datemath');
|
||||
export const KbnDatemath = require('@kbn/datemath');
|
||||
export const ReactBeautifulDnD = require('react-beautiful-dnd');
|
||||
|
||||
export const Lodash = require('lodash');
|
||||
|
|
|
@ -142,7 +142,7 @@ pkg_npm_types = rule(
|
|||
"_packager": attr.label(
|
||||
doc = "Target that executes the npm types package assembler binary",
|
||||
executable = True,
|
||||
cfg = "host",
|
||||
cfg = "exec",
|
||||
default = Label("//packages/kbn-type-summarizer:bazel-cli"),
|
||||
),
|
||||
},
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import { memoize } from 'lodash';
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
import { buildEsQuery } from '@kbn/es-query';
|
||||
|
||||
import { TimeRange } from '../../../../data/public';
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
import { omitBy } from 'lodash';
|
||||
import { buildRangeFilter } from '@kbn/es-query';
|
||||
import type { Moment } from 'moment';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import moment from 'moment';
|
||||
import dateMath, { Unit } from '@elastic/datemath';
|
||||
import dateMath, { Unit } from '@kbn/datemath';
|
||||
|
||||
import { parseEsInterval } from '../../../utils';
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import { Assign } from 'utility-types';
|
|||
import { isString, isObject as isObjectLodash, isPlainObject, sortBy } from 'lodash';
|
||||
import moment, { Moment } from 'moment';
|
||||
|
||||
import { Unit } from '@elastic/datemath';
|
||||
import { Unit } from '@kbn/datemath';
|
||||
import { parseInterval, splitStringInterval } from '../../../utils';
|
||||
import { TimeRangeBounds } from '../../../../../query';
|
||||
import { calcAutoIntervalLessThan, calcAutoIntervalNear } from './calc_auto_interval';
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import { Unit } from '@elastic/datemath';
|
||||
import { Unit } from '@kbn/datemath';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
export class InvalidEsCalendarIntervalError extends Error {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
import { leastCommonMultiple } from './least_common_multiple';
|
||||
import { parseEsInterval } from './parse_es_interval';
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import dateMath, { Unit } from '@elastic/datemath';
|
||||
import dateMath, { Unit } from '@kbn/datemath';
|
||||
import { InvalidEsCalendarIntervalError } from './invalid_es_calendar_interval_error';
|
||||
import { InvalidEsIntervalFormatError } from './invalid_es_interval_format_error';
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import { find } from 'lodash';
|
||||
import moment from 'moment';
|
||||
import dateMath, { Unit } from '@elastic/datemath';
|
||||
import dateMath, { Unit } from '@kbn/datemath';
|
||||
|
||||
// Assume interval is in the form (value)(unit), such as "1h"
|
||||
const INTERVAL_STRING_RE = new RegExp('^([0-9\\.]*)\\s*(' + dateMath.units.join('|') + ')$');
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
import { TimeRange } from '../../../../../common';
|
||||
|
||||
export function toAbsoluteDates(range: TimeRange) {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
import { buildQueryFromFilters } from '@kbn/es-query';
|
||||
import { memoize } from 'lodash';
|
||||
import { CoreSetup } from 'src/core/public';
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
import { TimeRange } from '../../../../common';
|
||||
|
||||
export function validateTimeRange(time?: TimeRange): boolean {
|
||||
|
|
|
@ -18,7 +18,7 @@ import {
|
|||
EuiText,
|
||||
} from '@elastic/eui';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
import {
|
||||
Axis,
|
||||
BrushEndListener,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import { buildPointSeriesData } from './point_series';
|
||||
import moment from 'moment';
|
||||
import { Unit } from '@elastic/datemath';
|
||||
import { Unit } from '@kbn/datemath';
|
||||
|
||||
describe('buildPointSeriesData', () => {
|
||||
test('with valid data', () => {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import { uniq } from 'lodash';
|
||||
import { Duration, Moment } from 'moment';
|
||||
import { Unit } from '@elastic/datemath';
|
||||
import { Unit } from '@kbn/datemath';
|
||||
import { SerializedFieldFormat } from '../../../../../../field_formats/common';
|
||||
|
||||
export interface Column {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
import moment from 'moment';
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
import { DataPublicPluginStart, search, IAggConfigs } from '../../../../../data/public';
|
||||
import { Dimensions, HistogramParamsBounds } from '../components/chart/point_series';
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { ToastsStart } from 'kibana/public';
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
import { Filter, FieldFilter } from '@kbn/es-query';
|
||||
import { ES_FIELD_TYPES } from '@kbn/field-types';
|
||||
import isSemverValid from 'semver/functions/valid';
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
import classNames from 'classnames';
|
||||
import React, { useCallback, useMemo, useRef, useState } from 'react';
|
||||
import deepEqual from 'fast-deep-equal';
|
||||
|
|
|
@ -21,7 +21,7 @@ import {
|
|||
EuiText,
|
||||
EuiFormRow,
|
||||
} from '@elastic/eui';
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { isEqual, omit } from 'lodash';
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
|
||||
export const GTE_INTERVAL_RE = new RegExp(`^>=([\\d\\.]+\\s*(${dateMath.units.join('|')}))$`);
|
||||
export const INTERVAL_STRING_RE = new RegExp(`^([\\d\\.]+)\\s*(${dateMath.units.join('|')})$`);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import { Unit } from '@elastic/datemath';
|
||||
import { Unit } from '@kbn/datemath';
|
||||
import {
|
||||
convertIntervalToUnit,
|
||||
parseInterval,
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import { Unit } from '@elastic/datemath';
|
||||
import { Unit } from '@kbn/datemath';
|
||||
import type { Panel } from '../../../../common/types';
|
||||
import { RollupSearchCapabilities } from './rollup_search_capabilities';
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
|
||||
export type Unit = 'ms' | 's' | 'm' | 'h' | 'd' | 'w' | 'M' | 'y';
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||
* Side Public License, v 1.
|
||||
*/
|
||||
import type { Unit } from '@elastic/datemath';
|
||||
import type { Unit } from '@kbn/datemath';
|
||||
|
||||
import {
|
||||
getUnitValue,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import _ from 'lodash';
|
||||
import moment from 'moment';
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
|
||||
// Assume interval is in the form (value)(unit), such as "1h"
|
||||
const INTERVAL_STRING_RE = new RegExp('^([0-9\\.]*)\\s*(' + dateMath.units.join('|') + ')$');
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import { Unit } from '@elastic/datemath';
|
||||
import { Unit } from '@kbn/datemath';
|
||||
|
||||
import {
|
||||
getUnitValue,
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import { sortBy, isNumber } from 'lodash';
|
||||
import { Unit } from '@elastic/datemath';
|
||||
import { Unit } from '@kbn/datemath';
|
||||
|
||||
/** @ts-ignore */
|
||||
import { INTERVAL_STRING_RE } from '../../../../common/interval_regexp';
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import $ from 'jquery';
|
||||
import moment from 'moment';
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
import { scheme, loader, logger, Warn, version as vegaVersion, expressionFunction } from 'vega';
|
||||
import { expressionInterpreter } from 'vega-interpreter';
|
||||
import { version as vegaLiteVersion } from 'vega-lite';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import d3 from 'd3';
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
|
||||
export class TimeMarker {
|
||||
constructor(times, xScale, height) {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
import datemath from '@elastic/datemath';
|
||||
import datemath from '@kbn/datemath';
|
||||
import { EuiModal } from '@elastic/eui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import datemath from '@elastic/datemath';
|
||||
import datemath from '@kbn/datemath';
|
||||
import moment from 'moment-timezone';
|
||||
import * as helpers from './helpers';
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import datemath from '@elastic/datemath';
|
||||
import datemath from '@kbn/datemath';
|
||||
import { pickBy } from 'lodash';
|
||||
import { UrlParams } from './types';
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
import datemath from '@elastic/datemath';
|
||||
import datemath from '@kbn/datemath';
|
||||
import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
import { schema } from '@kbn/config-schema';
|
||||
import {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
import { ExpressionValueFilter, ExpressionFunctionDefinition } from '../../../types';
|
||||
import { getFunctionHelp, getFunctionErrors } from '../../../i18n';
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { buildQueryFilter, Filter } from '@kbn/es-query';
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
import { maxBy, minBy } from 'lodash';
|
||||
import { ExpressionValueFilter } from '../../types';
|
||||
// @ts-expect-error untyped local
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { FilterType, FilterViewSpec, SimpleFilterViewField } from '../../../../types';
|
||||
import { formatByKey } from '../utils';
|
||||
|
|
|
@ -9,7 +9,7 @@ import { FIELD_FORMAT_IDS } from '../../../../../src/plugins/field_formats/commo
|
|||
import { UI_SETTINGS } from '../../../../../src/plugins/data/common';
|
||||
import { ary, assign, isPlainObject, isString, sortBy } from 'lodash';
|
||||
import moment from 'moment';
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
import { parseInterval } from '../utils/parse_interval';
|
||||
|
||||
const { duration: d } = moment;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { duration, Duration, unitOfTime } from 'moment';
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
|
||||
type SupportedUnits = unitOfTime.Base;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import moment from 'moment';
|
||||
import { TimefilterContract } from 'src/plugins/data/public';
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import type { ToastsStart } from 'kibana/public';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { parse } from '@elastic/datemath';
|
||||
import { parse } from '@kbn/datemath';
|
||||
import { EuiLink } from '@elastic/eui';
|
||||
import React from 'react';
|
||||
import { useLinkProps } from '../../../../../../observability/public';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { parse } from '@elastic/datemath';
|
||||
import { parse } from '@kbn/datemath';
|
||||
import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
import { useEffect, useMemo, useState } from 'react';
|
||||
import { useKibana } from '../../../../../../../../src/plugins/kibana_react/public';
|
||||
|
|
|
@ -15,7 +15,7 @@ import {
|
|||
} from '@elastic/eui';
|
||||
import { FormattedMessage, FormattedTime, FormattedRelative } from '@kbn/i18n-react';
|
||||
import * as React from 'react';
|
||||
import { Unit } from '@elastic/datemath';
|
||||
import { Unit } from '@kbn/datemath';
|
||||
|
||||
import { euiStyled } from '../../../../../../../src/plugins/kibana_react/common';
|
||||
import { LogTextSeparator } from './log_text_separator';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import datemath from '@elastic/datemath';
|
||||
import datemath from '@kbn/datemath';
|
||||
import { EuiFlexGroup, EuiFlexItem, EuiPage, EuiSuperDatePicker } from '@elastic/eui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import moment from 'moment';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import { useCallback, useMemo, useState } from 'react';
|
||||
import useInterval from 'react-use/lib/useInterval';
|
||||
import datemath from '@elastic/datemath';
|
||||
import datemath from '@kbn/datemath';
|
||||
import moment from 'moment';
|
||||
import * as rt from 'io-ts';
|
||||
import { TimeRange as KibanaTimeRange } from '../../../../../../../src/plugins/data/public';
|
||||
|
|
|
@ -9,7 +9,7 @@ import { useCallback, useState, useEffect } from 'react';
|
|||
import * as rt from 'io-ts';
|
||||
import { pipe } from 'fp-ts/lib/pipeable';
|
||||
import { fold } from 'fp-ts/lib/Either';
|
||||
import DateMath from '@elastic/datemath';
|
||||
import DateMath from '@kbn/datemath';
|
||||
import { constant, identity } from 'fp-ts/lib/function';
|
||||
import createContainer from 'constate';
|
||||
import { useUrlState } from '../../../../utils/use_url_state';
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import React, { useCallback, useEffect, useState, useContext } from 'react';
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
import moment from 'moment';
|
||||
import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
|
||||
import { Source } from '../../../../containers/metrics_source';
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import createContainer from 'constate';
|
||||
import { useState, useCallback, useEffect } from 'react';
|
||||
import moment from 'moment';
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
import * as rt from 'io-ts';
|
||||
import { pipe } from 'fp-ts/lib/pipeable';
|
||||
import { fold } from 'fp-ts/lib/Either';
|
||||
|
|
|
@ -14,7 +14,7 @@ import {
|
|||
EuiContextMenuPanelDescriptor,
|
||||
EuiPopover,
|
||||
} from '@elastic/eui';
|
||||
import DateMath from '@elastic/datemath';
|
||||
import DateMath from '@kbn/datemath';
|
||||
import { Capabilities } from 'src/core/public';
|
||||
import { MetricsSourceConfigurationProperties } from '../../../../../common/metrics_sources';
|
||||
import { AlertFlyout } from '../../../../alerting/metric_threshold/components/alert_flyout';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import DateMath from '@elastic/datemath';
|
||||
import DateMath from '@kbn/datemath';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { DataViewBase } from '@kbn/es-query';
|
||||
import { isEqual } from 'lodash';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
import moment from 'moment';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import * as rt from 'io-ts';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import dateMath, { Unit } from '@elastic/datemath';
|
||||
import dateMath, { Unit } from '@kbn/datemath';
|
||||
|
||||
const JS_MAX_DATE = 8640000000000000;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { Unit } from '@elastic/datemath';
|
||||
import { Unit } from '@kbn/datemath';
|
||||
import { countBy } from 'lodash';
|
||||
import { MappedAnomalyHit } from '../../infra_ml';
|
||||
import { MlSystem, MlAnomalyDetectors } from '../../../types';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
|
||||
export const GTE_INTERVAL_RE = new RegExp(`^>=([\\d\\.]+\\s*(${dateMath.units.join('|')}))$`);
|
||||
export const INTERVAL_STRING_RE = new RegExp(`^([\\d\\.]+)\\s*(${dateMath.units.join('|')})$`);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { Unit } from '@elastic/datemath';
|
||||
import { Unit } from '@kbn/datemath';
|
||||
import moment from 'moment';
|
||||
|
||||
export const roundTimestamp = (timestamp: number, unit: Unit) => {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import './field_item.scss';
|
||||
|
||||
import React, { useCallback, useState, useMemo } from 'react';
|
||||
import DateMath from '@elastic/datemath';
|
||||
import DateMath from '@kbn/datemath';
|
||||
import {
|
||||
EuiButtonGroup,
|
||||
EuiButtonIcon,
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
import { errors } from '@elastic/elasticsearch';
|
||||
import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
import DateMath from '@elastic/datemath';
|
||||
import DateMath from '@kbn/datemath';
|
||||
import { schema } from '@kbn/config-schema';
|
||||
import { CoreSetup } from 'src/core/server';
|
||||
import type { DataViewField } from 'src/plugins/data_views/common';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
// utility functions for handling dates
|
||||
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
import { formatDate } from '@elastic/eui';
|
||||
import { TimeRange } from '../../../../../src/plugins/data/common';
|
||||
import { TIME_FORMAT } from '../constants/time_format';
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { duration, Duration, unitOfTime } from 'moment';
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
|
||||
type SupportedUnits = unitOfTime.Base;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import moment from 'moment';
|
||||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
|
||||
import { getTimefilter, getToastNotifications } from '../../util/dependency_cache';
|
||||
import { ml, GetTimeFieldRangeResponse } from '../../services/ml_api_service';
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import seriesConfig from '../explorer/explorer_charts/__mocks__/mock_series_config_filebeat';
|
||||
|
||||
jest.mock('./dependency_cache', () => {
|
||||
const dateMath = require('@elastic/datemath');
|
||||
const dateMath = require('@kbn/datemath');
|
||||
let _time = undefined;
|
||||
const timefilter = {
|
||||
setTime: (time) => {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import { isPlainObject, isString, ary, sortBy, assign } from 'lodash';
|
||||
import moment from 'moment';
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
|
||||
import { timeBucketsCalcAutoIntervalProvider } from './calc_auto_interval';
|
||||
import { parseInterval } from '../../../common/util/parse_interval';
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import React from 'react';
|
||||
import { EuiDatePicker, EuiDatePickerRange } from '@elastic/eui';
|
||||
import { Moment } from 'moment';
|
||||
import DateMath from '@elastic/datemath';
|
||||
import DateMath from '@kbn/datemath';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { useSeriesStorage } from '../hooks/use_series_storage';
|
||||
import { useUiSetting } from '../../../../../../../../src/plugins/kibana_react/public';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import datemath from '@elastic/datemath';
|
||||
import datemath from '@kbn/datemath';
|
||||
|
||||
export function getAbsoluteTime(range: string, opts: Parameters<typeof datemath.parse>[1] = {}) {
|
||||
const parsed = datemath.parse(range, opts);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
import {
|
||||
EuiSuperDatePicker,
|
||||
OnRefreshChangeProps,
|
||||
|
|
|
@ -13,7 +13,7 @@ import {
|
|||
RelativeTimeRange,
|
||||
isRelativeTimeRange,
|
||||
} from '../../store/inputs/model';
|
||||
import DateMath from '@elastic/datemath';
|
||||
import DateMath from '@kbn/datemath';
|
||||
import { getTimeRangeSettings } from '../../utils/default_date_settings';
|
||||
|
||||
const getTimeRangeSettingsMock = getTimeRangeSettings as jest.Mock;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import moment from 'moment';
|
||||
import { Unit } from '@elastic/datemath';
|
||||
import { Unit } from '@kbn/datemath';
|
||||
import { inputsModel } from '../../../common/store';
|
||||
|
||||
import type { EqlSearchStrategyResponse } from '../../../../../../../src/plugins/data/common';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { Unit } from '@elastic/datemath';
|
||||
import { Unit } from '@kbn/datemath';
|
||||
|
||||
import { InspectResponse } from '../../../types';
|
||||
import { ChartData } from '../../components/charts/common';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { Unit } from '@elastic/datemath';
|
||||
import { Unit } from '@kbn/datemath';
|
||||
import { renderHook, act } from '@testing-library/react-hooks';
|
||||
import { of, throwError } from 'rxjs';
|
||||
import { delay } from 'rxjs/operators';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
import moment from 'moment';
|
||||
import { isBoolean, isNumber, isString } from 'lodash/fp';
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
import { getOr, isEmpty } from 'lodash/fp';
|
||||
import moment from 'moment';
|
||||
|
||||
import dateMath from '@elastic/datemath';
|
||||
import dateMath from '@kbn/datemath';
|
||||
import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
|
||||
import { FilterStateStore, Filter } from '@kbn/es-query';
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue