Skip to content

Commit

Permalink
Add custom formatting for Date Nanos format
Browse files Browse the repository at this point in the history
  • Loading branch information
bartvanremortele committed Aug 6, 2019
1 parent 9f6188f commit 34c4e9d
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* 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 { DateFormatEditor } from '../date';

export class DateNanosFormatEditor extends DateFormatEditor {
static formatId = 'date_nanos';

constructor(props) {
super(props);
}
}
Original file line number Diff line number Diff line change
@@ -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 { DateNanosFormatEditor } from './date_nanos';
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { RegistryFieldFormatEditorsProvider } from 'ui/registry/field_format_edi
import { BytesFormatEditor } from './editors/bytes';
import { ColorFormatEditor } from './editors/color';
import { DateFormatEditor } from './editors/date';
import { DateNanosFormatEditor } from './editors/date_nanos';
import { DurationFormatEditor } from './editors/duration';
import { NumberFormatEditor } from './editors/number';
import { PercentFormatEditor } from './editors/percent';
Expand All @@ -32,6 +33,7 @@ import { UrlFormatEditor } from './editors/url/url';
RegistryFieldFormatEditorsProvider.register(() => BytesFormatEditor);
RegistryFieldFormatEditorsProvider.register(() => ColorFormatEditor);
RegistryFieldFormatEditorsProvider.register(() => DateFormatEditor);
RegistryFieldFormatEditorsProvider.register(() => DateNanosFormatEditor);
RegistryFieldFormatEditorsProvider.register(() => DurationFormatEditor);
RegistryFieldFormatEditorsProvider.register(() => NumberFormatEditor);
RegistryFieldFormatEditorsProvider.register(() => PercentFormatEditor);
Expand Down

0 comments on commit 34c4e9d

Please sign in to comment.