Commit 52644bb2 by Torkel Ödegaard

fix(timepicker): fixed recent breaking of datetime picker when swithing from requirejs to systemjs

parent 7cad3c89
define([ ///<reference path="../../../headers/common.d.ts" />
"angular",
"lodash",
"moment",
],function (angular, _, moment) {
'use strict';
angular. import _ from 'lodash';
module("grafana.directives"). import angular from 'angular';
directive('inputDatetime', function () { import moment from 'moment';
export function inputDateDirective() {
return { return {
restrict: 'A', restrict: 'A',
require: 'ngModel', require: 'ngModel',
...@@ -40,5 +37,5 @@ define([ ...@@ -40,5 +37,5 @@ define([
ngModel.$formatters.push(toUser); ngModel.$formatters.push(toUser);
} }
}; };
}); }
});
///<reference path="../../../headers/common.d.ts" /> ///<reference path="../../../headers/common.d.ts" />
///<amd-dependency path="./input_date" name="inputDate" />
import _ from 'lodash'; import _ from 'lodash';
import kbn from 'app/core/utils/kbn'; import kbn from 'app/core/utils/kbn';
...@@ -9,8 +8,6 @@ import moment from 'moment'; ...@@ -9,8 +8,6 @@ import moment from 'moment';
import * as dateMath from 'app/core/utils/datemath'; import * as dateMath from 'app/core/utils/datemath';
import * as rangeUtil from 'app/core/utils/rangeutil'; import * as rangeUtil from 'app/core/utils/rangeutil';
declare var inputDate: any;
export class TimePickerCtrl { export class TimePickerCtrl {
static tooltipFormat = 'MMM D, YYYY HH:mm:ss'; static tooltipFormat = 'MMM D, YYYY HH:mm:ss';
...@@ -179,3 +176,6 @@ export function timePickerDirective() { ...@@ -179,3 +176,6 @@ export function timePickerDirective() {
angular.module('grafana.directives').directive('gfTimePickerSettings', settingsDirective); angular.module('grafana.directives').directive('gfTimePickerSettings', settingsDirective);
angular.module('grafana.directives').directive('gfTimePicker', timePickerDirective); angular.module('grafana.directives').directive('gfTimePicker', timePickerDirective);
import {inputDateDirective} from './input_date';
angular.module("grafana.directives").directive('inputDatetime', inputDateDirective);
...@@ -56,7 +56,7 @@ export class GrafanaApp { ...@@ -56,7 +56,7 @@ export class GrafanaApp {
'ang-drag-drop', 'ang-drag-drop',
'grafana', 'grafana',
'pasvaz.bindonce', 'pasvaz.bindonce',
'ui.bootstrap.tabs', 'ui.bootstrap',
'ui.bootstrap.tpls', 'ui.bootstrap.tpls',
]; ];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment