diff options
author | CoprDistGit <infra@openeuler.org> | 2024-08-01 15:22:25 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-08-01 15:22:25 +0000 |
commit | 449e373567557490a87c86be8d4e4071bd200fea (patch) | |
tree | 03263c28cbff996b9dcf6376a2a94a14cf6c8ce8 /build_frontend.sh | |
parent | 55cfeb99ef546c2091f3d1ad38c996f5559e63c6 (diff) |
automatic import of grafana-pcpopeneuler24.03_LTS
Diffstat (limited to 'build_frontend.sh')
-rwxr-xr-x | build_frontend.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/build_frontend.sh b/build_frontend.sh new file mode 100755 index 0000000..a0443d7 --- /dev/null +++ b/build_frontend.sh @@ -0,0 +1,24 @@ +#!/bin/bash -eu + +# Revert upstream change: "rename plugin IDs from pcp-*-* to performancecopilot-*-*" +# https://github.com/performancecopilot/grafana-pcp/commit/70ca5cc307e231cea14281e1cd2268ae4f1f445c +# This change would break all existing custom dashboards. Using sed here instead of a patch +# to catch all future usage of the new upstream plugin ids. +find src cypress \( -name '*.ts' -o -name '*.json' -o -name '*.jsonnet' -o -name '*.libsonnet' \) \ + -exec sed -i \ + -e 's/performancecopilot-redis-datasource/pcp-redis-datasource/g' \ + -e 's/performancecopilot-vector-datasource/pcp-vector-datasource/g' \ + -e 's/performancecopilot-bpftrace-datasource/pcp-bpftrace-datasource/g' \ + -e 's/performancecopilot-flamegraph-panel/pcp-flamegraph-panel/g' \ + -e 's/performancecopilot-breadcrumbs-panel/pcp-breadcrumbs-panel/g' \ + -e 's/performancecopilot-troubleshooting-panel/pcp-troubleshooting-panel/g' \ + {} \; + +# Build the frontend +yarn run build + +# Build the dashboards +make build-dashboards + +# Fix permissions (webpack sometimes outputs files with mode = 666 due to reasons unknown (race condition/umask issue afaics)) +chmod -R g-w,o-w dist |