Dashboards & Visualizations

App menu bar

gcusello
SplunkTrust
SplunkTrust

Hi at all,

I don't know if someone else found this issue:

Using for the first time 9.3.0 version I tried to customize an app menu bar.

Then I found that if I try to use this app with my language (it-IT) it doesn't change; if instead I run it with the default english interface (en-US) it correctly runs.

Ciao.

Giuseppe

 

Labels (1)
Tags (1)
1 Solution

tscroggins
Influencer

This was really bothering me ... and I isolated the cause to browser-local storage managed by SplunkWeb. Keys beginning with splunk-appnav cache nav menus, e.g.:

splunk-appnav:localized_nav:admin:en-US

{
  "nav": [
    {
      "label": "Localized Nav Dashboard",
      "uri": "/en-US/app/localized_nav/localized_nav_dashboard",
      "viewName": "localized_nav_dashboard",
      "isDefault": true
    },
    {
      "label": "More...",
      "submenu": [
        {
          "label": "Search",
          "uri": "/en-US/app/localized_nav/search",
          "viewName": "search"
        },
        {
          "label": "Analytics",
          "uri": "/en-US/app/localized_nav/analytics_workspace",
          "viewName": "analytics_workspace"
        },
        {
          "label": "Datasets",
          "uri": "/en-US/app/localized_nav/datasets",
          "viewName": "datasets"
        },
        {
          "label": "Reports",
          "uri": "/en-US/app/localized_nav/reports",
          "viewName": "reports"
        },
        {
          "label": "Alerts",
          "uri": "/en-US/app/localized_nav/alerts",
          "viewName": "alerts"
        },
        {
          "label": "Dashboards",
          "uri": "/en-US/app/localized_nav/dashboards",
          "viewName": "dashboards"
        }
      ]
    }
  ],
  "color": "#ff0000",
  "label": "Localized Nav",
  "searchView": "search",
  "lastModified": 1725807491341
}

Switching locales generates a new cached menu under a new key:

splunk-appnav:localized_nav:admin:it-IT

If you're having issues with nav menus, you may be able to resolve them with one of the following:

  • Clear browser cache
  • Clear site cookies/storage (linked in Chromium-based browsers)
  • Clear local storage entries in browser dev tools

View solution in original post

inventsekar
SplunkTrust
SplunkTrust

Hi @gcusello , i thought to test this but not sure how to test.

will check the other options replied and update you back, thanks. 

 

Best Regards

Sekar

thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !

tscroggins
Influencer

My custom default.xml isn't displayed at all in 9.3.0. I know it's being read because I changed the default view, and that's the view that loads when the app loads. ???

EDIT: I had named my test app localized_menu, and for reasons unknown to me right now, this broke menu customization.

Variations on this app name worked fine:

lauz_localized_menu
leaz_localized_menu
localzzz
localized_nav
localized_xxx
localizedxxx
mlocalized_menu

This appears to be a bug specific to apps named localized_menu or similar enough permutations, but I don't have a personal support account.

For now, though, I can test localization in a sanely named localized_nav app.

tscroggins
Influencer

This was really bothering me ... and I isolated the cause to browser-local storage managed by SplunkWeb. Keys beginning with splunk-appnav cache nav menus, e.g.:

splunk-appnav:localized_nav:admin:en-US

{
  "nav": [
    {
      "label": "Localized Nav Dashboard",
      "uri": "/en-US/app/localized_nav/localized_nav_dashboard",
      "viewName": "localized_nav_dashboard",
      "isDefault": true
    },
    {
      "label": "More...",
      "submenu": [
        {
          "label": "Search",
          "uri": "/en-US/app/localized_nav/search",
          "viewName": "search"
        },
        {
          "label": "Analytics",
          "uri": "/en-US/app/localized_nav/analytics_workspace",
          "viewName": "analytics_workspace"
        },
        {
          "label": "Datasets",
          "uri": "/en-US/app/localized_nav/datasets",
          "viewName": "datasets"
        },
        {
          "label": "Reports",
          "uri": "/en-US/app/localized_nav/reports",
          "viewName": "reports"
        },
        {
          "label": "Alerts",
          "uri": "/en-US/app/localized_nav/alerts",
          "viewName": "alerts"
        },
        {
          "label": "Dashboards",
          "uri": "/en-US/app/localized_nav/dashboards",
          "viewName": "dashboards"
        }
      ]
    }
  ],
  "color": "#ff0000",
  "label": "Localized Nav",
  "searchView": "search",
  "lastModified": 1725807491341
}

Switching locales generates a new cached menu under a new key:

splunk-appnav:localized_nav:admin:it-IT

If you're having issues with nav menus, you may be able to resolve them with one of the following:

  • Clear browser cache
  • Clear site cookies/storage (linked in Chromium-based browsers)
  • Clear local storage entries in browser dev tools

tscroggins
Influencer

If you want to provide both en-US and it-IT translations in your app, check https://docs.splunk.com/Documentation/Splunk/latest/AdvancedDev/TranslateSplunk for the localization process.

0 Karma

tscroggins
Influencer

A simple test in a barebones app worked for me. After working though the app name bug (see above), I customized default.xml, and the menu is rendered in both en-US and it-IT locales. My browser locale remains US English, however, so I'm probably not sufficiently emulating your environment.

0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...