I am trying to build a new visualization using the base visualization type in your visualization factory. After following the standard documentation as well as tutorials, I was able to get the plugin to try and register successfully.
However, I see an error as soon as I try to launch the plugin within a browser. Here is the error message :
Expected private module "undefined" to be a function http://localhost:5601/ujc/bundles/commons.bundle.js?v=8467:87442
"<div class="application ng-scope" ng-class="'tab-' + chrome.getFirstPathSegment() + ' ' + chrome.getApplicationClasses()" ng-view="" ng-controller="chrome.$$rootControllerConstruct as kibana">"
could you please provide some more information, what you mean by "launch the plugin with a browser"? Where exactly does it fail? When loading Kibana; creating a new visualization?
Also could you please paste the relevant source code. Best would be your visualization registration, and also when opening your dev tools and open the appropriate line (8467:87460) in your bundle.js what code line does this refer to?
Also, here is the appropriate line (8467:87460) in my bundle.js :
// return the uniq id for this function
function identify(fn) {
if (typeof fn !== 'function') {
throw new TypeError('Expected private module "' + fn + '" to be a function');
}
if (fn.$$id) return fn.$$id;else return fn.$$id = nextId();
}
Hmm so far it looks good. Are you sure VisController is a proper JavaScript class? Could you perhaps show the code of VisController and maybe also the imports/require statements in your SmartTableVisProvider file?
Just a small hint: when you want to insert a block of code here int he forums (or in markdown in general, use triple backticks (```) above and below it to get the proper highlighting.
Regarding the source code, that looks actually all very fine. Where do you place it, how does your folder structure look? Does Kibana start up correctly if you remove the plugin?
Is the full plugin source code somewhere available (on Github)?
What version of Kibana do you use to develop against? I unfortunately can't reproduce this issue with the sample visualization and have never seen a similar sounding issue in this part of the code.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.