Dashboards & Visualizations

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

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

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

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

Legend

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

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
State of Splunk Careers

Access the Splunk Careers Report to see real data that shows how Splunk mastery increases your value and job satisfaction.

Find out what your skills are worth!