我有一个 splunk 仪表板,其中 2 个面板的尺寸正确,但无论我更改什么,三分之一的高度似乎都与第一高度相关
I've got a splunk dashboard, 2 of the panels are sized correctly, but the thirds height seems to be tied to the firsts no matter what I change
我有以下用于仪表板的代码,在我添加靠近代码末尾的模型名称和尺寸面板之前,它一直运行良好。我一直在使用#singlevalue_ 为每个单独的面板设置布局,它适用于 "Models in Selected Workspace Set" 宽度以及 "Space Remaining in Each Workspace" 高度和宽度。 "Model Name and Size" 面板设置为 300 像素,这种方法可行,但面板又超出面板内容 300 像素,这与仪表板面板的最大高度相匹配。如何强制面板底部的空白坚持 300 像素?
<form>
<label>L3 recreate model Activity</label>
<description>Lists the models in descending order of last time used in the L3 recreate workspaces and their sizes for archival purposes</description>
<fieldset submitButton="false"></fieldset>
<row>
<panel id="singleValuePanel1">
<title>Models in Selected Workspace Set</title>
<input type="dropdown" token="set" searchWhenChanged="true">
<label>Workspace Set</label>
<default>8a81948243cb6a7f0143d9ff2be97e34</default>
<initialValue>8a81948243cb6a7f0143d9ff2be97e34</initialValue>
<fieldForLabel>workspaceName</fieldForLabel>
<fieldForValue>workspaceGuid</fieldForValue>
<search>
<query>workspaceGuid=8a81b09c53248e3d0153f1cab02d7dc5 OR workspaceGuid=8a81948243cb6a7f0143d9ff2be97e34 OR workspaceGuid=8a819488482885c901483c882c6c4fa9 OR workspaceGuid=8a81b0945ef8a5c0015f255c3f8e44a2 | dedup workspaceGuid | stats count by workspaceGuid | lookup model-all workspaceGuid</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
</input>
<input type="text" token="sizeGB" searchWhenChanged="true">
<label>Size Threshold(GB)</label>
<default>1</default>
</input>
<html>
<style>
.dashboard-row .dashboard-panel .panel-element-row {
overflow: auto;
max-height: 600px;
}
#singleValuePanel1{
width: 65% !important;
}
</style>
</html>
<table>
<search>
<query>index=core sourcetype=core $set$ GET_LOGGED_IN_USER=1
| eval lastseen=strftime(_time, "%m-%d-%Y %H:%M:%S")
| stats first(lastseen) by modelGuid
| sort + lastseen
| lookup model-all modelGuid output modelName as "Model Name" workspaceName as "Workspace Name"
| lookup model-dc5prod modelGuid output activeState memoryUsage
| eval "Model Size(GB)" = round(memoryUsage / 1073741824,4)
| search "Model Size(GB)" >$sizeGB$
| search activeState!=ARCHIVED
| table "Workspace Name", "Model Name", activeState, first(lastseen), "Model Size(GB)"</query>
<earliest>-60d</earliest>
<latest>now</latest>
<sampleRatio>1</sampleRatio>
</search>
<option name="count">50</option>
<option name="dataOverlayMode">none</option>
<option name="drilldown">none</option>
<option name="percentagesRow">false</option>
<option name="rowNumbers">false</option>
<option name="totalsRow">false</option>
<option name="wrap">true</option>
</table>
</panel>
<panel id="singleValuePanel2">
<title>Space Remaining in Each Workspace</title>
<html depends="$hiddenForCSS$">
<style>
#singleValuePanel2{
height: 200px !important;
width: 35% !important;
}
</style>
</html>
<table>
<search>
<query>workspaceGuid=8a81b09c53248e3d0153f1cab02d7dc5 OR workspaceGuid=8a81948243cb6a7f0143d9ff2be97e34 OR workspaceGuid=8a819488482885c901483c882c6c4fa9 OR workspaceGuid=8a81b0945ef8a5c0015f255c3f8e44a2
| fields + workspaceSize, workspaceGuid
| lookup workspace-dc5prod workspaceGuid output name
| stats latest(workspaceSize) by name
| appendcols
[| inputlookup workspace-dc5prod where workspaceGuid=8a81b09c53248e3d0153f1cab02d7dc5 OR workspaceGuid=8a81948243cb6a7f0143d9ff2be97e34 OR workspaceGuid=8a819488482885c901483c882c6c4fa9 OR workspaceGuid=8a81b0945ef8a5c0015f255c3f8e44a2
| eval sizeAllowance= sizeAllowance/ 1073741824
| stats values(sizeAllowance) by name ]
| convert num(latest(workspaceSize)) as workspaceSize, num(values(sizeAllowance)) as sizeAllowance
| eval "Space Remaining(GB)"=sizeAllowance-workspaceSize
| table name "Space Remaining(GB)" workspaceSize sizeAllowance
| rename workspaceSize as "Space Used(GB)" sizeAllowance as "Size Allowance(GB)"</query>
<earliest>-24h</earliest>
<latest>now</latest>
<sampleRatio>1</sampleRatio>
</search>
<option name="count">50</option>
<option name="dataOverlayMode">none</option>
<option name="drilldown">none</option>
<option name="percentagesRow">false</option>
<option name="rowNumbers">false</option>
<option name="totalsRow">false</option>
<option name="wrap">true</option>
</table>
</panel>
<panel id="singleValuePanel">
<title>Lookup Model Name and Size</title>
<input type="text" token="mGuid">
<label>Model Guid</label>
</input>
<html>
<style>
#singleValuePanel{
max-height: 300px !important;
width: 35% !important;
}
</style>
</html>
<table>
<search>
<query>| inputlookup model-all
| where modelGuid="$mGuid$"
| eval "Model Size(GB)"=round(lastModelSizeBytes/1000000000, 2)
| fields + customerName workspaceName modelName "Model Size(GB)"
| rename workspaceName as "Workspace Name" customerName as "Customer" modelName as "Model Name"</query>
<earliest>-24h</earliest>
<latest>now</latest>
<sampleRatio>1</sampleRatio>
</search>
<option name="count">1</option>
<option name="dataOverlayMode">none</option>
<option name="drilldown">none</option>
<option name="percentagesRow">false</option>
<option name="rowNumbers">false</option>
<option name="totalsRow">false</option>
<option name="wrap">true</option>
</table>
</panel>
</row>
</form>
我会将其添加到底部的代码中。
#singleValuePanel{
max-height: 300px !important;
width: 35% !important;
margin-bottom: 20px !important;
}
这应该会在模型名称和尺寸面板下为您提供所需的白色 space。根据需要在 margin-bottom 字段中调整 px 以提供更多或更少的空间。
我有以下用于仪表板的代码,在我添加靠近代码末尾的模型名称和尺寸面板之前,它一直运行良好。我一直在使用#singlevalue_ 为每个单独的面板设置布局,它适用于 "Models in Selected Workspace Set" 宽度以及 "Space Remaining in Each Workspace" 高度和宽度。 "Model Name and Size" 面板设置为 300 像素,这种方法可行,但面板又超出面板内容 300 像素,这与仪表板面板的最大高度相匹配。如何强制面板底部的空白坚持 300 像素?
<form>
<label>L3 recreate model Activity</label>
<description>Lists the models in descending order of last time used in the L3 recreate workspaces and their sizes for archival purposes</description>
<fieldset submitButton="false"></fieldset>
<row>
<panel id="singleValuePanel1">
<title>Models in Selected Workspace Set</title>
<input type="dropdown" token="set" searchWhenChanged="true">
<label>Workspace Set</label>
<default>8a81948243cb6a7f0143d9ff2be97e34</default>
<initialValue>8a81948243cb6a7f0143d9ff2be97e34</initialValue>
<fieldForLabel>workspaceName</fieldForLabel>
<fieldForValue>workspaceGuid</fieldForValue>
<search>
<query>workspaceGuid=8a81b09c53248e3d0153f1cab02d7dc5 OR workspaceGuid=8a81948243cb6a7f0143d9ff2be97e34 OR workspaceGuid=8a819488482885c901483c882c6c4fa9 OR workspaceGuid=8a81b0945ef8a5c0015f255c3f8e44a2 | dedup workspaceGuid | stats count by workspaceGuid | lookup model-all workspaceGuid</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
</input>
<input type="text" token="sizeGB" searchWhenChanged="true">
<label>Size Threshold(GB)</label>
<default>1</default>
</input>
<html>
<style>
.dashboard-row .dashboard-panel .panel-element-row {
overflow: auto;
max-height: 600px;
}
#singleValuePanel1{
width: 65% !important;
}
</style>
</html>
<table>
<search>
<query>index=core sourcetype=core $set$ GET_LOGGED_IN_USER=1
| eval lastseen=strftime(_time, "%m-%d-%Y %H:%M:%S")
| stats first(lastseen) by modelGuid
| sort + lastseen
| lookup model-all modelGuid output modelName as "Model Name" workspaceName as "Workspace Name"
| lookup model-dc5prod modelGuid output activeState memoryUsage
| eval "Model Size(GB)" = round(memoryUsage / 1073741824,4)
| search "Model Size(GB)" >$sizeGB$
| search activeState!=ARCHIVED
| table "Workspace Name", "Model Name", activeState, first(lastseen), "Model Size(GB)"</query>
<earliest>-60d</earliest>
<latest>now</latest>
<sampleRatio>1</sampleRatio>
</search>
<option name="count">50</option>
<option name="dataOverlayMode">none</option>
<option name="drilldown">none</option>
<option name="percentagesRow">false</option>
<option name="rowNumbers">false</option>
<option name="totalsRow">false</option>
<option name="wrap">true</option>
</table>
</panel>
<panel id="singleValuePanel2">
<title>Space Remaining in Each Workspace</title>
<html depends="$hiddenForCSS$">
<style>
#singleValuePanel2{
height: 200px !important;
width: 35% !important;
}
</style>
</html>
<table>
<search>
<query>workspaceGuid=8a81b09c53248e3d0153f1cab02d7dc5 OR workspaceGuid=8a81948243cb6a7f0143d9ff2be97e34 OR workspaceGuid=8a819488482885c901483c882c6c4fa9 OR workspaceGuid=8a81b0945ef8a5c0015f255c3f8e44a2
| fields + workspaceSize, workspaceGuid
| lookup workspace-dc5prod workspaceGuid output name
| stats latest(workspaceSize) by name
| appendcols
[| inputlookup workspace-dc5prod where workspaceGuid=8a81b09c53248e3d0153f1cab02d7dc5 OR workspaceGuid=8a81948243cb6a7f0143d9ff2be97e34 OR workspaceGuid=8a819488482885c901483c882c6c4fa9 OR workspaceGuid=8a81b0945ef8a5c0015f255c3f8e44a2
| eval sizeAllowance= sizeAllowance/ 1073741824
| stats values(sizeAllowance) by name ]
| convert num(latest(workspaceSize)) as workspaceSize, num(values(sizeAllowance)) as sizeAllowance
| eval "Space Remaining(GB)"=sizeAllowance-workspaceSize
| table name "Space Remaining(GB)" workspaceSize sizeAllowance
| rename workspaceSize as "Space Used(GB)" sizeAllowance as "Size Allowance(GB)"</query>
<earliest>-24h</earliest>
<latest>now</latest>
<sampleRatio>1</sampleRatio>
</search>
<option name="count">50</option>
<option name="dataOverlayMode">none</option>
<option name="drilldown">none</option>
<option name="percentagesRow">false</option>
<option name="rowNumbers">false</option>
<option name="totalsRow">false</option>
<option name="wrap">true</option>
</table>
</panel>
<panel id="singleValuePanel">
<title>Lookup Model Name and Size</title>
<input type="text" token="mGuid">
<label>Model Guid</label>
</input>
<html>
<style>
#singleValuePanel{
max-height: 300px !important;
width: 35% !important;
}
</style>
</html>
<table>
<search>
<query>| inputlookup model-all
| where modelGuid="$mGuid$"
| eval "Model Size(GB)"=round(lastModelSizeBytes/1000000000, 2)
| fields + customerName workspaceName modelName "Model Size(GB)"
| rename workspaceName as "Workspace Name" customerName as "Customer" modelName as "Model Name"</query>
<earliest>-24h</earliest>
<latest>now</latest>
<sampleRatio>1</sampleRatio>
</search>
<option name="count">1</option>
<option name="dataOverlayMode">none</option>
<option name="drilldown">none</option>
<option name="percentagesRow">false</option>
<option name="rowNumbers">false</option>
<option name="totalsRow">false</option>
<option name="wrap">true</option>
</table>
</panel>
</row>
</form>
我会将其添加到底部的代码中。
#singleValuePanel{
max-height: 300px !important;
width: 35% !important;
margin-bottom: 20px !important;
}
这应该会在模型名称和尺寸面板下为您提供所需的白色 space。根据需要在 margin-bottom 字段中调整 px 以提供更多或更少的空间。