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
Communicator

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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...