git: caae0ed5b3de - main - www/py-grafana-dashboard-manager: Add new port

From: Mateusz Piotrowski <0mp_at_FreeBSD.org>
Date: Thu, 16 Dec 2021 16:50:31 UTC
The branch main has been updated by 0mp:

URL: https://cgit.FreeBSD.org/ports/commit/?id=caae0ed5b3de09dc3f2d127872693bb86abe0bff

commit caae0ed5b3de09dc3f2d127872693bb86abe0bff
Author:     Mateusz Piotrowski <0mp@FreeBSD.org>
AuthorDate: 2021-12-16 16:39:16 +0000
Commit:     Mateusz Piotrowski <0mp@FreeBSD.org>
CommitDate: 2021-12-16 16:49:16 +0000

    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.
---
 www/Makefile                               |  1 +
 www/py-grafana-dashboard-manager/Makefile  | 25 +++++++++++++++++++++++++
 www/py-grafana-dashboard-manager/distinfo  |  3 +++
 www/py-grafana-dashboard-manager/pkg-descr | 21 +++++++++++++++++++++
 4 files changed, 50 insertions(+)

diff --git a/www/Makefile b/www/Makefile
index b918337b3421..c8079549ce73 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -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
diff --git a/www/py-grafana-dashboard-manager/Makefile b/www/py-grafana-dashboard-manager/Makefile
new file mode 100644
index 000000000000..54d2beb944b0
--- /dev/null
+++ b/www/py-grafana-dashboard-manager/Makefile
@@ -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>
diff --git a/www/py-grafana-dashboard-manager/distinfo b/www/py-grafana-dashboard-manager/distinfo
new file mode 100644
index 000000000000..ec285e250600
--- /dev/null
+++ b/www/py-grafana-dashboard-manager/distinfo
@@ -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
diff --git a/www/py-grafana-dashboard-manager/pkg-descr b/www/py-grafana-dashboard-manager/pkg-descr
new file mode 100644
index 000000000000..b0f06ea3b679
--- /dev/null
+++ b/www/py-grafana-dashboard-manager/pkg-descr
@@ -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