In fact, _eitableVis doe not exist in 6.x at all,
what does dirty mean in here?
Two main questions:
1γIs there a way to achive same goal in 6.x as _editableVis does in kibana 5.x?
2γsearchSource does not exist as $scope's method anymore, is there any way to call it or create an new one ?
@Lynnic what is the above code trying to achieve ?
and is this code part of editor or part of actual visualization ?
the vis._editableVis.dirty indicated that there is a pending change in the editor (when set to true) which was not yet applied (the play button was not pressed).
if this code is part of visualization .... visualization really should not be checking what the editor is doing.
if the code is part of editor, then it would be good to know where in editor exactly ? but in general, the editor now stores the dirty flag directly on the vis (so $scope.vis.dirty)
again, visualization should not be checking that. when editor applies the changes visualizations render method will be called again with new data.
the other thing is the searchSource ... that is no longer available on visualization, as visualization should not be issuing requests on their own. It would be helpful to know what is the goal here, but in general, requestHandler is responsible for issuing requests to elasticsearch. If for some reason visualization really needs to query elasticsearch it can create a new searchSource by importing the SearchSourceProvider (take a look at coordinate_maps_visualization.js
if i understand correctly, you don't use the default editor (for building es request, like which aggregations to use) but implement your own ?
if that is the case, you should implement your own request handler. when clicking apply button your request handler will be called and you can make your request there. the response will then be passed to visualization which can use it.
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.