Skip to content

Commit

Permalink
refactor: adjust config settings for grafana
Browse files Browse the repository at this point in the history
  • Loading branch information
mashb1t committed Mar 9, 2022
1 parent b16f5d8 commit 6d8dba9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion config/php.env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ APP_NAME=spotisights
APP_ENV=local
APP_KEY=base64:N/2tPIH4LosPts/ulPSHwPkvrMKa5Ux5nZ83eT2JeBY=
APP_DEBUG=true
APP_URL=https://127.0.0.1:8080
APP_URL=http://127.0.0.1:8080

LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
Expand Down Expand Up @@ -43,6 +43,7 @@ SPOTIFY_CRAWL_BULK_LIMIT=50
SPOTIFY_CACHE_TTL=2592000

# Grafana redirect (leave empty for no recirect after login)
GRAFANA_URL=http://127.0.0.1:3000
GRAFANA_DASHBOARD_URL=http://127.0.0.1:3000/d/spotisights/current-user

# Services
Expand Down
5 changes: 4 additions & 1 deletion php/src/config/spotisights.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
'active' => explode(',', env('ACTIVE_SERVICES', '')),
],

'grafana_dashboard_url' => env('GRAFANA_DASHBOARD_URL')

'grafana' => [
'url' => env('GRAFANA_URL'),
'dashboard_url' => env('GRAFANA_DASHBOARD_URL')
]
];
2 changes: 1 addition & 1 deletion php/src/resources/views/connect.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<div class="text-center text-lg text-gray-600 dark:text-gray-400 sm:text-left">
<div class="flex items-center">
@if (session('logged_in_spotify'))
<a href="{{ config('spotisights.grafana_dashboard_url') }}">Show Statistics</a>
<a href="{{ config('spotisights.grafana.dashboard_url') }}">Show Statistics</a>
@endif
</div>
</div>
Expand Down

0 comments on commit 6d8dba9

Please sign in to comment.