Splunk Search

How to edit the search_mrsparkle's, viz_editor_schema.js

mjlsnombrado
Communicator

Hi all,

I've edited the viz_editor_schema.js to change the maximum limit of rows displayed of a statistic table, I did some bumps, debug refresh and I even restarted my Splunk instance several times but nothing seems to work. How can I make this work? can someone help me with this.

path: C:\Program Files\Splunk\share\splunk\search_mrsparkle\exposed\js\views\shared\results_table\viz_editor_schema.js

Thanks in advance 🙂

0 Karma
1 Solution

paramagurukarth
Builder

When the page loads, splunk will load the nearly all individual modules from a single file (mvc.js).. it must be an outcome of some build process done over all other files.

In my version of splunk it is located in splunk/search_mrsparkle/exposed/js/build/simplexml.min/mvc.js

This is minified version.
You can find the your part of code in mvc.js.. search for this message "Rows Per Page must be a positive num" as the variables are renamed in minified version...

View solution in original post

0 Karma

paramagurukarth
Builder

When the page loads, splunk will load the nearly all individual modules from a single file (mvc.js).. it must be an outcome of some build process done over all other files.

In my version of splunk it is located in splunk/search_mrsparkle/exposed/js/build/simplexml.min/mvc.js

This is minified version.
You can find the your part of code in mvc.js.. search for this message "Rows Per Page must be a positive num" as the variables are renamed in minified version...

0 Karma

mjlsnombrado
Communicator

Hi @paramagurukarthikeyan thanks for answering, I've checked

C:\Program Files\Splunk\share\splunk\search_mrsparkle\exposed\js\build\simplexml.min\
and edited change the maximum value to 500 but still no luck

0 Karma

paramagurukarth
Builder
  1. Replace all occurrences.
  2. Clear you Browser Cache
  3. Or Try in Incognito Window

It will work for sure

0 Karma

mjlsnombrado
Communicator

Hi paramagurukarthikeyan, thanks 🙂

0 Karma

paramagurukarth
Builder

May I know what changes you have made

0 Karma

mjlsnombrado
Communicator

Hi @paramagurukarthikeyan thanks for answering, I've made changes on the min and max result per page part of the code, I've changed the maximum value to 500 and the error message that will be shown when the value entered exceed 500.

        {
            name: 'display.prefs.statistics.count',
            label: _('Rows Per Page').t(),
            defaultValue: '10',
            groupOptions: {
                controlClass: 'controls-block'
            },
            control: TextControl,
            validation: {
                pattern: 'digits',
                min: 1,
                max: 500,
                msg: _('Rows Per Page must be a positive number no larger than 500.').t(),
                required: true
            }
        }
0 Karma

scannon4
SplunkTrust
SplunkTrust

This may sound too simple, but did you try to clear your browser cache?

0 Karma

mjlsnombrado
Communicator

Hi @scannon4 thanks for answering, I've already tried to clear cache but it does not solve the problem

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

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

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...