Skip to content

Commit

Permalink
Update to Grafana 10.1.4 (#85)
Browse files Browse the repository at this point in the history
* Update to Grafana 10.1.4

* Update Dockerfile

* Disable Grafana updates
  • Loading branch information
mikhail-vl authored Oct 3, 2023
1 parent bc2635c commit 0fe09a7
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 15 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
33 changes: 22 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM grafana/grafana:10.0.3
FROM grafana/grafana:10.1.4

##################################################################
## CONFIGURATION
Expand All @@ -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

Expand Down Expand Up @@ -65,24 +69,21 @@ COPY img/background.svg /usr/share/grafana/public/img/g8_login_light.svg
# Update Title
RUN sed -i 's|<title>\[\[.AppTitle\]\]</title>|<title>Volkov Labs</title>|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

## Update Help menu
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

Expand All @@ -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
##################################################################
Expand Down Expand Up @@ -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*
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0fe09a7

Please sign in to comment.