Dashboards & Visualizations

Integrate Django visualization in SimpleXML

jleduc
Explorer

Hello,
I have developed a custom visualization app using django bindings and highcharts: everything works fine, the templates are easy to use... No problem there.
The main issue is that I need to use those Django based visualizations in some other Splunk apps, with SimpleXML dashboards.
I haven't seen anything about that.
Is there a way to integrate Django visualizations in SimpleXML?

Thank you for your help

Rocket66
Communicator

I think, not in an easy way.
Because SimpleXML is straightforward ... without possibilities of integrate modules -> Advanced XML.

I did similar transformation of some (javascript) modules (Advanced XML and Django) in SimpleXML by adding a <html> tag within simpleXML and extend simpleXML by using javascript and render that into a <div>.

<form script="custom_view.js" stylesheet="custom.css">
  <label>Custom View</label>
  <description>Add a custom view</description>
  <fieldset autoRun="true" submitButton="false">
    <input type="time" token="mytime" searchWhenChanged="true">
      <label>Timerange</label>
      <default>
        <earliestTime>-5m</earliestTime>
        <latestTime>now</latestTime>
      </default>
    </input>
  </fieldset>
  <row>
    <html>
      <title>Counter for sourcetypes</title>
      <div id="customview"/>
    </html>
  </row>
</form>

Maybe this approach will be helpful ...

0 Karma

jleduc
Explorer

Thank you for your answer, but in my case it is not sufficient.
Basically in Splunk there are several ways of developing web apps, but there is no way to mix those which is very disappointing...
If you have an app in django, another one in simple XML and you want to mix 2 panels from those 2 apps on a single page: GAMEOVER??
I find it hard to believe, if true this is a major issue.

robertlight
Path Finder

I have a django template (see below) and I'd like to embed this into a simplexml-based page... seems like something like this should be possible.

{% extends "splunkdj:base_with_account_bar.html" %}
{% load splunkmvc %}
{% load demoview %}
{% block content %}
{% demo id="mydemoview" managerid="mysearch" %}
{% endblock content %}

{% block managers %}
{% searchmanager id="mysearch" earliest_time="-3h" search="...my search here...." cache=True %}
{% endblock managers %}

0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...