<?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: Hide/contract the drilldown table in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hide-contract-the-drilldown-table/m-p/24081#M684</link>
    <description>&lt;P&gt;afterwards meaning after what, exactly? Can you spell out what condition you'd like to result in the hiding of the drilldown table?&lt;/P&gt;</description>
    <pubDate>Thu, 07 Feb 2013 20:49:47 GMT</pubDate>
    <dc:creator>sideview</dc:creator>
    <dc:date>2013-02-07T20:49:47Z</dc:date>
    <item>
      <title>Hide/contract the drilldown table</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hide-contract-the-drilldown-table/m-p/24080#M683</link>
      <description>&lt;P&gt;I have drilldowns in my Table module. When I click on any row, the drilldown table will present itself. &lt;/P&gt;

&lt;P&gt;Is there a way to hide this drilldown table afterwards? Would I need to create custom behavior on this table? &lt;/P&gt;

&lt;P&gt;I would like the panel to also shrink back in size when the drilldown is hiding.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2013 20:24:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hide-contract-the-drilldown-table/m-p/24080#M683</guid>
      <dc:creator>cmak</dc:creator>
      <dc:date>2013-02-07T20:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: Hide/contract the drilldown table</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hide-contract-the-drilldown-table/m-p/24081#M684</link>
      <description>&lt;P&gt;afterwards meaning after what, exactly? Can you spell out what condition you'd like to result in the hiding of the drilldown table?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2013 20:49:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hide-contract-the-drilldown-table/m-p/24081#M684</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-02-07T20:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: Hide/contract the drilldown table</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hide-contract-the-drilldown-table/m-p/24082#M685</link>
      <description>&lt;P&gt;That can be flexible, as long as it works. Perhaps clicking on the same row of the original table? Maybe an additional button that hides the drilldown?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2013 21:16:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hide-contract-the-drilldown-table/m-p/24082#M685</guid>
      <dc:creator>cmak</dc:creator>
      <dc:date>2013-02-07T21:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Hide/contract the drilldown table</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hide-contract-the-drilldown-table/m-p/24083#M686</link>
      <description>&lt;P&gt;Is the idea just that your users want to reclaim that space on the dashboard after they've had a look at the inline drilldown?  If so I think a little close-button would make the most sense, and a customBehavior is probably the best way to go.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2013 21:25:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hide-contract-the-drilldown-table/m-p/24083#M686</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-02-07T21:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: Hide/contract the drilldown table</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hide-contract-the-drilldown-table/m-p/24084#M687</link>
      <description>&lt;P&gt;Yes that is the idea. What is the Javascript function to hide a table and collapse all the empty white space? Simply hiding the table with CSS or .hide() does not take away any of the empty whitespace&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2013 21:37:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hide-contract-the-drilldown-table/m-p/24084#M687</guid>
      <dc:creator>cmak</dc:creator>
      <dc:date>2013-02-07T21:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: Hide/contract the drilldown table</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hide-contract-the-drilldown-table/m-p/24085#M688</link>
      <description>&lt;P&gt;Another problem I can foresee with having a button is that the button must be outside of any Pulldown, as the HTML module is reloaded for every downstream push and any event listeners are lost.&lt;/P&gt;

&lt;P&gt;Adding:&lt;/P&gt;

&lt;P&gt;.layoutCellInner.dashboardCell&lt;BR /&gt;
{&lt;BR /&gt;
    min-height:0 !important;&lt;BR /&gt;
}   &lt;/P&gt;

&lt;P&gt;to the application.css makes the height dynamic to the contents. I can have one button outside of all the pulldowns that hides all the drilldown tables&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2013 22:37:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hide-contract-the-drilldown-table/m-p/24085#M688</guid>
      <dc:creator>cmak</dc:creator>
      <dc:date>2013-02-07T22:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: Hide/contract the drilldown table</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hide-contract-the-drilldown-table/m-p/24086#M689</link>
      <description>&lt;P&gt;I ended up using a link with a javascript onclick function. When clicked, the function would hide the appropriate modules.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Feb 2013 00:30:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hide-contract-the-drilldown-table/m-p/24086#M689</guid>
      <dc:creator>cmak</dc:creator>
      <dc:date>2013-02-08T00:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: Hide/contract the drilldown table</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hide-contract-the-drilldown-table/m-p/24087#M690</link>
      <description>&lt;P&gt;Here's a more involved answer that tries to take care of some of the less trivial usability issues.  It implements a little close-button on the second table's header,  and basically when this close button is clicked it causes the first table to deselect and all downstream config to be hidden. &lt;/P&gt;

&lt;P&gt;Part 1)   The XML for the example&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;module name="Search" layoutPanel="panel_row1_col1" autoRun="True"&amp;gt;
  &amp;lt;param name="search"&amp;gt;index=_internal source="*metrics.log" group="per_sourcetype_thruput" | stats avg(eps) by series | sort - avg(eps)&amp;lt;/param&amp;gt;
  &amp;lt;param name="earliest"&amp;gt;-2h&amp;lt;/param&amp;gt;

  &amp;lt;module name="HTML"&amp;gt;
    &amp;lt;param name="html"&amp;gt;&amp;lt;![CDATA[
      &amp;lt;h2&amp;gt;Sourcetypes and their average event throughput $search.timeRange.label$&amp;lt;/h2&amp;gt;
    ]]&amp;gt;&amp;lt;/param&amp;gt;
  &amp;lt;/module&amp;gt;
  &amp;lt;module name="JobProgressIndicator"&amp;gt;&amp;lt;/module&amp;gt;
  &amp;lt;module name="Pager"&amp;gt;
    &amp;lt;module name="Table"&amp;gt;
      &amp;lt;param name="customBehavior"&amp;gt;closeButtonHidesAllChildrenAndClearsSelection&amp;lt;/param&amp;gt;

      &amp;lt;module name="Search"&amp;gt;
        &amp;lt;param name="search"&amp;gt;index=* OR index=_* sourcetype="$row.fields.series$" | stats count by source | sort - count&amp;lt;/param&amp;gt;
        &amp;lt;param name="earliest"&amp;gt;-2h&amp;lt;/param&amp;gt;

        &amp;lt;module name="HTML"&amp;gt;
          &amp;lt;param name="html"&amp;gt;&amp;lt;![CDATA[
            &amp;lt;div style="float:right"&amp;gt;&amp;lt;a class="splIcon splIcon-close"&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;
            &amp;lt;h2&amp;gt;$results.count$ source(s) that have sourcetype=$row.fields.series$&amp;lt;/h2&amp;gt;
          ]]&amp;gt;&amp;lt;/param&amp;gt;
          &amp;lt;param name="customBehavior"&amp;gt;closeButtonContractsDrilldownTable&amp;lt;/param&amp;gt;
        &amp;lt;/module&amp;gt;

        &amp;lt;module name="JobProgressIndicator"&amp;gt;&amp;lt;/module&amp;gt;
        &amp;lt;module name="Pager"&amp;gt;
          &amp;lt;module name="Table"&amp;gt;&amp;lt;/module&amp;gt;
        &amp;lt;/module&amp;gt;

      &amp;lt;/module&amp;gt;
    &amp;lt;/module&amp;gt;
  &amp;lt;/module&amp;gt;
&amp;lt;/module&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Part 2)  The JS for the customBehaviors.  Put this in application.js &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;if (typeof(Sideview)!="undefined") {
    // in this simple implementation there can only be one of these per page.

    // we just define a simple variable.
    var primaryTableModule;

    // and then use a customBehavior to just point our variable at the first table.
    Sideview.utils.declareCustomBehavior("closeButtonHidesAllChildrenAndClearsSelection", function(tableModule) {
        primaryTableModule = tableModule;
    });

    // then we use a customBehavior on the HTML module that will set up an 
    // event handler on the close button, that folds up all the drilldown
    // config and clears the selection.
    Sideview.utils.declareCustomBehavior("closeButtonContractsDrilldownTable", function(htmlModule) {
        var existingMethodReference = htmlModule.renderHTML.bind(htmlModule);
        htmlModule.renderHTML = function(context) {
            existingMethodReference(context);
            $(".splIcon-close",this.container).click(function() {
                // step 1 - tell the first table to hide all its descendants. 
                // it is best to use the visibilityMode system of the Splunk UI
                // lest you find yourself fighting it later. =) 
                var visibilityMode = primaryTableModule.drilldownVisibilityKey + primaryTableModule.moduleId;
                primaryTableModule.hideDescendants(visibilityMode);
                // step 2 - clear the highlighted row.
                primaryTableModule.clearSelection();
                // step 3 - call reset on all the descendants. 
                primaryTableModule.withEachDescendant(function(module) {
                    module.reset();
                });
            });
        }
    });
}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Feb 2013 01:07:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hide-contract-the-drilldown-table/m-p/24087#M690</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-02-08T01:07:46Z</dc:date>
    </item>
  </channel>
</rss>

