fix tether-drop dependency after moving Grafana to webpack
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -14,6 +14,8 @@
|
||||
# Builded docs
|
||||
docs/site/
|
||||
|
||||
vendor/npm
|
||||
src/vendor/npm
|
||||
node_modules
|
||||
npm-debug.log
|
||||
coverage/
|
||||
|
||||
30
Gruntfile.js
30
Gruntfile.js
@@ -15,12 +15,34 @@ module.exports = function(grunt) {
|
||||
test: {
|
||||
src: ["dist/test"]
|
||||
},
|
||||
vendor: {
|
||||
src: ["vendor"]
|
||||
},
|
||||
tmp: {
|
||||
src: ["tmp"]
|
||||
}
|
||||
},
|
||||
|
||||
copy: {
|
||||
node_modules: {
|
||||
cwd: './node_modules',
|
||||
expand: true,
|
||||
flatten: true,
|
||||
filter: 'isFile',
|
||||
src: [
|
||||
'tether-drop/dist/js/drop.min.js',
|
||||
'tether/dist/js/tether.min.js',
|
||||
],
|
||||
dest: 'vendor/npm'
|
||||
},
|
||||
vendor_to_dist: {
|
||||
cwd: 'vendor',
|
||||
expand: true,
|
||||
src: [
|
||||
'**/*'
|
||||
],
|
||||
dest: 'dist/vendor'
|
||||
},
|
||||
src_to_dist: {
|
||||
cwd: 'src',
|
||||
expand: true,
|
||||
@@ -29,6 +51,7 @@ module.exports = function(grunt) {
|
||||
'!datasource-zabbix/*.js',
|
||||
'!panel-triggers/*.js',
|
||||
'!components/*.js',
|
||||
'!vendor/*.js',
|
||||
'!module.js',
|
||||
'!**/*.scss'
|
||||
],
|
||||
@@ -65,6 +88,7 @@ module.exports = function(grunt) {
|
||||
'datasource-zabbix/*.js',
|
||||
'panel-triggers/*.js',
|
||||
'components/*.js',
|
||||
'vendor/*.js',
|
||||
'module.js',
|
||||
],
|
||||
dest: 'dist/'
|
||||
@@ -149,10 +173,9 @@ module.exports = function(grunt) {
|
||||
});
|
||||
|
||||
grunt.registerTask('default', [
|
||||
'clean:dist',
|
||||
'clean',
|
||||
'sass',
|
||||
'copy:src_to_dist',
|
||||
'copy:pluginDef',
|
||||
'copy',
|
||||
'jshint',
|
||||
'jscs',
|
||||
'babel',
|
||||
@@ -162,6 +185,7 @@ module.exports = function(grunt) {
|
||||
grunt.registerTask('watchTask', [
|
||||
'clean:dist',
|
||||
'sass',
|
||||
'copy:vendor_to_dist',
|
||||
'copy:src_to_dist',
|
||||
'copy:pluginDef',
|
||||
'babel',
|
||||
|
||||
16
dist/panel-triggers/ack-tooltip.directive.js
vendored
16
dist/panel-triggers/ack-tooltip.directive.js
vendored
@@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
System.register(['angular', 'jquery', 'tether-drop'], function (_export, _context) {
|
||||
System.register(['angular', 'jquery'], function (_export, _context) {
|
||||
"use strict";
|
||||
|
||||
var angular, $, Drop;
|
||||
@@ -9,11 +9,21 @@ System.register(['angular', 'jquery', 'tether-drop'], function (_export, _contex
|
||||
angular = _angular.default;
|
||||
}, function (_jquery) {
|
||||
$ = _jquery.default;
|
||||
}, function (_tetherDrop) {
|
||||
Drop = _tetherDrop.default;
|
||||
}],
|
||||
execute: function () {
|
||||
|
||||
System.config({
|
||||
paths: {
|
||||
tether: System.getConfig().baseURL + "plugins/alexanderzobnin-zabbix-app/vendor/npm/tether.min.js"
|
||||
}
|
||||
});
|
||||
|
||||
Drop = void 0;
|
||||
|
||||
System.amdRequire(["plugins/alexanderzobnin-zabbix-app/vendor/npm/drop.min.js"], function (drop) {
|
||||
Drop = drop;
|
||||
});
|
||||
|
||||
/** @ngInject */
|
||||
angular.module('grafana.directives').directive('ackTooltip', function ($sanitize, $compile) {
|
||||
var buttonTemplate = '<a bs-tooltip="\'Acknowledges ({{trigger.acknowledges.length}})\'"' + '<i ng-class="' + "{'fa fa-comments': trigger.acknowledges.length, " + "'fa fa-comments-o': !trigger.acknowledges.length, " + '}"></i></a>';
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -8,12 +8,19 @@ var _jquery = require('jquery');
|
||||
|
||||
var _jquery2 = _interopRequireDefault(_jquery);
|
||||
|
||||
var _tetherDrop = require('tether-drop');
|
||||
|
||||
var _tetherDrop2 = _interopRequireDefault(_tetherDrop);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
System.config({
|
||||
paths: {
|
||||
tether: System.getConfig().baseURL + "plugins/alexanderzobnin-zabbix-app/vendor/npm/tether.min.js"
|
||||
}
|
||||
});
|
||||
|
||||
var Drop = void 0;
|
||||
System.amdRequire(["plugins/alexanderzobnin-zabbix-app/vendor/npm/drop.min.js"], function (drop) {
|
||||
Drop = drop;
|
||||
});
|
||||
|
||||
/** @ngInject */
|
||||
_angular2.default.module('grafana.directives').directive('ackTooltip', function ($sanitize, $compile) {
|
||||
var buttonTemplate = '<a bs-tooltip="\'Acknowledges ({{trigger.acknowledges.length}})\'"' + '<i ng-class="' + "{'fa fa-comments': trigger.acknowledges.length, " + "'fa fa-comments-o': !trigger.acknowledges.length, " + '}"></i></a>';
|
||||
@@ -69,7 +76,7 @@ _angular2.default.module('grafana.directives').directive('ackTooltip', function
|
||||
tooltip += addAckButtonTemplate;
|
||||
tooltip += '</div>';
|
||||
|
||||
var drop = new _tetherDrop2.default({
|
||||
var drop = new Drop({
|
||||
target: element[0],
|
||||
content: tooltip,
|
||||
position: "bottom left",
|
||||
|
||||
1
dist/vendor/npm/drop.min.js
vendored
Normal file
1
dist/vendor/npm/drop.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/vendor/npm/tether.min.js
vendored
Normal file
1
dist/vendor/npm/tether.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -42,7 +42,8 @@
|
||||
"moment": "~2.14.1",
|
||||
"prunk": "~1.2.1",
|
||||
"q": "~1.4.1",
|
||||
"sinon-chai": "~2.8.0"
|
||||
"sinon-chai": "~2.8.0",
|
||||
"tether-drop": "^1.4.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"lodash": "~4.0.0"
|
||||
|
||||
@@ -1,6 +1,16 @@
|
||||
import angular from 'angular';
|
||||
import $ from 'jquery';
|
||||
import Drop from 'tether-drop';
|
||||
|
||||
System.config({
|
||||
paths: {
|
||||
tether: System.getConfig().baseURL + "plugins/alexanderzobnin-zabbix-app/vendor/npm/tether.min.js"
|
||||
}
|
||||
});
|
||||
|
||||
let Drop;
|
||||
System.amdRequire(["plugins/alexanderzobnin-zabbix-app/vendor/npm/drop.min.js"], (drop) => {
|
||||
Drop = drop;
|
||||
});
|
||||
|
||||
/** @ngInject */
|
||||
angular
|
||||
|
||||
Reference in New Issue
Block a user