@dxos/plugin-observability 0.8.4-main.937b3ca → 0.8.4-main.9be5663bfe
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-EM7ABGCA.mjs +31 -0
- package/dist/lib/browser/ObservabilitySettings-EM7ABGCA.mjs.map +7 -0
- package/dist/lib/browser/capture-user-feedback-4HGXJGJL.mjs +25 -0
- package/dist/lib/browser/capture-user-feedback-4HGXJGJL.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-J6DPYEFZ.mjs +49 -0
- package/dist/lib/browser/chunk-J6DPYEFZ.mjs.map +7 -0
- package/dist/lib/browser/chunk-K33HLC3Z.mjs +33 -0
- package/dist/lib/browser/chunk-K33HLC3Z.mjs.map +7 -0
- package/dist/lib/browser/chunk-VZR3FNBD.mjs +85 -0
- package/dist/lib/browser/chunk-VZR3FNBD.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +12 -15
- package/dist/lib/browser/cli/index.mjs.map +3 -3
- package/dist/lib/browser/index.mjs +72 -60
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operations/index.mjs +16 -0
- package/dist/lib/browser/operations/index.mjs.map +7 -0
- package/dist/lib/browser/send-event-VV2I6QYY.mjs +23 -0
- package/dist/lib/browser/send-event-VV2I6QYY.mjs.map +7 -0
- package/dist/lib/browser/toggle-H2GX3A6G.mjs +48 -0
- package/dist/lib/browser/toggle-H2GX3A6G.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +4 -6
- package/dist/lib/node-esm/ObservabilitySettings-VP4A362Z.mjs +32 -0
- package/dist/lib/node-esm/ObservabilitySettings-VP4A362Z.mjs.map +7 -0
- package/dist/lib/node-esm/capture-user-feedback-SDQA2VYI.mjs +26 -0
- package/dist/lib/node-esm/capture-user-feedback-SDQA2VYI.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-FZRJBWSE.mjs +86 -0
- package/dist/lib/node-esm/chunk-FZRJBWSE.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-JGHMP7UL.mjs +35 -0
- package/dist/lib/node-esm/chunk-JGHMP7UL.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-K7WZOJZF.mjs +50 -0
- package/dist/lib/node-esm/chunk-K7WZOJZF.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +12 -15
- package/dist/lib/node-esm/cli/index.mjs.map +3 -3
- package/dist/lib/node-esm/index.mjs +72 -60
- 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 +17 -0
- package/dist/lib/node-esm/operations/index.mjs.map +7 -0
- package/dist/lib/node-esm/send-event-EMV3VHAA.mjs +24 -0
- package/dist/lib/node-esm/send-event-EMV3VHAA.mjs.map +7 -0
- package/dist/lib/node-esm/toggle-XRNGEYNP.mjs +49 -0
- package/dist/lib/node-esm/toggle-XRNGEYNP.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +4 -6
- package/dist/types/src/ObservabilityPlugin.d.ts +1 -1
- package/dist/types/src/ObservabilityPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/client-ready.d.ts +10 -0
- package/dist/types/src/capabilities/client-ready.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +21 -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 +5 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings.d.ts +10 -0
- package/dist/types/src/capabilities/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/{state/state.d.ts → state.d.ts} +2 -2
- 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 +6 -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 +37 -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 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/HelpContainer/HelpContainer.d.ts +4 -0
- package/dist/types/src/containers/HelpContainer/HelpContainer.d.ts.map +1 -0
- package/dist/types/src/containers/HelpContainer/index.d.ts +2 -0
- package/dist/types/src/containers/HelpContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +3 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/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 +18 -16
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Settings.d.ts +6 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/capabilities.d.ts +2 -1
- 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 +50 -30
- package/src/ObservabilityPlugin.ts +20 -17
- package/src/capabilities/app-graph-builder.ts +35 -0
- package/src/capabilities/client-ready.ts +85 -0
- package/src/capabilities/index.ts +14 -6
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +42 -0
- package/src/capabilities/{settings/settings.ts → settings.ts} +7 -7
- package/src/capabilities/{state/state.ts → state.ts} +7 -8
- package/src/cli/plugin.ts +17 -13
- package/src/components/{FeedbackForm.stories.tsx → FeedbackForm/FeedbackForm.stories.tsx} +3 -4
- package/src/components/FeedbackForm/FeedbackForm.tsx +33 -0
- package/src/components/FeedbackForm/index.ts +5 -0
- package/src/components/ObservabilitySettings/ObservabilitySettings.stories.tsx +33 -0
- package/src/components/ObservabilitySettings/ObservabilitySettings.tsx +38 -0
- package/src/components/ObservabilitySettings/index.ts +5 -0
- package/src/components/index.ts +4 -2
- package/src/containers/HelpContainer/HelpContainer.tsx +56 -0
- package/src/containers/HelpContainer/index.ts +5 -0
- package/src/containers/index.ts +7 -0
- package/src/index.ts +1 -0
- package/src/meta.ts +1 -1
- package/src/operations/capture-user-feedback.ts +22 -0
- package/src/operations/definitions.ts +77 -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 +18 -17
- package/src/types/Settings.ts +19 -0
- package/src/types/capabilities.ts +9 -6
- package/src/types/events.ts +5 -4
- package/src/types/index.ts +1 -1
- package/dist/lib/browser/app-graph-builder-6KDHLPUO.mjs +0 -44
- package/dist/lib/browser/app-graph-builder-6KDHLPUO.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-PYNLPSSZ.mjs +0 -133
- package/dist/lib/browser/chunk-PYNLPSSZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-SN7DIHQG.mjs +0 -102
- package/dist/lib/browser/chunk-SN7DIHQG.mjs.map +0 -7
- package/dist/lib/browser/client-ready-YWKHC5S2.mjs +0 -107
- package/dist/lib/browser/client-ready-YWKHC5S2.mjs.map +0 -7
- package/dist/lib/browser/operation-resolver-4ROZET3B.mjs +0 -82
- package/dist/lib/browser/operation-resolver-4ROZET3B.mjs.map +0 -7
- package/dist/lib/browser/react-surface-SJTESQAF.mjs +0 -37
- package/dist/lib/browser/react-surface-SJTESQAF.mjs.map +0 -7
- package/dist/lib/browser/settings-SQ4ICR7F.mjs +0 -35
- package/dist/lib/browser/settings-SQ4ICR7F.mjs.map +0 -7
- package/dist/lib/browser/state-IKCFXHYV.mjs +0 -31
- package/dist/lib/browser/state-IKCFXHYV.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-4YHKY4SP.mjs +0 -45
- package/dist/lib/node-esm/app-graph-builder-4YHKY4SP.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-4T4N2NJZ.mjs +0 -134
- package/dist/lib/node-esm/chunk-4T4N2NJZ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HNMV7ZZZ.mjs +0 -103
- package/dist/lib/node-esm/chunk-HNMV7ZZZ.mjs.map +0 -7
- package/dist/lib/node-esm/client-ready-YLYG6F6H.mjs +0 -108
- package/dist/lib/node-esm/client-ready-YLYG6F6H.mjs.map +0 -7
- package/dist/lib/node-esm/operation-resolver-UI7ZINXR.mjs +0 -83
- package/dist/lib/node-esm/operation-resolver-UI7ZINXR.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-D53VLGHY.mjs +0 -38
- package/dist/lib/node-esm/react-surface-D53VLGHY.mjs.map +0 -7
- package/dist/lib/node-esm/settings-WIRCHLWE.mjs +0 -36
- package/dist/lib/node-esm/settings-WIRCHLWE.mjs.map +0 -7
- package/dist/lib/node-esm/state-MQR4PNOT.mjs +0 -32
- package/dist/lib/node-esm/state-MQR4PNOT.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +0 -6
- 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 +0 -10
- 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 -6
- 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 +0 -5
- 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 +0 -9
- 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 -34
- package/dist/types/src/components/FeedbackForm.stories.d.ts.map +0 -1
- package/dist/types/src/components/HelpContainer.d.ts +0 -3
- package/dist/types/src/components/HelpContainer.d.ts.map +0 -1
- package/dist/types/src/components/ObservabilitySettings.d.ts +0 -12
- package/dist/types/src/components/ObservabilitySettings.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -61
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +0 -42
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/client-ready/client-ready.ts +0 -97
- package/src/capabilities/client-ready/index.ts +0 -7
- package/src/capabilities/operation-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -82
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/react-surface/react-surface.tsx +0 -34
- package/src/capabilities/settings/index.ts +0 -7
- package/src/capabilities/state/index.ts +0 -7
- package/src/components/FeedbackForm.tsx +0 -26
- package/src/components/HelpContainer.tsx +0 -36
- package/src/components/ObservabilitySettings.tsx +0 -53
- package/src/types/schema.ts +0 -78
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.9be5663bfe",
|
|
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,14 @@
|
|
|
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
|
+
"#types": "./src/types/index.ts"
|
|
22
|
+
},
|
|
15
23
|
"exports": {
|
|
16
24
|
".": {
|
|
17
25
|
"source": "./src/index.ts",
|
|
@@ -25,6 +33,12 @@
|
|
|
25
33
|
"browser": "./dist/lib/browser/cli/index.mjs",
|
|
26
34
|
"node": "./dist/lib/node-esm/cli/index.mjs"
|
|
27
35
|
},
|
|
36
|
+
"./operations": {
|
|
37
|
+
"source": "./src/operations/index.ts",
|
|
38
|
+
"types": "./dist/types/src/operations/index.d.ts",
|
|
39
|
+
"browser": "./dist/lib/browser/operations/index.mjs",
|
|
40
|
+
"node": "./dist/lib/node-esm/operations/index.mjs"
|
|
41
|
+
},
|
|
28
42
|
"./types": {
|
|
29
43
|
"source": "./src/types/index.ts",
|
|
30
44
|
"types": "./dist/types/src/types/index.d.ts",
|
|
@@ -37,6 +51,9 @@
|
|
|
37
51
|
"*": {
|
|
38
52
|
"types": [
|
|
39
53
|
"dist/types/src/types/index.d.ts"
|
|
54
|
+
],
|
|
55
|
+
"operations": [
|
|
56
|
+
"dist/types/src/operations/index.d.ts"
|
|
40
57
|
]
|
|
41
58
|
}
|
|
42
59
|
},
|
|
@@ -45,44 +62,47 @@
|
|
|
45
62
|
"src"
|
|
46
63
|
],
|
|
47
64
|
"dependencies": {
|
|
48
|
-
"@effect-atom/atom": "^0.
|
|
49
|
-
"@effect-atom/atom-react": "^0.
|
|
50
|
-
"effect": "3.
|
|
65
|
+
"@effect-atom/atom": "^0.5.1",
|
|
66
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
67
|
+
"effect": "3.20.0",
|
|
51
68
|
"localforage": "^1.10.0",
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/app-
|
|
54
|
-
"@dxos/context": "0.8.4-main.
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/operation": "0.8.4-main.
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/react-
|
|
65
|
-
"@dxos/react-ui-
|
|
66
|
-
"@dxos/
|
|
69
|
+
"@dxos/app-framework": "0.8.4-main.9be5663bfe",
|
|
70
|
+
"@dxos/app-toolkit": "0.8.4-main.9be5663bfe",
|
|
71
|
+
"@dxos/context": "0.8.4-main.9be5663bfe",
|
|
72
|
+
"@dxos/async": "0.8.4-main.9be5663bfe",
|
|
73
|
+
"@dxos/echo": "0.8.4-main.9be5663bfe",
|
|
74
|
+
"@dxos/effect": "0.8.4-main.9be5663bfe",
|
|
75
|
+
"@dxos/observability": "0.8.4-main.9be5663bfe",
|
|
76
|
+
"@dxos/operation": "0.8.4-main.9be5663bfe",
|
|
77
|
+
"@dxos/plugin-graph": "0.8.4-main.9be5663bfe",
|
|
78
|
+
"@dxos/invariant": "0.8.4-main.9be5663bfe",
|
|
79
|
+
"@dxos/react-client": "0.8.4-main.9be5663bfe",
|
|
80
|
+
"@dxos/protocols": "0.8.4-main.9be5663bfe",
|
|
81
|
+
"@dxos/react-hooks": "0.8.4-main.9be5663bfe",
|
|
82
|
+
"@dxos/react-ui-attention": "0.8.4-main.9be5663bfe",
|
|
83
|
+
"@dxos/react-ui-stack": "0.8.4-main.9be5663bfe",
|
|
84
|
+
"@dxos/react-ui-form": "0.8.4-main.9be5663bfe",
|
|
85
|
+
"@dxos/util": "0.8.4-main.9be5663bfe",
|
|
86
|
+
"@dxos/log": "0.8.4-main.9be5663bfe"
|
|
67
87
|
},
|
|
68
88
|
"devDependencies": {
|
|
69
|
-
"@effect-atom/atom-react": "^0.
|
|
70
|
-
"@effect/platform": "0.
|
|
89
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
90
|
+
"@effect/platform": "0.94.4",
|
|
71
91
|
"@types/react": "~19.2.7",
|
|
72
92
|
"react": "~19.2.3",
|
|
73
|
-
"vite": "7.1.
|
|
74
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
75
|
-
"@dxos/storybook-utils": "0.8.4-main.
|
|
76
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
93
|
+
"vite": "^7.1.11",
|
|
94
|
+
"@dxos/react-ui": "0.8.4-main.9be5663bfe",
|
|
95
|
+
"@dxos/storybook-utils": "0.8.4-main.9be5663bfe",
|
|
96
|
+
"@dxos/ui-theme": "0.8.4-main.9be5663bfe"
|
|
77
97
|
},
|
|
78
98
|
"peerDependencies": {
|
|
79
|
-
"@effect-atom/atom-react": "^0.
|
|
80
|
-
"@effect/platform": "0.
|
|
81
|
-
"effect": "3.
|
|
99
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
100
|
+
"@effect/platform": "0.94.4",
|
|
101
|
+
"effect": "3.20.0",
|
|
82
102
|
"react": "~19.2.3",
|
|
83
103
|
"react-dom": "~19.2.3",
|
|
84
|
-
"@dxos/
|
|
85
|
-
"@dxos/ui
|
|
104
|
+
"@dxos/ui-theme": "0.8.4-main.9be5663bfe",
|
|
105
|
+
"@dxos/react-ui": "0.8.4-main.9be5663bfe"
|
|
86
106
|
},
|
|
87
107
|
"publishConfig": {
|
|
88
108
|
"access": "public"
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
-
import { ActivationEvent,
|
|
7
|
+
import { ActivationEvent, ActivationEvents, Capability, Plugin } from '@dxos/app-framework';
|
|
8
|
+
import { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';
|
|
8
9
|
import { type Observability } from '@dxos/observability';
|
|
9
10
|
|
|
10
11
|
import {
|
|
@@ -12,23 +13,27 @@ import {
|
|
|
12
13
|
ClientReady,
|
|
13
14
|
ObservabilitySettings,
|
|
14
15
|
ObservabilityState,
|
|
15
|
-
|
|
16
|
+
OperationHandler,
|
|
16
17
|
ReactSurface,
|
|
17
|
-
} from '
|
|
18
|
-
import { meta } from '
|
|
18
|
+
} from '#capabilities';
|
|
19
|
+
import { meta } from '#meta';
|
|
20
|
+
import { ClientReadyEvent, ObservabilityEvents } from '#types';
|
|
21
|
+
import { ObservabilityCapabilities } from '#types';
|
|
22
|
+
|
|
19
23
|
import { translations } from './translations';
|
|
20
|
-
import { ClientReadyEvent, ObservabilityEvents } from './types';
|
|
21
|
-
import { ObservabilityCapabilities } from './types';
|
|
22
24
|
|
|
23
25
|
export type ObservabilityPluginOptions = {
|
|
24
26
|
namespace: string;
|
|
25
|
-
observability: () => Promise<Observability>;
|
|
27
|
+
observability: () => Promise<Observability.Observability>;
|
|
26
28
|
};
|
|
27
29
|
|
|
28
30
|
export const ObservabilityPlugin = Plugin.define<ObservabilityPluginOptions>(meta).pipe(
|
|
31
|
+
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
32
|
+
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
33
|
+
AppPlugin.addTranslationsModule({ translations }),
|
|
29
34
|
Plugin.addModule(({ namespace, observability }) => ({
|
|
30
35
|
id: 'observability',
|
|
31
|
-
activatesOn:
|
|
36
|
+
activatesOn: ActivationEvents.Startup,
|
|
32
37
|
activate: () =>
|
|
33
38
|
Effect.gen(function* () {
|
|
34
39
|
const obs = yield* Effect.tryPromise(() => observability());
|
|
@@ -36,27 +41,25 @@ export const ObservabilityPlugin = Plugin.define<ObservabilityPluginOptions>(met
|
|
|
36
41
|
}),
|
|
37
42
|
})),
|
|
38
43
|
Plugin.addModule({
|
|
39
|
-
activatesOn:
|
|
44
|
+
activatesOn: AppActivationEvents.SetupSettings,
|
|
40
45
|
activate: ObservabilitySettings,
|
|
41
46
|
}),
|
|
42
47
|
Plugin.addModule(({ namespace }) => ({
|
|
43
48
|
id: Capability.getModuleTag(ObservabilityState),
|
|
44
|
-
activatesOn:
|
|
49
|
+
activatesOn: ActivationEvents.Startup,
|
|
45
50
|
activatesAfter: [ObservabilityEvents.StateReady],
|
|
46
51
|
activate: () => ObservabilityState({ namespace }),
|
|
47
52
|
})),
|
|
48
|
-
Common.Plugin.addTranslationsModule({ translations }),
|
|
49
53
|
Plugin.addModule(({ namespace }) => ({
|
|
50
|
-
id:
|
|
51
|
-
activatesOn:
|
|
52
|
-
activate: () =>
|
|
54
|
+
id: 'namespace',
|
|
55
|
+
activatesOn: ActivationEvents.Startup,
|
|
56
|
+
activate: () => Effect.succeed(Capability.contributes(ObservabilityCapabilities.Namespace, namespace)),
|
|
53
57
|
})),
|
|
54
|
-
|
|
55
|
-
Common.Plugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
58
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
56
59
|
Plugin.addModule(({ namespace, observability }) => ({
|
|
57
60
|
id: Capability.getModuleTag(ClientReady),
|
|
58
61
|
activatesOn: ActivationEvent.allOf(
|
|
59
|
-
|
|
62
|
+
ActivationEvents.OperationInvokerReady,
|
|
60
63
|
ObservabilityEvents.StateReady,
|
|
61
64
|
ClientReadyEvent,
|
|
62
65
|
),
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
}),
|
|
29
|
+
]),
|
|
30
|
+
}),
|
|
31
|
+
]);
|
|
32
|
+
|
|
33
|
+
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
34
|
+
}),
|
|
35
|
+
);
|
|
@@ -0,0 +1,85 @@
|
|
|
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 { LayoutOperation, SettingsOperation } from '@dxos/app-toolkit';
|
|
9
|
+
import { type Observability, ObservabilityProvider } from '@dxos/observability';
|
|
10
|
+
|
|
11
|
+
import { meta } from '#meta';
|
|
12
|
+
import { ObservabilityOperation } from '#operations';
|
|
13
|
+
import { ClientCapability, ObservabilityCapabilities } from '#types';
|
|
14
|
+
|
|
15
|
+
export type ClientReadyOptions = {
|
|
16
|
+
namespace: string;
|
|
17
|
+
observability: Observability.Observability;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default Capability.makeModule(
|
|
21
|
+
Effect.fnUntraced(function* ({ observability }: ClientReadyOptions) {
|
|
22
|
+
const manager = yield* Capability.get(Capabilities.PluginManager);
|
|
23
|
+
const { invokePromise } = yield* Capability.get(Capabilities.OperationInvoker);
|
|
24
|
+
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
25
|
+
const stateAtom = yield* Capability.get(ObservabilityCapabilities.State);
|
|
26
|
+
const client = yield* Capability.get(ClientCapability);
|
|
27
|
+
|
|
28
|
+
const sendPrivacyNotice = async () => {
|
|
29
|
+
const environment = client?.config?.values.runtime?.app?.env?.DX_ENVIRONMENT;
|
|
30
|
+
const notify =
|
|
31
|
+
environment && environment !== 'ci' && !environment.endsWith('.local') && !environment.endsWith('.lan');
|
|
32
|
+
const state = registry.get(stateAtom);
|
|
33
|
+
if (!state.notified && notify) {
|
|
34
|
+
await invokePromise(LayoutOperation.AddToast, {
|
|
35
|
+
id: `${meta.id}.notice`,
|
|
36
|
+
title: ['observability-toast.label', { ns: meta.id }],
|
|
37
|
+
description: ['observability-toast.description', { ns: meta.id }],
|
|
38
|
+
duration: Infinity,
|
|
39
|
+
icon: 'ph--info--regular',
|
|
40
|
+
actionLabel: ['observability-toast-action.label', { ns: meta.id }],
|
|
41
|
+
actionAlt: ['observability-toast-action.alt', { ns: meta.id }],
|
|
42
|
+
closeLabel: ['observability-toast-close.label', { ns: meta.id }],
|
|
43
|
+
onAction: () => invokePromise(SettingsOperation.Open, { plugin: meta.id }),
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
registry.set(stateAtom, { ...registry.get(stateAtom), notified: true });
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
// Ensure errors are tagged with enabled plugins to help with reproductions.
|
|
51
|
+
const enabledPlugins = manager.getEnabled();
|
|
52
|
+
for (const plugin of enabledPlugins) {
|
|
53
|
+
observability.setTags({ [`pluginEnabled-${plugin}`]: 'true' }, 'errors');
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
yield* Effect.tryPromise(() =>
|
|
57
|
+
invokePromise(ObservabilityOperation.SendEvent, {
|
|
58
|
+
name: 'page.load',
|
|
59
|
+
properties: {
|
|
60
|
+
// TODO(wittjosiah): These apis are deprecated. Is there a better way to find this information?
|
|
61
|
+
loadDuration: window.performance.timing.loadEventEnd - window.performance.timing.loadEventStart,
|
|
62
|
+
},
|
|
63
|
+
}),
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
// Add client data providers.
|
|
67
|
+
yield* observability.addDataProvider(ObservabilityProvider.Client.identityProvider(client.services.services));
|
|
68
|
+
yield* observability.addDataProvider(ObservabilityProvider.Client.networkMetricsProvider(client.services.services));
|
|
69
|
+
yield* observability.addDataProvider(ObservabilityProvider.Client.runtimeMetricsProvider(client.services.services));
|
|
70
|
+
yield* observability.addDataProvider(ObservabilityProvider.Client.spacesMetricsProvider(client));
|
|
71
|
+
|
|
72
|
+
if (client.halo.identity.get()) {
|
|
73
|
+
yield* Effect.tryPromise(() => sendPrivacyNotice());
|
|
74
|
+
} else {
|
|
75
|
+
const subscription = client.halo.identity.subscribe(async (identity) => {
|
|
76
|
+
if (identity && observability) {
|
|
77
|
+
await sendPrivacyNotice();
|
|
78
|
+
subscription.unsubscribe();
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return Capability.contributes(ObservabilityCapabilities.Observability, observability, () => observability.close());
|
|
84
|
+
}),
|
|
85
|
+
);
|
|
@@ -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/operation';
|
|
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/operation';
|
|
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,42 @@
|
|
|
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
|
+
role: 'article',
|
|
24
|
+
filter: AppSurface.settingsArticle(meta.id),
|
|
25
|
+
component: ({ data: { subject } }) => {
|
|
26
|
+
const { settings } = useSettingsState<Settings.Settings>(subject.atom);
|
|
27
|
+
const { invokePromise } = useOperationInvoker();
|
|
28
|
+
const handleSettingsChange = (cb: (current: Settings.Settings) => Settings.Settings) => {
|
|
29
|
+
const next = cb(settings);
|
|
30
|
+
void invokePromise(ObservabilityOperation.Toggle, { state: next.enabled });
|
|
31
|
+
};
|
|
32
|
+
return <ObservabilitySettings settings={settings} onSettingsChange={handleSettingsChange} />;
|
|
33
|
+
},
|
|
34
|
+
}),
|
|
35
|
+
Surface.create({
|
|
36
|
+
id: 'help',
|
|
37
|
+
role: 'deck-companion--help',
|
|
38
|
+
component: () => <HelpContainer />,
|
|
39
|
+
}),
|
|
40
|
+
]),
|
|
41
|
+
),
|
|
42
|
+
);
|
|
@@ -4,18 +4,18 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
-
import { Capability
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
8
9
|
import { createKvsStore } from '@dxos/effect';
|
|
9
10
|
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { ObservabilityCapabilities } from '../../types';
|
|
11
|
+
import { meta } from '#meta';
|
|
12
|
+
import { ObservabilityCapabilities, Settings } from '#types';
|
|
13
13
|
|
|
14
14
|
export default Capability.makeModule(() =>
|
|
15
15
|
Effect.sync(() => {
|
|
16
16
|
const settingsAtom = createKvsStore({
|
|
17
17
|
key: meta.id,
|
|
18
|
-
schema:
|
|
18
|
+
schema: Settings.Settings,
|
|
19
19
|
defaultValue: () => ({
|
|
20
20
|
enabled: true,
|
|
21
21
|
}),
|
|
@@ -23,9 +23,9 @@ export default Capability.makeModule(() =>
|
|
|
23
23
|
|
|
24
24
|
return [
|
|
25
25
|
Capability.contributes(ObservabilityCapabilities.Settings, settingsAtom),
|
|
26
|
-
Capability.contributes(
|
|
26
|
+
Capability.contributes(AppCapabilities.Settings, {
|
|
27
27
|
prefix: meta.id,
|
|
28
|
-
schema:
|
|
28
|
+
schema: Settings.Settings,
|
|
29
29
|
atom: settingsAtom,
|
|
30
30
|
}),
|
|
31
31
|
];
|
|
@@ -4,16 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
8
|
import { createKvsStore } from '@dxos/effect';
|
|
9
|
-
import {
|
|
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
|
-
Effect.fnUntraced(function* (
|
|
16
|
-
const { namespace } = props!;
|
|
15
|
+
Effect.fnUntraced(function* ({ namespace }: { namespace: string }) {
|
|
17
16
|
const stateAtom = createKvsStore({
|
|
18
17
|
key: meta.id,
|
|
19
18
|
schema: ObservabilityCapabilities.StateSchema,
|
|
@@ -21,8 +20,8 @@ export default Capability.makeModule(
|
|
|
21
20
|
});
|
|
22
21
|
|
|
23
22
|
// NOTE: Group is set at runtime, not persisted.
|
|
24
|
-
const group = yield* Effect.tryPromise(() => getObservabilityGroup(namespace));
|
|
25
|
-
const registry = yield* Capability.get(
|
|
23
|
+
const group = yield* Effect.tryPromise(() => Observability.getObservabilityGroup(namespace));
|
|
24
|
+
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
26
25
|
registry.set(stateAtom, { ...registry.get(stateAtom), group });
|
|
27
26
|
|
|
28
27
|
return Capability.contributes(ObservabilityCapabilities.State, stateAtom);
|
package/src/cli/plugin.ts
CHANGED
|
@@ -4,24 +4,28 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { Capabilities, Capability, Plugin } from '@dxos/app-framework';
|
|
8
|
+
import { AppPlugin } from '@dxos/app-toolkit';
|
|
9
|
+
import { Operation, OperationHandlerSet } from '@dxos/operation';
|
|
9
10
|
|
|
10
|
-
import { meta } from '
|
|
11
|
-
import { ObservabilityOperation } from '
|
|
11
|
+
import { meta } from '#meta';
|
|
12
|
+
import { ObservabilityOperation } from '#operations';
|
|
12
13
|
|
|
13
14
|
// TODO(wittjosiah): Hook up.
|
|
14
15
|
export const ObservabilityPlugin = Plugin.define(meta).pipe(
|
|
15
|
-
|
|
16
|
-
activate: () =>
|
|
17
|
-
|
|
18
|
-
Capability.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
+
);
|
|
22
25
|
}),
|
|
23
|
-
|
|
24
|
-
),
|
|
26
|
+
),
|
|
27
|
+
}),
|
|
28
|
+
),
|
|
25
29
|
}),
|
|
26
30
|
Plugin.make,
|
|
27
31
|
);
|
|
@@ -6,14 +6,13 @@ 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 '
|
|
10
|
-
|
|
9
|
+
import { translations } from '../../translations';
|
|
11
10
|
import { FeedbackForm } from './FeedbackForm';
|
|
12
11
|
|
|
13
12
|
const meta = {
|
|
14
|
-
title: 'plugins/plugin-observability/FeedbackForm',
|
|
13
|
+
title: 'plugins/plugin-observability/components/FeedbackForm',
|
|
15
14
|
component: FeedbackForm,
|
|
16
|
-
decorators: [withTheme, withLayout({ layout: 'column' })],
|
|
15
|
+
decorators: [withTheme(), withLayout({ layout: 'column' })],
|
|
17
16
|
parameters: {
|
|
18
17
|
layout: 'fullscreen',
|
|
19
18
|
translations,
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { 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'> & Pick<FormSubmitProps, 'disabled'>;
|
|
14
|
+
|
|
15
|
+
const defaultValues: UserFeedback = {
|
|
16
|
+
message: '',
|
|
17
|
+
includeLogs: true,
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const FeedbackForm = ({ onSave, disabled }: FeedbackFormProps) => {
|
|
21
|
+
const { t } = useTranslation(meta.id);
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<Form.Root schema={UserFeedback} defaultValues={defaultValues} onSave={onSave}>
|
|
25
|
+
<Form.Viewport>
|
|
26
|
+
<Form.Content>
|
|
27
|
+
<Form.FieldSet />
|
|
28
|
+
<Form.Submit icon='ph--paper-plane-tilt--regular' label={t('send-feedback.label')} disabled={disabled} />
|
|
29
|
+
</Form.Content>
|
|
30
|
+
</Form.Viewport>
|
|
31
|
+
</Form.Root>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
import { ObservabilitySettings } from './ObservabilitySettings';
|
|
11
|
+
|
|
12
|
+
const meta = {
|
|
13
|
+
title: 'plugins/plugin-observability/components/ObservabilitySettings',
|
|
14
|
+
component: ObservabilitySettings,
|
|
15
|
+
tags: ['settings'],
|
|
16
|
+
decorators: [withTheme(), withLayout({ layout: 'fullscreen' })],
|
|
17
|
+
parameters: {
|
|
18
|
+
layout: 'fullscreen',
|
|
19
|
+
translations,
|
|
20
|
+
},
|
|
21
|
+
} satisfies Meta<typeof ObservabilitySettings>;
|
|
22
|
+
|
|
23
|
+
export default meta;
|
|
24
|
+
|
|
25
|
+
type Story = StoryObj<typeof meta>;
|
|
26
|
+
|
|
27
|
+
export const Default: Story = {
|
|
28
|
+
args: {
|
|
29
|
+
settings: {
|
|
30
|
+
enabled: true,
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
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 { Input, Message, useTranslation } from '@dxos/react-ui';
|
|
9
|
+
import { Settings as SettingsForm } from '@dxos/react-ui-form';
|
|
10
|
+
|
|
11
|
+
import { meta } from '#meta';
|
|
12
|
+
import { type 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.Item
|
|
26
|
+
title={t('observability-enabled.label')}
|
|
27
|
+
description={t('observability-enabled.description')}
|
|
28
|
+
>
|
|
29
|
+
<Input.Switch
|
|
30
|
+
disabled={!onSettingsChange}
|
|
31
|
+
checked={settings.enabled}
|
|
32
|
+
onCheckedChange={(checked) => onSettingsChange?.((s) => ({ ...s, enabled: !!checked }))}
|
|
33
|
+
/>
|
|
34
|
+
</SettingsForm.Item>
|
|
35
|
+
</SettingsForm.Section>
|
|
36
|
+
</SettingsForm.Viewport>
|
|
37
|
+
);
|
|
38
|
+
};
|