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
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.
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.
@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
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
@ragnaroksg, if possible please add the solution as an answer and accept the same to mark this question answered and for other’s reference.