All Apps and Add-ons

Why simple XML form breaks browser "back page" functionality?

helge
Builder

I have a Simple XML form with three input elements. The relevant code reads:

<form>
   <fieldset autoRun="false">
      <input type="time" searchWhenChanged="true">
         <label>Time range:</label>
         <default>
            <earliestTime>-1h</earliestTime>
            <latestTime>now</latestTime>
         </default>
      </input>
      <input type="text" token="FilterString">
         <label>Filter:</label>
      </input>
      <input type="text" token="HostFilter">
         <label>Machine:</label>
      </input>
   </fieldset>

When I access the form's through its regular URL:

http://srv1:8000/en-US/app/uberAgent/process_detail_sxml

the URL is immediately replaced with:

http://srv1:8000/en-US/app/uberAgent/process_detail_sxml?earliest=-1h&latest=now&form.FilterString=&...

Obviously the form's tokens are mapped into HTTP GET parameters stored in the URL. However, that more or less breaks the browser's back (to last page) functionality. Clicking back once changes the URL to:

http://srv1:8000/en-US/app/uberAgent/process_detail_sxml?form.FilterString=&form.HostFilter=

Clicking back a second time changes the URL to the original value without HTTP GET parameters:

http://srv1:8000/en-US/app/uberAgent/process_detail_sxml

Only when I click back a third time I get the URL of the page I had visited before the current dashboard.

This is pretty bad from a user experience point of view. Is this a bug?

More information: I have observed this with Splunk 6.1.3. It seems to be caused by the parameter searchWhenChanged="true" of the input type="time". But I need that: when I set searchWhenChanged to false that dashboard's searches do not run until I manually click Submit. My current Advanced XML dashboards to not exhibit this problem.

jrodman
Splunk Employee
Splunk Employee

The intention of the back button in the current UI is to go to the previous state. For example when running a series of searches, clicking back goes to the prior search. This means that:

  1. the urls in the UI should match the current state and be mostly sharable.
  2. A user trying many things should be able to go back to something they were doing recently.
  3. Clicking back will not always go to a previous view right away.

It's quite possible that there are warts in the functionality which should be duly logged, triaged, and so on, but simple capacity for the back button to not leave the view is by design. It's pretty essential for some views to behave pleasantly.

However what I think you're saying is that simply navigating to a page without interacting with it leads to a series of url updates which cause the back button to not perform as a user would expect. If true, I don't know if it's a design flaw, a silly design, or a bug, but it's worth raising with technical support, IMO.

araitz
Splunk Employee
Splunk Employee

Doesn't the search page, and indeed most pages in Splunk Web, do this as well?

0 Karma

helge
Builder

Posting a comment because for some reason I cannot edit my question. The problem affects the app "Splunk 6.x Dashboard Examples", too. It is nearly impossible to go back from the dashboard "simple_xml_examples/simple_form_advanced".

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...