
Migration Issues
This release of Splunk contains various changes with respect to app development. This topic discusses migration issues from Splunk 5.x to Splunk 6 for app developers.
Flash charting not available in simple XML dashboards
Flash charting that is available in both simple XML and advanced XML in Splunk 5.x is no longer supported in Splunk 6.x.
This change provides a more consistent dashboard user experience for iOS devices and PDF generation.
Splunk silently ignores any charting options that previously triggered the rendering of FlashCharts. Some charts may render differently in Splunk 6.x as a result.
Redesign charts using JavaScript charting or export the dashboard as HTML and reimpelement using JavaScript.
However, exporting a dashboard as HTML can affect integrated PDF generation.
JavaScript and CSS support changes
The rendering engine for simple XML dashboards has been completely refactored in Splunk 6. Many of the function calls that are used in application.js
and application.css
no longer work.
For backward compatibility, in Splunk 6, simple xml dashboards no longer load application.js
and application.css
automatically. Instead, simple XML dashboards in Splunk 6 load dashboard.js
and dashboard.css
.
You can control the loading of specific JavaScript and CSS files within the configuration of each simple xml dashboard using the script and stylesheet attributes to the dashboard element. For example:
<dashboard script="myJavaScript.js" stylesheet="myStylesheet.css">. . .
For dashboards prior to Splunk 6, you can import application.js
and application.css
files using the dashboard element attributes, as shown in the above example.
Viewstates are no longer supported in simple XML
Chart options that were saved in viewstates are no longer layered in dashboard rendering.
Dynamic chart resizing no longer persists beyond the page view.
You need to manually migrate these chart options to the simple xml view configuration.
Implement persistence in charts using simple xml options. For example:
<chart>. . .
<option name="height">300px</option> . . .
For security purposes, JavaScript is no longer allowed with nav default.xml.
For example, the Search app packaged with Splunk 5.x contain a navigation item with the link Create new dashboard.... In Splunk 6, this link would not be functional.
Remove any JavaScript in the default.xml configuration and redesign access to any link previously supported.
App icon directory has changed
The directory Splunk Web looks for appIcon.png has changed.
In Splunk 6:
- $SPLUNK_HOME/etc/apps/<app_name>/static/
Previously, in Splunk 5.x:
/appserver/static/
Place app icons in the new location for Splunk 6.
New Splunk Search view page
Splunk 6.0 introduces a new search page search as a replacement to the existing flashtimeline.
While flashtimeline is still packaged in the product, all references to flashtimeline within an app should be changed to now reference search.
This includes references within nav default.xml and references within any dashboard views (mainly linkView options).
New global pages available to add to your app
Splunk 6 provides easier access to reports, alerts, dashboards, and data models packaged within your app.
This access is provided using new listing pages: Dashboards, Reports, Alerts, Data Models
You can add navigation to these views in your apps and also to nav default.xml.
Home page searchability for your app
Splunk 6 enables users to run a search query from within the home page, and target specific apps.
To allow users to directly target your app, this must be configured within your app's nav default.xml. Edit nav default.xml with the target view (<nav search_view="search">).
Data Models
Splunk 6.0 introduces data models that can be packaged within apps. Data Models are packaged within:
- $SPLUNK_HOME/etc/apps/<app_name>/default/data/models
Custom HTML dashboards
Added knowledge object to be included in default.meta.
Splunk 6.0 suports dashboard views written entirely in HTML (leveraging the new splunkjs library).
Custom HTML dashboards are packaged here: :$SPLUNK_HOME/etc/apps/<app_name>/default/data/ui/html
These custom HTML dashboards can be referenced in default.meta with the object name [html].
AppBar styling is more restrictive
For consistency between apps, Splunk 6.0 now constrains AppBar customization to color and logo.
To set color, use the color option to the nav element in default.xml. For example:
<nav color="#0072C6">
To set a logo, package appLogo.png within $SPLUNK_HOME/etc/apps/<app_name>/static
Here are the specifications to use for appLogo.png:
Specification | Description |
---|---|
Background | Transparent |
Width | variable |
Height | 40px (80px @2x) |
Margins | ~10px top and bottom (20px @2x)
The 40px width should a 10px space at the top and bottom, so the logo should be 20px tall. However, there is some leeway to go into the margin area, particularly if the logo has any bits that project up or down or it is particularly complex, square or round. |
Search page restyling no longer supported
Splunk 6.0 new search page cannot be customized as it does not load any custom javaScript or CSS.
PREVIOUS Apps and add-ons: an introduction |
NEXT Step 1: Getting started |
This documentation applies to the following versions of Splunk® Enterprise: 6.0, 6.0.1, 6.0.2, 6.0.3, 6.0.4, 6.0.5, 6.0.6, 6.0.7, 6.0.8, 6.0.9, 6.0.10, 6.0.11, 6.0.12, 6.0.13, 6.0.14, 6.0.15, 6.1, 6.1.1, 6.1.2, 6.1.3, 6.1.4, 6.1.5, 6.1.6, 6.1.7, 6.1.8, 6.1.9, 6.1.10, 6.1.11, 6.1.12, 6.1.13, 6.1.14, 6.2.0, 6.2.1, 6.2.2, 6.2.3, 6.2.4, 6.2.5, 6.2.6, 6.2.7, 6.2.8, 6.2.9, 6.2.10, 6.2.11, 6.2.12, 6.2.13, 6.2.14, 6.2.15
Feedback submitted, thanks!