Skip to content

Commit c0060ab

Browse files
committed
feat(observability): add onboarding pages for tenants and services
resolves: #MAOBS-110 Signed-off-by: David Arsène <david.arsene.ext@ovhcloud.com>
1 parent 8c36c8f commit c0060ab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1999
-74
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ packages/manager-tools/manager-pm
4646
packages/manager-tools/manager-muk-cli
4747
packages/manager/apps/pci-instances
4848
packages/manager/apps/pci-workflow
49+
packages/manager/apps/observability
4950
packages/manager/apps/web-domains
5051
packages/manager/apps/web-hosting
5152
packages/manager/apps/web-office

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ packages/manager/apps/pci-databases-analytics/src/components/ui
1212
packages/manager/apps/pci-databases-analytics/src/lib/utils.ts
1313
packages/manager-ui-kit
1414
packages/manager-wiki
15+
packages/manager/apps/observability

packages/manager/apps/container/src/container/legacy/server-sidebar/universe/DedicatedSidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ export default function DedicatedSidebar() {
537537
id: 'tenants',
538538
href: navigation.getURL('observability', '#/metrics/tenants'),
539539
label: t('sidebar_observability_metrics_tenants'),
540-
pathMatcher: new RegExp('^/observability/metrics/tenants'),
540+
pathMatcher: new RegExp('^/observability/metrics'),
541541
ignoreSearch: true,
542542
icon: observabilityIcon,
543543
},

packages/manager/apps/container/src/container/nav-reshuffle/sidebar/navigation-tree/services/observability.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ sioUniverse.children = [
4545
routing: {
4646
application: 'observability',
4747
hash: '#/metrics/tenants',
48+
// TODO: manage patchMather once merged
4849
},
4950
},
5051
],

packages/manager/apps/observability/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ The app uses **hash-based routing**. Open the dev server URL printed by Vite (de
3434
```
3535
#/[flavor-aware root from Routes.utils.ts]
3636
```
37+
### Enable mock mode for API calls (temporary)
38+
39+
Update `src/__mocks__/mock.config.ts`
40+
```js
41+
export const apiConfig = {
42+
mode: 'mock',
43+
};
44+
```
3745
---
3846

3947
## 📚 Useful Links

packages/manager/apps/observability/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"test:coverage": "manager-test run --coverage"
2020
},
2121
"dependencies": {
22+
"@ovh-ux/manager-common-translations": "*",
2223
"@ovh-ux/manager-config": "*",
2324
"@ovh-ux/manager-core-api": "*",
2425
"@ovh-ux/manager-core-utils": "*",
@@ -51,8 +52,5 @@
5152
"CA",
5253
"EU",
5354
"US"
54-
],
55-
"universes": [
56-
"Manager"
5755
]
5856
}
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
{
2-
"title": "Metrics"
2+
"listing": {
3+
"service": "Service",
4+
"select_observability_service": "Sélectionnez un service"
5+
},
6+
"onboarding": {
7+
"description": "Créez votre service pour découvrir comment les métriques d'observabilité vont vous aider à accéder à une vision plus fine et granulaire des performances de votre infrastructure et vos applications.",
8+
"orderButtonLabel": "Activez votre service"
9+
}
310
}
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
2-
"title": "Tenants",
32
"listing": {
43
"title": "Liste des tenants"
4+
},
5+
"onboarding": {
6+
"description": "Créez votre nouveau tenant pour continuer à explorer tout le potentiel des métriques d'observabilité. Vous pourrez envoyer des données, créer des tableaux de bord et configurer des alertes adaptées à vos besoins spécifiques.",
7+
"orderButtonLabel": "Créez votre tenant"
58
}
69
}

packages/manager/apps/observability/setupTests.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ import { vi } from 'vitest';
55

66
global.fetch = fetch;
77

8+
// TODO remove during unmocking phase
9+
vi.mock('@/__mocks__/mock.config', () => ({
10+
apiConfig: {
11+
mode: 'api',
12+
},
13+
}));
14+
815
vi.mock('react-i18next', () => ({
916
useTranslation: () => ({
1017
t: (translationKey: string) => translationKey,

packages/manager/apps/observability/src/App.constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export const appName = 'observability';
22

3-
export const AppConfig = {
3+
export const AppConfig = {
44
rootLabel: appName,
55
} as const;
66

0 commit comments

Comments
 (0)