Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

How to call a python script from an html view?

$
0
0
We have a Splunk html view. We are trying to call a python script. Currently the code looks like this (retyped since our Splunk server doesn't have web access, I tried to avoid typos): function callScript(){ $.ajax({ type: "POST", url: "bin/my_script.py", data: {'flag': defaultTokenModel.get("form.flag")) }, success: function() { alert("success returned"); } }); } This doesn't work. The success message is returned, but the actual python script isn't called. From what I can tell, it looks like there may be a method called ajax in simplifyxml/mvc.js which is conflicting with the JQuery method, though I'm not certain that is the case. What is the proper way to make a script call like this?

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>