mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
more modal loading optimizations
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
</div>
|
||||
|
||||
<div class="submenu-control-edit">
|
||||
<i class="icon-cog pointer" bs-modal="'app/panels/annotations/editor.html'" bs-tooltip="'Edit annotations'" ></i>
|
||||
<i class="icon-cog pointer" config-modal="app/panels/annotations/editor.html" bs-tooltip="'Edit annotations'" ></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -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);
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<li ng-show="dashboard.current.loader.save_local">
|
||||
<a class="link" ng-click="dashboard.to_file()">Export schema</a>
|
||||
</li>
|
||||
<li ng-show="showDropdown('share')"><a bs-tooltip="'Share'" data-placement="bottom" ng-click="elasticsearch_save('temp',dashboard.current.loader.save_temp_ttl)" bs-modal="'app/partials/dashLoaderShare.html'">Share temp copy</i></a></li>
|
||||
<li ng-show="showDropdown('share')"><a bs-tooltip="'Share'" data-placement="bottom" ng-click="elasticsearch_save('temp',dashboard.current.loader.save_temp_ttl)" config-modal="app/partials/dashLoaderShare.html">Share temp copy</i></a></li>
|
||||
|
||||
<li ng-show="dashboard.current.loader.save_gist" style="margin:10px">
|
||||
<h6>Gist</h6>
|
||||
|
||||
Reference in New Issue
Block a user