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!

[Puzzles] Solve, Learn, Repeat: Dynamic formatting from XML events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  &#x1f680; Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...