-
Notifications
You must be signed in to change notification settings - Fork 55
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
Compatibility with 7.5.1 #62
Comments
Hi, Are you able to resolve the issues? Thanks |
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 |
Hi,
Thanks for your reply.
I did following changes:
[image: image.png]
But still following error is coming:
[image: image.png]
…On Thu, Apr 30, 2020 at 6:22 PM Nathan Reese ***@***.***> wrote:
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';
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#62 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APLLFCWJOHD2WHZRIML5KDTRPFX7ZANCNFSM4KE3AXDQ>
.
|
Hi, I made following changes: //import { SimpleEmitter } from 'events'; and //const msearchEmitter = new SimpleEmitter(); in timeController.js file. But still following error is coming: TypeError: emitter.on is not a function Any suggestion? Thanks |
try putting a break point in listen.js and seeing what is getting passed in. |
Hi,
I tried to find the steps to add break point in listen.js but could not
find any. I am using yarn start to run the kiban with all the plugins for
development.
Can you please provide any tutorial url which explains the steps to debug
Kibana plugin?
Regards
Deepak Kumar
…On Sun, May 3, 2020 at 1:55 AM Nathan Reese ***@***.***> wrote:
try putting a break point in listen.js and seeing what is getting passed
in.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#62 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APLLFCXYNJCJVLMWBA5FJ4TRPR6T7ANCNFSM4KE3AXDQ>
.
|
Hi, Did you get chance to work on this bug? Thanks |
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 |
HI, Following code is not executing: Let's know if you have any idea? Thanks |
Hi, I commented following function in timeContoller.js /* 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 |
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,
|
Hi folks,
and replace it by:
and then in timeController.js, comment this: |
Thanks,
I will check it out.
Regards
Deepak Kumar
…On Fri, May 22, 2020 at 3:36 PM bassem chagra ***@***.***> wrote:
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()); });
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#62 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APLLFCUMDKOQ4WNNJ7TR2RDRSZFB5ANCNFSM4KE3AXDQ>
.
|
Thanks for your help ! vendors.bundle.dll.js:28 Uncaught TypeError: emitter.on is not a function If you have any adivce , please help to reply , thanks ! |
Hi @Arvin-developer , that was already answered, you should remove |
Thanks for your help ! FATAL Error: Optimizations failure.
ualizations/public/np_ready/public/legacy' in 'C:\inetpub\odfe-1.4.0-kibana_DEV Is maybe kibana version different to 7.5 so that miss the js source ? |
Please make sure that you are pointing to the write destination, because the file does exist in Kibana 7.5. |
Thanks @ch-bas |
Hi @ch-bas, I modified time.js and timeController.js as you describe but I am getting the following error:
|
Maybe this will help #64 . |
I have tried the plugin on 7.5.1
I have managed to solve loading issue in time.js but the component still don't work i have an error in timeController.js
commons.bundle.js:3 Uncaught (in promise) TypeError: emitter.on is not a function
at ChildScope._modules.uiModules.get.run.$rootScope.constructor.$listen (commons.bundle.js:3)
at Object. (commons.bundle.js:13)
at Object.invoke (vendors.bundle.dll.js:435)
at $controllerInit (vendors.bundle.dll.js:435)
at nodeLinkFn (vendors.bundle.dll.js:435)
Please help us.
Here's my modification of time.js
import 'ui/angular-bootstrap';
import 'plugins/kibana-time-plugin/lib/angular-bootstrap/css/btn-group.less';
import 'plugins/kibana-time-plugin/lib/angular-bootstrap/css/carousel.less';
import 'plugins/kibana-time-plugin/lib/angular-bootstrap/js/carousel.js';
import 'plugins/kibana-time-plugin/bower_components/bootstrap-addons/dist/css/bootstrap-addons.css';
import 'plugins/kibana-time-plugin/bower_components/bootstrap-addons/dist/js/bootstrap-addons.js';
import 'plugins/kibana-time-plugin/time.less';
import 'plugins/kibana-time-plugin/timeController';
import { AngularVisController } from 'ui/vis/vis_types/angular_vis_type';
import { visFactory } from 'ui/vis/vis_factory';
import { setup as visualizations } from '../../../src/legacy/core_plugins/visualizations/public/np_ready/public/legacy';
import visTemplate from 'plugins/kibana-time-plugin/time.html';
import optionsTemplate from 'plugins/kibana-time-plugin/timeOptions.html';
// register the provider with the visTypes registry
visualizations.types.registerVisualization(TimeVisProvider);
function TimeVisProvider() {
return visFactory.createBaseVisualization({
name: 'time',
title: 'Time widget',
icon: 'clock',
description: 'Add time inputs to your dashboards.',
visualization: AngularVisController,
visConfig: {
template: visTemplate,
defaults: {
enable_quick: false,
enable_relative: false,
enable_absolut: true,
enable_animation: false,
}
},
editorConfig: {
optionsTemplate: optionsTemplate
},
requestHandler: 'none',
responseHandler: 'none'
});
}
The text was updated successfully, but these errors were encountered: