Dashboards & Visualizations

Is it possible to add a "text box" in a cell using only XML/CSS?

splunk6161
Path Finder

Hi
Is it possible to add a "text box" in a cell using only XML/CSS?
I'd like to write inside it.

Request:
alt text

Target Ex. Insert a number in first row:
alt text

Thanks

Tags (5)
0 Karma

niketn
Legend

[UPDATED ANSWER]

If your requirement is to add Text Box to table Cell you will have to extend the Table Cell Renderer using Simple XML JS Extension and SplunkJS stack. Just CSS will not be enough. Refer to one of my older answer for a similar use case: https://answers.splunk.com/answers/682183/how-to-add-a-textbox-as-a-cell-in-a-splunk-table.html

@splunk6161 this should be possible directly via Splunk SPL (and tokens in dashboard if you have the Ticket number as token for the first row). There is no need for CSS override.

Following is the SPL which generates the sample table as per your question

| makeresults count=5
| fields - _time
| eval Ticket="Text Area",ID=random(),TRATTA="Some Text ".random()
| table Ticket ID TRATTA

Following query needs to be added to the above in order to get the row numbers using streamstats and then replace the Ticket value where row number is 1 using case() statement (also at the same time the remaining Ticket values are set to null).

| streamstats count as rowNum
| eval Ticket=case(rowNum=1,random())
| fields - rowNum
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

splunk6161
Path Finder

Hi @niketnilay
Sorry but my question was another.
I'd like to write inside of "text area", like a form "< input type="text" >" in HTML5, without use the token.
In pic "Target", the number in first row its only an example, i'd like to write manually "12345678" inside the "text area".
Thanks

0 Karma

niketn
Legend

I have added a reference to my older answer. This would not be possible with JS.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...