Skip to content

Commit

Permalink
Merge pull request #6972 from w33ble/npm-datemath
Browse files Browse the repository at this point in the history
Use @elastic/datemath module from npm
  • Loading branch information
w33ble committed Apr 19, 2016
2 parents 8f9ec7d + 0b09c8e commit 21a00be
Show file tree
Hide file tree
Showing 12 changed files with 10 additions and 260 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
},
"dependencies": {
"@bigfunger/decompress-zip": "0.2.0-stripfix2",
"@elastic/datemath": "2.2.0",
"@spalger/angular-bootstrap": "0.12.1",
"@spalger/filesaver": "1.1.2",
"@spalger/leaflet-draw": "0.2.3",
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/kibana/public/discover/controllers/discover.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import angular from 'angular';
import moment from 'moment';
import getSort from 'ui/doc_table/lib/get_sort';
import rison from 'rison-node';
import dateMath from 'ui/utils/date_math';
import dateMath from '@elastic/datemath';
import 'ui/doc_table';
import 'ui/visualize';
import 'ui/notify';
Expand Down
2 changes: 1 addition & 1 deletion src/ui/public/directives/pretty_duration.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import _ from 'lodash';
import dateMath from 'ui/utils/date_math';
import dateMath from '@elastic/datemath';
import moment from 'moment';
import 'ui/timepicker/quick_ranges';
import 'ui/timepicker/time_units';
Expand Down
2 changes: 1 addition & 1 deletion src/ui/public/directives/validate_date_math.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import _ from 'lodash';
import dateMath from 'ui/utils/date_math';
import dateMath from '@elastic/datemath';
import uiModules from 'ui/modules';

uiModules.get('kibana').directive('validateDateMath', function () {
Expand Down
2 changes: 1 addition & 1 deletion src/ui/public/time_buckets/calc_es_interval.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import moment from 'moment';
import dateMath from 'ui/utils/date_math';
import dateMath from '@elastic/datemath';
export default function () {

let unitsDesc = dateMath.unitsDesc;
Expand Down
2 changes: 1 addition & 1 deletion src/ui/public/time_buckets/time_buckets.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import _ from 'lodash';
import moment from 'moment';
import dateMath from 'ui/utils/date_math';
import dateMath from '@elastic/datemath';
import parseInterval from 'ui/utils/parse_interval';
import TimeBucketsCalcAutoIntervalProvider from 'ui/time_buckets/calc_auto_interval';
import TimeBucketsCalcEsIntervalProvider from 'ui/time_buckets/calc_es_interval';
Expand Down
2 changes: 1 addition & 1 deletion src/ui/public/timefilter/timefilter.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import _ from 'lodash';
import angular from 'angular';
import moment from 'moment';
import dateMath from 'ui/utils/date_math';
import dateMath from '@elastic/datemath';
import 'ui/state_management/global_state';
import 'ui/config';
import EventsProvider from 'ui/events';
Expand Down
2 changes: 1 addition & 1 deletion src/ui/public/timepicker/timepicker.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import html from 'ui/timepicker/timepicker.html';
import _ from 'lodash';
import dateMath from 'ui/utils/date_math';
import dateMath from '@elastic/datemath';
import moment from 'moment';
import Notifier from 'ui/notify/notifier';
import 'ui/directives/input_datetime';
Expand Down
143 changes: 0 additions & 143 deletions src/ui/public/utils/__tests__/datemath.js

This file was deleted.

108 changes: 0 additions & 108 deletions src/ui/public/utils/date_math.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/ui/public/utils/parse_interval.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import _ from 'lodash';
import moment from 'moment';
import dateMath from 'ui/utils/date_math';
import dateMath from '@elastic/datemath';

// Assume interval is in the form (value)(unit), such as "1h"
let INTERVAL_STRING_RE = new RegExp('^([0-9\\.]*)\\s*(' + dateMath.units.join('|') + ')$');
Expand Down
2 changes: 1 addition & 1 deletion src/ui/public/vislib/visualizations/time_marker.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import d3 from 'd3';
import dateMath from 'ui/utils/date_math';
import dateMath from '@elastic/datemath';
export default function TimeMarkerFactory() {

function TimeMarker(times, xScale, height) {
Expand Down

0 comments on commit 21a00be

Please sign in to comment.