Dashboards & Visualizations

View tag parameters list

timmalos
Communicator

Hi. Im searching for a list of parameters for the tag and i cant manage to find it. Im losing my time so i ask you. Everything seems easy with Splunk at first glance but take so long in reality to work..

Tags (1)
1 Solution

sideview
SplunkTrust
SplunkTrust

Since you're asking about the <view> tag, I'm assuming you mean the attributes on the <view> tag like "stylesheet" and "onunloadCancelJobs".

Assuming I have that right, I don't think this information exists in any Splunk documentation.

There is a file at share\splunk\search_mrsparkle\exposed\schema\advancedxml.xsd, but it's incomplete, so maybe it was never finished.

Here's a quick writeup from a combination of memory and skimming source code.

autoCancelInterval: Integer. the number of seconds after which Jobs kicked off by this view should be allowed to expire, if nothing from the UI accesses them. (There is another mechanism whereby the client will quietly access each job a little more frequently than this number while you're logged in, to thus keep them alive)

objectMode: you can ignore this. It's a relic that gets carried along from simple XML conversion. It does in some cases activate other CSS unexpectedly so it can have some relevance for weird CSS hacks and bugs.

onUnloadCancelJobs : True/False. If True, then when the user leaves the page, and if there are still jobs running that were dispatched from within this view, the page will try and send an HTTP request per job to cancel them. In reality I think this does not happen reliably on all browsers, and so with some browsers like IE I think the jobs will live until their autoCancelInterval expires.

isVisible: True/False. Defaults to True. If False, the view won't show up in the app navigation. The user can still get to the URL if they type it in manually (or if the app developer put an explicit <a href="view_name">View Label</a> tag into default.xml instead of the customary <view name="view_name"/> tag.)

isSticky - True/False. If you set this, then a few Splunk UI modules will remember their state the next time this user loads this specific view. In practice it's really just the TimeRangePicker control. There is a confusing bug where if you have it set to True for a while and then you set it to False, it wont forget the sticky states per user. Rather it will remember the last-updated sticky states forever, no matter what they are. Fixing this involves deleting a stanza out of each users viewstates.conf file, which is time consuming.

isPersistable - True/False. I'm afraid I don't remember. (With Sideview Utils the entire viewstate, intentions system as well as the resurrection system is replaced with other code so for Sideview Utils users this is a legacy attribute).

refresh: integer. If set, the page will reload itself after this many seconds have passed.

decomposeIntentions: True/False. I can't remember which is the default. When set to false, this effectively disables the half of the intentions system commonly known as "resurrection" or "decomposition".

stylesheet: set this to the name of a CSS file in appserver/static, within the same app. (In Sideview Utils btw this is replaced by the customStylesheet param on the Sideview Utils module, where you can set any number of CSS files and you can include them from other apps and not just the one you happen to be in)

template: set this to the name of one of the core Splunk view templates (eg: /share/splunk/search_mrsparkle/templates/view/dashboard.html). I believe you can also set it up to use a custom mako template you have developed and you have included in your app.

displayView: This tells the Splunk UI that if any saved searches are saved from this view, when those savedsearches are later run from the menu, the user should be taken to the view specified in this attribute, rather than to the view in which they created the saved search.

View solution in original post

lguinn2
Legend

Take a look at this Answer

sideview
SplunkTrust
SplunkTrust

Since you're asking about the <view> tag, I'm assuming you mean the attributes on the <view> tag like "stylesheet" and "onunloadCancelJobs".

Assuming I have that right, I don't think this information exists in any Splunk documentation.

There is a file at share\splunk\search_mrsparkle\exposed\schema\advancedxml.xsd, but it's incomplete, so maybe it was never finished.

Here's a quick writeup from a combination of memory and skimming source code.

autoCancelInterval: Integer. the number of seconds after which Jobs kicked off by this view should be allowed to expire, if nothing from the UI accesses them. (There is another mechanism whereby the client will quietly access each job a little more frequently than this number while you're logged in, to thus keep them alive)

objectMode: you can ignore this. It's a relic that gets carried along from simple XML conversion. It does in some cases activate other CSS unexpectedly so it can have some relevance for weird CSS hacks and bugs.

onUnloadCancelJobs : True/False. If True, then when the user leaves the page, and if there are still jobs running that were dispatched from within this view, the page will try and send an HTTP request per job to cancel them. In reality I think this does not happen reliably on all browsers, and so with some browsers like IE I think the jobs will live until their autoCancelInterval expires.

isVisible: True/False. Defaults to True. If False, the view won't show up in the app navigation. The user can still get to the URL if they type it in manually (or if the app developer put an explicit <a href="view_name">View Label</a> tag into default.xml instead of the customary <view name="view_name"/> tag.)

isSticky - True/False. If you set this, then a few Splunk UI modules will remember their state the next time this user loads this specific view. In practice it's really just the TimeRangePicker control. There is a confusing bug where if you have it set to True for a while and then you set it to False, it wont forget the sticky states per user. Rather it will remember the last-updated sticky states forever, no matter what they are. Fixing this involves deleting a stanza out of each users viewstates.conf file, which is time consuming.

isPersistable - True/False. I'm afraid I don't remember. (With Sideview Utils the entire viewstate, intentions system as well as the resurrection system is replaced with other code so for Sideview Utils users this is a legacy attribute).

refresh: integer. If set, the page will reload itself after this many seconds have passed.

decomposeIntentions: True/False. I can't remember which is the default. When set to false, this effectively disables the half of the intentions system commonly known as "resurrection" or "decomposition".

stylesheet: set this to the name of a CSS file in appserver/static, within the same app. (In Sideview Utils btw this is replaced by the customStylesheet param on the Sideview Utils module, where you can set any number of CSS files and you can include them from other apps and not just the one you happen to be in)

template: set this to the name of one of the core Splunk view templates (eg: /share/splunk/search_mrsparkle/templates/view/dashboard.html). I believe you can also set it up to use a custom mako template you have developed and you have included in your app.

displayView: This tells the Splunk UI that if any saved searches are saved from this view, when those savedsearches are later run from the menu, the user should be taken to the view specified in this attribute, rather than to the view in which they created the saved search.

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...