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!

Observability | How to Think About Instrumentation Overhead (White Paper)

Novice observability practitioners are often overly obsessed with performance. They might approach ...

Cloud Platform | Get Resiliency in the Cloud Event (Register Now!)

IDC Report: Enterprises Gain Higher Efficiency and Resiliency With Migration to Cloud  Today many enterprises ...

The Great Resilience Quest: 10th Leaderboard Update

The tenth leaderboard update (11.23-12.05) for The Great Resilience Quest is out >> As our brave ...