Skip to content

Commit

Permalink
feat: GEO-1189 - removed flags allowing dashboard and analytics pages…
Browse files Browse the repository at this point in the history
… to be disabled (#857)
  • Loading branch information
banders authored Nov 26, 2024
1 parent b1ca62c commit 2df08aa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
2 changes: 0 additions & 2 deletions admin-frontend/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
Content-Type text/javascript
}
respond `window.config = {
"IS_ADMIN_DASHBOARD_AVAILABLE":"{$IS_ADMIN_DASHBOARD_AVAILABLE}",
"IS_ADMIN_ANALYTICS_AVAILABLE":"{$IS_ADMIN_ANALYTICS_AVAILABLE}",
"SNOWPLOW_URL":"{$SNOWPLOW_URL}"
};`
}
Expand Down
9 changes: 2 additions & 7 deletions admin-frontend/src/components/AnalyticsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
>Web Traffic Analytics</v-btn
>

<div v-if="isAnalyticsAvailable" class="w-100 overflow-x-auto">
<div class="w-100 overflow-x-auto">
<div
v-for="[name, details] in powerBiDetailsPerResource"
:key="name"
Expand Down Expand Up @@ -47,16 +47,11 @@ type PowerBiDetails = {
const snowplowUrl = (window as any).config?.SNOWPLOW_URL;
const isAnalyticsAvailable =
(window as any).config?.IS_ADMIN_ANALYTICS_AVAILABLE?.toUpperCase() == 'TRUE';
const powerBiDetailsPerResource = createDefaultPowerBiDetailsMap([
POWERBI_RESOURCE.ANALYTICS,
]);
if (isAnalyticsAvailable) {
getPowerBiAccessToken(powerBiDetailsPerResource);
}
getPowerBiAccessToken(powerBiDetailsPerResource);
/** Create a Map containing the details of the resources. */
function createDefaultPowerBiDetailsMap(
Expand Down
4 changes: 1 addition & 3 deletions admin-frontend/src/components/DashboardPage.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-row v-if="isDashboardAvailable" :dense="true" class="w-100">
<v-row :dense="true" class="w-100">
<v-col sm="12" md="12" lg="7" xl="6" class="mb-4">
<h4 class="mb-4">
<v-icon icon="mdi-clipboard-text-outline"></v-icon>
Expand Down Expand Up @@ -85,8 +85,6 @@ import ToolTip from './ToolTip.vue';
import { ref, onMounted } from 'vue';
const refreshIntervalMinutes: number = 5;
const isDashboardAvailable =
(window as any).config?.IS_ADMIN_DASHBOARD_AVAILABLE?.toUpperCase() == 'TRUE';
const recentlySubmittedReports = ref<typeof RecentlySubmittedReports>();
const recentlyViewedReports = ref<typeof RecentlyViewedReports>();
Expand Down

0 comments on commit 2df08aa

Please sign in to comment.