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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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