<?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: Why are default values not working for Add-on Builder Configuration/Add-on Setup Parameters? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Why-are-default-values-not-working-for-Add-on-Builder/m-p/607952#M10728</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I can reproduce this behavior on the latest Add-On Builder from Splunkbase. Not sure if it always this way or changed recently.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When creating a new Add-On, you’ll get the default in&amp;nbsp;&lt;/SPAN&gt;bin/&amp;lt;ta&amp;gt;_rh_settings.py&lt;SPAN&gt;&amp;nbsp;as part of the source code as well as client-side in&amp;nbsp;&lt;/SPAN&gt;./appserver/static/js/build/globalConfig.json&lt;BR /&gt;&lt;SPAN&gt;Once the value is changed via the UI, it is saved in&amp;nbsp;&lt;/SPAN&gt;local/&amp;lt;ta&amp;gt;_settings.conf&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If I’m understanding this right then this would fail a new input unless the global setting has been modified at least once through the UI in some way. If someone simply wants to use the default value, they would not actually get that because&amp;nbsp;&lt;/SPAN&gt;helper.get_global_setting&lt;SPAN&gt;&amp;nbsp;tries to read the conf file directly (which does not exist at this point.&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;The workaround is, in case of global settings, to simply go to the page and save the default. This will create the conf file in local and everything works as expected. A more radical alternative is to use the account-level settings only. Since there are no accounts created by default, there will always be a conf file saved there.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The workaround based on&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 02 Aug 2022 16:47:49 GMT</pubDate>
    <dc:creator>dfederschmidt_s</dc:creator>
    <dc:date>2022-08-02T16:47:49Z</dc:date>
    <item>
      <title>Why are default values not working for Add-on Builder Configuration/Add-on Setup Parameters?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Why-are-default-values-not-working-for-Add-on-Builder/m-p/607847#M10724</link>
      <description>&lt;P&gt;Shouldn't the "Default value" for this 'Add-on Setup Parameter' get saved in the respective conf file's default file? Or do anything, for that matter? I see it the 'Display initial text' renders when the Configuration UI is loaded but since no value for this is set in the 'default' file there effectively is no value set anywhere - resulting in a broken add-on since it's not "fully configured".&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sloshburch_1-1659407405679.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/20805i8BAF98BC85CF7444/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sloshburch_1-1659407405679.png" alt="sloshburch_1-1659407405679.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Said another way: The default values for Add-on Setup Parameters don't seem to get saved into the respective default conf file created (&lt;/SPAN&gt;default/&amp;lt;ta_name&amp;gt;.conf&lt;SPAN&gt;). Conversely, any default values for the Data Input properties do get saved in the proper place in&amp;nbsp;&lt;/SPAN&gt;default/inputs.conf&lt;SPAN&gt;&amp;nbsp;. I see some of this info is saved in the&amp;nbsp;&lt;/SPAN&gt;&amp;lt;ta_name&amp;gt;_rh_settings&lt;SPAN&gt;&amp;nbsp;but that seems to only handle the setup pages. The result of this missing default config is that when I try to save a new instantiation of the input it won't work because it's missing those critical Add-on Setup Parameters. I'm not AoB expert so maybe I'm doing something wrong here?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Cross post:&amp;nbsp;&lt;A href="https://splunk-usergroups.slack.com/archives/C04DC8JJ6/p1659404655720859" target="_blank" rel="noopener"&gt;https://splunk-usergroups.slack.com/archives/C04DC8JJ6/p1659404655720859&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 14:37:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Why-are-default-values-not-working-for-Add-on-Builder/m-p/607847#M10724</guid>
      <dc:creator>sloshburch</dc:creator>
      <dc:date>2022-08-02T14:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: Why are default values not working for Add-on Builder Configuration/Add-on Setup Parameters?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Why-are-default-values-not-working-for-Add-on-Builder/m-p/607949#M10727</link>
      <description>&lt;P&gt;Ok, I'm pretty sure this is a bug so I filed&amp;nbsp;TAB-3048&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 16:11:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Why-are-default-values-not-working-for-Add-on-Builder/m-p/607949#M10727</guid>
      <dc:creator>sloshburch</dc:creator>
      <dc:date>2022-08-02T16:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: Why are default values not working for Add-on Builder Configuration/Add-on Setup Parameters?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Why-are-default-values-not-working-for-Add-on-Builder/m-p/607952#M10728</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I can reproduce this behavior on the latest Add-On Builder from Splunkbase. Not sure if it always this way or changed recently.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When creating a new Add-On, you’ll get the default in&amp;nbsp;&lt;/SPAN&gt;bin/&amp;lt;ta&amp;gt;_rh_settings.py&lt;SPAN&gt;&amp;nbsp;as part of the source code as well as client-side in&amp;nbsp;&lt;/SPAN&gt;./appserver/static/js/build/globalConfig.json&lt;BR /&gt;&lt;SPAN&gt;Once the value is changed via the UI, it is saved in&amp;nbsp;&lt;/SPAN&gt;local/&amp;lt;ta&amp;gt;_settings.conf&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If I’m understanding this right then this would fail a new input unless the global setting has been modified at least once through the UI in some way. If someone simply wants to use the default value, they would not actually get that because&amp;nbsp;&lt;/SPAN&gt;helper.get_global_setting&lt;SPAN&gt;&amp;nbsp;tries to read the conf file directly (which does not exist at this point.&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;The workaround is, in case of global settings, to simply go to the page and save the default. This will create the conf file in local and everything works as expected. A more radical alternative is to use the account-level settings only. Since there are no accounts created by default, there will always be a conf file saved there.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The workaround based on&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 16:47:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Why-are-default-values-not-working-for-Add-on-Builder/m-p/607952#M10728</guid>
      <dc:creator>dfederschmidt_s</dc:creator>
      <dc:date>2022-08-02T16:47:49Z</dc:date>
    </item>
  </channel>
</rss>

