So, I am trying to get a progress bar button in Splunk Dashboard, which will work on click button.
Here is what i done :
I have created a 2 files under /opt/splunk/etc/apps/MY_APP/appserver/static/button.js and button.css
code for button.js is :
*****************************************************
function move() {
var elem = document.getElementById("myBar");
var width = 1;
var id = setInterval(frame, 10);
function frame() {
if (width >= 100) {
clearInterval(id);
} else {
width++;
elem.style.width = width + '%';
}
}
}
*****************************************
Code for prog.css is :
******************************************
#myProgress {
width: 100%;
background-color: #ddd;
}
#myBar {
width: 1%;
height: 30px;
background-color: #4CAF50;
}
************************************************
Now here is my code for Dashboard where i can calling button.css and button.js file ( button.css works fine)
testdash
<panel>
<html>
Click Me
***********************************************
please find an Image below for your reference .
Button.js is still not working.
Any suggestion ?
... View more