<?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 removed source code (xml, js..) that is displaying in my dashboard? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-removed-source-code-xml-js-that-is-displaying-in-my/m-p/123286#M7240</link>
    <description>&lt;P&gt;Please provide me the app name where you taked your dashboard!&lt;/P&gt;</description>
    <pubDate>Mon, 06 Apr 2015 10:00:48 GMT</pubDate>
    <dc:creator>ngatchasandra</dc:creator>
    <dc:date>2015-04-06T10:00:48Z</dc:date>
    <item>
      <title>How to removed source code (xml, js..) that is displaying in my dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-removed-source-code-xml-js-that-is-displaying-in-my/m-p/123282#M7236</link>
      <description>&lt;P&gt;I want to remove description of source code (xml, js...) in main display of dashboard.&lt;BR /&gt;
how can I remove it?&lt;BR /&gt;
I don't know why it is added.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2015 05:37:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-removed-source-code-xml-js-that-is-displaying-in-my/m-p/123282#M7236</guid>
      <dc:creator>sheila48</dc:creator>
      <dc:date>2015-04-06T05:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to removed source code (xml, js..) that is displaying in my dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-removed-source-code-xml-js-that-is-displaying-in-my/m-p/123283#M7237</link>
      <description>&lt;P&gt;In which app are take your dashboard?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2015 06:56:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-removed-source-code-xml-js-that-is-displaying-in-my/m-p/123283#M7237</guid>
      <dc:creator>ngatchasandra</dc:creator>
      <dc:date>2015-04-06T06:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to removed source code (xml, js..) that is displaying in my dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-removed-source-code-xml-js-that-is-displaying-in-my/m-p/123284#M7238</link>
      <description>&lt;P&gt;Hi  sheila48 &lt;BR /&gt;
open your dashboard source code XML  and delete this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;description&amp;gt; your  Dashboard description &amp;lt;/description&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Apr 2015 08:15:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-removed-source-code-xml-js-that-is-displaying-in-my/m-p/123284#M7238</guid>
      <dc:creator>chimell</dc:creator>
      <dc:date>2015-04-06T08:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to removed source code (xml, js..) that is displaying in my dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-removed-source-code-xml-js-that-is-displaying-in-my/m-p/123285#M7239</link>
      <description>&lt;P&gt;I don't mean the description.&lt;/P&gt;

&lt;P&gt;========================  website view in dashboard  =======================&lt;BR /&gt;
------------------ ---------------------------------my implementation (XML) ---------------------------------------&lt;BR /&gt;
| CHART XXX&lt;BR /&gt;
| TABLE OOO&lt;BR /&gt;
| ......&lt;BR /&gt;
--------------------- from here, I don't implement in XML but show detail as below ---------------------&lt;BR /&gt;
| description&lt;/P&gt;

&lt;H1&gt;| Sourcecode [link_switch.js] [simple_chart.xml]&lt;/H1&gt;

&lt;P&gt;&amp;lt;&amp;lt;=== I want to remove here.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:23:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-removed-source-code-xml-js-that-is-displaying-in-my/m-p/123285#M7239</guid>
      <dc:creator>sheila48</dc:creator>
      <dc:date>2020-09-28T19:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to removed source code (xml, js..) that is displaying in my dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-removed-source-code-xml-js-that-is-displaying-in-my/m-p/123286#M7240</link>
      <description>&lt;P&gt;Please provide me the app name where you taked your dashboard!&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2015 10:00:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-removed-source-code-xml-js-that-is-displaying-in-my/m-p/123286#M7240</guid>
      <dc:creator>ngatchasandra</dc:creator>
      <dc:date>2015-04-06T10:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to removed source code (xml, js..) that is displaying in my dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-removed-source-code-xml-js-that-is-displaying-in-my/m-p/123287#M7241</link>
      <description>&lt;P&gt;Hi sheila &lt;BR /&gt;
Just follow these instructions&lt;BR /&gt;
1- create a view dashboard using your dashboard source code xml&lt;BR /&gt;
2- copy your source code js and css , go to $SPLUNK_HOME/etc/apps//appserver/static/  paste them .&lt;BR /&gt;
3-Go to Settings &amp;gt; User Interface &amp;gt;Navigation menu choose your app , click on default and add &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;view name="yourview-name" /&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Let test with the following xml , js,and css source code extract from dashboard example 6.x app &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   xml source code 



&amp;lt;dashboard script="custom_chart.js, autodiscover.js" stylesheet="custom_chart.css"&amp;gt;
        &amp;lt;label&amp;gt;Custom Chart Overlay&amp;lt;/label&amp;gt;
        &amp;lt;row grouping="2"&amp;gt;
        &amp;lt;html&amp;gt;
        &amp;lt;h2&amp;gt;Line + Bar Chart&amp;lt;/h2&amp;gt;
        &amp;lt;div id="chart1" /&amp;gt;
        &amp;lt;/html&amp;gt;
        &amp;lt;table id="table1"&amp;gt;
        &amp;lt;searchString&amp;gt;index=_internal | timechart span=1h count as total | appendcols [ search index=_internal (sourcetype=splunk_web_access OR sourcetype=splunkd_access) | timechart span=1h count by sourcetype ] | table _time splunk_web_access splunkd_access total&amp;lt;/searchString&amp;gt;
        &amp;lt;earliestTime&amp;gt;-1d@d&amp;lt;/earliestTime&amp;gt;
        &amp;lt;latestTime&amp;gt;@d&amp;lt;/latestTime&amp;gt;
        &amp;lt;/table&amp;gt;
        &amp;lt;/row&amp;gt;
        &amp;lt;row&amp;gt;
        &amp;lt;html&amp;gt;
        &amp;lt;h2&amp;gt;With Auto-Discovery&amp;lt;/h2&amp;gt;
        &amp;lt;div id="chart-search2"
        class="splunk-manager"
        data-require="splunkjs/mvc/searchmanager"
        data-options='{
        "earliest_time": "-1d@d",
        "latest_time": "@d",
        "search": "index=_internal | timechart span=1h count as total | appendcols [ search index=_internal NOT (sourcetype=splunk_web_access OR sourcetype=splunkd_access) | timechart span=1h count by sourcetype ] | eval time=strftime(_time, \"%H\") | table time * total"
        }'&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div id="chart2"
        class="splunk-view"
        data-require="splunkjs/mvc/d3chart/d3chartview"
        data-options='{
        "managerid": "chart-search2",
        "type": "linePlusBarChart"
        }'&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;/html&amp;gt;
        &amp;lt;/row&amp;gt;
        &amp;lt;/dashboard&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;this is custom_chart.js&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    `/*
     * A custom chart example based on the d3chartview of the web framework.
     * The component is initialized in Javascript which provides more flexibility and formatting options.
     */
    require([
        'underscore',
        'jquery',
        'splunkjs/mvc/utils',
        'splunkjs/mvc',
        'splunkjs/mvc/d3chart/d3chartview',
        'util/moment',
        'splunkjs/mvc/simplexml/ready!'
    ], function(_, $, utils, mvc, D3ChartView, moment) {

        // Re-use the search manager of the results table
        var tableManagerid = mvc.Components.get('table1').settings.get('managerid');

        // Create the D3 chart view
        var chart = new D3ChartView({
            "id": "chart1",
            "managerid": tableManagerid,
            "type": "linePlusBarChart",
            "el": $('#chart1')
        }).render();

        chart.settings.set("setup", function(chart) {
            // Configure chart formatting
            chart.color(d3.scale.category10().range());
            chart.margin({right: 100, left: 80, top: 70, bottom: 70 });

            // Set labels for Y axis on the left and on the right hand side
            chart.y1Axis.axisLabel("Access Events");
            chart.y2Axis.axisLabel("Total Events");


            // Format the X-Axis labels
            var start = moment().startOf('day').subtract(1, 'day').toDate(), end = moment().startOf('day').toDate();
            var xScale = d3.time.scale.utc().domain([start, end]);
            chart.xAxis.scale(xScale);
            chart.xAxis.tickValues(xScale.ticks(d3.time.hours.utc, 1));
            chart.xAxis.tickFormat(function(d) {
                var format = d3.time.format("%I %p");
                return format(new Date(d));
            });
            chart.xAxis.rotateLabels(45);
            chart.xAxis.axisLabel("Time of Day");
        });

    });
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;this is autodiscover.js&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    require.config({
    paths: {
    "app": "../app"
    }
    });
    require(['splunkjs/mvc/simplexml/ready!'], function(){
    require(['splunkjs/ready!'], function(){
    // The splunkjs/ready loader script will automatically instantiate all elements
    // declared in the dashboard's HTML.
    });
    });
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This custom_chart.css&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    #chart1, #chart2 {
    height: 450px;
    }
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Apr 2015 11:23:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-removed-source-code-xml-js-that-is-displaying-in-my/m-p/123287#M7241</guid>
      <dc:creator>chimell</dc:creator>
      <dc:date>2015-04-06T11:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to removed source code (xml, js..) that is displaying in my dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-removed-source-code-xml-js-that-is-displaying-in-my/m-p/123288#M7242</link>
      <description>&lt;P&gt;This is an answer to an old topic.  But I did get inn to same problem my self.&lt;BR /&gt;
For some reason my dashboard started showing it code in the bottom of my dashboards.&lt;BR /&gt;
Not sure how it got there, but I could not get rid of it.&lt;/P&gt;

&lt;P&gt;Then I guessed it was som sort of debugging.&lt;BR /&gt;
So I just closed my Splunk, and open a new window.&lt;BR /&gt;
When I the went back to the same view, the source code was gone.&lt;/P&gt;

&lt;P&gt;So I guess its for debugging, and goes away when you close the window &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2016 15:38:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-removed-source-code-xml-js-that-is-displaying-in-my/m-p/123288#M7242</guid>
      <dc:creator>lakromani</dc:creator>
      <dc:date>2016-03-11T15:38:44Z</dc:date>
    </item>
  </channel>
</rss>

