All Apps and Add-ons
Highlighted

Web Framework and ViewStates.conf

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?

Highlighted

Re: Web Framework and ViewStates.conf

Splunk Employee
Splunk Employee

What are you looking to achieve in your dashboard?

0 Karma
Highlighted

Re: Web Framework and ViewStates.conf

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
Highlighted

Re: Web Framework and ViewStates.conf

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

Highlighted

Re: Web Framework and ViewStates.conf

Motivator

Thanks! That is what I thought.

0 Karma
Highlighted

Re: Web Framework and ViewStates.conf

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
Highlighted

Re: Web Framework and ViewStates.conf

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
Highlighted

Re: Web Framework and ViewStates.conf

Splunk Employee
Splunk Employee
0 Karma