Hi
I want to know how we can display indexed HTML content in Dashboard.
My sample dashboard xml is below. (Here I have used SAMPLE search which will return HTML content)
<dashboard>
<search>
<query>| stats count | eval A="<h1>My Test HTML</h1>" </query>
<preview>
<set token="A">$result.A$</set>
</preview>
</search>
<label>Test Html</label>
<row>
<panel>
<html> $A$ </html>
</panel>
</row>
</dashboard>
My Expected result is:
My Test HTML
So is it possible without using Javascript? I have tried with javascript and it's working. But we don't want to use Javascript.
Thanks in advance.
Kamlesh
You can (1-way trip) convert your whole panel to html or you can add some html child elements in the XML but only in some nodes. For example, this is allowed in the panel node:
<panel>
<!--title>Foo Bar</title-->
<html>
<div style="text-align: left;">
<h2>Foo Bar</h2>
</div>
</html>
But this results in Invalid child="html" is not allowed in node="dashboard"
:
<dashboard>
<html>
<div style="text-align: left;">
<h2>Foo Bar</h2>
</div>
</html>
HI woodcock,
I just given a sample xml.
Can you please see my comment on @cmerriman's comment??
Thanks
Kamlesh
does this get you what you need:
<dashboard>
<search>
<query>| stats count | eval A="My Test HTML" </query>
<preview>
<set token="A">$result.A$</set>
</preview>
</search>
<label>Test Html</label>
<row>
<panel>
<html> <h1>$A$</h1> </html>
</panel>
</row>
</dashboard>
put the html formatting in the html panels? unless I'm missing something, which is completely possible
Hi @cmerriman,
Thanks for your reply.
Yes we can do this but my index contains the html pages.
My all html page get index in main index and HTMLContent filed has html tags. It Could be table , div or any tag.
Can you please guide me in this scenario.??
Thanks
Kamlesh
Just as a quick thought without testing anything, you could encase the query in CDATA. I'll try to test it out in a bit, bu let you might beat me to it.
Hi @cmerriman,
I have tried with CDATA but no luck. It's showing HTML Decoded value.. like & gt;h1& lt;........
Thanks
Kamlesh