@dxos/plugin-observability 0.8.4-main.4a85c3132b → 0.8.4-main.51f1e5ca51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/ObservabilitySettings-H6UKYDDT.mjs +27 -0
- package/dist/lib/browser/ObservabilitySettings-H6UKYDDT.mjs.map +7 -0
- package/dist/lib/browser/capture-user-feedback-3BXDUCZM.mjs +24 -0
- package/dist/lib/browser/capture-user-feedback-3BXDUCZM.mjs.map +7 -0
- package/dist/lib/browser/chunk-DLBA63VM.mjs +83 -0
- package/dist/lib/browser/chunk-DLBA63VM.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/browser/chunk-VQC6DG6V.mjs +53 -0
- package/dist/lib/browser/chunk-VQC6DG6V.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +10 -14
- package/dist/lib/browser/cli/index.mjs.map +3 -3
- package/dist/lib/browser/index.mjs +79 -51
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operations/index.mjs +15 -0
- package/dist/lib/browser/operations/index.mjs.map +7 -0
- package/dist/lib/browser/send-event-F3D32CJX.mjs +22 -0
- package/dist/lib/browser/send-event-F3D32CJX.mjs.map +7 -0
- package/dist/lib/browser/toggle-PPNDFGWJ.mjs +47 -0
- package/dist/lib/browser/toggle-PPNDFGWJ.mjs.map +7 -0
- package/dist/lib/browser/translations.mjs +33 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +4 -6
- package/dist/lib/node-esm/ObservabilitySettings-HXTWPHHR.mjs +28 -0
- package/dist/lib/node-esm/ObservabilitySettings-HXTWPHHR.mjs.map +7 -0
- package/dist/lib/node-esm/capture-user-feedback-LUPWJWGK.mjs +25 -0
- package/dist/lib/node-esm/capture-user-feedback-LUPWJWGK.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-3B7HMSKM.mjs +84 -0
- package/dist/lib/node-esm/chunk-3B7HMSKM.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-NCIKZY6L.mjs +54 -0
- package/dist/lib/node-esm/chunk-NCIKZY6L.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +10 -14
- package/dist/lib/node-esm/cli/index.mjs.map +3 -3
- package/dist/lib/node-esm/index.mjs +79 -51
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operations/index.mjs +16 -0
- package/dist/lib/node-esm/operations/index.mjs.map +7 -0
- package/dist/lib/node-esm/send-event-OKTEXC7M.mjs +23 -0
- package/dist/lib/node-esm/send-event-OKTEXC7M.mjs.map +7 -0
- package/dist/lib/node-esm/toggle-YS2KFMXS.mjs +48 -0
- package/dist/lib/node-esm/toggle-YS2KFMXS.mjs.map +7 -0
- package/dist/lib/node-esm/translations.mjs +34 -0
- package/dist/lib/node-esm/translations.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +4 -6
- package/dist/types/src/ObservabilityPlugin.d.ts +5 -0
- package/dist/types/src/ObservabilityPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/client-ready.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +17 -6
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/{settings/settings.d.ts → settings.d.ts} +2 -5
- package/dist/types/src/capabilities/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- package/dist/types/src/cli/plugin.d.ts.map +1 -1
- package/dist/types/src/components/FeedbackForm/FeedbackForm.d.ts +9 -0
- package/dist/types/src/components/FeedbackForm/FeedbackForm.d.ts.map +1 -0
- package/dist/types/src/components/FeedbackForm/FeedbackForm.stories.d.ts +36 -0
- package/dist/types/src/components/FeedbackForm/FeedbackForm.stories.d.ts.map +1 -0
- package/dist/types/src/components/FeedbackForm/index.d.ts +2 -0
- package/dist/types/src/components/FeedbackForm/index.d.ts.map +1 -0
- package/dist/types/src/components/ObservabilitySettings/ObservabilitySettings.d.ts +6 -0
- package/dist/types/src/components/ObservabilitySettings/ObservabilitySettings.d.ts.map +1 -0
- package/dist/types/src/components/ObservabilitySettings/ObservabilitySettings.stories.d.ts +36 -0
- package/dist/types/src/components/ObservabilitySettings/ObservabilitySettings.stories.d.ts.map +1 -0
- package/dist/types/src/components/ObservabilitySettings/index.d.ts +2 -0
- package/dist/types/src/components/ObservabilitySettings/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +2 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/HelpContainer/HelpContainer.d.ts.map +1 -1
- package/dist/types/src/containers/HelpContainer/index.d.ts +1 -2
- package/dist/types/src/containers/HelpContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +0 -3
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/operations/capture-user-feedback.d.ts +5 -0
- package/dist/types/src/operations/capture-user-feedback.d.ts.map +1 -0
- package/dist/types/src/operations/definitions.d.ts +23 -0
- package/dist/types/src/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +5 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/send-event.d.ts +5 -0
- package/dist/types/src/operations/send-event.d.ts.map +1 -0
- package/dist/types/src/operations/toggle.d.ts +5 -0
- package/dist/types/src/operations/toggle.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +17 -18
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Settings.d.ts +7 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/capabilities.d.ts +9 -5
- package/dist/types/src/types/capabilities.d.ts.map +1 -1
- package/dist/types/src/types/events.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +1 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +48 -33
- package/src/ObservabilityPlugin.ts +25 -11
- package/src/capabilities/app-graph-builder.ts +36 -0
- package/src/capabilities/{client-ready/client-ready.ts → client-ready.ts} +32 -9
- package/src/capabilities/index.ts +14 -6
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +41 -0
- package/src/capabilities/{settings/settings.ts → settings.ts} +4 -5
- package/src/capabilities/{state/state.ts → state.ts} +2 -2
- package/src/cli/plugin.ts +15 -12
- package/src/components/{FeedbackForm.stories.tsx → FeedbackForm/FeedbackForm.stories.tsx} +12 -1
- package/src/components/FeedbackForm/FeedbackForm.tsx +49 -0
- package/src/components/FeedbackForm/index.ts +5 -0
- package/src/components/ObservabilitySettings/ObservabilitySettings.stories.tsx +34 -0
- package/src/components/ObservabilitySettings/ObservabilitySettings.tsx +34 -0
- package/src/components/ObservabilitySettings/index.ts +5 -0
- package/src/components/index.ts +4 -0
- package/src/containers/HelpContainer/HelpContainer.tsx +11 -9
- package/src/containers/HelpContainer/index.ts +1 -3
- package/src/containers/index.ts +0 -7
- package/src/meta.ts +1 -1
- package/src/operations/capture-user-feedback.ts +22 -0
- package/src/operations/definitions.ts +76 -0
- package/src/operations/index.ts +14 -0
- package/src/operations/send-event.ts +24 -0
- package/src/operations/toggle.ts +47 -0
- package/src/translations.ts +17 -17
- package/src/types/Settings.ts +22 -0
- package/src/types/capabilities.ts +16 -6
- package/src/types/events.ts +2 -2
- package/src/types/index.ts +1 -1
- package/dist/lib/browser/HelpContainer-FS6R75L5.mjs +0 -74
- package/dist/lib/browser/HelpContainer-FS6R75L5.mjs.map +0 -7
- package/dist/lib/browser/ObservabilitySettings-M63CU4QW.mjs +0 -12
- package/dist/lib/browser/ObservabilitySettings-M63CU4QW.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-7PBOGFFG.mjs +0 -45
- package/dist/lib/browser/app-graph-builder-7PBOGFFG.mjs.map +0 -7
- package/dist/lib/browser/chunk-3XZDP7JS.mjs +0 -16
- package/dist/lib/browser/chunk-3XZDP7JS.mjs.map +0 -7
- package/dist/lib/browser/chunk-BURIOTMF.mjs +0 -41
- package/dist/lib/browser/chunk-BURIOTMF.mjs.map +0 -7
- package/dist/lib/browser/chunk-TB4V5AI3.mjs +0 -138
- package/dist/lib/browser/chunk-TB4V5AI3.mjs.map +0 -7
- package/dist/lib/browser/chunk-WYDANA3A.mjs +0 -32
- package/dist/lib/browser/chunk-WYDANA3A.mjs.map +0 -7
- package/dist/lib/browser/chunk-X2MDAD6K.mjs +0 -10
- package/dist/lib/browser/chunk-X2MDAD6K.mjs.map +0 -7
- package/dist/lib/browser/client-ready-QVJQMW75.mjs +0 -102
- package/dist/lib/browser/client-ready-QVJQMW75.mjs.map +0 -7
- package/dist/lib/browser/operation-resolver-MDAGP5UW.mjs +0 -78
- package/dist/lib/browser/operation-resolver-MDAGP5UW.mjs.map +0 -7
- package/dist/lib/browser/react-surface-R2TPU5TH.mjs +0 -39
- package/dist/lib/browser/react-surface-R2TPU5TH.mjs.map +0 -7
- package/dist/lib/browser/settings-K3HZEWSK.mjs +0 -37
- package/dist/lib/browser/settings-K3HZEWSK.mjs.map +0 -7
- package/dist/lib/browser/state-YS5COCDC.mjs +0 -30
- package/dist/lib/browser/state-YS5COCDC.mjs.map +0 -7
- package/dist/lib/node-esm/HelpContainer-XOCD23EA.mjs +0 -75
- package/dist/lib/node-esm/HelpContainer-XOCD23EA.mjs.map +0 -7
- package/dist/lib/node-esm/ObservabilitySettings-TONQ3AAW.mjs +0 -13
- package/dist/lib/node-esm/ObservabilitySettings-TONQ3AAW.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-D77CGMCQ.mjs +0 -46
- package/dist/lib/node-esm/app-graph-builder-D77CGMCQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2ECMMPZY.mjs +0 -18
- package/dist/lib/node-esm/chunk-2ECMMPZY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BGK3JUVL.mjs +0 -42
- package/dist/lib/node-esm/chunk-BGK3JUVL.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-IDJN2AON.mjs +0 -33
- package/dist/lib/node-esm/chunk-IDJN2AON.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-NH4PVNUO.mjs +0 -139
- package/dist/lib/node-esm/chunk-NH4PVNUO.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-WYLPEENT.mjs +0 -12
- package/dist/lib/node-esm/chunk-WYLPEENT.mjs.map +0 -7
- package/dist/lib/node-esm/client-ready-LXKSSYVT.mjs +0 -103
- package/dist/lib/node-esm/client-ready-LXKSSYVT.mjs.map +0 -7
- package/dist/lib/node-esm/operation-resolver-MV5V25GK.mjs +0 -79
- package/dist/lib/node-esm/operation-resolver-MV5V25GK.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-XXT3YBYG.mjs +0 -40
- package/dist/lib/node-esm/react-surface-XXT3YBYG.mjs.map +0 -7
- package/dist/lib/node-esm/settings-M7JG6IRW.mjs +0 -38
- package/dist/lib/node-esm/settings-M7JG6IRW.mjs.map +0 -7
- package/dist/lib/node-esm/state-LU6EARPH.mjs +0 -31
- package/dist/lib/node-esm/state-LU6EARPH.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/client-ready/client-ready.d.ts.map +0 -1
- package/dist/types/src/capabilities/client-ready/index.d.ts +0 -4
- package/dist/types/src/capabilities/client-ready/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -7
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/index.d.ts +0 -7
- package/dist/types/src/capabilities/settings/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/settings.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/index.d.ts +0 -11
- package/dist/types/src/capabilities/state/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/state.d.ts.map +0 -1
- package/dist/types/src/components/FeedbackForm.d.ts +0 -6
- package/dist/types/src/components/FeedbackForm.d.ts.map +0 -1
- package/dist/types/src/components/FeedbackForm.stories.d.ts +0 -35
- package/dist/types/src/components/FeedbackForm.stories.d.ts.map +0 -1
- package/dist/types/src/containers/ObservabilitySettings/ObservabilitySettings.d.ts +0 -12
- package/dist/types/src/containers/ObservabilitySettings/ObservabilitySettings.d.ts.map +0 -1
- package/dist/types/src/containers/ObservabilitySettings/index.d.ts +0 -3
- package/dist/types/src/containers/ObservabilitySettings/index.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -63
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +0 -43
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/client-ready/index.ts +0 -9
- package/src/capabilities/operation-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -76
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/react-surface/react-surface.tsx +0 -35
- package/src/capabilities/settings/index.ts +0 -7
- package/src/capabilities/state/index.ts +0 -7
- package/src/components/FeedbackForm.tsx +0 -33
- package/src/containers/ObservabilitySettings/ObservabilitySettings.tsx +0 -53
- package/src/containers/ObservabilitySettings/index.ts +0 -7
- package/src/types/schema.ts +0 -84
- /package/dist/types/src/capabilities/{app-graph-builder/app-graph-builder.d.ts → app-graph-builder.d.ts} +0 -0
- /package/dist/types/src/capabilities/{client-ready/client-ready.d.ts → client-ready.d.ts} +0 -0
- /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
- /package/dist/types/src/capabilities/{state/state.d.ts → state.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-observability",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.51f1e5ca51",
|
|
4
4
|
"description": "DXOS app framework plugin for hooking up app observability",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -12,6 +12,15 @@
|
|
|
12
12
|
"author": "DXOS.org",
|
|
13
13
|
"sideEffects": true,
|
|
14
14
|
"type": "module",
|
|
15
|
+
"imports": {
|
|
16
|
+
"#capabilities": "./src/capabilities/index.ts",
|
|
17
|
+
"#components": "./src/components/index.ts",
|
|
18
|
+
"#containers": "./src/containers/index.ts",
|
|
19
|
+
"#meta": "./src/meta.ts",
|
|
20
|
+
"#operations": "./src/operations/index.ts",
|
|
21
|
+
"#translations": "./src/translations.ts",
|
|
22
|
+
"#types": "./src/types/index.ts"
|
|
23
|
+
},
|
|
15
24
|
"exports": {
|
|
16
25
|
".": {
|
|
17
26
|
"source": "./src/index.ts",
|
|
@@ -25,6 +34,18 @@
|
|
|
25
34
|
"browser": "./dist/lib/browser/cli/index.mjs",
|
|
26
35
|
"node": "./dist/lib/node-esm/cli/index.mjs"
|
|
27
36
|
},
|
|
37
|
+
"./operations": {
|
|
38
|
+
"source": "./src/operations/index.ts",
|
|
39
|
+
"types": "./dist/types/src/operations/index.d.ts",
|
|
40
|
+
"browser": "./dist/lib/browser/operations/index.mjs",
|
|
41
|
+
"node": "./dist/lib/node-esm/operations/index.mjs"
|
|
42
|
+
},
|
|
43
|
+
"./translations": {
|
|
44
|
+
"source": "./src/translations.ts",
|
|
45
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
46
|
+
"browser": "./dist/lib/browser/translations.mjs",
|
|
47
|
+
"node": "./dist/lib/node-esm/translations.mjs"
|
|
48
|
+
},
|
|
28
49
|
"./types": {
|
|
29
50
|
"source": "./src/types/index.ts",
|
|
30
51
|
"types": "./dist/types/src/types/index.d.ts",
|
|
@@ -33,13 +54,6 @@
|
|
|
33
54
|
}
|
|
34
55
|
},
|
|
35
56
|
"types": "dist/types/src/index.d.ts",
|
|
36
|
-
"typesVersions": {
|
|
37
|
-
"*": {
|
|
38
|
-
"types": [
|
|
39
|
-
"dist/types/src/types/index.d.ts"
|
|
40
|
-
]
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
57
|
"files": [
|
|
44
58
|
"dist",
|
|
45
59
|
"src"
|
|
@@ -47,44 +61,45 @@
|
|
|
47
61
|
"dependencies": {
|
|
48
62
|
"@effect-atom/atom": "^0.5.1",
|
|
49
63
|
"@effect-atom/atom-react": "^0.5.0",
|
|
50
|
-
"effect": "3.
|
|
64
|
+
"effect": "3.20.0",
|
|
51
65
|
"localforage": "^1.10.0",
|
|
52
|
-
"@dxos/app-framework": "0.8.4-main.
|
|
53
|
-
"@dxos/app-toolkit": "0.8.4-main.
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/react-client": "0.8.4-main.
|
|
64
|
-
"@dxos/react-hooks": "0.8.4-main.
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/
|
|
66
|
+
"@dxos/app-framework": "0.8.4-main.51f1e5ca51",
|
|
67
|
+
"@dxos/app-toolkit": "0.8.4-main.51f1e5ca51",
|
|
68
|
+
"@dxos/async": "0.8.4-main.51f1e5ca51",
|
|
69
|
+
"@dxos/context": "0.8.4-main.51f1e5ca51",
|
|
70
|
+
"@dxos/echo": "0.8.4-main.51f1e5ca51",
|
|
71
|
+
"@dxos/compute": "0.8.4-main.51f1e5ca51",
|
|
72
|
+
"@dxos/effect": "0.8.4-main.51f1e5ca51",
|
|
73
|
+
"@dxos/invariant": "0.8.4-main.51f1e5ca51",
|
|
74
|
+
"@dxos/log": "0.8.4-main.51f1e5ca51",
|
|
75
|
+
"@dxos/observability": "0.8.4-main.51f1e5ca51",
|
|
76
|
+
"@dxos/plugin-graph": "0.8.4-main.51f1e5ca51",
|
|
77
|
+
"@dxos/react-client": "0.8.4-main.51f1e5ca51",
|
|
78
|
+
"@dxos/react-hooks": "0.8.4-main.51f1e5ca51",
|
|
79
|
+
"@dxos/protocols": "0.8.4-main.51f1e5ca51",
|
|
80
|
+
"@dxos/react-ui-attention": "0.8.4-main.51f1e5ca51",
|
|
81
|
+
"@dxos/react-ui-form": "0.8.4-main.51f1e5ca51",
|
|
82
|
+
"@dxos/util": "0.8.4-main.51f1e5ca51",
|
|
83
|
+
"@dxos/react-ui-stack": "0.8.4-main.51f1e5ca51"
|
|
69
84
|
},
|
|
70
85
|
"devDependencies": {
|
|
71
86
|
"@effect-atom/atom-react": "^0.5.0",
|
|
72
87
|
"@effect/platform": "0.94.4",
|
|
73
88
|
"@types/react": "~19.2.7",
|
|
74
89
|
"react": "~19.2.3",
|
|
75
|
-
"vite": "^
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/
|
|
78
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
90
|
+
"vite": "^8.0.10",
|
|
91
|
+
"@dxos/storybook-utils": "0.8.4-main.51f1e5ca51",
|
|
92
|
+
"@dxos/react-ui": "0.8.4-main.51f1e5ca51",
|
|
93
|
+
"@dxos/ui-theme": "0.8.4-main.51f1e5ca51"
|
|
79
94
|
},
|
|
80
95
|
"peerDependencies": {
|
|
81
96
|
"@effect-atom/atom-react": "^0.5.0",
|
|
82
97
|
"@effect/platform": "0.94.4",
|
|
83
|
-
"effect": "3.
|
|
98
|
+
"effect": "3.20.0",
|
|
84
99
|
"react": "~19.2.3",
|
|
85
100
|
"react-dom": "~19.2.3",
|
|
86
|
-
"@dxos/ui
|
|
87
|
-
"@dxos/
|
|
101
|
+
"@dxos/react-ui": "0.8.4-main.51f1e5ca51",
|
|
102
|
+
"@dxos/ui-theme": "0.8.4-main.51f1e5ca51"
|
|
88
103
|
},
|
|
89
104
|
"publishConfig": {
|
|
90
105
|
"access": "public"
|
|
@@ -13,24 +13,29 @@ import {
|
|
|
13
13
|
ClientReady,
|
|
14
14
|
ObservabilitySettings,
|
|
15
15
|
ObservabilityState,
|
|
16
|
-
|
|
16
|
+
OperationHandler,
|
|
17
17
|
ReactSurface,
|
|
18
|
-
} from '
|
|
19
|
-
import { meta } from '
|
|
20
|
-
import { translations } from '
|
|
21
|
-
import { ClientReadyEvent, ObservabilityEvents } from '
|
|
22
|
-
import { ObservabilityCapabilities } from '
|
|
18
|
+
} from '#capabilities';
|
|
19
|
+
import { meta } from '#meta';
|
|
20
|
+
import { translations } from '#translations';
|
|
21
|
+
import { ClientReadyEvent, ObservabilityEvents } from '#types';
|
|
22
|
+
import { ObservabilityCapabilities } from '#types';
|
|
23
23
|
|
|
24
24
|
export type ObservabilityPluginOptions = {
|
|
25
25
|
namespace: string;
|
|
26
26
|
observability: () => Promise<Observability.Observability>;
|
|
27
|
+
/**
|
|
28
|
+
* Optional callback invoked by the help/feedback UI to download captured logs.
|
|
29
|
+
* When omitted the "Download logs" action is hidden.
|
|
30
|
+
*/
|
|
31
|
+
downloadLogs?: () => void | Promise<void>;
|
|
27
32
|
};
|
|
28
33
|
|
|
29
34
|
export const ObservabilityPlugin = Plugin.define<ObservabilityPluginOptions>(meta).pipe(
|
|
30
35
|
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
31
36
|
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
32
37
|
AppPlugin.addTranslationsModule({ translations }),
|
|
33
|
-
Plugin.addModule(({
|
|
38
|
+
Plugin.addModule(({ observability }) => ({
|
|
34
39
|
id: 'observability',
|
|
35
40
|
activatesOn: ActivationEvents.Startup,
|
|
36
41
|
activate: () =>
|
|
@@ -46,14 +51,23 @@ export const ObservabilityPlugin = Plugin.define<ObservabilityPluginOptions>(met
|
|
|
46
51
|
Plugin.addModule(({ namespace }) => ({
|
|
47
52
|
id: Capability.getModuleTag(ObservabilityState),
|
|
48
53
|
activatesOn: ActivationEvents.Startup,
|
|
49
|
-
|
|
54
|
+
firesAfterActivation: [ObservabilityEvents.StateReady],
|
|
50
55
|
activate: () => ObservabilityState({ namespace }),
|
|
51
56
|
})),
|
|
52
57
|
Plugin.addModule(({ namespace }) => ({
|
|
53
|
-
id:
|
|
54
|
-
activatesOn: ActivationEvents.
|
|
55
|
-
activate: () =>
|
|
58
|
+
id: 'namespace',
|
|
59
|
+
activatesOn: ActivationEvents.Startup,
|
|
60
|
+
activate: () => Effect.succeed(Capability.contributes(ObservabilityCapabilities.Namespace, namespace)),
|
|
61
|
+
})),
|
|
62
|
+
Plugin.addModule(({ downloadLogs }) => ({
|
|
63
|
+
id: 'log-downloader',
|
|
64
|
+
activatesOn: ActivationEvents.Startup,
|
|
65
|
+
activate: () =>
|
|
66
|
+
Effect.succeed(
|
|
67
|
+
downloadLogs !== undefined ? Capability.contributes(ObservabilityCapabilities.LogDownloader, downloadLogs) : [],
|
|
68
|
+
),
|
|
56
69
|
})),
|
|
70
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
57
71
|
Plugin.addModule(({ namespace, observability }) => ({
|
|
58
72
|
id: Capability.getModuleTag(ClientReady),
|
|
59
73
|
activatesOn: ActivationEvent.allOf(
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities, AppNode } from '@dxos/app-toolkit';
|
|
9
|
+
import { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';
|
|
10
|
+
import { linkedSegment } from '@dxos/react-ui-attention';
|
|
11
|
+
|
|
12
|
+
import { meta } from '#meta';
|
|
13
|
+
|
|
14
|
+
export default Capability.makeModule(
|
|
15
|
+
Effect.fnUntraced(function* () {
|
|
16
|
+
const extensions = yield* Effect.all([
|
|
17
|
+
GraphBuilder.createExtension({
|
|
18
|
+
id: 'help',
|
|
19
|
+
match: NodeMatcher.whenRoot,
|
|
20
|
+
connector: (node) =>
|
|
21
|
+
Effect.succeed([
|
|
22
|
+
AppNode.makeDeckCompanion({
|
|
23
|
+
id: linkedSegment('help'),
|
|
24
|
+
label: ['help.label', { ns: meta.id }],
|
|
25
|
+
icon: 'ph--question--regular',
|
|
26
|
+
data: null,
|
|
27
|
+
position: 'hoist',
|
|
28
|
+
joyride: 'welcome/feedback',
|
|
29
|
+
}),
|
|
30
|
+
]),
|
|
31
|
+
}),
|
|
32
|
+
]);
|
|
33
|
+
|
|
34
|
+
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
35
|
+
}),
|
|
36
|
+
);
|
|
@@ -6,10 +6,12 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
|
|
7
7
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
8
|
import { LayoutOperation, SettingsOperation } from '@dxos/app-toolkit';
|
|
9
|
+
import { log } from '@dxos/log';
|
|
9
10
|
import { type Observability, ObservabilityProvider } from '@dxos/observability';
|
|
10
11
|
|
|
11
|
-
import { meta } from '
|
|
12
|
-
import {
|
|
12
|
+
import { meta } from '#meta';
|
|
13
|
+
import { ObservabilityOperation } from '#operations';
|
|
14
|
+
import { ClientCapability, ObservabilityCapabilities } from '#types';
|
|
13
15
|
|
|
14
16
|
export type ClientReadyOptions = {
|
|
15
17
|
namespace: string;
|
|
@@ -31,14 +33,14 @@ export default Capability.makeModule(
|
|
|
31
33
|
const state = registry.get(stateAtom);
|
|
32
34
|
if (!state.notified && notify) {
|
|
33
35
|
await invokePromise(LayoutOperation.AddToast, {
|
|
34
|
-
id: `${meta.id}
|
|
35
|
-
title: ['observability
|
|
36
|
-
description: ['observability
|
|
36
|
+
id: `${meta.id}.notice`,
|
|
37
|
+
title: ['observability-toast.label', { ns: meta.id }],
|
|
38
|
+
description: ['observability-toast.description', { ns: meta.id }],
|
|
37
39
|
duration: Infinity,
|
|
38
40
|
icon: 'ph--info--regular',
|
|
39
|
-
actionLabel: ['observability
|
|
40
|
-
actionAlt: ['observability
|
|
41
|
-
closeLabel: ['observability
|
|
41
|
+
actionLabel: ['observability-toast-action.label', { ns: meta.id }],
|
|
42
|
+
actionAlt: ['observability-toast-action.alt', { ns: meta.id }],
|
|
43
|
+
closeLabel: ['observability-toast-close.label', { ns: meta.id }],
|
|
42
44
|
onAction: () => invokePromise(SettingsOperation.Open, { plugin: meta.id }),
|
|
43
45
|
});
|
|
44
46
|
|
|
@@ -48,10 +50,12 @@ export default Capability.makeModule(
|
|
|
48
50
|
|
|
49
51
|
// Ensure errors are tagged with enabled plugins to help with reproductions.
|
|
50
52
|
const enabledPlugins = manager.getEnabled();
|
|
53
|
+
log('client-ready: tagging enabled plugins', { count: enabledPlugins.length });
|
|
51
54
|
for (const plugin of enabledPlugins) {
|
|
52
55
|
observability.setTags({ [`pluginEnabled-${plugin}`]: 'true' }, 'errors');
|
|
53
56
|
}
|
|
54
57
|
|
|
58
|
+
log('client-ready: sending page.load event');
|
|
55
59
|
yield* Effect.tryPromise(() =>
|
|
56
60
|
invokePromise(ObservabilityOperation.SendEvent, {
|
|
57
61
|
name: 'page.load',
|
|
@@ -61,16 +65,34 @@ export default Capability.makeModule(
|
|
|
61
65
|
},
|
|
62
66
|
}),
|
|
63
67
|
);
|
|
68
|
+
log('client-ready: page.load event sent');
|
|
64
69
|
|
|
65
|
-
//
|
|
70
|
+
// Each provider is logged individually because some provider setups perform
|
|
71
|
+
// RPC calls (e.g. runtimeMetricsProvider awaits SystemService.getPlatform());
|
|
72
|
+
// a hung worker pipe surfaces as a missing "added" log, so the last
|
|
73
|
+
// "adding ..." line points to the stall.
|
|
74
|
+
log('client-ready: adding identity data provider');
|
|
66
75
|
yield* observability.addDataProvider(ObservabilityProvider.Client.identityProvider(client.services.services));
|
|
76
|
+
log('client-ready: identity data provider added');
|
|
77
|
+
|
|
78
|
+
log('client-ready: adding network metrics data provider');
|
|
67
79
|
yield* observability.addDataProvider(ObservabilityProvider.Client.networkMetricsProvider(client.services.services));
|
|
80
|
+
log('client-ready: network metrics data provider added');
|
|
81
|
+
|
|
82
|
+
log('client-ready: adding runtime metrics data provider');
|
|
68
83
|
yield* observability.addDataProvider(ObservabilityProvider.Client.runtimeMetricsProvider(client.services.services));
|
|
84
|
+
log('client-ready: runtime metrics data provider added');
|
|
85
|
+
|
|
86
|
+
log('client-ready: adding space metrics data provider');
|
|
69
87
|
yield* observability.addDataProvider(ObservabilityProvider.Client.spacesMetricsProvider(client));
|
|
88
|
+
log('client-ready: space metrics data provider added');
|
|
70
89
|
|
|
71
90
|
if (client.halo.identity.get()) {
|
|
91
|
+
log('client-ready: identity present, sending privacy notice');
|
|
72
92
|
yield* Effect.tryPromise(() => sendPrivacyNotice());
|
|
93
|
+
log('client-ready: privacy notice sent');
|
|
73
94
|
} else {
|
|
95
|
+
log('client-ready: no identity, deferring privacy notice');
|
|
74
96
|
const subscription = client.halo.identity.subscribe(async (identity) => {
|
|
75
97
|
if (identity && observability) {
|
|
76
98
|
await sendPrivacyNotice();
|
|
@@ -79,6 +101,7 @@ export default Capability.makeModule(
|
|
|
79
101
|
});
|
|
80
102
|
}
|
|
81
103
|
|
|
104
|
+
log('client-ready: contributing observability capability');
|
|
82
105
|
return Capability.contributes(ObservabilityCapabilities.Observability, observability, () => observability.close());
|
|
83
106
|
}),
|
|
84
107
|
);
|
|
@@ -2,9 +2,17 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export
|
|
5
|
+
import { Capability } from '@dxos/app-framework';
|
|
6
|
+
import { OperationHandlerSet } from '@dxos/compute';
|
|
7
|
+
|
|
8
|
+
import type { ClientReadyOptions } from './client-ready';
|
|
9
|
+
|
|
10
|
+
export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
|
|
11
|
+
export const ClientReady = Capability.lazy<ClientReadyOptions>('ClientReady', () => import('./client-ready'));
|
|
12
|
+
export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
|
|
13
|
+
'OperationHandler',
|
|
14
|
+
() => import('./operation-handler'),
|
|
15
|
+
);
|
|
16
|
+
export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
|
|
17
|
+
export const ObservabilitySettings = Capability.lazy('ObservabilitySettings', () => import('./settings'));
|
|
18
|
+
export const ObservabilityState = Capability.lazy('ObservabilityState', () => import('./state'));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import type { OperationHandlerSet } from '@dxos/compute';
|
|
9
|
+
|
|
10
|
+
import { ObservabilityOperationHandlerSet } from '#operations';
|
|
11
|
+
|
|
12
|
+
export default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(
|
|
13
|
+
Effect.fnUntraced(function* () {
|
|
14
|
+
return Capability.contributes(Capabilities.OperationHandler, ObservabilityOperationHandlerSet);
|
|
15
|
+
}),
|
|
16
|
+
);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { Surface, useOperationInvoker, useSettingsState } from '@dxos/app-framework/ui';
|
|
10
|
+
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
11
|
+
|
|
12
|
+
import { ObservabilitySettings } from '#components';
|
|
13
|
+
import { HelpContainer } from '#containers';
|
|
14
|
+
import { meta } from '#meta';
|
|
15
|
+
import { ObservabilityOperation } from '#operations';
|
|
16
|
+
import { type Settings } from '#types';
|
|
17
|
+
|
|
18
|
+
export default Capability.makeModule(() =>
|
|
19
|
+
Effect.succeed(
|
|
20
|
+
Capability.contributes(Capabilities.ReactSurface, [
|
|
21
|
+
Surface.create({
|
|
22
|
+
id: 'root',
|
|
23
|
+
filter: AppSurface.settings(AppSurface.Article, meta.id),
|
|
24
|
+
component: ({ data: { subject } }) => {
|
|
25
|
+
const { settings } = useSettingsState<Settings.Settings>(subject.atom);
|
|
26
|
+
const { invokePromise } = useOperationInvoker();
|
|
27
|
+
const handleSettingsChange = (cb: (current: Settings.Settings) => Settings.Settings) => {
|
|
28
|
+
const next = cb(settings);
|
|
29
|
+
void invokePromise(ObservabilityOperation.Toggle, { state: next.enabled });
|
|
30
|
+
};
|
|
31
|
+
return <ObservabilitySettings settings={settings} onSettingsChange={handleSettingsChange} />;
|
|
32
|
+
},
|
|
33
|
+
}),
|
|
34
|
+
Surface.create({
|
|
35
|
+
id: 'help',
|
|
36
|
+
role: 'deck-companion--help',
|
|
37
|
+
component: () => <HelpContainer />,
|
|
38
|
+
}),
|
|
39
|
+
]),
|
|
40
|
+
),
|
|
41
|
+
);
|
|
@@ -8,15 +8,14 @@ import { Capability } from '@dxos/app-framework';
|
|
|
8
8
|
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
9
9
|
import { createKvsStore } from '@dxos/effect';
|
|
10
10
|
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { ObservabilityCapabilities } from '../../types';
|
|
11
|
+
import { meta } from '#meta';
|
|
12
|
+
import { ObservabilityCapabilities, Settings } from '#types';
|
|
14
13
|
|
|
15
14
|
export default Capability.makeModule(() =>
|
|
16
15
|
Effect.sync(() => {
|
|
17
16
|
const settingsAtom = createKvsStore({
|
|
18
17
|
key: meta.id,
|
|
19
|
-
schema:
|
|
18
|
+
schema: Settings.Settings,
|
|
20
19
|
defaultValue: () => ({
|
|
21
20
|
enabled: true,
|
|
22
21
|
}),
|
|
@@ -26,7 +25,7 @@ export default Capability.makeModule(() =>
|
|
|
26
25
|
Capability.contributes(ObservabilityCapabilities.Settings, settingsAtom),
|
|
27
26
|
Capability.contributes(AppCapabilities.Settings, {
|
|
28
27
|
prefix: meta.id,
|
|
29
|
-
schema:
|
|
28
|
+
schema: Settings.Settings,
|
|
30
29
|
atom: settingsAtom,
|
|
31
30
|
}),
|
|
32
31
|
];
|
|
@@ -8,8 +8,8 @@ import { Capabilities, Capability } from '@dxos/app-framework';
|
|
|
8
8
|
import { createKvsStore } from '@dxos/effect';
|
|
9
9
|
import { Observability } from '@dxos/observability';
|
|
10
10
|
|
|
11
|
-
import { meta } from '
|
|
12
|
-
import { ObservabilityCapabilities } from '
|
|
11
|
+
import { meta } from '#meta';
|
|
12
|
+
import { ObservabilityCapabilities } from '#types';
|
|
13
13
|
|
|
14
14
|
export default Capability.makeModule(
|
|
15
15
|
Effect.fnUntraced(function* ({ namespace }: { namespace: string }) {
|
package/src/cli/plugin.ts
CHANGED
|
@@ -6,23 +6,26 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
|
|
7
7
|
import { Capabilities, Capability, Plugin } from '@dxos/app-framework';
|
|
8
8
|
import { AppPlugin } from '@dxos/app-toolkit';
|
|
9
|
-
import {
|
|
9
|
+
import { Operation, OperationHandlerSet } from '@dxos/compute';
|
|
10
10
|
|
|
11
|
-
import { meta } from '
|
|
12
|
-
import { ObservabilityOperation } from '
|
|
11
|
+
import { meta } from '#meta';
|
|
12
|
+
import { ObservabilityOperation } from '#operations';
|
|
13
13
|
|
|
14
14
|
// TODO(wittjosiah): Hook up.
|
|
15
15
|
export const ObservabilityPlugin = Plugin.define(meta).pipe(
|
|
16
|
-
AppPlugin.
|
|
17
|
-
activate: () =>
|
|
18
|
-
|
|
19
|
-
Capability.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
AppPlugin.addOperationHandlerModule({
|
|
17
|
+
activate: Capability.lazy('OperationHandler', () =>
|
|
18
|
+
Promise.resolve({
|
|
19
|
+
default: Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(
|
|
20
|
+
Effect.fnUntraced(function* () {
|
|
21
|
+
return Capability.contributes(
|
|
22
|
+
Capabilities.OperationHandler,
|
|
23
|
+
OperationHandlerSet.make(Operation.withHandler(ObservabilityOperation.SendEvent, () => Effect.void)),
|
|
24
|
+
);
|
|
23
25
|
}),
|
|
24
|
-
|
|
25
|
-
),
|
|
26
|
+
),
|
|
27
|
+
}),
|
|
28
|
+
),
|
|
26
29
|
}),
|
|
27
30
|
Plugin.make,
|
|
28
31
|
);
|
|
@@ -6,7 +6,7 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
|
6
6
|
|
|
7
7
|
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
8
8
|
|
|
9
|
-
import { translations } from '
|
|
9
|
+
import { translations } from '#translations';
|
|
10
10
|
|
|
11
11
|
import { FeedbackForm } from './FeedbackForm';
|
|
12
12
|
|
|
@@ -31,3 +31,14 @@ export const Default: Story = {
|
|
|
31
31
|
},
|
|
32
32
|
},
|
|
33
33
|
};
|
|
34
|
+
|
|
35
|
+
export const WithDownloadLogs: Story = {
|
|
36
|
+
args: {
|
|
37
|
+
onSave: (values) => {
|
|
38
|
+
console.log(values);
|
|
39
|
+
},
|
|
40
|
+
onDownloadLogs: () => {
|
|
41
|
+
console.log('download logs clicked');
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { IconButton, useTranslation } from '@dxos/react-ui';
|
|
8
|
+
import { Form, type FormRootProps, type FormSubmitProps } from '@dxos/react-ui-form';
|
|
9
|
+
|
|
10
|
+
import { meta } from '#meta';
|
|
11
|
+
import { UserFeedback } from '#operations';
|
|
12
|
+
|
|
13
|
+
export type FeedbackFormProps = Pick<FormRootProps<UserFeedback>, 'onSave'> &
|
|
14
|
+
Pick<FormSubmitProps, 'disabled'> & {
|
|
15
|
+
/** Optional handler — when supplied a "Download logs" button is rendered below the submit action. */
|
|
16
|
+
onDownloadLogs?: () => void | Promise<void>;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const defaultValues: UserFeedback = {
|
|
20
|
+
message: '',
|
|
21
|
+
includeLogs: true,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const FeedbackForm = ({ onSave, disabled, onDownloadLogs }: FeedbackFormProps) => {
|
|
25
|
+
const { t } = useTranslation(meta.id);
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<Form.Root schema={UserFeedback} defaultValues={defaultValues} onSave={onSave}>
|
|
29
|
+
<Form.Viewport>
|
|
30
|
+
<Form.Content>
|
|
31
|
+
<Form.FieldSet />
|
|
32
|
+
<Form.Submit icon='ph--paper-plane-tilt--regular' label={t('send-feedback.label')} disabled={disabled} />
|
|
33
|
+
{onDownloadLogs && (
|
|
34
|
+
<div role='none' className='flex w-full pt-form-padding'>
|
|
35
|
+
<IconButton
|
|
36
|
+
classNames='w-full'
|
|
37
|
+
type='button'
|
|
38
|
+
icon='ph--download-simple--regular'
|
|
39
|
+
label={t('download-logs.label')}
|
|
40
|
+
onClick={() => void onDownloadLogs()}
|
|
41
|
+
data-testid='download-logs-button'
|
|
42
|
+
/>
|
|
43
|
+
</div>
|
|
44
|
+
)}
|
|
45
|
+
</Form.Content>
|
|
46
|
+
</Form.Viewport>
|
|
47
|
+
</Form.Root>
|
|
48
|
+
);
|
|
49
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
|
|
7
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
8
|
+
|
|
9
|
+
import { translations } from '#translations';
|
|
10
|
+
|
|
11
|
+
import { ObservabilitySettings } from './ObservabilitySettings';
|
|
12
|
+
|
|
13
|
+
const meta = {
|
|
14
|
+
title: 'plugins/plugin-observability/components/ObservabilitySettings',
|
|
15
|
+
component: ObservabilitySettings,
|
|
16
|
+
tags: ['settings'],
|
|
17
|
+
decorators: [withTheme(), withLayout({ layout: 'fullscreen' })],
|
|
18
|
+
parameters: {
|
|
19
|
+
layout: 'fullscreen',
|
|
20
|
+
translations,
|
|
21
|
+
},
|
|
22
|
+
} satisfies Meta<typeof ObservabilitySettings>;
|
|
23
|
+
|
|
24
|
+
export default meta;
|
|
25
|
+
|
|
26
|
+
type Story = StoryObj<typeof meta>;
|
|
27
|
+
|
|
28
|
+
export const Default: Story = {
|
|
29
|
+
args: {
|
|
30
|
+
settings: {
|
|
31
|
+
enabled: true,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { type AppSurface } from '@dxos/app-toolkit/ui';
|
|
8
|
+
import { Message, useTranslation } from '@dxos/react-ui';
|
|
9
|
+
import { Settings as SettingsForm } from '@dxos/react-ui-form';
|
|
10
|
+
|
|
11
|
+
import { meta } from '#meta';
|
|
12
|
+
import { Settings } from '#types';
|
|
13
|
+
|
|
14
|
+
export type ObservabilitySettingsProps = AppSurface.SettingsArticleProps<Settings.Settings>;
|
|
15
|
+
|
|
16
|
+
export const ObservabilitySettings = ({ settings, onSettingsChange }: ObservabilitySettingsProps) => {
|
|
17
|
+
const { t } = useTranslation(meta.id);
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<SettingsForm.Viewport>
|
|
21
|
+
<SettingsForm.Section title={t('settings.title', { ns: meta.id })}>
|
|
22
|
+
<Message.Root valence='info'>
|
|
23
|
+
<Message.Content>{t('observability.description')}</Message.Content>
|
|
24
|
+
</Message.Root>
|
|
25
|
+
<SettingsForm.FieldSet
|
|
26
|
+
readonly={!onSettingsChange}
|
|
27
|
+
schema={Settings.Settings}
|
|
28
|
+
values={settings}
|
|
29
|
+
onValuesChanged={(values) => onSettingsChange?.(() => values)}
|
|
30
|
+
/>
|
|
31
|
+
</SettingsForm.Section>
|
|
32
|
+
</SettingsForm.Viewport>
|
|
33
|
+
);
|
|
34
|
+
};
|
package/src/components/index.ts
CHANGED