Dashboards & Visualizations

SingleView is returning "No search set."

Path Finder

I have created a search manager and then a single view using Django tags and javascript. The SingleView element shows us in my splunk app but I only see the text "No search set.".
This is the search manager:

 new SearchManager({
                                                id: "managerID",
                                                preview: true,
                                                cache: true,
                                                status_buckets: 300,
                                                search: searchQuery (<--long search query but works fine when searched in the search app)

This is the singleview:

new SingleView({
                                                id: "uniqueID",
                                                managerid: "managerID",
                                                field: "field1",
                                                el: $("#singleview")

What could be causing this?

0 Karma

Path Finder

I've run into the same problem today.

In my custom SimpleSplunkView I've that's its receiving data from the search, but it said 'No search set'.
Strange but my guess would be that the initialization of the search takes some time and it's still not initialized when the view is starting to initialize, so it initialize method returns 'No search set'.

I've found few solutions to this problem.
One is to move search to django/xml definition, so we can have a handler to it after it's initialized.

Other solution I've managed to get running is to create the custom view after the search is initialized
Im using underscore _.once() method to call this function only once, but it could be also if check to see if the view was created. Or maybe there is a better handler, I haven't found it yet.

  searchResults.on('search:done', _.once(function() {
    var swimlaneView = new SwimlaneView({
      name: "mycustomview",
      managerid: "sla1_query",
      el: $("#swimlane_view")
0 Karma

New Member

Check out if you have any quots or any special characters in the search query. If yes escape them with .

The issue could be with the special characters like quots in the search query. Escaping them should fix the issue.

0 Karma
Get Updates on the Splunk Community!

Optimize Cloud Monitoring

  TECH TALKS Optimize Cloud Monitoring Tuesday, August 13, 2024  |  11:00AM–12:00PM PST   Register to ...

What's New in Splunk Cloud Platform 9.2.2403?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.2.2403! Analysts can ...

Stay Connected: Your Guide to July and August Tech Talks, Office Hours, and Webinars!

Dive into our sizzling summer lineup for July and August Community Office Hours and Tech Talks. Scroll down to ...