mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Replaces moment with Grafanas DateTime (#16919)
* Wip: Initial commit * Refactor: Replaces moment.utc( * Refactor: replaces the last isMoment statements * Refactor: Removes almost all moment imports * Refactor: Moves moment_wrapper to grafana/ui * Refactor: Renames momentWrapper * Refactor: Removes one more moment import * Refactor: Removes unitOfTime import * Fix: Fixes Prettier error * Refactor: Renames DateTimeType to DateTime * Refactor: Renames isDateTimeType to isDateTime * Refactor: Renames dateTime to dateTime * Feature: Bans moment imports and types
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import moment from 'moment';
|
||||
import { MssqlDatasource } from '../datasource';
|
||||
import { TemplateSrvStub, TimeSrvStub } from 'test/specs/helpers';
|
||||
import { CustomVariable } from 'app/features/templating/custom_variable';
|
||||
import q from 'q';
|
||||
import { dateTime } from '@grafana/ui/src/utils/moment_wrapper';
|
||||
|
||||
describe('MSSQLDatasource', () => {
|
||||
const ctx: any = {
|
||||
@@ -29,8 +29,8 @@ describe('MSSQLDatasource', () => {
|
||||
rawQuery: 'select time, text, tags from table;',
|
||||
},
|
||||
range: {
|
||||
from: moment(1432288354),
|
||||
to: moment(1432288401),
|
||||
from: dateTime(1432288354),
|
||||
to: dateTime(1432288401),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -209,8 +209,8 @@ describe('MSSQLDatasource', () => {
|
||||
},
|
||||
};
|
||||
const time = {
|
||||
from: moment(1521545610656),
|
||||
to: moment(1521546251185),
|
||||
from: dateTime(1521545610656),
|
||||
to: dateTime(1521546251185),
|
||||
};
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
Reference in New Issue
Block a user