From 0fe09a70e4bc853efca095b6f7df2a19a6594550 Mon Sep 17 00:00:00 2001 From: Mikhail Volkov <47795110+mikhail-vl@users.noreply.github.com> Date: Tue, 3 Oct 2023 16:51:07 -0400 Subject: [PATCH] Update to Grafana 10.1.4 (#85) * Update to Grafana 10.1.4 * Update Dockerfile * Disable Grafana updates --- CHANGELOG.md | 3 ++- Dockerfile | 33 ++++++++++++++++++++++----------- README.md | 2 +- package-lock.json | 4 ++-- 4 files changed, 27 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d61ab98..1f840ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,12 @@ # Change Log -## 3.2.0 (IN PROGRESS) +## 3.2.0 (2023-10-03) ### Features / Enhancements - Move App plugin to Root (#82) - Update logo and background (#83) +- Update to Grafana 10.1.4 (#84) ## 3.1.0 (2023-07-26) diff --git a/Dockerfile b/Dockerfile index 9875175..1ea8cb4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM grafana/grafana:10.0.3 +FROM grafana/grafana:10.1.4 ################################################################## ## CONFIGURATION @@ -18,6 +18,10 @@ ENV GF_PANELS_DISABLE_SANITIZE_HTML=true ## Disable Explore ENV GF_EXPLORE_ENABLED=false +# Updates Check +ENV GF_ANALYTICS_CHECK_FOR_UPDATES=false +#ENV GF_ANALYTICS_CHECK_FOR_PLUGIN_UPDATES=false + ## Set Home Dashboard ENV GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/etc/grafana/provisioning/dashboards/news.json @@ -65,9 +69,6 @@ COPY img/background.svg /usr/share/grafana/public/img/g8_login_light.svg # Update Title RUN sed -i 's|\[\[.AppTitle\]\]|Volkov Labs|g' /usr/share/grafana/public/views/index.html -# Disable Connections -RUN sed -i 's|# feature2 = false|dataConnectionsConsole = false|g' /usr/share/grafana/conf/defaults.ini - # Move Volkov Labs App to navigation root section RUN sed -i 's|\[navigation.app_sections\]|\[navigation.app_sections\]\nvolkovlabs-app=root|g' /usr/share/grafana/conf/defaults.ini @@ -75,14 +76,14 @@ RUN sed -i 's|\[navigation.app_sections\]|\[navigation.app_sections\]\nvolkovlab RUN sed -i "s|\[\[.NavTree\]\],|nav,|g; \ s|window.grafanaBootData = {| \ let nav = [[.NavTree]]; \ + const alerting = nav.find((element) => element.id === 'alerting'); \ + if (alerting) { alerting['url'] = '/alerting/list'; } \ + const dashboards = nav.find((element) => element.id === 'dashboards/browse'); \ + if (dashboards) { dashboards['children'] = [];} \ + const connections = nav.find((element) => element.id === 'connections'); \ + if (connections) { connections['url'] = '/datasources'; connections['children'].shift(); } \ const help = nav.find((element) => element.id === 'help'); \ - if (help) { help['subTitle'] = 'Application';} \ - window.grafanaBootData = {|g" \ - /usr/share/grafana/public/views/index.html - -## Add News dashboard to the Mega Menu -RUN sed -i "s|window.grafanaBootData = {| \ - nav.push({\"id\":\"my-dashboard\",\"text\":\"Volkov Labs News\",\"icon\":\"play\",\"url\":\"/d/O4tc_E6Gz\",\"sortWeight\":-2000}); \ + if (help) { help['subTitle'] = 'Grafana OSS'; help['children'] = [];} \ window.grafanaBootData = {|g" \ /usr/share/grafana/public/views/index.html @@ -107,6 +108,9 @@ RUN find /usr/share/grafana/public/build/ -name *.js -exec sed -i 's|({target:"_ ## Remove News icon RUN find /usr/share/grafana/public/build/ -name *.js -exec sed -i 's|..createElement(....,{className:.,onClick:.,iconOnly:!0,icon:"rss","aria-label":"News"})|null|g' {} \; +## Remove Open Source icon +RUN find /usr/share/grafana/public/build/ -name *.js -exec sed -i 's|.push({target:"_blank",id:"version",text:`${..edition}${.}`,url:..licenseUrl,icon:"external-link-alt"})||g' {} \; + ################################################################## ## CLEANING Remove Native Data Sources ################################################################## @@ -167,6 +171,10 @@ RUN rm -rf /usr/share/grafana/public/build/parca* RUN rm -rf /usr/share/grafana/public/app/plugins/datasource/phlare RUN rm -rf /usr/share/grafana/public/build/phlare* +## Profiling / Pyroscope +RUN rm -rf /usr/share/grafana/public/app/plugins/datasource/grafana-pyroscope-datasource +RUN rm -rf /usr/share/grafana/public/build/pyroscope* + ## Others / Alertmanager RUN rm -rf /usr/share/grafana/public/app/plugins/datasource/alertmanager RUN rm -rf /usr/share/grafana/public/build/alertmanager* @@ -197,6 +205,9 @@ RUN rm -rf /usr/share/grafana/public/app/plugins/panel/table-old ## Traces RUN rm -rf /usr/share/grafana/public/app/plugins/panel/traces +## Flamegraph +RUN rm -rf /usr/share/grafana/public/app/plugins/panel/flamegraph + ################################################################## USER grafana diff --git a/README.md b/README.md index a7c0d70..4677394 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![App](https://raw.githubusercontent.com/volkovlabs/volkovlabs-app/main/img/app.png) -![Grafana 10](https://img.shields.io/badge/Grafana-10.0-orange) +![Grafana 10](https://img.shields.io/badge/Grafana-10.1-orange) [![YouTube](https://img.shields.io/badge/YouTube-Channel-red)](https://youtube.com/@volkovlabs) ![CI](https://github.com/volkovlabs/volkovlabs-app/workflows/CI/badge.svg) ![E2E](https://github.com/volkovlabs/volkovlabs-app/workflows/E2E/badge.svg) diff --git a/package-lock.json b/package-lock.json index 173c96f..32b7fb1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "volkovlabs-app", - "version": "3.1.0", + "version": "3.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "volkovlabs-app", - "version": "3.1.0", + "version": "3.2.0", "license": "Apache-2.0", "dependencies": { "@emotion/css": "^11.11.2",