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
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...