Dashboards & Visualizations

How to create a hyperlink from the column values in a table

aditsss
Builder

Hi Everyone,

 

I have one requirement.  I have one table Dashboard which consists of multiple Columns.

There is one column "url". I want it to be hyperlink so that it can open.

Below is my code:

<row>
<panel>
<table>
<search>
<query>index=abc sourcetype=xyz source="ser.log" $process_tok1$
| rex field=_raw "(?&lt;id&gt;[A_Za-z0-9]{8}[\-][A_Za-z0-9]{4}[\-][A_Za-z0-9]{4}[\-][A_Za-z0-9]{4}[\-][A_Za-z0-9]{12})"
| join type=outer id [inputlookup nifi_api_parent_chains_e1.csv]|search $ckey$|search $usr$
| table _time _raw host id parent_chain url
</query>
<earliest>$field1.earliest$</earliest>
<latest>$field1.latest$</latest>
<sampleRatio>1</sampleRatio>
</search>
<option name="count">100</option>
<option name="dataOverlayMode">none</option>
<option name="drilldown">cell</option>
<option name="percentagesRow">false</option>
<option name="refresh.display">progressbar</option>
<option name="rowNumbers">false</option>
<option name="totalsRow">false</option>
<option name="wrap">true</option>
</table>
</panel>
</row>

I want url column should be a hyperlink . How can I do that.

Thanks in advance.

Labels (2)
0 Karma
1 Solution

ITWhisperer
Legend
<link target="_blank">$row.url|n$</link>

View solution in original post

ITWhisperer
Legend

Use a drilldown which opens a page based on the value of the cell. You could even change the text so that it looks like a link e.g. underlined and blue.

0 Karma

aditsss
Builder

@ITWhisperer 

I have made the below changes but its not working.

Can you guide me where I have gone wrong:

<panel>
<table>
<search>
<query>index=abc sourcetype=xyz source="user.log" $process_tok1$
| rex field=_raw "(?&lt;id&gt;[A_Za-z0-9]{8}[\-][A_Za-z0-9]{4}[\-][A_Za-z0-9]{4}[\-][A_Za-z0-9]{4}[\-][A_Za-z0-9]{12})"
| join type=outer id [inputlookup nifi_api_parent_chains_e1.csv]|search $ckey$|search $usr$|eval ClickHere= url
| table _time _raw host id parent_chain url
</query>
<earliest>$field1.earliest$</earliest>
<latest>$field1.latest$</latest>
<sampleRatio>1</sampleRatio>
</search>
<option name="count">100</option>
<option name="dataOverlayMode">none</option>
<option name="drilldown">cell</option>
<option name="percentagesRow">false</option>
<option name="refresh.display">progressbar</option>
<option name="rowNumbers">false</option>
<option name="totalsRow">false</option>
<option name="wrap">true</option>
<drilldown>
<condition field="url">
<link target="_blank">$url$</link>
</condition>
</drilldown>
</table>
</panel>

0 Karma

ITWhisperer
Legend
<link target="_blank">$row.url|n$</link>

View solution in original post

aditsss
Builder

@ITWhisperer 

 

Thank u so much 

0 Karma
Take the 2021 Splunk Career Survey

Help us learn about how Splunk has
impacted your career by taking the 2021 Splunk Career Survey.

Earn $50 in Amazon cash!