Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for status panel lib #1369

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions status-panels-lib/status-panels/panels.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ local g = import '../common/g.libsonnet';
local utils = import '../utils.libsonnet';
local stat = g.panel.stat;
local row = g.panel.row;
local text = g.panel.text;
function(
title,
type,
Expand Down Expand Up @@ -74,15 +75,13 @@ function(
+ row.gridPos.withY(rowPositionY),

integrationVersionInit(targets)::
stat.new('Integration version')
+ stat.panelOptions.withDescription('Shows the installed version of this integration.')
+ stat.standardOptions.withUnit('string')
+ stat.standardOptions.withNoValue(integrationVersion)
+ stat.standardOptions.color.withMode('fixed')
+ stat.standardOptions.color.withFixedColor('text')
+ stat.gridPos.withH(panelsHeight)
+ stat.gridPos.withW(panelsWidth)
+ stat.gridPos.withX(0 + 2 * panelsWidth)
text.new('Integration version')
+ text.panelOptions.withDescription('Shows the installed version of this integration.')
+ text.options.withContent(value='<p style="text-align: center">'+ integrationVersion + '</p>')
+ text.options.withMode(value='html')
+ text.gridPos.withH(panelsHeight)
+ text.gridPos.withW(panelsWidth)
+ text.gridPos.withX(0 + 2 * panelsWidth)
+ row.gridPos.withY(rowPositionY),

rowInit(title)::
Expand Down
Loading