www/py-grafana-dashboard-manager: Add new port

This port provides a simple CLI utility for importing or exporting
dashboard JSON definitions using the Grafana HTTP API.

Sponsored by:	Ekco
Sponsored by:	Klara Inc.
This commit is contained in:
Mateusz Piotrowski
2021-12-16 17:39:16 +01:00
parent 6a80102dad
commit caae0ed5b3
4 changed files with 50 additions and 0 deletions

View File

@@ -1661,6 +1661,7 @@
SUBDIR += py-google-cloud-translate
SUBDIR += py-google-cloud-vision
SUBDIR += py-google-resumable-media
SUBDIR += py-grafana-dashboard-manager
SUBDIR += py-graphite-api
SUBDIR += py-graphite-web
SUBDIR += py-grequests

View File

@@ -0,0 +1,25 @@
PORTNAME= grafana-dashboard-manager
DISTVERSION= 0.1.2
CATEGORIES= www python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= ${PORTNAME:S/-/_/g}-${DISTVERSION}
MAINTAINER= 0mp@FreeBSD.org
COMMENT= CLI for saving and restoring Grafana dashboards via HTTP API
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
# XXX: Requires requests>=2.26.0
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}gitpython>=0:devel/py-gitpython@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}requests>=0:www/py-requests@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}rich>=0:textproc/py-rich@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}typer>=0.4.0:devel/py-typer@${PY_FLAVOR}
USES= python:3.7+
USE_PYTHON= autoplist concurrent distutils
NO_ARCH= yes
.include <bsd.port.mk>

View File

@@ -0,0 +1,3 @@
TIMESTAMP = 1639671938
SHA256 (grafana_dashboard_manager-0.1.2.tar.gz) = bf02ec1a0271a55ecb61aa42f134e7eb9e9a6757db312cf5a8e08945777d3e8e
SIZE (grafana_dashboard_manager-0.1.2.tar.gz) = 9807

View File

@@ -0,0 +1,21 @@
A simple CLI utility for importing or exporting dashboard JSON definitions
using the Grafana HTTP API.
This may be useful for:
- Backing up your dashboards that already exist within your Grafana instance,
e.g., if you are migrating from the internal sqlite database to MySQL.
- Updating dashboard files for your Infrastructure-as-Code, for use with
Grafana dashboard provisioning.
- Making tweaks to dashboard JSON files directly and updating Grafana with one
command.
Notable features:
- Mirrors the folder structure between a local set of dashboards and Grafana,
creating folders where necessary.
- Ensures links to dashboards folders in a dashlist Panel are consistent with
the Folder IDs - useful for deploying one set of dashboards across mulitple
Grafana instances, e.g., for dev, test, prod environments.
WWW: https://github.com/Beam-Connectivity/grafana-dashboard-manager