From a256fd95933e0e5961639f76e865ec40a93e9a6f Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Fri, 31 Oct 2025 12:52:25 +0000 Subject: [PATCH] px stuff --- .../public/locales/en-GB/translation.json | 2 +- .../configSections/AdminPremiumSection.tsx | 14 ++--- .../audit/AuditChartsSection.tsx | 34 +++++------- .../usage/UsageAnalyticsChart.tsx | 30 +++++------ .../config/configSections/PeopleSection.tsx | 8 +-- .../configSections/TeamDetailsSection.tsx | 53 ++++++++----------- .../config/configSections/TeamsSection.tsx | 13 ++--- 7 files changed, 64 insertions(+), 90 deletions(-) diff --git a/frontend/public/locales/en-GB/translation.json b/frontend/public/locales/en-GB/translation.json index 1131afb60..368c17b13 100644 --- a/frontend/public/locales/en-GB/translation.json +++ b/frontend/public/locales/en-GB/translation.json @@ -3726,7 +3726,7 @@ "enableAnalytics": "Enable Analytics", "enableAnalytics.description": "Collect anonymous usage analytics to help improve the application", "metricsEnabled": "Enable Metrics", - "metricsEnabled.description": "Enable collection of performance and usage metrics", + "metricsEnabled.description": "Enable collection of performance and usage metrics. Provides API endpoint for admins to access metrics data", "searchEngine": "Search Engine Visibility", "googleVisibility": "Google Visibility", "googleVisibility.description": "Allow search engines to index this application" diff --git a/frontend/src/core/components/shared/config/configSections/AdminPremiumSection.tsx b/frontend/src/core/components/shared/config/configSections/AdminPremiumSection.tsx index 42f45cb64..87781ba1d 100644 --- a/frontend/src/core/components/shared/config/configSections/AdminPremiumSection.tsx +++ b/frontend/src/core/components/shared/config/configSections/AdminPremiumSection.tsx @@ -1,6 +1,6 @@ import { useEffect } from 'react'; import { useTranslation } from 'react-i18next'; -import { TextInput, Switch, Button, Stack, Paper, Text, Loader, Group, Alert } from '@mantine/core'; +import { TextInput, Switch, Button, Stack, Paper, Text, Loader, Group, Alert, List } from '@mantine/core'; import { alert } from '@app/components/toast'; import LocalIcon from '@app/components/shared/LocalIcon'; import RestartConfirmationModal from '@app/components/shared/config/RestartConfirmationModal'; @@ -73,12 +73,12 @@ export default function AdminPremiumSection() { {t('admin.settings.premium.movedFeatures.message', 'Premium and Enterprise features are now organized in their respective sections:')} - + + SSO Auto Login (PRO) - Connections + Custom Metadata (PRO) - General + Audit Logging (ENTERPRISE) - Security + Database Configuration (ENTERPRISE) - Database + {/* License Configuration */} diff --git a/frontend/src/core/components/shared/config/configSections/audit/AuditChartsSection.tsx b/frontend/src/core/components/shared/config/configSections/audit/AuditChartsSection.tsx index 671092945..bf97df52c 100644 --- a/frontend/src/core/components/shared/config/configSections/audit/AuditChartsSection.tsx +++ b/frontend/src/core/components/shared/config/configSections/audit/AuditChartsSection.tsx @@ -1,5 +1,5 @@ import React, { useState, useEffect } from 'react'; -import { Card, Text, Group, Stack, SegmentedControl, Loader, Alert } from '@mantine/core'; +import { Card, Text, Group, Stack, SegmentedControl, Loader, Alert, Box, SimpleGrid } from '@mantine/core'; import { useTranslation } from 'react-i18next'; import auditService, { AuditChartsData } from '@app/services/auditService'; @@ -17,9 +17,9 @@ const SimpleBarChart: React.FC = ({ data, title, color = 'b {title} -
+ {data.map((item, index) => ( -
+ {item.label} @@ -28,16 +28,16 @@ const SimpleBarChart: React.FC = ({ data, title, color = 'b {item.value} -
-
= ({ data, title, color = 'b transition: 'width 0.3s ease', }} /> -
-
+
+ ))} -
+
); }; @@ -82,9 +82,9 @@ const AuditChartsSection: React.FC = () => { if (loading) { return ( -
+ -
+
); } @@ -134,13 +134,7 @@ const AuditChartsSection: React.FC = () => { /> -
+ = () => { title={t('audit.charts.overTime', 'Events Over Time')} color="purple" /> -
+ ); diff --git a/frontend/src/core/components/shared/config/configSections/usage/UsageAnalyticsChart.tsx b/frontend/src/core/components/shared/config/configSections/usage/UsageAnalyticsChart.tsx index 29165fedc..7ca14039e 100644 --- a/frontend/src/core/components/shared/config/configSections/usage/UsageAnalyticsChart.tsx +++ b/frontend/src/core/components/shared/config/configSections/usage/UsageAnalyticsChart.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Card, Text, Stack } from '@mantine/core'; +import { Card, Text, Stack, Group, Box } from '@mantine/core'; import { useTranslation } from 'react-i18next'; interface SimpleBarChartProps { @@ -11,20 +11,20 @@ const SimpleBarChart: React.FC = ({ data, maxValue }) => { const { t } = useTranslation(); return ( -
+ {data.length === 0 ? ( {t('usage.noData', 'No data available')} ) : ( data.map((item, index) => ( -
-
+ + = ({ data, maxValue }) => { > {item.label} -
+ {item.value} ({((item.value / maxValue) * 100).toFixed(1)}%) -
-
-
+ + -
= ({ data, maxValue }) => { transition: 'width 0.3s ease', }} /> -
-
+ + )) )} -
+
); }; diff --git a/frontend/src/proprietary/components/shared/config/configSections/PeopleSection.tsx b/frontend/src/proprietary/components/shared/config/configSections/PeopleSection.tsx index d653d74db..ea93291c7 100644 --- a/frontend/src/proprietary/components/shared/config/configSections/PeopleSection.tsx +++ b/frontend/src/proprietary/components/shared/config/configSections/PeopleSection.tsx @@ -476,6 +476,7 @@ export default function PeopleSection() { ) : ( filteredUsers.map((user) => ( - + + -
- {user.username.charAt(0).toUpperCase()} -
-
+ + {user.username.charAt(0).toUpperCase()} + + + )} -
+
diff --git a/frontend/src/proprietary/components/shared/config/configSections/TeamsSection.tsx b/frontend/src/proprietary/components/shared/config/configSections/TeamsSection.tsx index d93dca9de..5e31588fb 100644 --- a/frontend/src/proprietary/components/shared/config/configSections/TeamsSection.tsx +++ b/frontend/src/proprietary/components/shared/config/configSections/TeamsSection.tsx @@ -228,6 +228,8 @@ export default function TeamsSection() {
( setViewingTeamId(team.id)} - onMouseEnter={(e) => { - e.currentTarget.style.backgroundColor = 'var(--mantine-color-gray-0)'; - }} - onMouseLeave={(e) => { - e.currentTarget.style.backgroundColor = 'transparent'; - }} >