<?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 dynamically display the username of the current logged in user in the app navigation menu? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-dynamically-display-the-username-of-the-current-logged-in/m-p/257127#M16145</link>
    <description>&lt;P&gt;I work for a customer that want this in the nav menu =s (For me it's useless...)&lt;/P&gt;</description>
    <pubDate>Wed, 18 May 2016 12:54:49 GMT</pubDate>
    <dc:creator>MaryvonneMB</dc:creator>
    <dc:date>2016-05-18T12:54:49Z</dc:date>
    <item>
      <title>How to dynamically display the username of the current logged in user in the app navigation menu?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-dynamically-display-the-username-of-the-current-logged-in/m-p/257125#M16143</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I would like to put the current username in the app navigation menu. New on Splunk and I don't understand everything.&lt;/P&gt;

&lt;P&gt;I guess one way is to use a parameter in the default.xml file. For example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;param name="search"&amp;gt;search | rest /services/authentication/current-context | table username&amp;lt;/param&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Found on this post:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/338919/how-do-i-get-the-current-logged-in-username-in-spl.html"&gt;https://answers.splunk.com/answers/338919/how-do-i-get-the-current-logged-in-username-in-spl.html&lt;/A&gt;&lt;BR /&gt;
But I don't know how to set a view name dynamically.&lt;/P&gt;

&lt;P&gt;I think it could be possible to use JavaScript, but I'm not very comfortable with it.&lt;/P&gt;

&lt;P&gt;If someone can help me, it will be pretty cool (even with a JS solution if there's great explications ^^)&lt;/P&gt;

&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2016 12:02:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-dynamically-display-the-username-of-the-current-logged-in/m-p/257125#M16143</guid>
      <dc:creator>MaryvonneMB</dc:creator>
      <dc:date>2016-05-18T12:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically display the username of the current logged in user in the app navigation menu?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-dynamically-display-the-username-of-the-current-logged-in/m-p/257126#M16144</link>
      <description>&lt;P&gt;Does the current location not suffice?  &lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1376iC5DD56A8110E22AA/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2016 12:49:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-dynamically-display-the-username-of-the-current-logged-in/m-p/257126#M16144</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-05-18T12:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically display the username of the current logged in user in the app navigation menu?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-dynamically-display-the-username-of-the-current-logged-in/m-p/257127#M16145</link>
      <description>&lt;P&gt;I work for a customer that want this in the nav menu =s (For me it's useless...)&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2016 12:54:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-dynamically-display-the-username-of-the-current-logged-in/m-p/257127#M16145</guid>
      <dc:creator>MaryvonneMB</dc:creator>
      <dc:date>2016-05-18T12:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically display the username of the current logged in user in the app navigation menu?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-dynamically-display-the-username-of-the-current-logged-in/m-p/257128#M16146</link>
      <description>&lt;P&gt;Hi MaryvonneMB,&lt;/P&gt;

&lt;P&gt;For use this, the command must be like this only:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| rest /services/authentication/current-context | table username&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Then, you put this inside your XML.&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2016 13:01:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-dynamically-display-the-username-of-the-current-logged-in/m-p/257128#M16146</guid>
      <dc:creator>rafamss</dc:creator>
      <dc:date>2016-05-18T13:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically display the username of the current logged in user in the app navigation menu?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-dynamically-display-the-username-of-the-current-logged-in/m-p/257129#M16147</link>
      <description>&lt;P&gt;Just like this, not in any specific tag?&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2016 13:03:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-dynamically-display-the-username-of-the-current-logged-in/m-p/257129#M16147</guid>
      <dc:creator>MaryvonneMB</dc:creator>
      <dc:date>2016-05-18T13:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically display the username of the current logged in user in the app navigation menu?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-dynamically-display-the-username-of-the-current-logged-in/m-p/257130#M16148</link>
      <description>&lt;P&gt;Finally, dealing with JS I find a solution:&lt;BR /&gt;
I get the last 'a' tag, get the parent (li), duplicate and change children attribute I want. Then I append it to the last &lt;LI&gt;.&lt;/LI&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;var $str = $( ".nav-item.shared-appbar-navitem.nav-item-" ).find($('a[title="DECONNEXION"]'));              
var $li=$str.parent();
$topList=$li.clone()
$topList.children().attr('href',"");
$topList.children().attr('title',"USERNAME");                                                   $topList.children().text(nameShow);                                             
$ul=$li.parent();   
$topList.appendTo($ul);

&amp;lt;/li&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2016 14:06:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-dynamically-display-the-username-of-the-current-logged-in/m-p/257130#M16148</guid>
      <dc:creator>MaryvonneMB</dc:creator>
      <dc:date>2016-05-20T14:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically display the username of the current logged in user in the app navigation menu?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-dynamically-display-the-username-of-the-current-logged-in/m-p/257131#M16149</link>
      <description>&lt;P&gt;I believe The requirement is to display it in a custom dashboard and fetch similar data related to the username&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 12:45:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-dynamically-display-the-username-of-the-current-logged-in/m-p/257131#M16149</guid>
      <dc:creator>arunsundarm</dc:creator>
      <dc:date>2019-05-07T12:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically display the username of the current logged in user in the app navigation menu?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-dynamically-display-the-username-of-the-current-logged-in/m-p/257132#M16150</link>
      <description>&lt;P&gt;I Could not paste this script in the dashboard and it gives an error, can someone give me steps on how to include this in the dashboard&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 12:46:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-dynamically-display-the-username-of-the-current-logged-in/m-p/257132#M16150</guid>
      <dc:creator>arunsundarm</dc:creator>
      <dc:date>2019-05-07T12:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically display the username of the current logged in user in the app navigation menu?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-dynamically-display-the-username-of-the-current-logged-in/m-p/621719#M51028</link>
      <description>&lt;P class="lia-align-left"&gt;What kind of builder are you using for your dashboards?&lt;BR /&gt;&lt;BR /&gt;If it's dashboard studio, I believe it is not possible to render any dynamic JS content.&lt;BR /&gt;&lt;BR /&gt;With the classic dashboard panel I think it would be possible to do so.&lt;/P&gt;&lt;P class="lia-align-left"&gt;In &lt;A title="Differences between splunk dashboard editors" href="https://docs.splunk.com/Documentation/DashApp/0.9.0/DashApp/IntroFrame" target="_blank" rel="noopener"&gt;this url&lt;/A&gt; you can check differences between both of them.&lt;BR /&gt;&lt;BR /&gt;Finally, you got the option with SPLUNK UI, where you can customize everything and in a dynamic way, but it requieres a huge effort for developing the whole solution.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2022 15:31:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-dynamically-display-the-username-of-the-current-logged-in/m-p/621719#M51028</guid>
      <dc:creator>gmontero</dc:creator>
      <dc:date>2022-11-22T15:31:26Z</dc:date>
    </item>
  </channel>
</rss>

