Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

TableView using splunkjs can show events but not tabular results. What am I doing wrong - or is it a bug

$
0
0
Tableview will only show events but I can not get it to show any table ie. "results" instead of "events". For example: "index = _internal | head 10" works, but "index = _internal | head 10 | table *" does not. I know I have results because I can log them to console using sm.data("results"); require([ 'jquery', 'underscore', 'splunkjs/ready!', 'splunkjs/mvc/searchmanager', 'splunkjs/mvc/searchcontrolsview', 'splunkjs/mvc/timelineview', 'splunkjs/mvc/tableview', 'splunkjs/mvc/eventsviewerview', 'splunkjs/mvc/searchbarview' ], function( $, _, mvc, SearchManager, SearchControlsView, TimelineView, EventsViewer, TableView, SearchbarView ) { var sm =new SearchManager({ id: 'main-search', search: '|inputlookup r.csv', preview: true, autostart: false, }); var sb = new SearchbarView({ id: 'main-searchbar', managerid: 'main-search', value: mvc.tokenSafe('$search$'), timerange_value: mvc.tokenSafe('$timeRange$'), el: $('#main-searchbar') }).render(); sb.on("change", function() { sm.settings.unset("search"); sm.settings.set("search", sb.val()); sm.startSearch(); }); var tv= new TableView({ id: 'main-events', data: "results" , managerid: 'main-search', el: $('#main-events') }).render(); sm.on("search:done", function() { console.log(tv.settings.get("data")); console.log(sm.data("results")); }); }); And the dashboard:
I'm using Splunk 6.4.1 on Firefox.

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>