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!

Laser Bananas and Edge Hubs: Exploring Operational Technology (OT) Data Through a ...

  OT is a different environment to traditional IT and can have interesting challenges when interfacing the ...

Event Series: Mastering AI Tokenomics and Splunk Agent Observability

Beyond the Black Box: Correlating AI Performance and Tokenomics with Splunk Agent Observability   As ...

span_metrics: The OpenTelemetry-Idiomatic Way to See Inside Your Services

You open a trace in Splunk Observability Cloud and everything looks fine. One root span, order-pipeline, with ...