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!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...