Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV-46515 Add missing plugins #43

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ public/css/*.min.css
.stylelintcache

/data/*
# LOGZ.IO CHANGE
!/data/plugins
/bin/*

# any certificates generated by grafana apiserver
Expand Down
94 changes: 94 additions & 0 deletions data/plugins/grafana-flowcharting/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Changelog

## [[0.4.0]](https://algenty.github.io/flowcharting-repository/archives/agenty-flowcharting-panel-0.4.0.zip) - 2019-09-26
### Added
- Draw.io editor ([see example](https://algenty.github.io/flowcharting-repository/images/openEditor_ani.gif))
- Open draw.io with dark theme for better rendering
- Display waiting screen when loading xml definition.
- Upgrading libraries
- mxGraph 4.0.4
- draw.io 11.2.8
- Graph definition
- Adding download function to download source by http on load. ([See example](https://algenty.github.io/flowcharting-repository/images/download_ani.gif))
- Metric
- Adding string support for state (See example)
- Zoom [(issue #19)](https://github.com/algenty/grafana-flowcharting/issues/19) ([See example](https://algenty.github.io/flowcharting-repository/images/zoom2_ani.gif))
- On the mouse pointer : Ctrl + Mouse
- Hold right button to move diagram.
- double click on shape to zoom on.
- Escape key to restore.
- Tooltip/popup support ([see example](https://algenty.github.io/flowcharting-repository/images/tooltip2_ani.gif))
- Grafana style css and date
- Adding metrics with color according levels
- Adding colors on metrics in tooltip
- Adding date of change
- Adding label input for metric
- Variables/templates support, accept variable like ${} ([See example](https://algenty.github.io/flowcharting-repository/images/variable_ani.gif))
- In xml definition
- In text mapping when type in sring for "Range to text" and "Value to text"
- In link ovewrite
- full shapes from draw.io included ([See example](https://algenty.github.io/flowcharting-repository/images/shapes_ani.gif))
- Some optimizations

### Fixed
- Optimization when refresh/render [(issue #15)](https://github.com/algenty/grafana-flowcharting/issues/15)
- No decimal fixed when 0 [(issue #23)](https://github.com/algenty/grafana-flowcharting/issues/23)
- Text substring and color [(issues #29)](https://github.com/algenty/grafana-flowcharting/issues/29)
- Fix formatted text when label is html [(issues #21)](https://github.com/algenty/grafana-flowcharting/issues/29)
- Work around a bug since Grafana 6+ [(issues 19426 grafana)](https://github.com/grafana/grafana/issues/19426)

## [[0.3.0]](https://algenty.github.io/flowcharting-repository/archives/agenty-flowcharting-panel-0.3.0.zip) - 2019-05-07
### Added
/!\ Possible breaking change with 0.2.0 and 0.2.5 but it will compatible with next release.

- Migration process for next release.
- Dynamic documentation/Examples on popover (thx SCHKN)
- Params link option, add params of dashboard to link.
- Full review of code (ES6 Class mode)
- Unit test with jest to increase quality
- Fill/text/stoke rules on the same object is possible.
- Mapping selector helper (chain in mapping)
- Icon overlay state (display icon warning when NOK)
- Implemented the conditions to display text according to the states.
- new inspect Tab with :
- Renamer ID (double click on ID)
- State status
- Debug mode
- Custom Link Mapping overrite.

### Fixed
- Substring replace on text [(Issue #8)](https://github.com/algenty/grafana-flowcharting/issues/8)
- Editor object not found Exception [(Issue #1)](https://github.com/algenty/grafana-flowcharting/issues/1)
- Original Link [(Issue #9)](https://github.com/algenty/grafana-flowcharting/issues/9)
- Fixed Change the colors [(Issue #14)](https://github.com/algenty/grafana-flowcharting/issues/14)
- Fixed Unit [(Issue #12)](https://github.com/algenty/grafana-flowcharting/issues/12)

## [[0.2.5]](https://algenty.github.io/flowcharting-repository/archives/agenty-flowcharting-panel-0.2.5.zip) - 2019-04-19
### Added
- Mapping Helper for select object with mouse

### Fixed
- Substring replace on text [(Issue #8)](https://github.com/algenty/grafana-flowcharting/issues/8)
- Editor object not found Exception [(Issue #1)](https://github.com/algenty/grafana-flowcharting/issues/1)

## [0.2.0] - 2019-03-18
### Added
- Display graph through xml definition
- Calibrate display (scale, center, background)
- Inspect tab to test states and shape from graph.
- Mapping values and colors (use stroke in color options for arrows instead fill)
- String type added with range or value mapping.
- Date type added
- multi rules with expand/collapes for better display, possibility to reorg rules

## [0.1.0] - 2019-09-02
### Added
- Display graph with mxgraph libs
- Inspect tab to explore object in graph and preview colors


# Annex
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
274 changes: 274 additions & 0 deletions data/plugins/grafana-flowcharting/Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,274 @@
const path = require("path");
const sass = require('node-sass');
// const plugin = require('./src/plugin.js');
const version = "0.5.0";

module.exports = (grunt) => {
require('load-grunt-tasks')(grunt);

grunt.loadNpmTasks('grunt-git');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-contrib-compress');

grunt.initConfig({

clean: {
before_init: {
src: ['externals/**/*'],
},
build: {
src: ['dist/**/*'],
},
after_init: {
src: ['externals/**/.git'],
},
},

copy: {
sanitizer_to_src: {
cwd: 'externals/drawio/src/main/webapp/js/sanitizer',
expand: true,
src: ['sanitizer.min.js'],
dest: 'src/libs',
},
shapes_to_src: {
cwd: 'externals/drawio/src/main/webapp/shapes',
expand: true,
src: ['**/*.js'],
dest: 'src/libs/shapes',
},
src_to_dist: {
cwd: 'src',
expand: true,
src: ['**/*', '!**/*.js', '!**/*.scss', '!img/**/*', '.*', '!__mocks__'],
dest: 'dist',
},
vkbeautify_to_dist: {
cwd: 'node_modules',
expand: true,
src: ['vkbeautify/index.js'],
dest: 'dist/libs',
},
libs_to_dist: {
cwd: 'node_modules',
expand: true,
src: ['mxgraph/javascript/dist/**/*', '!**/*.js'],
dest: 'dist/libs',
},
res_to_dist: {
cwd: 'node_modules/mxgraph/javascript/src',
expand: true,
src: ['**/*', '!**/*.js'],
dest: 'dist/libs/mxgraph/javascript/dist',
},
mxgraph_to_dist: {
cwd: 'externals/mxgraph/javascript/examples/grapheditor/www',
expand: true,
src: ['**/*', '!**/*.js'],
dest: 'dist/libs/mxgraph/javascript/dist',
},
chartist_to_dist: {
cwd: 'node_modules/chartist/dist/chartist.min.js',
expand: true,
src: ['**/*', '!**/*.js'],
dest: 'dist/chartist',
},


readme: {
expand: true,
src: ['README.md'],
dest: 'dist',
},

img_to_dist: {
cwd: 'src',
expand: true,
src: ['img/**/*'],
dest: 'dist/',
},

drawio_img_to_dist: {
cwd: 'externals/drawio/src/main/webapp',
expand: true,
src: ['img/**/*'],
dest: 'dist/',
},

stencils_to_dist: {
cwd: 'externals/drawio/src/main/webapp/stencils',
expand: true,
src: ['**/*', '!**/*.js'],
dest: 'dist/libs/mxgraph/javascript/dist/stencils',
},
},

watch: {
rebuild_all: {
files: ['src/**/*', 'README.md'],
tasks: ['default'],
options: {
spawn: false,
},
},
microbuild: {
files: ['src/**/*'],
tasks: ['microbuild'],
options: {
spawn: false,
},
},
},


sass: {
options: {
sourceMap: false,
implementation: sass,
},
dist: {
files: {
'dist/css/chartist-settings.css': 'src/css/_chartist-settings.scss',
'dist/css/flowchart.dark.css': 'src/css/flowchart.dark.scss',
'dist/css/flowchart.light.css': 'src/css/flowchart.light.scss',
},
},
},
babel: {
options: {
sourceMap: false,
},
dist: {
files: [{
cwd: 'src',
expand: true,
src: ['**/*.js', '!mxHandler.js', "!Graph.js", "!init.js", "!utils.js", "!backup/**/*", "!__mocks__", "!libs/sanitizer.min.js"],
dest: 'dist',
ext: '.js',
}],
},
},

webpack: {
mxgraph: {
entry: "./src/graph_class.js",
mode: "development",
module: {
rules: [
{
test: /\.m?js$/,
exclude: /(node_modules|bower_components|externals)/,
use: {
loader: 'babel-loader',
},
},
],
},
output: {
path: path.resolve(process.cwd(), "./dist"),
filename: "graph_class.js",
library: "graph_class",
libraryTarget: "umd",
},
externals: {
jquery: "jquery",
lodash: "lodash",
},
},
utils: {
entry: "./src/utils.js",
mode: "development",
module: {
rules: [
{
test: /\.m?js$/,
exclude: /(node_modules|bower_components|externals)/,
use: {
loader: 'babel-loader',
},
},
],
},
output: {
path: path.resolve(process.cwd(), "./dist"),
filename: "utils.js",
library: "utils",
libraryTarget: "umd",
},
externals: {
jquery: "jquery",
lodash: "lodash",
},
},
tooltip: {
entry: "./src/tooltipHandler.js",
mode: "development",
module: {
rules: [
{
test: /\.m?js$/,
exclude: /(node_modules|bower_components|externals)/,
use: {
loader: 'babel-loader',
},
},
],
},
output: {
path: path.resolve(process.cwd(), "./dist"),
filename: "tooltipHandler.js",
library: "tooltipHandler",
libraryTarget: "umd",
},
externals: {
jquery: "jquery",
lodash: "lodash",
},
},
},

compress: {
main: {
options: {
archive: "archives/agenty-flowcharting-panel-" + version + "-SNAPSHOT.zip",
},
expand: true,
cwd: '.',
src: ['**/*', '!node_modules/**', '!bower_components/**', '!others/**', '!.git/**', '!archives/**', '!public/**', '!backup/**', '!spec/**', '!spec/__snapshots__/**','!externals/**'],
dest: 'grafana-flowcharting',
},
},

gitclone: {
mxgraph: {
options: {
repository: 'https://github.com/jgraph/mxgraph',
branch: 'master',
depth: 1,
tags: "v4.0.4",
directory: 'externals/mxgraph',
verbose: true,
}
},
drawio: {
options: {
repository: 'https://github.com/jgraph/drawio',
branch: 'master',
depth: 1,
tags : "v11.2.8",
directory: 'externals/drawio',
verbose: true,
}
}
},

});

grunt.registerTask('default', ['clean:build', 'copy:src_to_dist', 'sass', 'copy:readme', 'copy:img_to_dist', 'babel', 'webpack', 'copy:res_to_dist', 'copy:mxgraph_to_dist', 'copy:stencils_to_dist']);
grunt.registerTask('microbuild', ['sass', 'babel', 'webpack' ]);
grunt.registerTask('dev', ['default', 'watch:rebuild_all']);
grunt.registerTask('microdev', ['microbuild', 'watch:microbuild']);
grunt.registerTask('archive', ['default', 'compress:main']);
grunt.registerTask('init', ['clean:before_init','gitclone:mxgraph','gitclone:drawio','clean:after_init']);
};
Loading