All Apps and Add-ons

Web Framework and ViewStates.conf

aelliott
Motivator

Is it possible to save viewstates (using viewstates.conf) of Splunk Web Framework Components (http://docs.splunk.com/Documentation/WebFramework) within a custom Dashboard?

1 Solution

ineeman
Splunk Employee
Splunk Employee

There is no support in the Web Framework for viewstates. In general, the revamped Splunk UI in Splunk 6 does not use viewstates.

If you'd like to persist data in between visits, you have a couple of options:
1. You could send the data to the server and persist it in the user session (wiped on logout or timeout).
2. You could save the data to localStorage (on applicable browsers), which would save it for that machine.
3. You could persist the data to the URL.
4. You could write the data to the user-prefs endpoint or something along those lines.

You could also write to the viewstates API yourself if you wanted to (https://localhost:8089/services/data/ui/viewstates).

We've opened a task to add an example to the Web Framework Toolkit on how to
achieve some level of persistence. We'll update the answer here when it is
available.

View solution in original post

skawasaki_splun
Splunk Employee
Splunk Employee
0 Karma

ineeman
Splunk Employee
Splunk Employee

There is no support in the Web Framework for viewstates. In general, the revamped Splunk UI in Splunk 6 does not use viewstates.

If you'd like to persist data in between visits, you have a couple of options:
1. You could send the data to the server and persist it in the user session (wiped on logout or timeout).
2. You could save the data to localStorage (on applicable browsers), which would save it for that machine.
3. You could persist the data to the URL.
4. You could write the data to the user-prefs endpoint or something along those lines.

You could also write to the viewstates API yourself if you wanted to (https://localhost:8089/services/data/ui/viewstates).

We've opened a task to add an example to the Web Framework Toolkit on how to
achieve some level of persistence. We'll update the answer here when it is
available.

aelliott
Motivator

We have a dashboard that has several charts, with dropdowns such as how the dashboard looks(pie, line, etc), what they are shown by (product, category etc), and timeframe to show.
The end user can then configure the dashboard via the dropdowns to look however they want and it can then be saved the next time they look at it or show it in a presentation.

0 Karma

ineeman
Splunk Employee
Splunk Employee

Please feel free to share more about your usecase! We'd love to hear what you want to do and what requirements you have. That way, we can improve it in the future.

0 Karma

aelliott
Motivator

Thanks! That is what I thought.

0 Karma

aelliott
Motivator

Users to go to the dashboard, select something in a dropdown, and later go back and have it still be that selection. Users would have their own viewstates

0 Karma

sdaniels
Splunk Employee
Splunk Employee

What are you looking to achieve in your dashboard?

0 Karma
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 ...