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!

Earn a $35 Gift Card for Answering our Splunk Admins & App Developer Survey

Survey for Splunk Admins and App Developers is open now! | Earn a $35 gift card!      Hello there,  Splunk ...

Continuing Innovation & New Integrations Unlock Full Stack Observability For Your ...

You’ve probably heard the latest about AppDynamics joining the Splunk Observability portfolio, deepening our ...

Monitoring Amazon Elastic Kubernetes Service (EKS)

As we’ve seen, integrating Kubernetes environments with Splunk Observability Cloud is a quick and easy way to ...