Dashboards & Visualizations

Custom Time Picker Classic vs Dashboard Studio

interrobang
Explorer

hi there,

need to convert a large number of classic dashboards to dashboard studio style. they are used to breakdown quarterly reporting data and have x number of visualisations with a time picker dropdown for quarters eg. Q1-Year, Q2-Year, Q3-Year, Q4-Year

using the inbuilt migration option and cloning the dashboards in the new studio style, everything is generally working, but the custom time token setup that was used on my classic dashboards.

As an example the classic board have variations on the following time picker:

 

    <input type="dropdown" token="quarter">
      <label>Select Quarter</label>
      <choice value="Q1-22">Q1-22</choice>
      <choice value="Q2-22">Q2-22</choice>
      <choice value="Q3-22">Q3-22</choice>
      <choice value="Q4-22">Q4-22</choice>
      <choice value="Last4Quarters">Last4Quarters</choice>
      <change>
        <condition label="Q1-22">
          <set token="custom_earliest">-1y@y+0q</set>
          <set token="custom_latest">-1y@y+1q</set>
        </condition>
        <condition label="Q2-22">
          <set token="custom_earliest">-1y@y+1q</set>
          <set token="custom_latest">-1y@y+2q</set>
        </condition>
        <condition label="Q3-22">
          <set token="custom_earliest">-1y@y+2q</set>
          <set token="custom_latest">-1y@y+3q</set>
        </condition>
        <condition label="Q4-22">
          <set token="custom_earliest">-1y@y+3q</set>
          <set token="custom_latest">-1y@y+4q</set>
        </condition>
        <condition label="Last4Quarters">
          <set token="custom_earliest">-4q@q</set>
          <set token="custom_latest">now</set>
        </condition>
      </change>
      <default>Q4-22</default>
      <initialValue>Q4-22</initialValue>
    </input>

 

 this worked fine. but upon migration, the code moves to this:

 

{
    "type": "input.dropdown",
    "title": "Select Quarter",
    "options": {
        "token": "quarter",
        "items": [
            {
                "value": "Q1-22",
                "label": "Q1-22"
            },
            {
                "value": "Q2-22",
                "label": "Q2-22"
            },
            {
                "value": "Q3-22",
                "label": "Q3-22"
            },
            {
                "value": "Q4-22",
                "label": "Q4-22"
            },
            {
                "value": "Q1-23",
                "label": "Q1-23"
            },
            {
                "value": "Q2-23",
                "label": "Q2-23"
            },
            {
                "value": "Q3-23",
                "label": "Q3-23"
            },
            {
                "value": "Q4-23",
                "label": "Q4-23"
            },
            {
                "value": "Last1Year",
                "label": "Last1Year"
            }
        ],
        "defaultValue": ""
    }
}

 

 
selecting a visualisation and its data source configuration the code seems to reference the custom token

 

{
    "type": "ds.search",
    "options": {
        "query": "index=report_summary source=quarterly-info | timechart span=1d count by source | eval Threshold = 100000000",
        "queryParameters": {
            "earliest": "$custom_earliest$",
            "latest": "$custom_latest$"
        }
    },
    "name": "viz1"
}

 


but nothing ever loads. like the tokens are disconnected or not specified.

feel like im missing something here on the new style. is it an issue with dynamically setting the tokens custom_earliest and custom_latest per dropdown item? is is this a common migration problem where theres a new token format that should be followed? or am i missing something?

Labels (1)
0 Karma

Splunk_User2806
Explorer

Hey, i have the same task to handle 🙂 Did you find a Solution?

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

A Four-Part Event Series: Full Stack Observability For the AI Era

As AI reshapes applications, infrastructure, and the way teams operate, the traditional boundaries of ...

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Event Series: Level up your SOC: Advancing with Splunk Enterprise Security

AI has fundamentally raised the stakes for security operations, and this three-part series is your guide to ...