<?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 can I have tabs with different views in a dashboard panel in Splunk 6.1.2? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-have-tabs-with-different-views-in-a-dashboard-panel-in/m-p/184111#M11391</link>
    <description>&lt;P&gt;Yes you can uninstall and reinstall splunk. You will get a new free licence for 60 days, and you could be able to test the above code.&lt;/P&gt;</description>
    <pubDate>Sun, 15 Mar 2015 22:36:41 GMT</pubDate>
    <dc:creator>stephanefotso</dc:creator>
    <dc:date>2015-03-15T22:36:41Z</dc:date>
    <item>
      <title>How can I have tabs with different views in a dashboard panel in Splunk 6.1.2?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-have-tabs-with-different-views-in-a-dashboard-panel-in/m-p/184106#M11386</link>
      <description>&lt;P&gt;I have the below code and this is a panel in a dashboard that shows a chart.&lt;/P&gt;

&lt;P&gt;What I want to be able to do is add a tab so that I can have 2 tabs in the one panel. For example, Tab1 will be the view below a chart and Tab2 will be the same but it will be in a table visualization and not a chart. How can i achieve this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;title&amp;gt;title_123&amp;lt;/title&amp;gt;
        &amp;lt;searchString&amp;gt; &amp;lt;MY_SEARCH_STRING_GOES_HERE&amp;gt; &amp;lt;/searchString&amp;gt;
        &amp;lt;earliestTime&amp;gt;rt-2d&amp;lt;/earliestTime&amp;gt;
        &amp;lt;latestTime&amp;gt;rtnow&amp;lt;/latestTime&amp;gt;
        &amp;lt;option name="charting.axisLabelsX.majorLabelStyle.overflowMode"&amp;gt;ellipsisNone&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisLabelsX.majorLabelStyle.rotation"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisTitleX.visibility"&amp;gt;visible&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisTitleY.visibility"&amp;gt;visible&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisTitleY2.visibility"&amp;gt;visible&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisX.scale"&amp;gt;linear&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisY.maximumNumber"&amp;gt;100&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisY.scale"&amp;gt;linear&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisY2.enabled"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisY2.scale"&amp;gt;inherit&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;line&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.nullValueMode"&amp;gt;gaps&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.sliceCollapsingThreshold"&amp;gt;0.01&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.stackMode"&amp;gt;default&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.style"&amp;gt;shiny&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.drilldown"&amp;gt;all&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.layout.splitSeries"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.legend.labelStyle.overflowMode"&amp;gt;ellipsisStart&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.legend.placement"&amp;gt;right&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Mar 2015 22:29:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-have-tabs-with-different-views-in-a-dashboard-panel-in/m-p/184106#M11386</guid>
      <dc:creator>HattrickNZ</dc:creator>
      <dc:date>2015-03-11T22:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: How can I have tabs with different views in a dashboard panel in Splunk 6.1.2?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-have-tabs-with-different-views-in-a-dashboard-panel-in/m-p/184107#M11387</link>
      <description>&lt;P&gt;I think the &lt;STRONG&gt;Custom Link Switcher&lt;/STRONG&gt; dashboard in &lt;STRONG&gt;Splunk 6.x Dashboad Example&lt;/STRONG&gt; app could help you. Take a look at it.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2015 01:01:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-have-tabs-with-different-views-in-a-dashboard-panel-in/m-p/184107#M11387</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2015-03-12T01:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: How can I have tabs with different views in a dashboard panel in Splunk 6.1.2?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-have-tabs-with-different-views-in-a-dashboard-panel-in/m-p/184108#M11388</link>
      <description>&lt;P&gt;tks @stephanefotso I also need these files for it to work. &lt;CODE&gt;autodiscover.js&lt;/CODE&gt; &lt;CODE&gt;link_switcher.js&lt;/CODE&gt; &lt;CODE&gt;linkswitcher.js&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$ pwd
/cygdrive/c/Program Files/Splunk/etc/apps/simple_xml_examples

$ find . -name autodiscover.js
./appserver/static/autodiscover.js

$ find . -name 'link_switcher.js'
./appserver/static/link_switcher.js

$ find . -name 'linkswitcher.js'
./appserver/static/components/linkswitcher/linkswitcher.js
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Mar 2015 22:53:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-have-tabs-with-different-views-in-a-dashboard-panel-in/m-p/184108#M11388</guid>
      <dc:creator>HattrickNZ</dc:creator>
      <dc:date>2015-03-12T22:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: How can I have tabs with different views in a dashboard panel in Splunk 6.1.2?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-have-tabs-with-different-views-in-a-dashboard-panel-in/m-p/184109#M11389</link>
      <description>&lt;P&gt;Haa ok. I understand HattrickNZ. See bellow an example which can help you, i hope. It is working, just test it.And if you wish to use the &lt;STRONG&gt;autodiscover&lt;/STRONG&gt;, let me know, i will help you.&lt;BR /&gt;
Just put the &lt;STRONG&gt;js file&lt;/STRONG&gt; in &lt;STRONG&gt;$SPLUNK_HOME$/etc/apps/your_app_name/appserver/static&lt;/STRONG&gt; folder, and don't forget to restart SPLUNK.&lt;BR /&gt;
Let's go&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;costum_link_switcher.xml&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard script="link_switcher.js"&amp;gt;
    &amp;lt;label&amp;gt;Link Switcher&amp;lt;/label&amp;gt;
    &amp;lt;row grouping="4"&amp;gt;
        &amp;lt;html&amp;gt;
            &amp;lt;!-- Placeholder/container for the link switcher to appear --&amp;gt;
            &amp;lt;div class="link-switcher" data-items="link1,link2,link3"&amp;gt;Select a view: &amp;lt;!--Links go here--&amp;gt;&amp;lt;/div&amp;gt;
        &amp;lt;/html&amp;gt;
        &amp;lt;table id="link1"&amp;gt;
            &amp;lt;title&amp;gt;Table&amp;lt;/title&amp;gt;
            &amp;lt;searchString&amp;gt;index=_internal | stats count by sourcetype&amp;lt;/searchString&amp;gt;
            &amp;lt;earliestTime&amp;gt;-24h&amp;lt;/earliestTime&amp;gt;
        &amp;lt;/table&amp;gt;
        &amp;lt;chart id="link2"&amp;gt;
            &amp;lt;title&amp;gt;Chart&amp;lt;/title&amp;gt;
            &amp;lt;searchString&amp;gt;index=_internal | stats count by sourcetype&amp;lt;/searchString&amp;gt;
            &amp;lt;earliestTime&amp;gt;-24h&amp;lt;/earliestTime&amp;gt;
        &amp;lt;/chart&amp;gt;
        &amp;lt;map id="link3"&amp;gt;
            &amp;lt;title&amp;gt;Map&amp;lt;/title&amp;gt;
            &amp;lt;searchString&amp;gt;| inputlookup geomaps_data.csv | iplocation device_ip | geostats latfield=lat longfield=lon count by method&amp;lt;/searchString&amp;gt;
            &amp;lt;earliestTime&amp;gt;0&amp;lt;/earliestTime&amp;gt;
            &amp;lt;option name="mapping.map.center"&amp;gt;(30.810646,-10.556976)&amp;lt;/option&amp;gt;
            &amp;lt;option name="mapping.map.zoom"&amp;gt;2&amp;lt;/option&amp;gt;
        &amp;lt;/map&amp;gt;
    &amp;lt;/row&amp;gt;

&amp;lt;/dashboard&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;link_switcher.js&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/*
 * Simple link switcher implementation which uses jQuery to inject the switcher elements
 */
require([
    'underscore',
    'jquery',
    'splunkjs/mvc',
    'splunkjs/mvc/simplexml/ready!'
], function(_, $, mvc) {
    $('.link-switcher').each(function() {
        var linkSwitcherContainer = $(this);
        // Grab component instances for the specified item IDs
        var elements = _(linkSwitcherContainer.data('items').split(',')).map(function(id) {
            return mvc.Components.get($.trim(id));
        });
        // Hide all but the first element
        _(elements).chain().each(function(el) {
            var link = $('&amp;lt;a href="#" class="btn-pill"&amp;gt;&amp;lt;/a&amp;gt;').appendTo(linkSwitcherContainer);
            // Use the title of the dashboard element for the link text
            link.text(el.settings.get('title'));
            // Clear the title of the dashboard element
            el.settings.unset('title');
            link.click(function(e) {
                e.preventDefault();
                // Reset the selected link
                linkSwitcherContainer.find('a.active').removeClass('active');
                // Hide all views
                _(elements).chain().pluck('$el').invoke('hide');
                // Mark clicked link as active
                link.addClass('active');
                // Show the view
                el.$el.show().css({ width: '100%' });
                // Force charts to redraw
                $(window).trigger('resize');
            });
        }).pluck('$el').invoke('hide'); // Hide all elements initially
        // Activate the first link and view by simulating a click on the first link
        linkSwitcherContainer.find('a:first').click();
    });
});
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:13:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-have-tabs-with-different-views-in-a-dashboard-panel-in/m-p/184109#M11389</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2020-09-28T19:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: How can I have tabs with different views in a dashboard panel in Splunk 6.1.2?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-have-tabs-with-different-views-in-a-dashboard-panel-in/m-p/184110#M11390</link>
      <description>&lt;P&gt;tks @stephanefotso, but i have access to the files of &lt;STRONG&gt;Custom Link Switcher&lt;/STRONG&gt; dashboard in &lt;STRONG&gt;Splunk 6.x Dashboad Example&lt;/STRONG&gt;  but that is on my own macine where I have splunk installed, but it is out of indexing licence. Can i uninstall and reinstall? Will this give me a new licence so I can use this for testing?&lt;/P&gt;

&lt;P&gt;On the splunk server i am working on I can't have access to the live splunk server at present. So I can't put all the files on where  I want. Not sure the best way around this? Can you advise?&lt;/P&gt;</description>
      <pubDate>Sun, 15 Mar 2015 20:05:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-have-tabs-with-different-views-in-a-dashboard-panel-in/m-p/184110#M11390</guid>
      <dc:creator>HattrickNZ</dc:creator>
      <dc:date>2015-03-15T20:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: How can I have tabs with different views in a dashboard panel in Splunk 6.1.2?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-have-tabs-with-different-views-in-a-dashboard-panel-in/m-p/184111#M11391</link>
      <description>&lt;P&gt;Yes you can uninstall and reinstall splunk. You will get a new free licence for 60 days, and you could be able to test the above code.&lt;/P&gt;</description>
      <pubDate>Sun, 15 Mar 2015 22:36:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-have-tabs-with-different-views-in-a-dashboard-panel-in/m-p/184111#M11391</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2015-03-15T22:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: How can I have tabs with different views in a dashboard panel in Splunk 6.1.2?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-have-tabs-with-different-views-in-a-dashboard-panel-in/m-p/184112#M11392</link>
      <description>&lt;P&gt;many thanks @stephanefotso Can i include the code in the simple xml? or can i only have xml in that? &lt;BR /&gt;
For example is there some way I can use tags to enclose my js or css code?&lt;/P&gt;</description>
      <pubDate>Sun, 15 Mar 2015 22:40:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-have-tabs-with-different-views-in-a-dashboard-panel-in/m-p/184112#M11392</guid>
      <dc:creator>HattrickNZ</dc:creator>
      <dc:date>2015-03-15T22:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: How can I have tabs with different views in a dashboard panel in Splunk 6.1.2?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-have-tabs-with-different-views-in-a-dashboard-panel-in/m-p/184113#M11393</link>
      <description>&lt;P&gt;No! you can't. The same Xml file include all your tabs. For example in the above xml, you have three tags: &lt;STRONG&gt;link1, link2&lt;/STRONG&gt; and &lt;STRONG&gt;link3&lt;/STRONG&gt; handled in the same js file. &lt;/P&gt;</description>
      <pubDate>Sun, 15 Mar 2015 23:18:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-have-tabs-with-different-views-in-a-dashboard-panel-in/m-p/184113#M11393</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2015-03-15T23:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: How can I have tabs with different views in a dashboard panel in Splunk 6.1.2?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-have-tabs-with-different-views-in-a-dashboard-panel-in/m-p/184114#M11394</link>
      <description>&lt;P&gt;Hello! Are you satisfy by the answer? if yes, don't forget to vote or accept it.&lt;BR /&gt;
Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2015 14:13:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-have-tabs-with-different-views-in-a-dashboard-panel-in/m-p/184114#M11394</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2015-03-26T14:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: How can I have tabs with different views in a dashboard panel in Splunk 6.1.2?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-have-tabs-with-different-views-in-a-dashboard-panel-in/m-p/184115#M11395</link>
      <description>&lt;P&gt;Not sure if this is more in line with what you're looking for, but this latest Splunk blog entry shows a slick way of adding tabs to a panel: &lt;A href="http://blogs.splunk.com/2015/03/30/making-a-dashboard-with-tabs-and-searches-that-run-when-clicked/"&gt;http://blogs.splunk.com/2015/03/30/making-a-dashboard-with-tabs-and-searches-that-run-when-clicked/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2015 15:04:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-have-tabs-with-different-views-in-a-dashboard-panel-in/m-p/184115#M11395</guid>
      <dc:creator>joshua_hart1</dc:creator>
      <dc:date>2015-08-21T15:04:49Z</dc:date>
    </item>
  </channel>
</rss>

