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
Get Updates on the Splunk Community!

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...