-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding latest grafonnet library support
- Loading branch information
Vishnu Challa
committed
Oct 2, 2023
1 parent
1cac256
commit 710e096
Showing
14 changed files
with
605 additions
and
5,090 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
templates/grafonnet-lib | ||
templates/vendor | ||
rendered | ||
tmp | ||
bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,21 @@ | ||
FROM ubuntu | ||
FROM registry.access.redhat.com/ubi8/ubi-minimal | ||
|
||
# Set the working directory | ||
WORKDIR /performance-dashboards | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
# Install necessary libraries for subsequent commands | ||
RUN apt-get update && apt-get install -y podman dumb-init python3.6 python3-distutils python3-pip python3-apt | ||
RUN microdnf install -y podman python3 python3-pip && \ | ||
microdnf clean all && \ | ||
rm -rf /var/cache/yum | ||
|
||
COPY . . | ||
|
||
# Set permissions | ||
RUN chmod -R 775 /performance-dashboards | ||
|
||
# Install dependencies | ||
RUN python3 -m pip install --upgrade pip | ||
RUN pip install -r requirements.txt | ||
|
||
# Cleanup the installation remainings | ||
RUN apt-get clean autoclean && \ | ||
apt-get autoremove --yes && \ | ||
rm -rf /var/lib/{apt,dpkg,cache,log}/ | ||
RUN pip3 install --upgrade pip && \ | ||
pip3 install -r requirements.txt | ||
|
||
# Start the command | ||
ENTRYPOINT ["/usr/bin/dumb-init", "--"] | ||
CMD ["python3", "dittybopper/syncer/entrypoint.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonnet'; | ||
|
||
{ | ||
timeSeries: { | ||
local timeSeries = g.panel.timeSeries, | ||
local fieldOverride = g.panel.timeSeries.fieldOverride, | ||
local custom = timeSeries.fieldConfig.defaults.custom, | ||
local options = timeSeries.options, | ||
|
||
generic(title, unit, targets, gridPos): | ||
timeSeries.new(title) | ||
+ timeSeries.queryOptions.withTargets(targets) | ||
+ timeSeries.datasource.withUid('$datasource') | ||
+ timeSeries.standardOptions.withUnit(unit) | ||
+ timeSeries.gridPos.withX(gridPos.x) | ||
+ timeSeries.gridPos.withY(gridPos.y) | ||
+ timeSeries.gridPos.withH(gridPos.h) | ||
+ timeSeries.gridPos.withW(gridPos.w) | ||
+ custom.withSpanNulls('false') | ||
+ options.tooltip.withMode('multi') | ||
+ options.tooltip.withSort('desc') | ||
+ options.legend.withDisplayMode('table'), | ||
|
||
genericLegend(title, unit, targets, gridPos): | ||
self.generic(title, unit, targets, gridPos) | ||
+ options.legend.withShowLegend(true) | ||
+ options.legend.withCalcs([ | ||
'mean', | ||
'max', | ||
'min', | ||
]) | ||
+ options.legend.withSortBy('max') | ||
+ options.legend.withSortDesc(true) | ||
+ options.legend.withPlacement('bottom'), | ||
}, | ||
stat: { | ||
local stat = g.panel.stat, | ||
local options = stat.options, | ||
|
||
base(title, targets, gridPos): | ||
stat.new(title) | ||
+ stat.datasource.withUid('$datasource') | ||
+ stat.queryOptions.withTargets(targets) | ||
+ stat.gridPos.withX(gridPos.x) | ||
+ stat.gridPos.withY(gridPos.y) | ||
+ stat.gridPos.withH(gridPos.h) | ||
+ stat.gridPos.withW(gridPos.w) | ||
+ options.reduceOptions.withCalcs([ | ||
'last', | ||
]), | ||
}, | ||
} |
Oops, something went wrong.