diff --git a/SOURCES/001-fix-empty-container-dashboard.patch b/SOURCES/001-fix-empty-container-dashboard.patch new file mode 100644 index 0000000..5c57bfd --- /dev/null +++ b/SOURCES/001-fix-empty-container-dashboard.patch @@ -0,0 +1,30 @@ +diff --git a/src/dashboards/pcp-vector-container-overview.json b/src/dashboards/pcp-vector-container-overview.json +index a1a75c2..a674d74 100644 +--- a/src/dashboards/pcp-vector-container-overview.json ++++ b/src/dashboards/pcp-vector-container-overview.json +@@ -127,7 +127,7 @@ + "format": "percentunit", + "label": null, + "logBase": 1, +- "max": "1", ++ "max": null, + "min": "0", + "show": true + }, +diff --git a/src/datasources/lib/datasource_base.ts b/src/datasources/lib/datasource_base.ts +index db0167b..4bca9c0 100644 +--- a/src/datasources/lib/datasource_base.ts ++++ b/src/datasources/lib/datasource_base.ts +@@ -150,7 +150,11 @@ export abstract class PmapiDatasourceBase { + container: container, + endpoint: this.getOrCreateEndpoint(url, container) + }; +- }); ++ }) ++ // getConnectionParams only processes target.container if it is not blank ++ // the only case when container is "" is because it was $container, but the ++ // $container dashboard variable is empty (viewing "all" containers, but none exists) ++ .filter(target => target.container !== ""); + } + + async applyTransformations(pmapiSrv: PmapiSrv, results: TargetResult) { diff --git a/SPECS/grafana-pcp.spec b/SPECS/grafana-pcp.spec index e7f5801..2113947 100644 --- a/SPECS/grafana-pcp.spec +++ b/SPECS/grafana-pcp.spec @@ -1,6 +1,6 @@ Name: grafana-pcp Version: 2.0.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Performance Co-Pilot Grafana Plugin %global github https://github.com/performancecopilot/grafana-pcp @@ -17,6 +17,8 @@ Source1: grafana-pcp-deps-%{version}.tar.xz Source2: create_dependency_bundle.sh Source3: list_bundled_nodejs_packages.py +Patch1: 001-fix-empty-container-dashboard.patch + BuildRequires: nodejs Requires: grafana >= 6.6.0 Suggests: pcp >= 5.0.0 @@ -82,6 +84,7 @@ bpftrace scripts from pmdabpftrace(1), as well as several dashboards. %prep %setup -q %setup -q -a 1 +%patch1 -p1 %build rm -rf dist @@ -104,6 +107,9 @@ cp -a dist/* %{buildroot}/%{install_dir} %doc README.md %changelog +* Fri Jul 24 2020 Andreas Gerstmayr 2.0.2-2 +- vector: do not show all cgroups in the container overview dashboard in case no containers are present on the system + * Mon May 11 2020 Andreas Gerstmayr 2.0.2-1 - update to upstream version 2.0.2, see CHANGELOG