<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to fix: JavaScript error caused an issue loading your dashboard, likely due to the dashboard version update? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-fix-JavaScript-error-caused-an-issue-loading-your/m-p/624087#M51165</link>
    <description>&lt;P&gt;Please find the complete code below and the error below.&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Error: &lt;SPAN class=""&gt;Already have instance with id: details-search-manager&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;require([&lt;BR /&gt;'splunkjs/mvc/tableview',&lt;BR /&gt;'splunkjs/mvc/chartview',&lt;BR /&gt;'splunkjs/mvc/dataview',&lt;BR /&gt;'splunkjs/mvc/searchmanager',&lt;BR /&gt;'splunkjs/mvc/postprocessmanager',&lt;BR /&gt;'splunkjs/mvc',&lt;BR /&gt;'underscore',&lt;BR /&gt;'splunkjs/mvc/simplexml/ready!'],function(&lt;BR /&gt;TableView,&lt;BR /&gt;ChartView,&lt;BR /&gt;DataView,&lt;BR /&gt;SearchManager,&lt;BR /&gt;PostProcessManager,&lt;BR /&gt;mvc,&lt;BR /&gt;_&lt;BR /&gt;){&lt;/P&gt;&lt;P&gt;var EventSearchBasedRowExpansionRenderer = TableView.BaseRowExpansionRenderer.extend({&lt;BR /&gt;initialize: function(args) {&lt;BR /&gt;// initialize will run once, so we will set up a search and a chart to be reused.&lt;BR /&gt;this._searchManager = new SearchManager({&lt;BR /&gt;id: 'details-search-manager',&lt;BR /&gt;preview: false&lt;BR /&gt;&lt;BR /&gt;});&lt;BR /&gt;this._baseSearchManager = new SearchManager({&lt;BR /&gt;id: 'base-search-manager',&lt;BR /&gt;search: '| loadjob savedsearch="nobody:duerr_it_vuln_management:saved-plugin_outputv2"',&lt;BR /&gt;preview: false&lt;BR /&gt;});&lt;BR /&gt;this._postproc_pluginOutput = new PostProcessManager({&lt;BR /&gt;id: 'postproc-plugin-output',&lt;BR /&gt;managerid: 'base-search-manager',&lt;BR /&gt;});&lt;BR /&gt;this._tableView = new TableView({&lt;BR /&gt;managerid: 'details-search-manager',&lt;BR /&gt;'charting.legend.placement': 'none'&lt;BR /&gt;});&lt;BR /&gt;this._plugintableView = new TableView({&lt;BR /&gt;managerid: 'postproc-plugin-output',&lt;BR /&gt;'charting.legend.placement': 'none'&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;//this._dataView = new DataView({&lt;BR /&gt;// managerid: 'details-search-manager',&lt;BR /&gt;// template: "&amp;lt;b&amp;gt;Solution:&amp;lt;/b&amp;gt; &amp;lt;p&amp;gt;&amp;lt;%= results[0].solution %&amp;gt;&amp;lt;/p&amp;gt;"&lt;BR /&gt;//});&lt;BR /&gt;},&lt;/P&gt;&lt;P&gt;canRender: function(rowData) {&lt;BR /&gt;// Since more than one row expansion renderer can be registered we let each decide if they can handle that&lt;BR /&gt;// data&lt;BR /&gt;// Here we will always handle it.&lt;BR /&gt;return true;&lt;BR /&gt;},&lt;/P&gt;&lt;P&gt;render: function($container, rowData) {&lt;BR /&gt;// rowData contains information about the row that is expanded. We can see the cells, fields, and values&lt;BR /&gt;// We will find the sourcetype cell to use its value&lt;BR /&gt;$container.html("");&lt;BR /&gt;var findingCell = _(rowData.cells).find(function (cell) {&lt;BR /&gt;return cell.field === 'finding';&lt;BR /&gt;});&lt;BR /&gt;// get plugin and ip&lt;BR /&gt;var result = findingCell.value.split("#");&lt;BR /&gt;//update the searches&lt;BR /&gt;this._searchManager.set({ search: '| inputlookup nessus_plugin_solution.csv | search id=' + result[1] + ' | fields solution | append [| makeresults | eval solution="No data available." | fields - _time ] | head 1'});&lt;BR /&gt;// the rex is a workaround for splunk not implementing linebreaks in the details tables correctly, only mv fields seem to work&lt;BR /&gt;this._postproc_pluginOutput.set({search: '| search pokey="' + result[3] + '" | fields plugin_output | rex mode=sed field=plugin_output "s/(\\n)/\\1 #BREAK#/g" | makemv delim="#BREAK#" plugin_output | append [| makeresults | eval plugin_output="No data available." | fields - _time ] | head 1' });&lt;/P&gt;&lt;P&gt;// $container is the jquery object where we can put out content.&lt;BR /&gt;// In this case we will render our chart and add it to the $container&lt;BR /&gt;$container.append(this._tableView.render().el);&lt;BR /&gt;$container.append(this._plugintableView.render().el);&lt;BR /&gt;// $container.append("IP: " + result[0] + " Plugin: " + result[1] );&lt;BR /&gt;}&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;var CustomLinkRenderer = TableView.BaseCellRenderer.extend({&lt;BR /&gt;canRender: function(cell) {&lt;BR /&gt;return cell.field === 'solved';&lt;BR /&gt;},&lt;BR /&gt;render: function($td, cell) {&lt;BR /&gt;var solved = cell.value;&lt;BR /&gt;var solved_result = solved.split("-");&lt;BR /&gt;//var a = $('&amp;lt;a&amp;gt;').attr("href", "&lt;A href="http://www.test.de" target="_blank"&gt;www.test.de&lt;/A&gt;").text("testlink");&lt;BR /&gt;//var a = $('&amp;lt;input&amp;gt;').attr('type','checkbox');&lt;BR /&gt;//var a = $('&amp;lt;div&amp;gt;').attr({"id":"chk-sourcetype"+cell.value,"value":cell.value}).attr('class','icon-minus-circle');&lt;BR /&gt;var a = $('&amp;lt;div&amp;gt;').attr({"id":"chk-sourcetype"+cell.value,"value":cell.value});&lt;BR /&gt;// check if marked as solved&lt;BR /&gt;if(solved_result[1] == 1)&lt;BR /&gt;{&lt;BR /&gt;a.attr('class','icon-check-circle');&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;a.attr('class','icon-minus-circle');&lt;BR /&gt;}&lt;BR /&gt;$td.empty().append(a);&lt;BR /&gt;&lt;BR /&gt;a.click(function(e) {&lt;BR /&gt;e.preventDefault();&lt;BR /&gt;//window.location = $(e.currentTarget).attr('href');&lt;BR /&gt;// or for popup:&lt;BR /&gt;// window.open($(e.currentTarget).attr('href'));&lt;BR /&gt;if($(e.currentTarget).attr('class') == 'icon-minus-circle')&lt;BR /&gt;{&lt;BR /&gt;$(e.currentTarget).attr('class','icon-gear');&lt;BR /&gt;var updatestring = '| inputlookup lkp-all-findings | eval key=_key | where key="' + solved_result[2] +'" | eval lastchecked=1 | outputlookup append=t lkp-all-findings';&lt;BR /&gt;var kvupdate = new SearchManager({&lt;BR /&gt;preview: false&lt;BR /&gt;});&lt;BR /&gt;kvupdate.set({search: updatestring});&lt;BR /&gt;kvupdate.on('search:done', function(properties) {&lt;BR /&gt;//console.log("DONE!\nSearch job properties:", properties.content);&lt;BR /&gt;// Set new value when search is done&lt;BR /&gt;$(e.currentTarget).attr('class','icon-check-circle');&lt;BR /&gt;});&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;$(e.currentTarget).attr('class','icon-gear');&lt;BR /&gt;var updatestring = '| inputlookup lkp-all-findings | eval key=_key | where key="' + solved_result[2] +'" | eval lastchecked=0 | outputlookup append=t lkp-all-findings';&lt;BR /&gt;var kvupdate = new SearchManager({&lt;BR /&gt;preview: false&lt;BR /&gt;});&lt;BR /&gt;kvupdate.set({search: updatestring});&lt;BR /&gt;kvupdate.on('search:done', function(properties) {&lt;BR /&gt;//console.log("DONE!\nSearch job properties:", properties.content);&lt;BR /&gt;// Set new value when search is done&lt;BR /&gt;$(e.currentTarget).attr('class','icon-minus-circle');&lt;BR /&gt;});&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;});&lt;BR /&gt;}&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;var tableElement = mvc.Components.getInstance("reports_table");&lt;BR /&gt;tableElement.getVisualization(function(tableView) {&lt;BR /&gt;// Add custom cell renderer, the table will re-render automatically.&lt;BR /&gt;&lt;BR /&gt;tableView.addRowExpansionRenderer(new EventSearchBasedRowExpansionRenderer());&lt;BR /&gt;tableView.table.addCellRenderer(new CustomLinkRenderer());&lt;BR /&gt;// Force the table to re-render&lt;BR /&gt;tableView.table.render();&lt;BR /&gt;});&lt;BR /&gt;});&lt;/P&gt;</description>
    <pubDate>Tue, 13 Dec 2022 06:16:51 GMT</pubDate>
    <dc:creator>kgiri253</dc:creator>
    <dc:date>2022-12-13T06:16:51Z</dc:date>
    <item>
      <title>How to fix: JavaScript error caused an issue loading your dashboard, likely due to the dashboard version update?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-fix-JavaScript-error-caused-an-issue-loading-your/m-p/623359#M51117</link>
      <description>&lt;P&gt;I updated Splunk to 9.0.2 from 9.0.0 and in on of my panels I have changed lookup from kvstore lookup to general csv lookup -&amp;gt; from "allfindings" to "allfindings.csv". Just after this I started getting the following error.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kgiri253_0-1670306068087.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/22873i4D1777CB645113AD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kgiri253_0-1670306068087.png" alt="kgiri253_0-1670306068087.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;I tried to inspect this error and found this in my console.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kgiri253_0-1670306315445.png" style="width: 611px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/22874i9FA10C97ECD5A517/image-dimensions/611x113?v=v2" width="611" height="113" role="button" title="kgiri253_0-1670306315445.png" alt="kgiri253_0-1670306315445.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Trying to resolve this issue but noting is working.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2022 14:40:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-fix-JavaScript-error-caused-an-issue-loading-your/m-p/623359#M51117</guid>
      <dc:creator>kgiri253</dc:creator>
      <dc:date>2022-12-06T14:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to fix: JavaScript error caused an issue loading your dashboard, likely due to the dashboard version update?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-fix-JavaScript-error-caused-an-issue-loading-your/m-p/623563#M51139</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/249277"&gt;@kgiri253&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please share the sample JS code and the error you are getting in the console in plain text?&lt;/P&gt;&lt;P&gt;KV&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 12:19:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-fix-JavaScript-error-caused-an-issue-loading-your/m-p/623563#M51139</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2022-12-07T12:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to fix: JavaScript error caused an issue loading your dashboard, likely due to the dashboard version update?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-fix-JavaScript-error-caused-an-issue-loading-your/m-p/624087#M51165</link>
      <description>&lt;P&gt;Please find the complete code below and the error below.&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Error: &lt;SPAN class=""&gt;Already have instance with id: details-search-manager&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;require([&lt;BR /&gt;'splunkjs/mvc/tableview',&lt;BR /&gt;'splunkjs/mvc/chartview',&lt;BR /&gt;'splunkjs/mvc/dataview',&lt;BR /&gt;'splunkjs/mvc/searchmanager',&lt;BR /&gt;'splunkjs/mvc/postprocessmanager',&lt;BR /&gt;'splunkjs/mvc',&lt;BR /&gt;'underscore',&lt;BR /&gt;'splunkjs/mvc/simplexml/ready!'],function(&lt;BR /&gt;TableView,&lt;BR /&gt;ChartView,&lt;BR /&gt;DataView,&lt;BR /&gt;SearchManager,&lt;BR /&gt;PostProcessManager,&lt;BR /&gt;mvc,&lt;BR /&gt;_&lt;BR /&gt;){&lt;/P&gt;&lt;P&gt;var EventSearchBasedRowExpansionRenderer = TableView.BaseRowExpansionRenderer.extend({&lt;BR /&gt;initialize: function(args) {&lt;BR /&gt;// initialize will run once, so we will set up a search and a chart to be reused.&lt;BR /&gt;this._searchManager = new SearchManager({&lt;BR /&gt;id: 'details-search-manager',&lt;BR /&gt;preview: false&lt;BR /&gt;&lt;BR /&gt;});&lt;BR /&gt;this._baseSearchManager = new SearchManager({&lt;BR /&gt;id: 'base-search-manager',&lt;BR /&gt;search: '| loadjob savedsearch="nobody:duerr_it_vuln_management:saved-plugin_outputv2"',&lt;BR /&gt;preview: false&lt;BR /&gt;});&lt;BR /&gt;this._postproc_pluginOutput = new PostProcessManager({&lt;BR /&gt;id: 'postproc-plugin-output',&lt;BR /&gt;managerid: 'base-search-manager',&lt;BR /&gt;});&lt;BR /&gt;this._tableView = new TableView({&lt;BR /&gt;managerid: 'details-search-manager',&lt;BR /&gt;'charting.legend.placement': 'none'&lt;BR /&gt;});&lt;BR /&gt;this._plugintableView = new TableView({&lt;BR /&gt;managerid: 'postproc-plugin-output',&lt;BR /&gt;'charting.legend.placement': 'none'&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;//this._dataView = new DataView({&lt;BR /&gt;// managerid: 'details-search-manager',&lt;BR /&gt;// template: "&amp;lt;b&amp;gt;Solution:&amp;lt;/b&amp;gt; &amp;lt;p&amp;gt;&amp;lt;%= results[0].solution %&amp;gt;&amp;lt;/p&amp;gt;"&lt;BR /&gt;//});&lt;BR /&gt;},&lt;/P&gt;&lt;P&gt;canRender: function(rowData) {&lt;BR /&gt;// Since more than one row expansion renderer can be registered we let each decide if they can handle that&lt;BR /&gt;// data&lt;BR /&gt;// Here we will always handle it.&lt;BR /&gt;return true;&lt;BR /&gt;},&lt;/P&gt;&lt;P&gt;render: function($container, rowData) {&lt;BR /&gt;// rowData contains information about the row that is expanded. We can see the cells, fields, and values&lt;BR /&gt;// We will find the sourcetype cell to use its value&lt;BR /&gt;$container.html("");&lt;BR /&gt;var findingCell = _(rowData.cells).find(function (cell) {&lt;BR /&gt;return cell.field === 'finding';&lt;BR /&gt;});&lt;BR /&gt;// get plugin and ip&lt;BR /&gt;var result = findingCell.value.split("#");&lt;BR /&gt;//update the searches&lt;BR /&gt;this._searchManager.set({ search: '| inputlookup nessus_plugin_solution.csv | search id=' + result[1] + ' | fields solution | append [| makeresults | eval solution="No data available." | fields - _time ] | head 1'});&lt;BR /&gt;// the rex is a workaround for splunk not implementing linebreaks in the details tables correctly, only mv fields seem to work&lt;BR /&gt;this._postproc_pluginOutput.set({search: '| search pokey="' + result[3] + '" | fields plugin_output | rex mode=sed field=plugin_output "s/(\\n)/\\1 #BREAK#/g" | makemv delim="#BREAK#" plugin_output | append [| makeresults | eval plugin_output="No data available." | fields - _time ] | head 1' });&lt;/P&gt;&lt;P&gt;// $container is the jquery object where we can put out content.&lt;BR /&gt;// In this case we will render our chart and add it to the $container&lt;BR /&gt;$container.append(this._tableView.render().el);&lt;BR /&gt;$container.append(this._plugintableView.render().el);&lt;BR /&gt;// $container.append("IP: " + result[0] + " Plugin: " + result[1] );&lt;BR /&gt;}&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;var CustomLinkRenderer = TableView.BaseCellRenderer.extend({&lt;BR /&gt;canRender: function(cell) {&lt;BR /&gt;return cell.field === 'solved';&lt;BR /&gt;},&lt;BR /&gt;render: function($td, cell) {&lt;BR /&gt;var solved = cell.value;&lt;BR /&gt;var solved_result = solved.split("-");&lt;BR /&gt;//var a = $('&amp;lt;a&amp;gt;').attr("href", "&lt;A href="http://www.test.de" target="_blank"&gt;www.test.de&lt;/A&gt;").text("testlink");&lt;BR /&gt;//var a = $('&amp;lt;input&amp;gt;').attr('type','checkbox');&lt;BR /&gt;//var a = $('&amp;lt;div&amp;gt;').attr({"id":"chk-sourcetype"+cell.value,"value":cell.value}).attr('class','icon-minus-circle');&lt;BR /&gt;var a = $('&amp;lt;div&amp;gt;').attr({"id":"chk-sourcetype"+cell.value,"value":cell.value});&lt;BR /&gt;// check if marked as solved&lt;BR /&gt;if(solved_result[1] == 1)&lt;BR /&gt;{&lt;BR /&gt;a.attr('class','icon-check-circle');&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;a.attr('class','icon-minus-circle');&lt;BR /&gt;}&lt;BR /&gt;$td.empty().append(a);&lt;BR /&gt;&lt;BR /&gt;a.click(function(e) {&lt;BR /&gt;e.preventDefault();&lt;BR /&gt;//window.location = $(e.currentTarget).attr('href');&lt;BR /&gt;// or for popup:&lt;BR /&gt;// window.open($(e.currentTarget).attr('href'));&lt;BR /&gt;if($(e.currentTarget).attr('class') == 'icon-minus-circle')&lt;BR /&gt;{&lt;BR /&gt;$(e.currentTarget).attr('class','icon-gear');&lt;BR /&gt;var updatestring = '| inputlookup lkp-all-findings | eval key=_key | where key="' + solved_result[2] +'" | eval lastchecked=1 | outputlookup append=t lkp-all-findings';&lt;BR /&gt;var kvupdate = new SearchManager({&lt;BR /&gt;preview: false&lt;BR /&gt;});&lt;BR /&gt;kvupdate.set({search: updatestring});&lt;BR /&gt;kvupdate.on('search:done', function(properties) {&lt;BR /&gt;//console.log("DONE!\nSearch job properties:", properties.content);&lt;BR /&gt;// Set new value when search is done&lt;BR /&gt;$(e.currentTarget).attr('class','icon-check-circle');&lt;BR /&gt;});&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;$(e.currentTarget).attr('class','icon-gear');&lt;BR /&gt;var updatestring = '| inputlookup lkp-all-findings | eval key=_key | where key="' + solved_result[2] +'" | eval lastchecked=0 | outputlookup append=t lkp-all-findings';&lt;BR /&gt;var kvupdate = new SearchManager({&lt;BR /&gt;preview: false&lt;BR /&gt;});&lt;BR /&gt;kvupdate.set({search: updatestring});&lt;BR /&gt;kvupdate.on('search:done', function(properties) {&lt;BR /&gt;//console.log("DONE!\nSearch job properties:", properties.content);&lt;BR /&gt;// Set new value when search is done&lt;BR /&gt;$(e.currentTarget).attr('class','icon-minus-circle');&lt;BR /&gt;});&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;});&lt;BR /&gt;}&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;var tableElement = mvc.Components.getInstance("reports_table");&lt;BR /&gt;tableElement.getVisualization(function(tableView) {&lt;BR /&gt;// Add custom cell renderer, the table will re-render automatically.&lt;BR /&gt;&lt;BR /&gt;tableView.addRowExpansionRenderer(new EventSearchBasedRowExpansionRenderer());&lt;BR /&gt;tableView.table.addCellRenderer(new CustomLinkRenderer());&lt;BR /&gt;// Force the table to re-render&lt;BR /&gt;tableView.table.render();&lt;BR /&gt;});&lt;BR /&gt;});&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 06:16:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-fix-JavaScript-error-caused-an-issue-loading-your/m-p/624087#M51165</guid>
      <dc:creator>kgiri253</dc:creator>
      <dc:date>2022-12-13T06:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to fix: JavaScript error caused an issue loading your dashboard, likely due to the dashboard version update?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-fix-JavaScript-error-caused-an-issue-loading-your/m-p/624500#M51202</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/249277"&gt;@kgiri253&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please try this?&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;require([
    'splunkjs/mvc/tableview',
    'splunkjs/mvc/chartview',
    'splunkjs/mvc/dataview',
    'splunkjs/mvc/searchmanager',
    'splunkjs/mvc/postprocessmanager',
    'splunkjs/mvc',
    'underscore',
    'splunkjs/mvc/simplexml/ready!'
], function(
    TableView,
    ChartView,
    DataView,
    SearchManager,
    PostProcessManager,
    mvc,
    _
) {

    var EventSearchBasedRowExpansionRenderer = TableView.BaseRowExpansionRenderer.extend({
        initialize: function(args) {
            // initialize will run once, so we will set up a search and a chart to be reused.
            if(this._searchManager == "undefined") {
                this._searchManager = new SearchManager({
                id: 'details-search-manager',
                preview: false
                });
            }
            if(this._baseSearchManager == "undefined") {
                this._baseSearchManager = new SearchManager({
                    id: 'base-search-manager',
                    search: '| loadjob savedsearch="nobody:duerr_it_vuln_management:saved-plugin_outputv2"',
                    preview: false
                });
            }
            this._postproc_pluginOutput = new PostProcessManager({
                id: 'postproc-plugin-output',
                managerid: 'base-search-manager',
            });
            this._tableView = new TableView({
                managerid: 'details-search-manager',
                'charting.legend.placement': 'none'
            });
            
            this._plugintableView = new TableView({
                managerid: 'postproc-plugin-output',
                'charting.legend.placement': 'none'
            });
            

            //this._dataView = new DataView({
            // managerid: 'details-search-manager',
            // template: "&amp;lt;b&amp;gt;Solution:&amp;lt;/b&amp;gt; &amp;lt;p&amp;gt;&amp;lt;%= results[0].solution %&amp;gt;&amp;lt;/p&amp;gt;"
            //});
        },

        canRender: function(rowData) {
            // Since more than one row expansion renderer can be registered we let each decide if they can handle that
            // data
            // Here we will always handle it.
            return true;
        },

        render: function($container, rowData) {
            // rowData contains information about the row that is expanded. We can see the cells, fields, and values
            // We will find the sourcetype cell to use its value
            $container.html("");
            var findingCell = _(rowData.cells).find(function(cell) {
                return cell.field === 'finding';
            });
            // get plugin and ip
            var result = findingCell.value.split("#");
            //update the searches
            this._searchManager.set({
                search: '| inputlookup nessus_plugin_solution.csv | search id=' + result[1] + ' | fields solution | append [| makeresults | eval solution="No data available." | fields - _time ] | head 1'
            });
            // the rex is a workaround for splunk not implementing linebreaks in the details tables correctly, only mv fields seem to work
            this._postproc_pluginOutput.set({
                search: '| search pokey="' + result[3] + '" | fields plugin_output | rex mode=sed field=plugin_output "s/(\\n)/\\1 #BREAK#/g" | makemv delim="#BREAK#" plugin_output | append [| makeresults | eval plugin_output="No data available." | fields - _time ] | head 1'
            });

            // $container is the jquery object where we can put out content.
            // In this case we will render our chart and add it to the $container
            $container.append(this._tableView.render().el);
            $container.append(this._plugintableView.render().el);
            // $container.append("IP: " + result[0] + " Plugin: " + result[1] );
        }
    });

    var CustomLinkRenderer = TableView.BaseCellRenderer.extend({
        canRender: function(cell) {
            return cell.field === 'solved';
        },
        render: function($td, cell) {
            var solved = cell.value;
            var solved_result = solved.split("-");
            //var a = $('&amp;lt;a&amp;gt;').attr("href", "www.test.de").text("testlink");
            //var a = $('&amp;lt;input&amp;gt;').attr('type','checkbox');
            //var a = $('&amp;lt;div&amp;gt;').attr({"id":"chk-sourcetype"+cell.value,"value":cell.value}).attr('class','icon-minus-circle');
            var a = $('&amp;lt;div&amp;gt;').attr({
                "id": "chk-sourcetype" + cell.value,
                "value": cell.value
            });
            // check if marked as solved
            if (solved_result[1] == 1) {
                a.attr('class', 'icon-check-circle');
            } else {
                a.attr('class', 'icon-minus-circle');
            }
            $td.empty().append(a);

            a.click(function(e) {
                e.preventDefault();
                //window.location = $(e.currentTarget).attr('href');
                // or for popup:
                // window.open($(e.currentTarget).attr('href'));
                if ($(e.currentTarget).attr('class') == 'icon-minus-circle') {
                    $(e.currentTarget).attr('class', 'icon-gear');
                    var updatestring = '| inputlookup lkp-all-findings | eval key=_key | where key="' + solved_result[2] + '" | eval lastchecked=1 | outputlookup append=t lkp-all-findings';
                    var kvupdate = new SearchManager({
                        preview: false
                    });
                    kvupdate.set({
                        search: updatestring
                    });
                    kvupdate.on('search:done', function(properties) {
                        //console.log("DONE!\nSearch job properties:", properties.content);
                        // Set new value when search is done
                        $(e.currentTarget).attr('class', 'icon-check-circle');
                    });
                } else {
                    $(e.currentTarget).attr('class', 'icon-gear');
                    var updatestring = '| inputlookup lkp-all-findings | eval key=_key | where key="' + solved_result[2] + '" | eval lastchecked=0 | outputlookup append=t lkp-all-findings';
                    var kvupdate = new SearchManager({
                        preview: false
                    });
                    kvupdate.set({
                        search: updatestring
                    });
                    kvupdate.on('search:done', function(properties) {
                        //console.log("DONE!\nSearch job properties:", properties.content);
                        // Set new value when search is done
                        $(e.currentTarget).attr('class', 'icon-minus-circle');
                    });
                }

            });
        }
    });

    var tableElement = mvc.Components.getInstance("reports_table");
    tableElement.getVisualization(function(tableView) {
        // Add custom cell renderer, the table will re-render automatically.

        tableView.addRowExpansionRenderer(new EventSearchBasedRowExpansionRenderer());
        tableView.table.addCellRenderer(new CustomLinkRenderer());
        // Force the table to re-render
        tableView.table.render();
    });
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this will help you.&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;If any of my replies help you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2022 06:15:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-fix-JavaScript-error-caused-an-issue-loading-your/m-p/624500#M51202</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2022-12-16T06:15:49Z</dc:date>
    </item>
  </channel>
</rss>

