From 6c8cb1028add5d8559589f39dcbf0b36b95ca3dc Mon Sep 17 00:00:00 2001 From: jacky-xbb Date: Tue, 12 Sep 2023 15:20:47 +0800 Subject: [PATCH] chore: fix comments --- .../grafana-template/grafanalib-emqx/README.md | 18 +++++++----------- .../grafana-template/grafanalib-emqx/emqx5.py | 4 ++-- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/config/grafana-template/grafanalib-emqx/README.md b/config/grafana-template/grafanalib-emqx/README.md index d4b3739..0693c29 100644 --- a/config/grafana-template/grafanalib-emqx/README.md +++ b/config/grafana-template/grafanalib-emqx/README.md @@ -1,10 +1,11 @@ # grafanalib-emqx - - + + ## Setup Usage of Python 3 is required. It can be installed [on Python.org](https://www.python.org/downloads/) + - Install Pipenv ```shell @@ -23,21 +24,16 @@ pipenv install pipenv shell ``` - ## Generate Dashboard JSON -- Install Enterprise Dashboard +- Install EMQX Enterprise Dashboard ```shell -./emqx5.py > emqx5.json +./emqx5.py -e ee > emqx5.json ``` -- Install OpenSource Dashboard +- Install EMQX Community Edition Dashboard ``` -./emqx5.py -c os > emqx5.json +./emqx5.py -e ce > emqx5.json ``` - - - - diff --git a/config/grafana-template/grafanalib-emqx/emqx5.py b/config/grafana-template/grafanalib-emqx/emqx5.py index 0655f0c..8ed4fb1 100755 --- a/config/grafana-template/grafanalib-emqx/emqx5.py +++ b/config/grafana-template/grafanalib-emqx/emqx5.py @@ -421,11 +421,11 @@ def generate_table_overrides(targets): parser = argparse.ArgumentParser(description="Argument Parser") # Define a single optional argument for category (-c or --category) - parser.add_argument("-c", "--category", choices=["ee", "os"], help="Set EMQX Enterprise(ee) or EMQX OpenSource(os)") + parser.add_argument("-e", "--edition", choices=["ee", "ce"], help="Set EMQX Enterprise(ee) or EMQX Community(ce)") args = parser.parse_args() - if args.category == "os": + if args.edition == "ce": is_ee = False # create a dashboard