* CI: fix shellcheck issues (#789) Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com> * annotations: fix options in grafana 6.x, fix #813 * fix function editor in Grafana 6.4, closes #810 * add typings for grafana packages * Add $__range_series variable for calculating function over the whole series, #531 * fix tests * Don't set alert styles for react panels, fix #823 * docs: add range variables * docs: percentile reference * fix codespell * update packages (build with node 12) * update circleci node image to 12 * fix test configuration (babel) * Fix 817 (#851) * problems: update panel schema * update packages (build with node 12) * problems: use datasource from target * problems: fix query editor after schema update * problems: fix list layout * update circleci node image to 12 * fix tests * build(deps-dev): bump lodash from 4.17.10 to 4.17.13 (#852) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.10 to 4.17.13. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.10...4.17.13) Signed-off-by: dependabot[bot] <support@github.com> * fix packages security alerts * problems: fix tags adding and removal * fix adding func from typeahead, closes #468 * update change log * bump plugin version to 3.10.5 * problems: fix tag removal (list layout) * Fix percentile() function, closes #862 (#863) Like the other aggregation functions, the datapoints need to be sorted in time before calling groupBy_perf(). * Update copyright, happy New Year! * fix not acknowledged problem color with a message (#858) * fix not acknowledged problem color with a message * fix not acknowledged problem color with a message, closes #857 * Variable query editor (#856) * refactor: convert module to typescript * refactor: covert utils to typescript * variable query editor WIP * variable editor: fix type error after grafana/ui update * variable editor: use FormLabel from grafana/ui * variable editor: refactor * variable editor: input validation and highlights * variable editor: fix tests * variable query: fix backward compatibility with empty queries * fix linter errors * variable editor: fix variable replacement in queries * Fixes for backend Co-authored-by: Mario Trangoni <mario@mariotrangoni.de> Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mark Reibert <mreibert@netskope.com> Co-authored-by: memfiz <arnis.civciss@gmail.com>
100 lines
2.6 KiB
JavaScript
100 lines
2.6 KiB
JavaScript
const path = require('path');
|
|
const webpack = require('webpack');
|
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
const CleanWebpackPlugin = require('clean-webpack-plugin');
|
|
const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
|
|
|
const ExtractTextPluginLight = new ExtractTextPlugin('./css/grafana-zabbix.light.css');
|
|
const ExtractTextPluginDark = new ExtractTextPlugin('./css/grafana-zabbix.dark.css');
|
|
|
|
function resolve(dir) {
|
|
return path.join(__dirname, '..', dir);
|
|
}
|
|
|
|
module.exports = {
|
|
target: 'node',
|
|
context: resolve('src'),
|
|
entry: {
|
|
'./module': './module.js',
|
|
'components/config': './components/config.js',
|
|
'datasource-zabbix/module': './datasource-zabbix/module.ts',
|
|
'panel-triggers/module': './panel-triggers/module.js',
|
|
},
|
|
output: {
|
|
filename: "[name].js",
|
|
path: resolve('dist'),
|
|
libraryTarget: "amd"
|
|
},
|
|
externals: [
|
|
// remove the line below if you don't want to use builtin versions
|
|
'jquery', 'lodash', 'moment', 'angular',
|
|
'react', 'react-dom', '@grafana/ui', '@grafana/runtime','@grafana/data',
|
|
function (context, request, callback) {
|
|
var prefix = 'grafana/';
|
|
if (request.indexOf(prefix) === 0) {
|
|
return callback(null, request.substr(prefix.length));
|
|
}
|
|
callback();
|
|
}
|
|
],
|
|
plugins: [
|
|
new webpack.optimize.OccurrenceOrderPlugin(),
|
|
new CopyWebpackPlugin([
|
|
{ from: '**/plugin.json' },
|
|
{ from: '**/*.html' },
|
|
{ from: 'dashboards/*' },
|
|
{ from: '../README.md' },
|
|
{ from: '**/img/*' },
|
|
]),
|
|
new CleanWebpackPlugin(['dist'], {
|
|
root: resolve('.')
|
|
}),
|
|
ExtractTextPluginLight,
|
|
ExtractTextPluginDark,
|
|
],
|
|
resolve: {
|
|
extensions: ['.js', '.es6', '.ts', '.tsx', '.html', '.scss']
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.js$/,
|
|
exclude: /(external)/,
|
|
use: {
|
|
loader: 'babel-loader',
|
|
query: {
|
|
presets: ['@babel/preset-env']
|
|
}
|
|
}
|
|
},
|
|
{
|
|
test: /\.tsx?$/,
|
|
exclude: /node_modules|external/,
|
|
loaders: [
|
|
"ts-loader"
|
|
],
|
|
},
|
|
{
|
|
test: /\.html$/,
|
|
use: {
|
|
loader: 'html-loader'
|
|
}
|
|
},
|
|
{
|
|
test: /\.light\.scss$/,
|
|
use: ExtractTextPluginLight.extract({
|
|
fallback: 'style-loader',
|
|
use: ['css-loader', 'sass-loader']
|
|
})
|
|
},
|
|
{
|
|
test: /\.dark\.scss$/,
|
|
use: ExtractTextPluginDark.extract({
|
|
fallback: 'style-loader',
|
|
use: ['css-loader', 'sass-loader']
|
|
})
|
|
},
|
|
]
|
|
}
|
|
};
|