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!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...