All Apps and Add-ons

Copy Value From Table to ClipBoard

ho000dor
Explorer

Hello,

I have a table module that passes data to an html module. I was wondering if when the user clicks the data, the field value can be automatically copied to the users clipboard and another URL opened? I don't want to pass any values to the other URL.

search TESTSEARCH | table TEST_URL

10

$row.fields.TEST_URL$]]>

sideview
SplunkTrust
SplunkTrust

It would be awesome if Javascript could do this, but it cannot. Not directly, and it's more of a security thing.

Which leaves two kinds of solutions, broadly speaking
1) solutions which rely on some external component like Flash or Java or activeX and so on and so forth.
2) solutions that display the text to the user, and select it for them, and that tell them to type Ctrl-C.

Both of these directions are pretty lame... The first one is outright horrifying and I really really do not advise it, and the second one is just awkward usability.

If you can tell me more about the use case, there might be another way. For example if the content needs to be POST'ed to the page in question rather than being sent as a mere GET argument, there are ways to do that. Or we could do some pretty powerful things with a custom python controller. The devil is in the details.

ho000dor
Explorer

The solution i'm trying to achieve is with the table module. The table content includes lookup values. The content is contact info that is used on another URL. I can copy the value no problem and paste it in the destination URL but i'm lazy and have had good fortune with splunk so far.

Also, the destination URL doesn't contain anything in the URL that would reference the contact info so click param in the redirector module might not be the answer. This is not important, its just to remove some monotony from the users job and seems like a fun experiment.

0 Karma

ho000dor
Explorer
<module name="Search" group="TEST">
<param name="search">search TESTSEARCH | table TEST_CONTENT</param>
<module name="Table" layoutPanel="panel_row3_col1">
<param name="count">10</param>


<module name="HTML" group="row.fields.TEST_CONTENT">
<param name="html"><![CDATA[<a href="$row.fields.TEST_CONTENT$">$row.fields.TEST_CONTENT$</a>]]></param>
</module> 
</module> 
</module>
0 Karma
Get Updates on the Splunk Community!

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...