I'm trying to display a simple input type and html text side by side but they are appearing vertically. I have tried few CSS options but none of them worked.
Sample Panel code
<panel id="panel1">
<input type="text" token="tk1" id="tk1id" searchWhenChanged=“true”>
<label>Refine further?</label>
<prefix> | where </prefix>
</input>
<html id="htmlid">
<p>count: $job.resultCount$</p>
</html>
<event>
<search>
.
.
.
.
</search>
</event>
</panel>
How can I make input and html text appear side by side and events at the bottom? My requirement is to have this in achieved in single panel in XML dashboard. Thanks for any help!
Hi Will,
Thanks! That kind of worked but is there a way to have the html within same panel next to input without creating another panel? Its sort of didn’t align the panels correctly.
Try something like this
<dashboard version="1.1" theme="light">
<label>Events</label>
<row>
<panel id="panel1">
<input type="text" token="tk1" id="tk1id" searchWhenChanged="true">
<label>Refine further?</label>
<prefix> | where </prefix>
</input>
<html id="htmlid">
<p>count: $job.resultCount$</p>
</html>
<event>
<search>
<query>index=_internal</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<option name="list.drilldown">none</option>
</event>
</panel>
<panel depends="$alwaysHide$">
<html>
<style>
#panel1 .dashboard-panel {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
</style>
</html>
</panel>
</row>
</dashboard>
Hi,
Thanks! This almost worked - the alignment is now all rows including panel title, input text, html text and events.
Is there a way to leave title as is and have just input and html tags side by side with events coming down to both of them? Now all of them are in a row with title, input, html and events all are next to next.
Please share your current SimpleXML source demonstrating the issue.
Hi @nnkreddy
Each of the objects you want to be next to each other horizontally need to be in <panel> within the same <row>.
This will produce something like below, is this what you are looking to achieve?
<form version="1.1" theme="light">
<label>xmltest</label>
<fieldset submitButton="false"></fieldset>
<row>
<panel id="input1">
<input type="text" token="tk1" id="tk1id" searchWhenChanged="true">
<label>Refine further?</label>
<prefix> | where </prefix>
</input>
</panel>
<panel id="html1">
<html id="htmlid">
<p>count: $job.resultCount$</p>
</html>
</panel>
</row>
<row>
<panel id="panel1">
<table>
<search>
<query>|makeresults
| eval msg="test" | stats count by msg</query>
</search>
<option name="drilldown">cell</option>
</table>
</panel>
</row>
</form>
Please let me know how you get on and consider adding karma to this or any other answer if it has helped.
Regards
Will