<?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 make the div that can be fold/unfold on dashboard in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-the-div-that-can-be-fold-unfold-on-dashboard/m-p/289173#M18306</link>
    <description>&lt;P&gt;It was able to be realized with the following code.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;require(['jquery', 'splunkjs/mvc/simplexml/ready!'], function($) {
    //
    $('#&amp;lt;id of panel1&amp;gt;').closest(".dashboard-cell").css('width', '97%');
    $('#&amp;lt;id of panel2&amp;gt;').closest(".dashboard-cell").css('width', '3%');
    document.getElementById("&amp;lt;id of contents of panel2(table,chart...)&amp;gt;").style.display="none";
    var cnt = 0;
    $('#&amp;lt;id of button&amp;gt;').click(function onoff() {
        if(cnt == 0){
            cnt = 1;
            $('#&amp;lt;id of panel1&amp;gt;').closest(".dashboard-cell").css('width', '70%');
            $('#&amp;lt;id of panel2&amp;gt;').closest(".dashboard-cell").css('width', '30%');
            document.getElementById("&amp;lt;id of contents of panel2(table,chart...)&amp;gt;").style.display="block";
        } else {
            cnt = 0;
            $('#&amp;lt;id of panel1&amp;gt;').closest(".dashboard-cell").css('width', '97%');
            $('#&amp;lt;id of panel2&amp;gt;').closest(".dashboard-cell").css('width', '3%');
            document.getElementById("&amp;lt;id of contents of panel2(table,chart...)&amp;gt;").style.display="none";
        }
    });
    $(window).trigger('resize');
});
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;By clicking the button,&lt;BR /&gt;
Since it is possible to change the width of panel1 and panel2 and display/non-display of contents of panel2, so, panel2 looks like a panel that can switch between folding/unfolding.&lt;/P&gt;

&lt;P&gt;Details of processing are as follows.&lt;/P&gt;

&lt;P&gt;In the case of cnt = 0, clicking, the width of the panel 1 is narrowed, the width of the panel 2 is widened, and the content in the panel 2 is displayed.&lt;/P&gt;

&lt;P&gt;In the case of cnt = 1, when clicking, widens the width of the panel 1, narrows the width of the panel 2, and hides the contents in the panel 2.&lt;/P&gt;</description>
    <pubDate>Thu, 12 Oct 2017 04:42:30 GMT</pubDate>
    <dc:creator>yutaka1005</dc:creator>
    <dc:date>2017-10-12T04:42:30Z</dc:date>
    <item>
      <title>How to make the div that can be fold/unfold on dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-the-div-that-can-be-fold-unfold-on-dashboard/m-p/289167#M18300</link>
      <description>&lt;P&gt;I'd like to make the div that can be fold/unfold on dashboard.&lt;BR /&gt;
So I tried to implement an easy thing using html, but it does not work.&lt;/P&gt;

&lt;P&gt;How can I make this possible on Splunk's dashboard?&lt;BR /&gt;
Please tell me that if someone know about it.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 08:42:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-the-div-that-can-be-fold-unfold-on-dashboard/m-p/289167#M18300</guid>
      <dc:creator>yutaka1005</dc:creator>
      <dc:date>2017-10-06T08:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to make the div that can be fold/unfold on dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-the-div-that-can-be-fold-unfold-on-dashboard/m-p/289168#M18301</link>
      <description>&lt;P&gt;@yutaka1005, you ca either refer to the following blog to create tabs in dashboard using Simple XML JS Extension: &lt;A href="https://www.splunk.com/blog/2015/03/30/making-a-dashboard-with-tabs-and-searches-that-run-when-clicked.html"&gt;https://www.splunk.com/blog/2015/03/30/making-a-dashboard-with-tabs-and-searches-that-run-when-clicked.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Or else use jQuery UI Accordion using Splunk HTML Dashboard (Web Framework) from the Splunk dev site: &lt;A href="http://dev.splunk.com/view/webframework-tutorials/SP-CAAAEN5"&gt;http://dev.splunk.com/view/webframework-tutorials/SP-CAAAEN5&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 10:57:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-the-div-that-can-be-fold-unfold-on-dashboard/m-p/289168#M18301</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-10-06T10:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to make the div that can be fold/unfold on dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-the-div-that-can-be-fold-unfold-on-dashboard/m-p/289169#M18302</link>
      <description>&lt;P&gt;To niketnilay&lt;/P&gt;

&lt;P&gt;Thank you for answer.&lt;/P&gt;

&lt;P&gt;Second URL that you pasted is very similar to what I want to do.&lt;BR /&gt;
But I want to make a panel that fades in from the side when I press the button.&lt;/P&gt;

&lt;P&gt;Have you any ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 02:41:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-the-div-that-can-be-fold-unfold-on-dashboard/m-p/289169#M18302</guid>
      <dc:creator>yutaka1005</dc:creator>
      <dc:date>2017-10-11T02:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to make the div that can be fold/unfold on dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-the-div-that-can-be-fold-unfold-on-dashboard/m-p/289170#M18303</link>
      <description>&lt;P&gt;@yutaka1005, Fade in or Fade Out is similar to Show or Hide but with some delay (or rather animated). So would just Hide/Show suffice? Since this can be done pretty easily using depends/rejects Simple XML attributes and you can find several examples here in on Splunk Answers.&lt;/P&gt;

&lt;P&gt;If you want Fade In or Fade Out specifically, please provide an example from any demo site (like jQuery or W3Schools or any actual site with Fade In and Fade Out implemented).&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 17:54:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-the-div-that-can-be-fold-unfold-on-dashboard/m-p/289170#M18303</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-10-11T17:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to make the div that can be fold/unfold on dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-the-div-that-can-be-fold-unfold-on-dashboard/m-p/289171#M18304</link>
      <description>&lt;P&gt;You should probably use my app as a starting point: Developer Gadgets for Splunk &lt;A href="https://splunkbase.splunk.com/app/3689/"&gt;https://splunkbase.splunk.com/app/3689/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;It includes a library to turn Splunk panels into accordions, and it has a sliding panel on the bottom of the dashboard.&lt;/P&gt;

&lt;P&gt;The Splunk code on &lt;A href="http://dev.splunk.com/view/webframework-tutorials/SP-CAAAEN5"&gt;http://dev.splunk.com/view/webframework-tutorials/SP-CAAAEN5&lt;/A&gt;  is pretty outdated an incapable of handling some situations (e.g., dealing with user inputs).&lt;/P&gt;

&lt;P&gt;My app code is tested on various versions of Splunk and used in my company's Layer8Insight App for Splunk, so it should be good as a launching off point.&lt;/P&gt;

&lt;P&gt;The built-in dashboard of the Developer Gadgets app will tell you how to turn a regular panel/row into an accordion. &lt;/P&gt;

&lt;P&gt;You will need to copy the JS / CSS code for the bottom slider panel if you want to reuse for something else.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 18:00:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-the-div-that-can-be-fold-unfold-on-dashboard/m-p/289171#M18304</guid>
      <dc:creator>rjthibod</dc:creator>
      <dc:date>2017-10-11T18:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to make the div that can be fold/unfold on dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-the-div-that-can-be-fold-unfold-on-dashboard/m-p/289172#M18305</link>
      <description>&lt;P&gt;To niketnilay&lt;/P&gt;

&lt;P&gt;Thank you for reply.&lt;/P&gt;

&lt;P&gt;It would be nice if I could display or hide the panel, but I would like a mechanism that can change the display/folding of the panel by pressing the button, not by using variables and "depends".&lt;/P&gt;

&lt;P&gt;So if it can realize that mechanism, I do not care about the method (fade in, accordion menu ... etc).&lt;/P&gt;

&lt;P&gt;There is a part called "Focus" which can change display/folding by click, in "deep dive" which is one of the contents in ITSI which is a chargeable App of Splunk.&lt;BR /&gt;
I would like to do something similar to this.&lt;/P&gt;

&lt;P&gt;See below ↓&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/images/e/e3/Deep_dive.png"&gt;http://docs.splunk.com/images/e/e3/Deep_dive.png&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 02:01:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-the-div-that-can-be-fold-unfold-on-dashboard/m-p/289172#M18305</guid>
      <dc:creator>yutaka1005</dc:creator>
      <dc:date>2017-10-12T02:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to make the div that can be fold/unfold on dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-the-div-that-can-be-fold-unfold-on-dashboard/m-p/289173#M18306</link>
      <description>&lt;P&gt;It was able to be realized with the following code.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;require(['jquery', 'splunkjs/mvc/simplexml/ready!'], function($) {
    //
    $('#&amp;lt;id of panel1&amp;gt;').closest(".dashboard-cell").css('width', '97%');
    $('#&amp;lt;id of panel2&amp;gt;').closest(".dashboard-cell").css('width', '3%');
    document.getElementById("&amp;lt;id of contents of panel2(table,chart...)&amp;gt;").style.display="none";
    var cnt = 0;
    $('#&amp;lt;id of button&amp;gt;').click(function onoff() {
        if(cnt == 0){
            cnt = 1;
            $('#&amp;lt;id of panel1&amp;gt;').closest(".dashboard-cell").css('width', '70%');
            $('#&amp;lt;id of panel2&amp;gt;').closest(".dashboard-cell").css('width', '30%');
            document.getElementById("&amp;lt;id of contents of panel2(table,chart...)&amp;gt;").style.display="block";
        } else {
            cnt = 0;
            $('#&amp;lt;id of panel1&amp;gt;').closest(".dashboard-cell").css('width', '97%');
            $('#&amp;lt;id of panel2&amp;gt;').closest(".dashboard-cell").css('width', '3%');
            document.getElementById("&amp;lt;id of contents of panel2(table,chart...)&amp;gt;").style.display="none";
        }
    });
    $(window).trigger('resize');
});
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;By clicking the button,&lt;BR /&gt;
Since it is possible to change the width of panel1 and panel2 and display/non-display of contents of panel2, so, panel2 looks like a panel that can switch between folding/unfolding.&lt;/P&gt;

&lt;P&gt;Details of processing are as follows.&lt;/P&gt;

&lt;P&gt;In the case of cnt = 0, clicking, the width of the panel 1 is narrowed, the width of the panel 2 is widened, and the content in the panel 2 is displayed.&lt;/P&gt;

&lt;P&gt;In the case of cnt = 1, when clicking, widens the width of the panel 1, narrows the width of the panel 2, and hides the contents in the panel 2.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 04:42:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-the-div-that-can-be-fold-unfold-on-dashboard/m-p/289173#M18306</guid>
      <dc:creator>yutaka1005</dc:creator>
      <dc:date>2017-10-12T04:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to make the div that can be fold/unfold on dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-the-div-that-can-be-fold-unfold-on-dashboard/m-p/289174#M18307</link>
      <description>&lt;P&gt;To rjthibod&lt;/P&gt;

&lt;P&gt;Thank you for answer!&lt;/P&gt;

&lt;P&gt;I will check your app!&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 04:43:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-the-div-that-can-be-fold-unfold-on-dashboard/m-p/289174#M18307</guid>
      <dc:creator>yutaka1005</dc:creator>
      <dc:date>2017-10-12T04:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to make the div that can be fold/unfold on dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-the-div-that-can-be-fold-unfold-on-dashboard/m-p/289175#M18308</link>
      <description>&lt;P&gt;@yutaka1005, sorry, I do not have access to Splunk ITSI, but whatever I searched online gave expanded Topology Tree view not collapsed. Looking at it seems like it is an accordion.&lt;/P&gt;

&lt;P&gt;I am glad you were able to figure out something as per your requirement.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 16:03:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-the-div-that-can-be-fold-unfold-on-dashboard/m-p/289175#M18308</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-10-12T16:03:00Z</dc:date>
    </item>
  </channel>
</rss>

