Skip to content

Commit

Permalink
Merge branch 'mejarrett-7.5-dev' into 7-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
dlumbrer committed Mar 2, 2020
2 parents 140b337 + 92be9f1 commit a4a1cdb
Show file tree
Hide file tree
Showing 7 changed files with 263 additions and 298 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Network Plugin for Kibana 5.5.X
# Network Plugin for Kibana 7.5.X

This is a plugin developed for Kibana 5 that displays a network node that link two fields that have been previously selected.
This is a plugin developed for Kibana 7.5.x that displays a network node that link two fields that have been previously selected.

###### Link to the page: https://dlumbrer.github.io/kbn_network/

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "network_vis",
"version": "5.5.0-1",
"version": "7.5.2",
"kibana": {
"version": "kibana"
},
Expand Down
2 changes: 1 addition & 1 deletion public/images/icon-network.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 11 additions & 19 deletions public/network_vis.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,36 @@
import "plugins/network_vis/network_vis.less";

import { KbnNetworkVisController } from './network_vis_controller'
import { VisFactoryProvider } from 'ui/vis/vis_factory';
import { visFactory } from 'ui/vis/vis_factory';
import { Schemas } from 'ui/vis/editors/default/schemas';
import { VisTypesRegistryProvider } from 'ui/registry/vis_types';
import { setup as visualizations } from '../../../src/legacy/core_plugins/visualizations/public/np_ready/public/legacy';
import image from './images/icon-network.svg';
import networkVisTemplate from 'plugins/network_vis/network_vis.html';
import networkVisParamsTemplate from 'plugins/network_vis/network_vis_params.html';



import { AngularVisController } from 'ui/vis/vis_types/angular_vis_type';

// register the provider with the visTypes registry
VisTypesRegistryProvider.register(NetworkVisTypeProvider);
visualizations.types.registerVisualization(NetworkVisTypeProvider);

// define the TableVisType
function NetworkVisTypeProvider(Private) {
const VisFactory = Private(VisFactoryProvider);

// return the visType object, which kibana will use to display and configure new
// Vis object of this type.
return VisFactory.createAngularVisualization({
return visFactory.createBaseVisualization({
name: 'network',
title: 'Network',
image,
description: 'Displays a network node that link two fields that have been selected.',
visualization: AngularVisController,
visConfig: {
defaults: {
showLabels: true,
showPopup: false,
showPopup: true,
showColorLegend: true,
nodePhysics: true,
firstNodeColor: '#FD7BC4',
secondNodeColor: '#00d1ff',
firstNodeColor: '#6F86D7',
secondNodeColor: '#DAA05D',
canvasBackgroundColor: '#FFFFFF',
shapeFirstNode: 'dot',
shapeSecondNode: 'box',
Expand All @@ -41,8 +39,6 @@ function NetworkVisTypeProvider(Private) {
shapeArrow: 'arrow',
smoothType: 'continuous',
scaleArrow: 1,
maxCutMetricSizeNode: 5000,
maxCutMetricSizeEdge: 5000,
minCutMetricSizeNode: 0,
maxNodeSize: 80,
minNodeSize: 8,
Expand All @@ -67,8 +63,6 @@ function NetworkVisTypeProvider(Private) {
defaults: [
{ type: 'count', schema: 'size_node' }
]

//aggFilter: ['count', 'avg', 'sum', 'min', 'max', 'cardinality', 'std_dev']
},
{
group: 'metrics',
Expand Down Expand Up @@ -107,14 +101,12 @@ function NetworkVisTypeProvider(Private) {
responseHandlerConfig: {
asAggConfigResults: true
},
////////MIRAR THIS
// structures the data tables (returned by kibana in resp and in UI Inspect)
hierarchicalData: function (vis) {
return true;
},
////////////////////


});
}

export default NetworkVisTypeProvider;

7 changes: 3 additions & 4 deletions public/network_vis.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
height: 100%;
}

div.vis-network-tooltip {
div.vis-tooltip {
position: absolute;
visibility: hidden;
padding: 5px;
Expand Down Expand Up @@ -31,9 +31,8 @@ div.vis-network-tooltip {
.loading_msg {
height: 50px;
width: 150px;
border-radius: 10px 10px 10px 10px;
border: 4px solid #FD7BC4;
background-color: #00d1ff;
color: #FFFFFF;
background-color: #006BB4;
text-align: center;
line-height: 40px;
}
Loading

0 comments on commit a4a1cdb

Please sign in to comment.