diff --git a/src/app/panels/annotations/module.html b/src/app/panels/annotations/module.html index 1ae6b65a237..0441ed1f883 100644 --- a/src/app/panels/annotations/module.html +++ b/src/app/panels/annotations/module.html @@ -6,7 +6,7 @@
\ No newline at end of file diff --git a/src/app/panels/timepicker/module.js b/src/app/panels/timepicker/module.js index 093afa17556..198239f6a0d 100644 --- a/src/app/panels/timepicker/module.js +++ b/src/app/panels/timepicker/module.js @@ -40,15 +40,9 @@ function (angular, app, _, moment, kbn) { refresh_intervals : ['5s','10s','30s','1m','5m','15m','30m','1h','2h','1d'], }; - _.defaults($scope.panel,_d); + var customTimeModal = null; - var customTimeModal = $modal({ - template: './app/panels/timepicker/custom.html', - persist: true, - show: false, - scope: $scope, - keyboard: false - }); + _.defaults($scope.panel,_d); $scope.filterSrv = filterSrv; @@ -72,6 +66,16 @@ function (angular, app, _, moment, kbn) { }; $scope.customTime = function() { + if (!customTimeModal) { + customTimeModal = $modal({ + template: './app/panels/timepicker/custom.html', + persist: true, + show: false, + scope: $scope, + keyboard: false + }); + } + // Assume the form is valid since we're setting it to something valid $scope.input.$setValidity("dummy", true); $scope.temptime = cloneTime($scope.time); diff --git a/src/app/partials/dashLoader.html b/src/app/partials/dashLoader.html index 0025faa47b5..5bff28860c9 100644 --- a/src/app/partials/dashLoader.html +++ b/src/app/partials/dashLoader.html @@ -45,7 +45,7 @@