<?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: Writing Out to beforeLabel on SingleValue in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Writing-Out-to-beforeLabel-on-SingleValue/m-p/98465#M5455</link>
    <description>&lt;P&gt;And below is the answer I eventually came up with after digging out the SingleValue module code &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; This code will look for a particular text match in your beforeLabel and apply a static link to it. You can extend this easily to add a link across the result and afterLabel too.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;if (Splunk.Module.SingleValue) {
 Splunk.Module.SingleValue = $.klass(Splunk.Module.SingleValue, {
  renderResults: function($super, result) {
   var retVal = $super(result);
    if (this._before_label=="beforeLabel Text -") {
    $('.singleLabelBefore', this.container).html("&amp;lt;a href='dashboardtolinkto'&amp;gt;beforeLabel Text -&amp;lt;/a&amp;gt;");
    } else if(this._before_label=="different beforeLabel Text -") {
     $('.singleLabelBefore', this.container).html("&amp;lt;a href='diffdashboard'&amp;gt;different beforeLabel Text -&amp;lt;/a&amp;gt;");
    } 
    return retVal;
    }
});
}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 16 Jul 2012 14:47:42 GMT</pubDate>
    <dc:creator>Drainy</dc:creator>
    <dc:date>2012-07-16T14:47:42Z</dc:date>
    <item>
      <title>Writing Out to beforeLabel on SingleValue</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Writing-Out-to-beforeLabel-on-SingleValue/m-p/98464#M5454</link>
      <description>&lt;P&gt;So at the moment there is some jquery I use which I believe @sideview posted some time ago, it begins with;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;if (Splunk.Module.SingleValue) {
    Splunk.Module.SingleValue = $.klass(Splunk.Module.SingleValue, {
        renderResults: function($super, result) {
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now my problem is that I need to change the text to a link to another dashboard. If I use the linkView and linkSearch then it will pass a search through, I just want to link directly to another dashboard without using the view results link.&lt;/P&gt;

&lt;P&gt;So, I decided to try and re-write the above to access the beforelabel but with little to no effect.&lt;BR /&gt;
If anyone has any suggestions on how I could achieve this then I would be glad to hear it. I just need to do a text match on the contents of the beforeLabel and then assign a static URL to a custom dashboard for that text.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jul 2012 15:43:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Writing-Out-to-beforeLabel-on-SingleValue/m-p/98464#M5454</guid>
      <dc:creator>Drainy</dc:creator>
      <dc:date>2012-07-13T15:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: Writing Out to beforeLabel on SingleValue</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Writing-Out-to-beforeLabel-on-SingleValue/m-p/98465#M5455</link>
      <description>&lt;P&gt;And below is the answer I eventually came up with after digging out the SingleValue module code &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; This code will look for a particular text match in your beforeLabel and apply a static link to it. You can extend this easily to add a link across the result and afterLabel too.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;if (Splunk.Module.SingleValue) {
 Splunk.Module.SingleValue = $.klass(Splunk.Module.SingleValue, {
  renderResults: function($super, result) {
   var retVal = $super(result);
    if (this._before_label=="beforeLabel Text -") {
    $('.singleLabelBefore', this.container).html("&amp;lt;a href='dashboardtolinkto'&amp;gt;beforeLabel Text -&amp;lt;/a&amp;gt;");
    } else if(this._before_label=="different beforeLabel Text -") {
     $('.singleLabelBefore', this.container).html("&amp;lt;a href='diffdashboard'&amp;gt;different beforeLabel Text -&amp;lt;/a&amp;gt;");
    } 
    return retVal;
    }
});
}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Jul 2012 14:47:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Writing-Out-to-beforeLabel-on-SingleValue/m-p/98465#M5455</guid>
      <dc:creator>Drainy</dc:creator>
      <dc:date>2012-07-16T14:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: Writing Out to beforeLabel on SingleValue</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Writing-Out-to-beforeLabel-on-SingleValue/m-p/98466#M5456</link>
      <description>&lt;P&gt;Thanks for this! &lt;BR /&gt;
Adding a link to a single value is unnecessarily difficult, you've been a great help&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2013 14:33:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Writing-Out-to-beforeLabel-on-SingleValue/m-p/98466#M5456</guid>
      <dc:creator>606866581</dc:creator>
      <dc:date>2013-05-28T14:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: Writing Out to beforeLabel on SingleValue</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Writing-Out-to-beforeLabel-on-SingleValue/m-p/98467#M5457</link>
      <description>&lt;P&gt;No worries, glad it helped &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2013 14:41:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Writing-Out-to-beforeLabel-on-SingleValue/m-p/98467#M5457</guid>
      <dc:creator>Drainy</dc:creator>
      <dc:date>2013-05-28T14:41:40Z</dc:date>
    </item>
  </channel>
</rss>

