mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
* Fix browser date format (#57714)
This commit is contained in:
parent
df4f90633e
commit
0c56c8099d
10 changed files with 61 additions and 10 deletions
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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;
|
20
src/plugins/data/public/field_formats/converters/index.ts
Normal file
20
src/plugins/data/public/field_formats/converters/index.ts
Normal 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';
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
20
src/plugins/data/server/field_formats/converters/index.ts
Normal file
20
src/plugins/data/server/field_formats/converters/index.ts
Normal 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';
|
|
@ -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 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue