Skip to content

Commit

Permalink
Update to Business App (#109)
Browse files Browse the repository at this point in the history
* Update to Business App

* Updates

* Update plugin.json

* Update Dockerfile
  • Loading branch information
mikhail-vl authored Aug 27, 2024
1 parent cf2fa0a commit da6dfc4
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 32 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Features / Enhancements

- Update to Grafana 11.1.4 image (#108)
- Update to Business App (#109)

## 4.2.0 (2024-08-05)

Expand All @@ -29,7 +30,7 @@

- Add plugin e2e tests and remove cypress (#95)
- Update to Grafana 11.1 dependencies (#97)
- Update to Business Suite (#98)
- Update to Business App (#98)
- Update to Grafana 11.1.0 image (#99)

## 3.3.0 (2023-02-01)
Expand Down
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ COPY img/background.svg /usr/share/grafana/public/img/g8_login_light.svg
##################################################################

# Update Title
RUN sed -i 's|<title>\[\[.AppTitle\]\]</title>|<title>Business Suite</title>|g' /usr/share/grafana/public/views/index.html
RUN sed -i 's|Loading Grafana|Loading Business Suite|g' /usr/share/grafana/public/views/index.html
RUN sed -i 's|<title>\[\[.AppTitle\]\]</title>|<title>Business App</title>|g' /usr/share/grafana/public/views/index.html
RUN sed -i 's|Loading Grafana|Loading Business App|g' /usr/share/grafana/public/views/index.html

## Update Mega and Help menu
RUN sed -i "s|\[\[.NavTree\]\],|nav,|g; \
Expand All @@ -82,12 +82,12 @@ RUN sed -i "s|\[\[.NavTree\]\],|nav,|g; \
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'] = 'Business Suite 4.2.0'; help['children'] = [];} \
if (help) { help['subTitle'] = 'Business App 4.3.0'; help['children'] = [];} \
window.grafanaBootData = {|g" \
/usr/share/grafana/public/views/index.html

# Move Business Suite 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
# Move Business App to navigation root section
RUN sed -i 's|\[navigation.app_sections\]|\[navigation.app_sections\]\nbusiness-app=root|g' /usr/share/grafana/conf/defaults.ini

##################################################################
## HANDS-ON
Expand All @@ -96,9 +96,9 @@ RUN sed -i 's|\[navigation.app_sections\]|\[navigation.app_sections\]\nvolkovlab

RUN find /usr/share/grafana/public/build/ -name *.js \
## Update Title
-exec sed -i 's|AppTitle="Grafana"|AppTitle="Business Suite"|g' {} \; \
-exec sed -i 's|AppTitle="Grafana"|AppTitle="Business App"|g' {} \; \
## Update Login Title
-exec sed -i 's|LoginTitle="Welcome to Grafana"|LoginTitle="Business Suite for Grafana"|g' {} \; \
-exec sed -i 's|LoginTitle="Welcome to Grafana"|LoginTitle="Business App for Grafana"|g' {} \; \
## Remove Documentation, Support, Community in the Footer
-exec sed -i 's|\[{target:"_blank",id:"documentation".*grafana_footer"}\]|\[\]|g' {} \; \
## Remove Edition in the Footer
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# Business Suite App for Grafana
# Business App for Grafana

![App](https://raw.githubusercontent.com/volkovlabs/business-suite/main/img/app.png)
![App](https://raw.githubusercontent.com/volkovlabs/business-app/main/img/app.png)

![Grafana](https://img.shields.io/badge/Grafana-11.1-orange)
[![YouTube](https://img.shields.io/badge/YouTube-Channel-red)](https://youtube.com/@volkovlabs)
![CI](https://github.com/volkovlabs/business-suite/workflows/CI/badge.svg)
![E2E](https://github.com/volkovlabs/business-suite/workflows/E2E/badge.svg)
[![codecov](https://codecov.io/gh/VolkovLabs/business-suite/branch/main/graph/badge.svg)](https://codecov.io/gh/VolkovLabs/business-suite)
[![CodeQL](https://github.com/VolkovLabs/business-suite/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/VolkovLabs/business-suite/actions/workflows/codeql-analysis.yml)
![CI](https://github.com/volkovlabs/business-app/workflows/CI/badge.svg)
![E2E](https://github.com/volkovlabs/business-app/workflows/E2E/badge.svg)
[![codecov](https://codecov.io/gh/VolkovLabs/business-app/branch/main/graph/badge.svg)](https://codecov.io/gh/VolkovLabs/business-app)
[![CodeQL](https://github.com/VolkovLabs/business-app/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/VolkovLabs/business-app/actions/workflows/codeql-analysis.yml)

## Introduction

The Business Suite App includes a Docker image with customized Grafana and an application plugin.
The Business App includes a Docker image with customized Grafana and an application plugin.

## Customization

Months of work bundled with deep expertise nicely wrapped into a 7-minute long video revealing simple steps to customize Grafana. In this tutorial, we answered all community questions we collected to this moment.

[![Customization](https://raw.githubusercontent.com/volkovlabs/volkovlabs-app/main/img/grafana-11.png)](https://youtu.be/8ArQ0vlWA88)
[![Customization](https://raw.githubusercontent.com/volkovlabs/business-app/main/img/grafana-11.png)](https://youtu.be/8ArQ0vlWA88)

## Docker image

Expand Down Expand Up @@ -45,4 +45,4 @@ We're looking forward to hearing from you. You can use different ways to get in

## License

Apache License Version 2.0, see [LICENSE](https://github.com/volkovlabs/business-suite/blob/main/LICENSE).
Apache License Version 2.0, see [LICENSE](https://github.com/volkovlabs/business-app/blob/main/LICENSE).
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ services:
environment:
- GF_DEFAULT_APP_MODE=development
volumes:
- ./dist:/var/lib/grafana/plugins/volkovlabs-app
- ./dist:/var/lib/grafana/plugins/business-app
- ./provisioning:/etc/grafana/provisioning
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

SRC="/app"
GRAFANA_APP_PATH="${GF_PATHS_PLUGINS}/volkovlabs-app"
GRAFANA_APP_PATH="${GF_PATHS_PLUGINS}/business-app"

## Replace App
rm -rf $GRAFANA_APP_PATH
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"react-router-dom": "^5.3.4",
"tslib": "^2.6.3"
},
"description": "Business Suite for Grafana",
"description": "Business App for Grafana",
"devDependencies": {
"@babel/core": "^7.24.7",
"@grafana/eslint-config": "^7.0.0",
Expand Down
2 changes: 1 addition & 1 deletion provisioning/plugins/apps.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: 1

apps:
- type: volkovlabs-app
- type: business-app
disabled: false
2 changes: 1 addition & 1 deletion src/components/Config/Config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const Config: React.FC<Props> = () => {
return (
<FieldSet data-testid={TEST_IDS.config.root}>
<h2>{APP_INFO.name}</h2>
<p>The Business Suite App includes Docker image and an application plugin.</p>
<p>The Business App includes Docker image and an application plugin.</p>
</FieldSet>
);
};
4 changes: 2 additions & 2 deletions src/constants/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* App Information
*/
export const APP_INFO = {
name: 'Business Suite',
root: '/a/volkovlabs-app',
name: 'Business App',
root: '/a/business-app',
};

/**
Expand Down
4 changes: 2 additions & 2 deletions src/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
"grafanaDependency": ">=11.0.0",
"plugins": []
},
"id": "volkovlabs-app",
"id": "business-app",
"includes": [
{
"addToNav": true,
"defaultNav": true,
"icon": "apps",
"name": "Plugins",
"path": "/a/volkovlabs-app/",
"path": "/a/business-app/",
"role": "Viewer",
"type": "page"
}
Expand Down
2 changes: 1 addition & 1 deletion test/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ services:
environment:
- GF_USERS_DEFAULT_THEME=light
volumes:
- ../dist:/var/lib/grafana/plugins/volkovlabs-app
- ../dist:/var/lib/grafana/plugins/business-app
- ../provisioning:/etc/grafana/provisioning
2 changes: 1 addition & 1 deletion test/panel.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { test, expect } from '@grafana/plugin-e2e';

test.describe('Business Suite', () => {
test.describe('Business App', () => {
test('Should display a Canvas Panel', async ({ gotoDashboardPage, dashboardPage, page }) => {
/**
* Go To panels dashboard panels.json
Expand Down

0 comments on commit da6dfc4

Please sign in to comment.