mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
query: more work on metrics tab changes
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
define([
|
||||
'angular',
|
||||
'require',
|
||||
'../core_module',
|
||||
'app/core/utils/kbn',
|
||||
],
|
||||
function (angular, coreModule, kbn) {
|
||||
function (angular, require, coreModule, kbn) {
|
||||
'use strict';
|
||||
|
||||
coreModule.default.directive('tip', function($compile) {
|
||||
@@ -18,6 +19,20 @@ function (angular, coreModule, kbn) {
|
||||
};
|
||||
});
|
||||
|
||||
coreModule.default.directive('clipboardButton',function() {
|
||||
return function(scope, elem) {
|
||||
require(['vendor/clipboard/dist/clipboard'], function(Clipboard) {
|
||||
scope.clipboard = new Clipboard(elem[0]);
|
||||
});
|
||||
|
||||
scope.$on('$destroy', function() {
|
||||
if (scope.clipboard) {
|
||||
scope.clipboard.destroy();
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
coreModule.default.directive('watchChange', function() {
|
||||
return {
|
||||
scope: { onchange: '&watchChange' },
|
||||
|
||||
Reference in New Issue
Block a user