All Apps and Add-ons

Splunk Add-on Builder: how do you attach a dashboard with an add-on?

Path Finder

Hi,

I created an add-on using Add-on Builder where, on the User Interface, I have these links:
Inputs | Configuration | Search |Dashboard

I have added the link Dashboard from Settings » User interface » Navigation menus » default
and added the below bold line

< nav search_view="search" color="#65A637" >
< view name="inputs" default="true" / >
< view name="configuration"/ >
< view name="search" label="Search" / >
< a href="http://:8000/en-US/app/search/dashboarddemo" >Dashboard
< / nav >

But the problem is when i save the plugin and install in another system, the dashboard is not found. I have to manually create the dashboard and change the IP in the above href and then it works.

Is there any way that, while downloading the plugin, the dashboard also gets packaged with the plugin? That way, I do not have to manually create it in a new system where I install the AddOn.

I want to share this plugin but nobody should manually create the dashboard and paste the link in the above < nav />

0 Karma

SplunkTrust
SplunkTrust

@sawgata12345

Is dashboarddemo in your addon builder generated app?

If Yes then add

 <view name="dashboarddemo" />

in navigation configuration.

http://dev.splunk.com/view/webframework-developapps/SP-CAAAEP9

0 Karma

Path Finder

No the dashboarddemo is not in the addon builder generated app.
I created the dashboard from the search app ("Create dashboard"), then i created a AddOn using addonbuilder.
then from the setting menu i added the link to the dashboard which i had already created.
Now when I am downloading the "addonexample.spl" file and installing in another machine with splunk there i am getting the Addon with the "Dashboard" on the navigation bar but on clicking the dashboard called "dashboarddemo" is missing.
If i go and create the dashboard (called "dashboarddemo") manually then the nav link from Addon works and opens up the dashboard.

0 Karma

SplunkTrust
SplunkTrust

@sawgata12345

Your app should have your dashboard files and navigation file,

Just follow these steps:
1) Create folder if not exists SPLUNK_HOME/etc//apps/default/data/ui/views/
Reference for folder Structure: http://dev.splunk.com/view/webframework-developapps/SP-CAAAEUC
2) Copy dashboarddemo.xml file:
From: SPLUNK_HOME/etc/search/apps/local/data/ui/views/
To : SPLUNK_HOME/etc//apps/default/data/ui/views/
3) Create folder if not exists: SPLUNK_HOME/etc//apps/default/data/ui/nav/
Create a default.xml file and paste navigation XML.

4) Generate build

0 Karma