Skip to content

Commit b65d3a2

Browse files
committed
Made grafana url stuff more sensible
1 parent 6ce6e59 commit b65d3a2

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,8 @@ POSTGRES_USERNAME=your-postgres-username (postgres if not changed)
4242
POSTGRES_PASSWORD=your-postgres-password
4343
DB_HOST= (only if you are not using PostgreSQL locally)
4444
GRAFANA_TOKEN=your-grafana-authorization-token
45-
GRAFANA_URL=your-server-url/grafana
45+
GRAFANA_URL=your-server-url/grafana/your-dashboard-specific-stuff
4646
GRAFANA_PANEL_ID=your-grafana-panel-id
47-
GRAFANA_DASHBOARD=your-grafana-dashboard-name
48-
GRAFANA_ORG_ID=your-grafana-org-id
4947
PAPERTRAIL_URL=papertrailapp-url
5048
WORKSHOPS_API=pajat-api-url
5149

src/discordBot/services/service.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,7 @@ const findAndUpdateInstructorRole = async (name, guild, adminRole) => {
160160

161161
const downloadImage = async (course) => {
162162
const panel = process.env.GRAFANA_PANEL_ID;
163-
const dashboard = process.env.GRAFANA_DASHBOARD;
164-
const orgId = process.env.GRAFANA_ORG_ID;
165-
const url = `${process.env.GRAFANA_URL}/render/d-solo/WpYTNiOnz/${dashboard}?orgId=${orgId}&from=now-30d&to=now&var-course=${course}&panelId=${panel}&width=1000&height=500&tz=Europe%2FHelsinki`;
163+
const url = `${process.env.GRAFANA_URL}&var-course=${course}&panelId=${panel}&width=1000&height=500&tz=Europe%2FHelsinki`;
166164
const directory = path.resolve(__dirname, "../../promMetrics/graph/");
167165

168166
if (!fs.existsSync(directory)) {

0 commit comments

Comments
 (0)