Comments (20)
Hi,
Are you able to resolve the issues?
Thanks
from kibana-time-plugin.
There has been a lot of refactoring in Kibana between 7.0 and 7.5.
It looks like SimpleEmitter used at https://github.com/nreese/kibana-time-plugin/blob/master/public/timeController.js#L9 no longer exists in 7.5. Try replacing it with import EventEmitter from 'events';
from kibana-time-plugin.
from kibana-time-plugin.
Hi,
I made following changes:
//import { SimpleEmitter } from 'events';
import { EventEmitter } from 'events';
and
//const msearchEmitter = new SimpleEmitter();
const msearchEmitter = new EventEmitter();
in timeController.js file. But still following error is coming:
TypeError: emitter.on is not a function
listen.js:34
Detected an unhandled Promise rejection.
TypeError: emitter.on is not a function fatal_errors_service.tsx:118
Any suggestion?
Thanks
from kibana-time-plugin.
try putting a break point in listen.js and seeing what is getting passed in.
from kibana-time-plugin.
from kibana-time-plugin.
Hi,
Did you get chance to work on this bug?
Thanks
from kibana-time-plugin.
I have not had time to look into the issue
here is a guide for using chrome debugger to isolate the issue https://dzone.com/articles/debug-javascript-using-chrome-developer-tools
from kibana-time-plugin.
HI,
Following code is not executing:
$scope.$listen(timefilter, 'timeUpdate', () => {
$scope.$evalAsync(() => setTime());
});
it throws
message: "emitter.on is not a function"
stack: "TypeError: emitter.on is not a function↵ at ChildScope.$rootScope.constructor.$listen (http://localhost:5601/fya/bundles/commons.bundle.js:151308:13)↵ at Object. (http://localhost:5601/fya/bundles/commons.bundle.js:25847:10)↵ at Object.invoke (webpack://%5Bname%5D/./node_modules/angular/angular.js?:5143:19)↵ at
proto: Error
constructor: ƒ TypeError()
message: ""
name: "TypeError"
toString: ƒ toString()
proto: Object
Let's know if you have any idea?
Thanks
from kibana-time-plugin.
Hi,
I commented following function in timeContoller.js
/*
$scope.$listen(timefilter, 'timeUpdate', () => {
$scope.$evalAsync(() => setTime());
});
*/
After that plugin is getting displayed, but I don't know how it will affect the whole plugin. Please let me know what to do next? How should i re-rewrite this code?
Thanks
from kibana-time-plugin.
After that plugin is getting displayed, but I don't know how it will affect the whole plugin. Please let me know what to do next? How should i re-rewrite this code?
I believe that subscript is to update the time slider when the Kibana global time picker changes. With that listen removed, does the time slider update when the global time picker changes?
If it does not, try adding the following, globalState
is an angular service that gets injected in module.controller
definition.
$scope.$listen(globalState, 'fetch_with_changes', diff => {
if (diff.includes('time')) {
setTime();
}
});
from kibana-time-plugin.
Hi folks,
if you make these changes, the plugin should work fine:
remove:
import { VisFactoryProvider } from 'ui/vis/vis_factory';
import { VisTypesRegistryProvider } from 'ui/registry/vis_types';
and replace it by:
import { AngularVisController } from 'ui/vis/vis_types/angular_vis_type';
import KbnTimeVisController from './timeController'
import { setup as visualizations } from '../../../src/legacy/core_plugins/visualizations/public/np_ready/public/legacy';
import { npSetup } from 'ui/new_platform';
const timePickeerDefinition = {
name: 'time',
title: 'Time widget',
icon: 'clock',
visualization: AngularVisController,
description: 'Add time inputs to your dashboards.',
visConfig: {
template: visTemplate,
defaults: {
enable_quick: true,
enable_relative: true,
enable_absolut: true,
enable_animation: true,
}
},
editorConfig: {
optionsTemplate: optionsTemplate
},
requestHandler: 'none',
responseHandler: 'none'
};
npSetup.plugins.expressions.registerFunction(timePickeerDefinition);
visualizations.types.createBaseVisualization(timePickeerDefinition);
and then in timeController.js, comment this:
$scope.$listen(timefilter, 'timeUpdate', () => { $scope.$evalAsync(() => setTime()); });
from kibana-time-plugin.
from kibana-time-plugin.
Hi folks,
if you make these changes, the plugin should work fine:
remove:import { VisFactoryProvider } from 'ui/vis/vis_factory'; import { VisTypesRegistryProvider } from 'ui/registry/vis_types';
and replace it by:
import { AngularVisController } from 'ui/vis/vis_types/angular_vis_type'; import KbnTimeVisController from './timeController' import { setup as visualizations } from '../../../src/legacy/core_plugins/visualizations/public/np_ready/public/legacy'; import { npSetup } from 'ui/new_platform'; const timePickeerDefinition = { name: 'time', title: 'Time widget', icon: 'clock', visualization: AngularVisController, description: 'Add time inputs to your dashboards.', visConfig: { template: visTemplate, defaults: { enable_quick: true, enable_relative: true, enable_absolut: true, enable_animation: true, } }, editorConfig: { optionsTemplate: optionsTemplate }, requestHandler: 'none', responseHandler: 'none' }; npSetup.plugins.expressions.registerFunction(timePickeerDefinition); visualizations.types.createBaseVisualization(timePickeerDefinition);
and then in timeController.js, comment this:
$scope.$listen(timefilter, 'timeUpdate', () => { $scope.$evalAsync(() => setTime()); });
Thanks for your help !
I follow those setting on opendistro kibana 7.4.2 , the web error also exit and no diagram display :
vendors.bundle.dll.js:28 Uncaught TypeError: emitter.on is not a function
at ChildScope.$rootScope.constructor.$listen (commons.bundle.js:85)
at Object. (kibana.bundle.js:1)
at Object.invoke (vendors.bundle.dll.js:239)
at $controllerInit (vendors.bundle.dll.js:239)
at nodeLinkFn (vendors.bundle.dll.js:239)
at compositeLinkFn (vendors.bundle.dll.js:239)
at publicLinkFn (vendors.bundle.dll.js:239)
at commons.bundle.js:83
at new Promise ()
at AngularVisController.render (commons.bundle.js:83)
If you have any adivce , please help to reply , thanks !
from kibana-time-plugin.
Hi @Arvin-developer , that was already answered, you should remove
$scope.$listen(timefilter, 'timeUpdate', () => { $scope.$evalAsync(() => setTime()); });
from kibana-time-plugin.
Hi @Arvin-developer , that was already answered, you should remove
$scope.$listen(timefilter, 'timeUpdate', () => { $scope.$evalAsync(() => setTime()); });
Thanks for your help !
I had remove this code on timeController.js , and restart the kibana ,but meet the new exception :
FATAL Error: Optimizations failure.
4579 modules
ERROR in ./plugins/kibana-time-plugin/public/time.js
Module not found: Error: Can't resolve '../../../src/legacy/core_plugins/vis
ualizations/public/np_ready/public/legacy' in 'C:\inetpub\odfe-1.4.0-kibana_DEV
plugins\kibana-time-plugin\public'
Is maybe kibana version different to 7.5 so that miss the js source ?
from kibana-time-plugin.
Please make sure that you are pointing to the write destination, because the file does exist in Kibana 7.5.
from kibana-time-plugin.
Please make sure that you are pointing to the write destination, because the file does exist in Kibana 7.5.
Thanks @ch-bas
My kibana version is opendistro kibana 7.4.2 , there is no src\legacy\core_plugins\visualizations\public\np_ready\public\legacy.js file , so error happend .
Maybe we can not add this plugin on difference opendistro kibana 7.4.2 , it will need to modify many js code .
from kibana-time-plugin.
Hi folks,
if you make these changes, the plugin should work fine:
remove:import { VisFactoryProvider } from 'ui/vis/vis_factory'; import { VisTypesRegistryProvider } from 'ui/registry/vis_types';
and replace it by:
import { AngularVisController } from 'ui/vis/vis_types/angular_vis_type'; import KbnTimeVisController from './timeController' import { setup as visualizations } from '../../../src/legacy/core_plugins/visualizations/public/np_ready/public/legacy'; import { npSetup } from 'ui/new_platform'; const timePickeerDefinition = { name: 'time', title: 'Time widget', icon: 'clock', visualization: AngularVisController, description: 'Add time inputs to your dashboards.', visConfig: { template: visTemplate, defaults: { enable_quick: true, enable_relative: true, enable_absolut: true, enable_animation: true, } }, editorConfig: { optionsTemplate: optionsTemplate }, requestHandler: 'none', responseHandler: 'none' }; npSetup.plugins.expressions.registerFunction(timePickeerDefinition); visualizations.types.createBaseVisualization(timePickeerDefinition);
and then in timeController.js, comment this:
$scope.$listen(timefilter, 'timeUpdate', () => { $scope.$evalAsync(() => setTime()); });
Hi @ch-bas,
I modified time.js and timeController.js as you describe but I am getting the following error:
Version: 7.5.2 Build: 27675 Error: Register requires an function register@http://host.removed.com:5601/bundles/plugin/expressions.bundle.js:3:12420 registerFunction@http://host.removed.com:5601/bundles/plugin/expressions.bundle.js:3:7982 @http://host.removed.com:5601/bundles/commons.bundle.js:3:6403163 __webpack_require__@http://host.removed.com:5601/bundles/kibana.bundle.js:3:1463 @http://host.removed.com:5601/bundles/commons.bundle.js:3:796141 __webpack_require__@http://host.removed.com:5601/bundles/kibana.bundle.js:3:1463 __kbnBundles__.kibana<@http://host.removed.com:5601/bundles/kibana.bundle.js:3:739512 __webpack_require__@http://host.removed.com:5601/bundles/kibana.bundle.js:3:1463 requireLegacyFiles@http://host.removed.com:5601/bundles/kibana.bundle.js:3:739114 start@http://host.removed.com:5601/bundles/commons.bundle.js:3:2485247 _callee2$@http://host.removed.com:5601/bundles/commons.bundle.js:3:2480213 tryCatch@http://host.removed.com:5601/built_assets/dlls/vendors.bundle.dll.js:489:789856 invoke@http://host.removed.com:5601/built_assets/dlls/vendors.bundle.dll.js:489:793705 defineIteratorMethods/</prototype[method]@http://host.removed.com:5601/built_assets/dlls/vendors.bundle.dll.js:489:790980 asyncGeneratorStep@http://host.removed.com:5601/bundles/commons.bundle.js:3:2472100 _next@http://host.removed.com:5601/bundles/commons.bundle.js:3:2472411 notify/<@http://host.removed.com:5601/built_assets/dlls/vendors.bundle.dll.js:314:123090 flush@http://host.removed.com:5601/built_assets/dlls/vendors.bundle.dll.js:109:959249
I am using Kibana 7.5.2 on docker with the directory of the plugin mounted on /usr/share/kibana/plugins/kibana-time-plugin in the container.
Is there any other modification I should do? Thank you.
from kibana-time-plugin.
Maybe this will help #64 .
from kibana-time-plugin.
Related Issues (20)
- Kibana server 6.2.3 fails to start HOT 4
- kibana 6.2.4 Crasching when using kibana-time-plugin visualisation HOT 2
- plugin doesn't support Kibana 6.3.0 HOT 12
- Kibana 6.3 crashes when the plugin is selected HOT 4
- Kibana 6.4.1 Error: [$injector:unpr] Unknown provider: timefilterProvider <- timefilter <- KbnTimeVisController HOT 3
- plugin doesn't support Kibana 6.5.1 HOT 9
- does not change the values in dashboard graphs when i changed the time
- Plugin issue with 6.6.0 HOT 7
- 6.3 Installation in Kibana 6.5.4 HOT 2
- does not even load with logtrail and elastalert plugin (6.5.4)
- Plugin issue with 6.6.2 HOT 1
- Icons do not appear HOT 7
- Stop Play animation automatically HOT 3
- Problem with Kibana 6.7.x HOT 9
- How to insert kibana-time-plugin in dashboard?
- Plugin fails to install on 7.1.1 HOT 1
- Incompatible with kibana 7.3.0 - fix? HOT 4
- Compatibility with kibana 7.4.2 ? HOT 1
- Warnings and Suggestions... Are there any plans to migrate. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kibana-time-plugin.