[7.6] Fix browser date format (#57714) (#58170)

* Fix browser date format (#57714)
This commit is contained in:
Matthew Kime 2020-02-22 10:15:19 -06:00 committed by GitHub
parent df4f90633e
commit 0c56c8099d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 61 additions and 10 deletions

View file

@ -19,7 +19,6 @@
export { UrlFormat } from './url';
export { BytesFormat } from './bytes';
export { DateFormat } from './date_server';
export { DateNanosFormat } from './date_nanos';
export { RelativeDateFormat } from './relative_date';
export { DurationFormat } from './duration';

View file

@ -22,3 +22,4 @@ export * from './timefilter/types';
export * from './query/types';
export * from './kbn_field_types/types';
export * from './index_patterns/types';
export { TextContextTypeConvert } from './field_formats/types';

View file

@ -19,9 +19,12 @@
import { memoize, noop } from 'lodash';
import moment from 'moment';
import { KBN_FIELD_TYPES } from '../../kbn_field_types/types';
import { FieldFormat } from '../field_format';
import { TextContextTypeConvert, FIELD_FORMAT_IDS } from '../types';
import {
FieldFormat,
KBN_FIELD_TYPES,
TextContextTypeConvert,
FIELD_FORMAT_IDS,
} from '../../../common';
export class DateFormat extends FieldFormat {
static id = FIELD_FORMAT_IDS.DATE;

View file

@ -0,0 +1,20 @@
/*
* 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.
*/
export { DateFormat } from './date';

View file

@ -24,7 +24,6 @@ import {
BoolFormat,
BytesFormat,
ColorFormat,
DateFormat,
DateNanosFormat,
DurationFormat,
IpFormat,
@ -38,6 +37,8 @@ import {
UrlFormat,
} from '../../common/';
import { DateFormat } from '../field_formats/converters';
export class FieldFormatsService {
private readonly fieldFormats: FieldFormatRegisty = new FieldFormatRegisty();

View file

@ -49,6 +49,8 @@ export {
TimeRange,
} from '../common';
export { DateFormat } from './field_formats/converters';
/**
* Static code to be shared externally
* @public
@ -68,7 +70,6 @@ export {
BoolFormat,
BytesFormat,
ColorFormat,
DateFormat,
DateNanosFormat,
DEFAULT_CONVERTER_COLOR,
DurationFormat,

View file

@ -19,9 +19,14 @@
import { memoize, noop } from 'lodash';
import moment from 'moment-timezone';
import { KBN_FIELD_TYPES } from '../../kbn_field_types/types';
import { FieldFormat, IFieldFormatMetaParams } from '../field_format';
import { TextContextTypeConvert, FIELD_FORMAT_IDS } from '../types';
import {
FieldFormat,
KBN_FIELD_TYPES,
TextContextTypeConvert,
FIELD_FORMAT_IDS,
IFieldFormatMetaParams,
} from '../../../common';
export class DateFormat extends FieldFormat {
static id = FIELD_FORMAT_IDS.DATE;

View file

@ -0,0 +1,20 @@
/*
* 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.
*/
export { DateFormat } from './date_server';

View file

@ -72,7 +72,6 @@ export {
BoolFormat,
BytesFormat,
ColorFormat,
DateFormat,
DateNanosFormat,
DEFAULT_CONVERTER_COLOR,
DurationFormat,
@ -94,4 +93,6 @@ export {
getKbnTypeNames,
} from '../common';
export { DateFormat } from './field_formats/converters';
export { DataServerPlugin as Plugin, DataPluginSetup as PluginSetup };