dlumbrer / dlumbrer/kbn_network
Kibana fails to start when using the Network Plugin
- Dominant language
- JavaScript
- Stars
- 366
- Forks
- 94
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I tried using the Kibana network plugin on my Ubuntu 18 version by downloading the latest version of the network plugin tar.gz file as the Kibana version on my system is 7.6
But when I start the Kibana service - it fails with the below mentioned error in the logs:
**> FATAL Error: Optimizations failure.
> ERROR in ./plugins/network_vis/public/network_vis.js
> Module not found: Error: Can't resolve 'ui/vis/vis_factory' in '/usr/share/kibana/plugins/network_vis/public'
>
> kibana.service: Main process exited, code=exited, status=1/FAILURE
> kibana.service: Failed with result 'exit-code'.
> kibana.service: Service hold-off time over, scheduling restart.**
Below is the details of package.json file
**> {
> "name": "network_vis",
> "version": "7.5.2",
> "kibana": {
> "version": "kibana"
> },
> "authors": [
> "David Moreno Lumbreras "
> ],
> "license": "Apache-2.0",
> "repository": {
> "type": "git",
> "url": "https://github.com/dlumbrer/kbn_network"
> },
> "dependencies": {
> "vis-network": "7.2.0",
> "randomcolor": "0.5.0",
> "css-element-queries": "0.3.2",
> "keycharm": "^0.2.0",
> "moment": "^2.24.0",
> "vis-data": "^6.2.1",
> "vis-util": "^1.1.8"
> }
> }**
And below is the content in the network_vis.js file
**> import "plugins/network_vis/network_vis.less";
>
> import { KbnNetworkVisController } from './network_vis_controller'
> import { visFactory } from 'ui/vis/vis_factory';
> import { Schemas } from 'ui/vis/editors/default/schemas';
> 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
> visualizations.types.registerVisualization(NetworkVisTypeProvider);
>
> // define the TableVisType
> function NetworkVisTypeProvider(Private) {
>
> // return the visType object, which kibana will use to display and configure new
> // Vis object of this type.
> 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: true,
> showColorLegend: true,
> nodePhysics: true,
> firstNodeColor: '#6F86D7',
> secondNodeColor: '#DAA05D',
> canvasBackgroundColor: '#FFFFFF',
> shapeFirstNode: 'dot',
> shapeSecondNode: 'box',
> displayArrow: false,
> posArrow: 'to',
> shapeArrow: 'arrow',
> smoothType: 'continuous',
> scaleArrow: 1,
> minCutMetricSizeNode: 0,
> maxNodeSize: 80,
> minNodeSize: 8,
> maxEdgeSize: 20,
> minEdgeSize: 0.1,
> springConstant: 0.001,
> gravitationalConstant: -35000,
> labelColor: '#000000'
> },
> template: networkVisTemplate,
> },
> editorConfig: {
> optionsTemplate: networkVisParamsTemplate,
> schemas: new Schemas([
> {
> group: 'metrics',
> name: 'size_node',
> title: 'Node Size',
> mustBeFirst: 'true',
> min: 1,
> max: 1,
> defaults: [
> { type: 'count', schema: 'size_node' }
> ]
> },
> {
> group: 'metrics',
> name: 'size_edge',
> title: 'Edge Size',
> max: 1,
> },
> {
> group: 'buckets',
> name: 'first',
> icon: 'fa fa-circle-thin',
> mustBeFirst: 'true',
> title: 'Node',
> min: 1,
> max: 2,
> aggFilter: ['terms']//Only have sense choose terms
> },
> {
> group: 'buckets',
> name: 'second',
> icon: 'fa fa-random',
> title: 'Relation',
> max: 1,
> aggFilter: ['terms']
> },
> {
> group: 'buckets',
> name: 'colornode',
> icon: 'fa fa-paint-brush',
> title: 'Node Color',
> max: 1,
> aggFilter: ['terms']
> },
> {
> group: 'buckets',
> name: 'colornode',
> icon: 'fa fa-paint-brush',
> title: 'Node Color',
> max: 1,
> aggFilter: ['terms']
> }
> ])
> },
> responseHandlerConfig: {
> asAggConfigResults: true
> },
> // structures the data tables (returned by kibana in resp and in UI Inspect)
> hierarchicalData: function (vis) {
> return true;
> },
> });
> }
>
> export default NetworkVisTypeProvider;**
I am unable to get a proper resolution for it from anywhere on the google or the digitalocean website.
Can anyone help me here with this issue ? How can this be resolved and what changes will I have to make?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with plugins/network_vis/public/network_vis.js and package.json, then reproduce the Kibana startup failure using the reported Kibana 7.6 and network plugin versions. Check the missing ui/vis/vis_factory import and the other Kibana imports for compatibility. Done means the plugin builds and Kibana starts without the reported module-resolution error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100