Dashboards & Visualizations

Custom cell properties in html/js

ragnaroksg
New Member

Hi everyone,

I have a Splunk table in HTML and I want to make some of its cell editables.
Is there any way I can add the property "contenteditable"= true to the table from the javascript?

Thanks

0 Karma

DalJeanis
Legend

The general answer is "no", but it depends on what you are trying to achieve.

Splunk is not a database, in that sense, so there is no such thing as "editing" the results of a Splunk search.

On the other hand, it is not difficult to put a javascript layer in front of a Splunk back end, and then let the user modify the data held by the interface, and then do something with that, if you have a business use case.

Given a reasonable use case, you can also create screens and forms that can change the contents of the indexes, for instance by inserting or deleting records. That is definitely not the normal architecture of Splunk, with the exception of certain workflow methodologies. More commonly you might have a way to change the contents of lookup tables.

If you explain more fully what you are trying to accomplish, then we can help further.

0 Karma

ragnaroksg
New Member

I'm getting the data from a kv store and what I'm triying to achieve, is that the user could modify some of the fields. In my case I have 7 columns in the kv store and the user can only modify the last three of them. The problem is that the table and components, appear after the load of the page and the TableElement, so I don't know how to get that table elements.

0 Karma

niketn
Legend

@ragnaroksg, following Splunk Dev Site talks about deletion of a KV pair from collection after which corrected KV Pair can be added. See if this fits your needs: http://dev.splunk.com/view/SP-CAAAEZX

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

ragnaroksg
New Member

Hi, I didn't want to do that, but I've already find the answer. All I had to do was using the method onchange in the table element. Thanks for everything

0 Karma

niketn
Legend

@ragnaroksg, if possible please add the solution as an answer and accept the same to mark this question answered and for other’s reference.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...