Skip to content

Commit

Permalink
Allow customizing Grafana maps and links
Browse files Browse the repository at this point in the history
  • Loading branch information
GeniJaho committed Aug 11, 2024
1 parent 588f529 commit c7460c4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ VITE_PUSHER_HOST="${PUSHER_HOST}"
VITE_PUSHER_PORT="${PUSHER_PORT}"
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
VITE_GRAFANA_NAV_LINK=https://globalmap.litterapp.net/
VITE_GRAFANA_MAP_LINK=https://globalmap.litterapp.net/

GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
Expand All @@ -67,4 +69,4 @@ GOOGLE_REDIRECT_URI=/auth/google/callback

TWITTER_CLIENT_ID=
TWITTER_CLIENT_SECRET=
TWITTER_REDIRECT_URI=/auth/twitter/callback
TWITTER_REDIRECT_URI=/auth/twitter/callback
5 changes: 4 additions & 1 deletion resources/js/Components/Welcome.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<script setup>
import {Link} from "@inertiajs/vue3";
const grafanaLink = import.meta.env.VITE_GRAFANA_MAP_LINK;
</script>

<template>
Expand Down Expand Up @@ -33,7 +36,7 @@ import {Link} from "@inertiajs/vue3";

<div class="pt-32 w-full">
<iframe class="w-full"
src="https://globalmap.litterapp.net/"
:src="grafanaLink"
width="450"
height="450"
frameborder="0"
Expand Down
6 changes: 4 additions & 2 deletions resources/js/Layouts/AppLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ defineProps({
const showingNavigationDropdown = ref(false);
const grafanaLink = import.meta.env.VITE_GRAFANA_NAV_LINK;
const switchToTeam = (team) => {
router.put(route('current-team.update'), {
team_id: team.id,
Expand Down Expand Up @@ -49,7 +51,7 @@ const logout = () => {

<!-- Navigation Links -->
<div class="hidden sm:space-x-8 lg:space-x-24 sm:-my-px ml-12 lg:ml-14 md:flex">
<NavLink href="https://globalmap.litterapp.net/"
<NavLink :href="grafanaLink"
:externalLink="true"
target="_blank"
>
Expand Down Expand Up @@ -265,7 +267,7 @@ const logout = () => {
class="sm:hidden">
<div class="pt-2 pb-3 space-y-1">

<ResponsiveNavLink href="https://globalmap.litterapp.net/"
<ResponsiveNavLink :href="grafanaLink"
as="externalLink"
target="_blank"
>
Expand Down

0 comments on commit c7460c4

Please sign in to comment.