@gravitee/gamma-lib-observability 1.0.0 → 1.1.0-fix-gma-396-mgmt-v2-data-source.c40acab
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/INTEGRATION.md +123 -10
- package/README.md +1 -0
- package/USAGE_GUIDE.md +156 -0
- package/dist/dashboards/DashboardView.d.ts +1 -1
- package/dist/dashboards/DashboardView.d.ts.map +1 -1
- package/dist/dashboards/WidgetGroup.d.ts +16 -0
- package/dist/dashboards/WidgetGroup.d.ts.map +1 -0
- package/dist/dashboards/WidgetGroupContext.d.ts +9 -0
- package/dist/dashboards/WidgetGroupContext.d.ts.map +1 -0
- package/dist/dashboards/WidgetItem.d.ts +50 -0
- package/dist/dashboards/WidgetItem.d.ts.map +1 -0
- package/dist/dashboards/compute-bucket-interval.d.ts +6 -0
- package/dist/dashboards/compute-bucket-interval.d.ts.map +1 -1
- package/dist/dashboards/index.d.ts +11 -1
- package/dist/dashboards/index.d.ts.map +1 -1
- package/dist/dashboards/renderers/BarPresentation.d.ts +4 -0
- package/dist/dashboards/renderers/BarPresentation.d.ts.map +1 -0
- package/dist/dashboards/renderers/BarWidgetRenderer.d.ts.map +1 -1
- package/dist/dashboards/renderers/CartesianPresentation.d.ts +4 -0
- package/dist/dashboards/renderers/CartesianPresentation.d.ts.map +1 -0
- package/dist/dashboards/renderers/CartesianWidgetRenderer.d.ts.map +1 -1
- package/dist/dashboards/renderers/DoughnutPresentation.d.ts +4 -0
- package/dist/dashboards/renderers/DoughnutPresentation.d.ts.map +1 -0
- package/dist/dashboards/renderers/DoughnutWidgetRenderer.d.ts.map +1 -1
- package/dist/dashboards/renderers/MetricGroupPresentation.d.ts +4 -0
- package/dist/dashboards/renderers/MetricGroupPresentation.d.ts.map +1 -0
- package/dist/dashboards/renderers/MetricGroupWidgetRenderer.d.ts.map +1 -1
- package/dist/dashboards/renderers/MetricPresentation.d.ts +4 -0
- package/dist/dashboards/renderers/MetricPresentation.d.ts.map +1 -0
- package/dist/dashboards/renderers/MetricWidgetRenderer.d.ts.map +1 -1
- package/dist/dashboards/widget-data.d.ts +71 -0
- package/dist/dashboards/widget-data.d.ts.map +1 -0
- package/dist/dashboards/widget-defaults.d.ts +20 -0
- package/dist/dashboards/widget-defaults.d.ts.map +1 -0
- package/dist/data-sources/http-data-source.d.ts +28 -1
- package/dist/data-sources/http-data-source.d.ts.map +1 -1
- package/dist/data-sources/index.d.ts +1 -1
- package/dist/data-sources/index.d.ts.map +1 -1
- package/dist/filter-providers-context.js +23 -20
- package/dist/hooks/use-facets-query.d.ts.map +1 -1
- package/dist/hooks/use-logs-histogram-query.d.ts.map +1 -1
- package/dist/hooks/use-logs-paged-query.d.ts.map +1 -1
- package/dist/hooks/use-logs-query.d.ts.map +1 -1
- package/dist/hooks/use-measures-query.d.ts.map +1 -1
- package/dist/hooks/use-time-series-query.d.ts.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1479 -5230
- package/dist/providers/index.d.ts +1 -1
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/logs-data-source-provider.d.ts +1 -0
- package/dist/providers/logs-data-source-provider.d.ts.map +1 -1
- package/dist/routing/ObservabilityRoutes.d.ts.map +1 -1
- package/dist/styles/observability.css +1 -1
- package/dist/testing/mock-metrics-data-source.d.ts +8 -0
- package/dist/testing/mock-metrics-data-source.d.ts.map +1 -0
- package/dist/testing.js +7 -7
- package/dist/types/domain.d.ts +5 -0
- package/dist/types/domain.d.ts.map +1 -1
- package/package.json +3 -2
package/INTEGRATION.md
CHANGED
|
@@ -13,6 +13,7 @@ This guide walks through integrating the observability library into a Gamma modu
|
|
|
13
13
|
- [Quick Start](#quick-start)
|
|
14
14
|
- [Feature: Dashboards](#feature-dashboards)
|
|
15
15
|
- [Feature: Logs](#feature-logs)
|
|
16
|
+
- [Feature: Widget Embedding](#feature-widget-embedding)
|
|
16
17
|
- [Feature: Traces (preview)](#feature-traces-preview)
|
|
17
18
|
- [Navigation & Breadcrumbs](#navigation--breadcrumbs)
|
|
18
19
|
- [Capabilities (RBAC)](#capabilities-rbac)
|
|
@@ -26,15 +27,16 @@ This guide walks through integrating the observability library into a Gamma modu
|
|
|
26
27
|
|
|
27
28
|
Your module must provide these packages. They are **not** bundled by the library.
|
|
28
29
|
|
|
29
|
-
| Package | Minimum version | Notes
|
|
30
|
-
| --------------------------- | --------------- |
|
|
31
|
-
| `react` | ^19.0.0 |
|
|
32
|
-
| `react-dom` | ^19.0.0 |
|
|
33
|
-
| `react-router-dom` | ^7.0.0 |
|
|
34
|
-
| `@tanstack/react-query` | ^5.0.0 | Must be a **shared singleton** if using Module Federation
|
|
35
|
-
| `@gravitee/graphene-core` | ^2.16.0 | Design system primitives (buttons, popovers, tables, icons)
|
|
36
|
-
| `@gravitee/graphene-charts` | ^2.
|
|
37
|
-
| `
|
|
30
|
+
| Package | Minimum version | Notes |
|
|
31
|
+
| --------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------- |
|
|
32
|
+
| `react` | ^19.0.0 | |
|
|
33
|
+
| `react-dom` | ^19.0.0 | |
|
|
34
|
+
| `react-router-dom` | ^7.0.0 | |
|
|
35
|
+
| `@tanstack/react-query` | ^5.0.0 | Must be a **shared singleton** if using Module Federation |
|
|
36
|
+
| `@gravitee/graphene-core` | ^2.16.0 | Design system primitives (buttons, popovers, tables, icons) |
|
|
37
|
+
| `@gravitee/graphene-charts` | ^2.25.0 | Chart components used by dashboard widgets. Sub-path `/dashboard-grid` is required and is exposed since `2.19.1`. |
|
|
38
|
+
| `react-grid-layout` | ^2.0.0 | Required by `@gravitee/graphene-charts/dashboard-grid`. The lib does **not** bundle it. |
|
|
39
|
+
| `tailwindcss` | ^4.0.0 | Optional — only if you compile Tailwind yourself |
|
|
38
40
|
|
|
39
41
|
### Module responsibilities
|
|
40
42
|
|
|
@@ -82,6 +84,8 @@ shared: {
|
|
|
82
84
|
}
|
|
83
85
|
```
|
|
84
86
|
|
|
87
|
+
The lib publishes a **pure ESM bundle** with no Rolldown `require()` polyfill: `@gravitee/graphene-charts`, `@gravitee/graphene-charts/dashboard-grid`, `@gravitee/graphene-core`, `@gravitee/graphene-core/icons`, `react`, `react-dom`, `react-router-dom`, and `@tanstack/react-query` are all left external and resolved by the consumer's bundler. **No custom Rspack/webpack loader is required** to import the bundle.
|
|
88
|
+
|
|
85
89
|
---
|
|
86
90
|
|
|
87
91
|
## Quick Start
|
|
@@ -383,6 +387,61 @@ interface LogsFeatureConfig {
|
|
|
383
387
|
|
|
384
388
|
---
|
|
385
389
|
|
|
390
|
+
## Feature: Widget Embedding
|
|
391
|
+
|
|
392
|
+
Beyond the `observe/*` routes, the library lets you embed individual widgets on any page. This is useful for KPI sections on API detail pages, overview pages, or sidebar widgets.
|
|
393
|
+
|
|
394
|
+
### Auto mode — connected widgets
|
|
395
|
+
|
|
396
|
+
Widgets fetch their own data from the `MetricsDataSourceProvider`. Mount the provider at app root if it is not already present:
|
|
397
|
+
|
|
398
|
+
```tsx
|
|
399
|
+
import {
|
|
400
|
+
MetricsDataSourceProvider,
|
|
401
|
+
createHttpDataSource,
|
|
402
|
+
WidgetGroup,
|
|
403
|
+
WidgetItem,
|
|
404
|
+
} from '@gravitee/gamma-lib-observability';
|
|
405
|
+
|
|
406
|
+
const dataSource = createHttpDataSource(baseUrl);
|
|
407
|
+
|
|
408
|
+
<MetricsDataSourceProvider dataSource={dataSource}>
|
|
409
|
+
<WidgetGroup timeRange={tr} filters={apiFilters}>
|
|
410
|
+
<WidgetItem widget={requestsKpi} />
|
|
411
|
+
<WidgetItem widget={errorRateKpi} />
|
|
412
|
+
<WidgetItem widget={latencyKpi} />
|
|
413
|
+
</WidgetGroup>
|
|
414
|
+
</MetricsDataSourceProvider>;
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
Each `WidgetItem` resolves a renderer that handles data fetching, loading states, and error handling internally.
|
|
418
|
+
|
|
419
|
+
### Manual mode — host-provided data
|
|
420
|
+
|
|
421
|
+
When you already have the data (e.g. from a different API, WebSocket, or shared state), pass a `data` prop to bypass all data fetching. No `MetricsDataSourceProvider` or `QueryClientProvider` is required:
|
|
422
|
+
|
|
423
|
+
```tsx
|
|
424
|
+
import { WidgetItem } from '@gravitee/gamma-lib-observability';
|
|
425
|
+
import type { MetricWidgetData } from '@gravitee/gamma-lib-observability';
|
|
426
|
+
|
|
427
|
+
const kpiData: MetricWidgetData = {
|
|
428
|
+
type: 'metric',
|
|
429
|
+
value: '12.4k',
|
|
430
|
+
label: 'Total Requests',
|
|
431
|
+
state: 'ready',
|
|
432
|
+
trend: { value: 10.7, direction: 'up' },
|
|
433
|
+
trendSentiment: 'higher-is-better',
|
|
434
|
+
};
|
|
435
|
+
|
|
436
|
+
<WidgetItem widget={requestsKpi} data={kpiData} />;
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
Manual mode supports all widget types: `metric`, `metric-group`, `cartesian`, `bar`, `doughnut`. Each type has a corresponding `WidgetData` interface (`MetricWidgetData`, `BarWidgetData`, etc.).
|
|
440
|
+
|
|
441
|
+
For full data type reference, see [`USAGE_GUIDE.md` — Widget Integration Levels](./USAGE_GUIDE.md#widget-integration-levels).
|
|
442
|
+
|
|
443
|
+
---
|
|
444
|
+
|
|
386
445
|
## Feature: Traces (preview)
|
|
387
446
|
|
|
388
447
|
Trace support is available at the **type and provider level** but does not yet have a UI route. You can prepare your integration now:
|
|
@@ -524,6 +583,37 @@ const baseUrl = `${config.managementBaseURL}/v2/environments/${environmentId}`;
|
|
|
524
583
|
|
|
525
584
|
The library uses `baseUrl` to construct its built-in HTTP data source (`createHttpDataSource(baseUrl)`) and filter source (`createHttpFilterSource(baseUrl)`). If you pass a custom `dataSource` or `filterProviders`, `baseUrl` is still required for any internal HTTP calls.
|
|
526
585
|
|
|
586
|
+
### Authenticated backends (`createHttpDataSource` options)
|
|
587
|
+
|
|
588
|
+
The built-in `createHttpDataSource(baseUrl, options?)` adapter speaks the Gravitee Management v2 analytics contract (`/analytics/measures`, `/analytics/facets`, `/analytics/time-series`). It accepts an `options` argument for hosts that need to plug their auth flow:
|
|
589
|
+
|
|
590
|
+
```ts
|
|
591
|
+
import { createHttpDataSource } from '@gravitee/gamma-lib-observability';
|
|
592
|
+
|
|
593
|
+
const dataSource = createHttpDataSource(baseUrl, {
|
|
594
|
+
// Send cookies (e.g. Gravitee session) on every request
|
|
595
|
+
credentials: 'include',
|
|
596
|
+
// Static or dynamic headers — the function form is called per-request,
|
|
597
|
+
// so short-lived tokens like XSRF stay fresh.
|
|
598
|
+
headers: () => ({
|
|
599
|
+
'X-Requested-With': 'XMLHttpRequest',
|
|
600
|
+
'X-Xsrf-Token': readXsrfTokenFromCookie(),
|
|
601
|
+
}),
|
|
602
|
+
// Override the metric injected on facet/by-only requests when your
|
|
603
|
+
// backend cannot count `HTTP_REQUESTS` for the active scope.
|
|
604
|
+
defaultFacetMetric: { name: 'LLM_REQUESTS', measures: ['COUNT'] },
|
|
605
|
+
});
|
|
606
|
+
```
|
|
607
|
+
|
|
608
|
+
| Option | Purpose |
|
|
609
|
+
| -------------------- | ------------------------------------------------------------------------------------------------- |
|
|
610
|
+
| `fetch` | Custom fetch implementation — useful when the host already has an authenticated client |
|
|
611
|
+
| `headers` | Static `HeadersInit` or a factory called per-request (re-evaluated for every call) |
|
|
612
|
+
| `credentials` | Forwarded to `fetch` — `'include'` when the host relies on cookies |
|
|
613
|
+
| `defaultFacetMetric` | Metric injected on facet / by-only requests. Defaults to `{ name: 'HTTP_REQUESTS', measures: ['COUNT'] }` |
|
|
614
|
+
|
|
615
|
+
**Filter operators**: only the v2 `Operator` enum is supported on the wire — `EQ`, `IN`, `LTE`, `GTE`. The data source maps lib operators (`eq`, `in`, `lte`, `gte`) accordingly and **throws** on any unsupported operator (`contains`, `neq`, `not_in`, …) so dashboard authors see the mismatch immediately.
|
|
616
|
+
|
|
527
617
|
### Custom data source
|
|
528
618
|
|
|
529
619
|
Override the built-in HTTP metrics adapter when your module needs custom request/response mapping:
|
|
@@ -588,7 +678,7 @@ defineFilterProvider({
|
|
|
588
678
|
|
|
589
679
|
### MetricsDataSourceProvider at app root
|
|
590
680
|
|
|
591
|
-
If you
|
|
681
|
+
If you use auto-mode widgets on pages **outside** the `observe/*` route (see [Widget Embedding](#feature-widget-embedding)), wrap your root layout with `MetricsDataSourceProvider`:
|
|
592
682
|
|
|
593
683
|
```tsx
|
|
594
684
|
import { MetricsDataSourceProvider, createHttpDataSource } from '@gravitee/gamma-lib-observability';
|
|
@@ -607,6 +697,29 @@ const dataSource = createHttpDataSource(baseUrl);
|
|
|
607
697
|
</QueryClientProvider>;
|
|
608
698
|
```
|
|
609
699
|
|
|
700
|
+
`<observability.Routes>` defers to the outer `MetricsDataSourceProvider` when it finds one — it never wraps a duplicate provider that would silently shadow the host's data source. The same precedence applies to `LogsDataSourceProvider`. Resolution order is:
|
|
701
|
+
|
|
702
|
+
1. `dataSource` / `logsDataSource` prop on `<observability.Routes>` (explicit, wins)
|
|
703
|
+
2. Outer `MetricsDataSourceProvider` / `LogsDataSourceProvider` from the host
|
|
704
|
+
3. Fallback: built from `baseUrl` via `createHttpDataSource`
|
|
705
|
+
|
|
706
|
+
### Query fan-out & defaults
|
|
707
|
+
|
|
708
|
+
| Widget | First-mount queries (defaults) | Notes |
|
|
709
|
+
| -------------- | ------------------------------------------------------------------------------- | -------------------------------------------------------------- |
|
|
710
|
+
| `metric` | **1** measures call | `showTrend` and `showSparkline` default to `false` — opt in |
|
|
711
|
+
| `metric` opt-in (both) | up to 3 (current + previous-period measures + sparkline time-series) | Sparkline shares its `queryKey` with cartesian charts (dedup) |
|
|
712
|
+
| `metric-group` | 1 measures call (+1 if any item opts into `showTrend`) | All items batched into a single request |
|
|
713
|
+
| `cartesian` | 1 time-series call per series | Same `metric`+filters+timeRange across widgets dedupe |
|
|
714
|
+
| `doughnut` | 1 facets call | Default counter is the data source's `defaultFacetMetric` |
|
|
715
|
+
| `bar` | 1 facets call | |
|
|
716
|
+
|
|
717
|
+
**Tips for keeping a dashboard light:**
|
|
718
|
+
|
|
719
|
+
- Leave `showSparkline` / `showTrend` off unless you really need them — every tile that opts in adds 1–2 calls.
|
|
720
|
+
- Use the same metric/filters across cartesian and metric tiles so React Query dedupes the time-series fetch (sparkline and cartesian intervals are aligned via `DASHBOARD_BUCKET_TARGET`).
|
|
721
|
+
- The library no longer hard-codes `refetchOnWindowFocus: true` on its queries — the host's `QueryClient` defaults apply. Set it explicitly on your `QueryClient` (or per-query) if you want auto-refresh on focus.
|
|
722
|
+
|
|
610
723
|
### URL state codec
|
|
611
724
|
|
|
612
725
|
Filter state and time range are encoded in URL query parameters (`q`, `v`) for bookmarkable views. This is handled automatically by the library routes. If you need to build deep links programmatically:
|
package/README.md
CHANGED
|
@@ -9,6 +9,7 @@ This library provides a **contributor model**: it exports page components, route
|
|
|
9
9
|
### Key features
|
|
10
10
|
|
|
11
11
|
- **Dashboards** — read-only preset dashboards with CSS Grid widget layout
|
|
12
|
+
- **Embeddable widgets** — `WidgetItem` and `WidgetGroup` for embedding KPIs/charts on any page, with auto (data-fetching) and manual (host-provided data) modes
|
|
12
13
|
- **Logs** — `LogsExplorerPage` with search, filters, pagination, and column visibility
|
|
13
14
|
- **Filters & time range** — `<FilterBar>`, `<TimeRangePicker>`, URL state codec
|
|
14
15
|
- **DI providers** — DataSource ports (Metrics, Logs, Traces), Capability, Persistence
|
package/USAGE_GUIDE.md
CHANGED
|
@@ -282,6 +282,162 @@ if (isTimeSeriesWidget(widget)) {
|
|
|
282
282
|
|
|
283
283
|
---
|
|
284
284
|
|
|
285
|
+
## Widget Integration Levels
|
|
286
|
+
|
|
287
|
+
The library provides three levels of widget integration, each usable independently. Level 3 supports both auto mode (data-fetching) and manual mode (host-provided data).
|
|
288
|
+
|
|
289
|
+
```
|
|
290
|
+
DashboardView (full dashboard with positional grid, editing, persistence, capabilities)
|
|
291
|
+
└→ WidgetGroup (flex layout + shared context via React Context)
|
|
292
|
+
└→ WidgetItem (renderer resolution + data fetching + lifecycle)
|
|
293
|
+
└→ manual mode: host passes data directly (no providers required)
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
### Level 1 — `DashboardView` (full dashboard page)
|
|
297
|
+
|
|
298
|
+
Use when you need a complete dashboard experience with a 12-column positional grid.
|
|
299
|
+
|
|
300
|
+
```tsx
|
|
301
|
+
import { DashboardView } from '@gravitee/gamma-lib-observability';
|
|
302
|
+
|
|
303
|
+
<DashboardView dashboard={dashboardDef} timeRange={tr} />;
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
### Level 2 — `WidgetGroup` + `WidgetItem` (KPI section on any page)
|
|
307
|
+
|
|
308
|
+
Use when embedding multiple widgets in a non-dashboard context (e.g. API detail page, overview). `WidgetGroup` propagates `timeRange` and `filters` to all nested `WidgetItem` children via React Context.
|
|
309
|
+
|
|
310
|
+
```tsx
|
|
311
|
+
import { WidgetGroup, WidgetItem } from '@gravitee/gamma-lib-observability';
|
|
312
|
+
|
|
313
|
+
<WidgetGroup timeRange={tr} filters={apiFilters}>
|
|
314
|
+
<WidgetItem widget={requestsKpi} />
|
|
315
|
+
<WidgetItem widget={errorRateKpi} />
|
|
316
|
+
<WidgetItem widget={latencyKpi} />
|
|
317
|
+
</WidgetGroup>;
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
`WidgetGroup` renders a responsive flex layout where each child takes equal width. Use `align` to control cross-axis alignment (`'stretch'` | `'center'` | `'start'` | `'end'`, defaults to `'stretch'`).
|
|
321
|
+
|
|
322
|
+
> **Important:** `WidgetGroup` children must be direct `WidgetItem` elements (not wrapped in extra `<div>`s) for equal-width sizing to work correctly.
|
|
323
|
+
|
|
324
|
+
#### Title chrome for chart widgets
|
|
325
|
+
|
|
326
|
+
`WidgetItem` renders the widget's registry output directly — it does **not** provide title chrome. `metric` widgets include their own label, but `cartesian`, `bar`, and `doughnut` widgets rely on external chrome for titles.
|
|
327
|
+
|
|
328
|
+
When embedding chart widgets outside of `DashboardView`, wrap them with `DashboardWidget` from graphene-charts:
|
|
329
|
+
|
|
330
|
+
```tsx
|
|
331
|
+
import { DashboardWidget } from '@gravitee/graphene-charts/dashboard-grid';
|
|
332
|
+
|
|
333
|
+
<WidgetGroup timeRange={tr}>
|
|
334
|
+
<WidgetItem widget={requestsKpi} />
|
|
335
|
+
<DashboardWidget title="Traffic" noPadding>
|
|
336
|
+
<WidgetItem widget={trafficChart} timeRange={tr} />
|
|
337
|
+
</DashboardWidget>
|
|
338
|
+
</WidgetGroup>;
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
#### Filter composition
|
|
342
|
+
|
|
343
|
+
`WidgetGroup` filters are passed to renderers via the `filters` prop. If a page-level `ContextFiltersProvider` is also present, renderers will merge both sources — group filters **compose with** page filters, they do not replace them.
|
|
344
|
+
|
|
345
|
+
### Level 3 — `WidgetItem` standalone (isolated widget)
|
|
346
|
+
|
|
347
|
+
Use when embedding a single widget in a sidebar, card, or other context.
|
|
348
|
+
|
|
349
|
+
```tsx
|
|
350
|
+
import { WidgetItem } from '@gravitee/gamma-lib-observability';
|
|
351
|
+
|
|
352
|
+
<WidgetItem widget={activeUsersKpi} timeRange={tr} />;
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
When used standalone, `timeRange` is required as a prop. Props always take precedence over `WidgetGroup` context when both are provided.
|
|
356
|
+
|
|
357
|
+
### Level 3b — Manual mode (host-provided data)
|
|
358
|
+
|
|
359
|
+
Any `WidgetItem` (standalone or inside a `WidgetGroup`) can switch to manual mode. Use when the host already owns the data, or when no `MetricsDataSourceProvider` is available. Pass a `data` prop matching the widget type to skip all data fetching:
|
|
360
|
+
|
|
361
|
+
```tsx
|
|
362
|
+
import { WidgetItem } from '@gravitee/gamma-lib-observability';
|
|
363
|
+
import type { MetricWidgetData } from '@gravitee/gamma-lib-observability';
|
|
364
|
+
|
|
365
|
+
const kpiData: MetricWidgetData = {
|
|
366
|
+
type: 'metric',
|
|
367
|
+
value: '12.4k',
|
|
368
|
+
label: 'Total Requests',
|
|
369
|
+
state: 'ready',
|
|
370
|
+
trend: { value: 10.7, direction: 'up' },
|
|
371
|
+
trendSentiment: 'higher-is-better',
|
|
372
|
+
};
|
|
373
|
+
|
|
374
|
+
<WidgetItem widget={requestsKpi} data={kpiData} />;
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
In manual mode:
|
|
378
|
+
|
|
379
|
+
- No `MetricsDataSourceProvider` or `QueryClientProvider` required
|
|
380
|
+
- No `timeRange` required (the host controls when to re-render)
|
|
381
|
+
- The `data.type` must match `widget.type`
|
|
382
|
+
- The host is responsible for fetching data, computing trends, and managing loading/error states
|
|
383
|
+
|
|
384
|
+
#### Available data types
|
|
385
|
+
|
|
386
|
+
| `data.type` | TypeScript type | Key fields |
|
|
387
|
+
| -------------- | ----------------------- | ------------------------------------------------------------ |
|
|
388
|
+
| `metric` | `MetricWidgetData` | `value`, `label`, `state`, `trend?`, `sparklineData?` |
|
|
389
|
+
| `metric-group` | `MetricGroupWidgetData` | `items[]` (value, label, trend?), `state` |
|
|
390
|
+
| `cartesian` | `CartesianWidgetData` | `data[]` (CartesianDataPoint), `config`, `series[]`, `state` |
|
|
391
|
+
| `bar` | `BarWidgetData` | `data[]` (category, count), `config`, `state`, `layout?` |
|
|
392
|
+
| `doughnut` | `DoughnutWidgetData` | `data[]` (category, value), `config`, `state` |
|
|
393
|
+
|
|
394
|
+
All types share a `state: 'loading' | 'ready' | 'empty'` field that controls skeleton/empty rendering.
|
|
395
|
+
|
|
396
|
+
#### Presentation components
|
|
397
|
+
|
|
398
|
+
For even finer control, the library also exports the pure presentation components directly:
|
|
399
|
+
|
|
400
|
+
```tsx
|
|
401
|
+
import { MetricPresentation, BarPresentation } from '@gravitee/gamma-lib-observability';
|
|
402
|
+
|
|
403
|
+
<MetricPresentation value="12.4k" label="Requests" state="ready" />;
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
### Props reference
|
|
407
|
+
|
|
408
|
+
#### `WidgetItemProps`
|
|
409
|
+
|
|
410
|
+
`WidgetItemProps` is a **discriminated union**: in auto mode, `widget` accepts any `Widget` and `data` is omitted. In manual mode, `widget` and `data` must be the matching pair for the same widget type. TypeScript enforces this at compile time.
|
|
411
|
+
|
|
412
|
+
| Mode | `widget` type | `data` type |
|
|
413
|
+
| ------ | ------------------- | ----------------------- |
|
|
414
|
+
| Auto | `Widget` (any) | omitted |
|
|
415
|
+
| Manual | `MetricWidget` | `MetricWidgetData` |
|
|
416
|
+
| Manual | `MetricGroupWidget` | `MetricGroupWidgetData` |
|
|
417
|
+
| Manual | `CartesianWidget` | `CartesianWidgetData` |
|
|
418
|
+
| Manual | `BarWidget` | `BarWidgetData` |
|
|
419
|
+
| Manual | `DoughnutWidget` | `DoughnutWidgetData` |
|
|
420
|
+
|
|
421
|
+
Shared props (available in all modes):
|
|
422
|
+
|
|
423
|
+
| Prop | Type | Required | Description |
|
|
424
|
+
| ----------- | ---------------------------- | -------- | --------------------------------------------------------------------------------- |
|
|
425
|
+
| `timeRange` | `TimeRange` | No\* | Time range for data fetching. Required in auto mode when not inside `WidgetGroup` |
|
|
426
|
+
| `filters` | `readonly FilterCondition[]` | No | Filters for data fetching. Overrides group context when provided. |
|
|
427
|
+
|
|
428
|
+
\* Not required in manual mode (when `data` is provided).
|
|
429
|
+
|
|
430
|
+
#### `WidgetGroupProps`
|
|
431
|
+
|
|
432
|
+
| Prop | Type | Required | Default | Description |
|
|
433
|
+
| ----------- | ---------------------------- | -------- | ----------- | --------------------------------------------------------- |
|
|
434
|
+
| `timeRange` | `TimeRange` | Yes | | Time range propagated to all nested `WidgetItem`s |
|
|
435
|
+
| `filters` | `readonly FilterCondition[]` | No | `[]` | Filters propagated to all nested `WidgetItem`s |
|
|
436
|
+
| `align` | `WidgetGroupAlign` | No | `'stretch'` | Cross-axis alignment: `stretch`, `center`, `start`, `end` |
|
|
437
|
+
| `children` | `ReactNode` | Yes | | `WidgetItem` children |
|
|
438
|
+
|
|
439
|
+
---
|
|
440
|
+
|
|
285
441
|
## URL State Codec
|
|
286
442
|
|
|
287
443
|
The URL state codec encodes the current observability view (filters + time range) into URL query parameters, enabling bookmarkable and shareable views.
|
|
@@ -3,7 +3,7 @@ import { Dashboard, FilterCondition, TimeRange, WidgetLayout } from '../types/do
|
|
|
3
3
|
export interface DashboardViewProps {
|
|
4
4
|
readonly dashboard: Dashboard;
|
|
5
5
|
readonly timeRange: TimeRange;
|
|
6
|
-
readonly filters?: FilterCondition[];
|
|
6
|
+
readonly filters?: readonly FilterCondition[];
|
|
7
7
|
/** Enable drag-and-drop and resize on dashboard widgets. Requires `observability.dashboards.write` capability. @default false */
|
|
8
8
|
readonly editable?: boolean;
|
|
9
9
|
/** Height of a single grid row in pixels. @default 150 */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardView.d.ts","sourceRoot":"","sources":["../../src/dashboards/DashboardView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAwB,MAAM,0CAA0C,CAAC;AAGrG,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,EAAU,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"DashboardView.d.ts","sourceRoot":"","sources":["../../src/dashboards/DashboardView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAwB,MAAM,0CAA0C,CAAC;AAGrG,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,EAAU,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAiBnG,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IAC9C,iIAAiI;IACjI,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,0DAA0D;IAC1D,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;OAKG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC;IACzC,2DAA2D;IAC3D,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,YAAY,CAAC,KAAK,IAAI,CAAC;CAChF;AAED,wBAAgB,aAAa,CAAC,EAC5B,SAAS,EACT,SAAS,EACT,OAAuB,EACvB,QAAgB,EAChB,SAAS,EACT,cAAwC,EACxC,cAAc,GACf,EAAE,kBAAkB,2CA8CpB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { FilterCondition, TimeRange } from '../types/domain';
|
|
3
|
+
export type WidgetGroupAlign = 'stretch' | 'center' | 'start' | 'end';
|
|
4
|
+
export interface WidgetGroupProps {
|
|
5
|
+
readonly timeRange: TimeRange;
|
|
6
|
+
readonly filters?: readonly FilterCondition[];
|
|
7
|
+
readonly align?: WidgetGroupAlign;
|
|
8
|
+
readonly children: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Groups multiple `WidgetItem` components with a shared `timeRange` and
|
|
12
|
+
* `filters` context. Renders children in a responsive flex layout where
|
|
13
|
+
* each child takes equal width.
|
|
14
|
+
*/
|
|
15
|
+
export declare function WidgetGroup({ timeRange, filters, align, children }: WidgetGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=WidgetGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidgetGroup.d.ts","sourceRoot":"","sources":["../../src/dashboards/WidgetGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGlE,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAC;AAEtE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IAC9C,QAAQ,CAAC,KAAK,CAAC,EAAE,gBAAgB,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;CAC9B;AASD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,OAAuB,EAAE,KAAiB,EAAE,QAAQ,EAAE,EAAE,gBAAgB,2CAQhH"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FilterCondition, TimeRange } from '../types/domain';
|
|
2
|
+
export declare const EMPTY_FILTERS: readonly FilterCondition[];
|
|
3
|
+
export interface WidgetGroupContextValue {
|
|
4
|
+
readonly timeRange: TimeRange;
|
|
5
|
+
readonly filters: readonly FilterCondition[];
|
|
6
|
+
}
|
|
7
|
+
export declare const WidgetGroupContextProvider: import('react').Provider<WidgetGroupContextValue | null>;
|
|
8
|
+
export declare function useWidgetGroupContext(): WidgetGroupContextValue | null;
|
|
9
|
+
//# sourceMappingURL=WidgetGroupContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidgetGroupContext.d.ts","sourceRoot":"","sources":["../../src/dashboards/WidgetGroupContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAElE,eAAO,MAAM,aAAa,EAAE,SAAS,eAAe,EAAO,CAAC;AAE5D,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,CAAC;CAC9C;AAID,eAAO,MAAM,0BAA0B,0DAA8B,CAAC;AAEtE,wBAAgB,qBAAqB,IAAI,uBAAuB,GAAG,IAAI,CAEtE"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { BarWidget, CartesianWidget, DoughnutWidget, FilterCondition, MetricGroupWidget, MetricWidget, TimeRange, Widget } from '../types/domain';
|
|
2
|
+
import { BarWidgetData, CartesianWidgetData, DoughnutWidgetData, MetricGroupWidgetData, MetricWidgetData } from './widget-data';
|
|
3
|
+
interface WidgetItemBaseProps {
|
|
4
|
+
readonly timeRange?: TimeRange;
|
|
5
|
+
readonly filters?: readonly FilterCondition[];
|
|
6
|
+
}
|
|
7
|
+
interface WidgetItemAutoProps extends WidgetItemBaseProps {
|
|
8
|
+
readonly widget: Widget;
|
|
9
|
+
readonly data?: undefined;
|
|
10
|
+
}
|
|
11
|
+
interface WidgetItemManualMetricProps extends WidgetItemBaseProps {
|
|
12
|
+
readonly widget: MetricWidget;
|
|
13
|
+
readonly data: MetricWidgetData;
|
|
14
|
+
}
|
|
15
|
+
interface WidgetItemManualMetricGroupProps extends WidgetItemBaseProps {
|
|
16
|
+
readonly widget: MetricGroupWidget;
|
|
17
|
+
readonly data: MetricGroupWidgetData;
|
|
18
|
+
}
|
|
19
|
+
interface WidgetItemManualCartesianProps extends WidgetItemBaseProps {
|
|
20
|
+
readonly widget: CartesianWidget;
|
|
21
|
+
readonly data: CartesianWidgetData;
|
|
22
|
+
}
|
|
23
|
+
interface WidgetItemManualBarProps extends WidgetItemBaseProps {
|
|
24
|
+
readonly widget: BarWidget;
|
|
25
|
+
readonly data: BarWidgetData;
|
|
26
|
+
}
|
|
27
|
+
interface WidgetItemManualDoughnutProps extends WidgetItemBaseProps {
|
|
28
|
+
readonly widget: DoughnutWidget;
|
|
29
|
+
readonly data: DoughnutWidgetData;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Props for `WidgetItem`. The union ensures that when `data` is provided,
|
|
33
|
+
* `data.type` is paired with the correct `widget` subtype at compile time.
|
|
34
|
+
*/
|
|
35
|
+
export type WidgetItemProps = WidgetItemAutoProps | WidgetItemManualMetricProps | WidgetItemManualMetricGroupProps | WidgetItemManualCartesianProps | WidgetItemManualBarProps | WidgetItemManualDoughnutProps;
|
|
36
|
+
/**
|
|
37
|
+
* Standalone widget that resolves a renderer from the widget registry.
|
|
38
|
+
*
|
|
39
|
+
* **Auto mode** (default): resolves a connected renderer that handles data
|
|
40
|
+
* fetching internally. Requires `MetricsDataSourceProvider` in the tree.
|
|
41
|
+
*
|
|
42
|
+
* **Manual mode** (`data` prop): renders the presentation layer directly
|
|
43
|
+
* with the provided data. No providers or `timeRange` required.
|
|
44
|
+
*
|
|
45
|
+
* When used inside a `WidgetGroup`, inherits `timeRange` and `filters` from
|
|
46
|
+
* context. Props always take precedence over context values.
|
|
47
|
+
*/
|
|
48
|
+
export declare function WidgetItem(props: WidgetItemProps): import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
export {};
|
|
50
|
+
//# sourceMappingURL=WidgetItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidgetItem.d.ts","sourceRoot":"","sources":["../../src/dashboards/WidgetItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,SAAS,EACT,eAAe,EACf,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,MAAM,EACP,MAAM,iBAAiB,CAAC;AASzB,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAEjB,MAAM,eAAe,CAAC;AAKvB,UAAU,mBAAmB;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;IAC/B,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;CAC/C;AAED,UAAU,mBAAoB,SAAQ,mBAAmB;IACvD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC;CAC3B;AAED,UAAU,2BAA4B,SAAQ,mBAAmB;IAC/D,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;CACjC;AAED,UAAU,gCAAiC,SAAQ,mBAAmB;IACpE,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC;CACtC;AAED,UAAU,8BAA+B,SAAQ,mBAAmB;IAClE,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;CACpC;AAED,UAAU,wBAAyB,SAAQ,mBAAmB;IAC5D,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;CAC9B;AAED,UAAU,6BAA8B,SAAQ,mBAAmB;IACjE,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;CACnC;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,GACvB,mBAAmB,GACnB,2BAA2B,GAC3B,gCAAgC,GAChC,8BAA8B,GAC9B,wBAAwB,GACxB,6BAA6B,CAAC;AAElC;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CAMhD"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { AbsoluteTimeRange } from '../types/domain';
|
|
2
|
+
/**
|
|
3
|
+
* Default number of buckets every dashboard widget aims for. Sharing a single
|
|
4
|
+
* target across cartesian charts and metric-widget sparklines keeps their
|
|
5
|
+
* `queryKey`s aligned so React Query can dedupe overlapping queries.
|
|
6
|
+
*/
|
|
7
|
+
export declare const DASHBOARD_BUCKET_TARGET = 48;
|
|
2
8
|
/**
|
|
3
9
|
* Computes a bucket interval (in ms) that yields approximately `targetPoints`
|
|
4
10
|
* data points across the given time range. Enforces a 1-minute minimum.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compute-bucket-interval.d.ts","sourceRoot":"","sources":["../../src/dashboards/compute-bucket-interval.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAIzD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAKhG"}
|
|
1
|
+
{"version":3,"file":"compute-bucket-interval.d.ts","sourceRoot":"","sources":["../../src/dashboards/compute-bucket-interval.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAIzD;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAKhG"}
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
export { DashboardView, type DashboardViewProps } from './DashboardView';
|
|
2
|
+
export { WidgetGroup, type WidgetGroupAlign, type WidgetGroupProps } from './WidgetGroup';
|
|
3
|
+
export { useWidgetGroupContext, type WidgetGroupContextValue } from './WidgetGroupContext';
|
|
4
|
+
export { WidgetItem, type WidgetItemProps } from './WidgetItem';
|
|
5
|
+
export type { BarWidgetData, CartesianWidgetData, DoughnutWidgetData, MetricGroupItem, MetricGroupWidgetData, MetricWidgetData, WidgetData, } from './widget-data';
|
|
6
|
+
export { BarPresentation, type BarPresentationProps } from './renderers/BarPresentation';
|
|
7
|
+
export { CartesianPresentation, type CartesianPresentationProps } from './renderers/CartesianPresentation';
|
|
8
|
+
export { DoughnutPresentation, type DoughnutPresentationProps } from './renderers/DoughnutPresentation';
|
|
9
|
+
export { MetricGroupPresentation, type MetricGroupPresentationProps } from './renderers/MetricGroupPresentation';
|
|
10
|
+
export { MetricPresentation, type MetricPresentationProps } from './renderers/MetricPresentation';
|
|
2
11
|
export { mergeFilters } from './merge-filters';
|
|
3
12
|
export { registerDefaultRenderers } from './register-default-renderers';
|
|
4
13
|
export { clearWidgetRenderers, getWidgetRenderer, registerWidgetRenderer, type WidgetRenderer, type WidgetRendererProps, } from './widget-renderer-registry';
|
|
5
|
-
export { computeBucketInterval } from './compute-bucket-interval';
|
|
14
|
+
export { computeBucketInterval, DASHBOARD_BUCKET_TARGET } from './compute-bucket-interval';
|
|
15
|
+
export { DEFAULT_MEASURE, resolveMeasure } from './widget-defaults';
|
|
6
16
|
export { computePreviousTimeRange } from './compute-previous-time-range';
|
|
7
17
|
export { resolveStableTimeRange } from './resolve-stable-time-range';
|
|
8
18
|
export { facetsToBar, facetsToDoughnut } from './adapters/facets-adapter';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dashboards/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,KAAK,cAAc,EACnB,KAAK,mBAAmB,GACzB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dashboards/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,qBAAqB,EAAE,KAAK,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAChE,YAAY,EACV,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EAChB,UAAU,GACX,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACzF,OAAO,EAAE,qBAAqB,EAAE,KAAK,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAC3G,OAAO,EAAE,oBAAoB,EAAE,KAAK,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AACxG,OAAO,EAAE,uBAAuB,EAAE,KAAK,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AACjH,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAClG,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,KAAK,cAAc,EACnB,KAAK,mBAAmB,GACzB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC3F,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EACL,KAAK,aAAa,EAClB,YAAY,EACZ,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAG5E,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,EACvB,4BAA4B,EAC5B,oBAAoB,EACpB,qBAAqB,EACrB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,+BAA+B,GACrC,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { BarWidgetData } from '../widget-data';
|
|
2
|
+
export type BarPresentationProps = Omit<BarWidgetData, 'type'>;
|
|
3
|
+
export declare function BarPresentation({ data, config, state, layout }: BarPresentationProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=BarPresentation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BarPresentation.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/BarPresentation.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAOpD,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;AAE/D,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAmB,EAAE,EAAE,oBAAoB,2CAsBjG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BarWidgetRenderer.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/BarWidgetRenderer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BarWidgetRenderer.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/BarWidgetRenderer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAGvE,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,mBAAmB,CAAC,SAAS,CAAC,2CA+B/F"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CartesianWidgetData } from '../widget-data';
|
|
2
|
+
export type CartesianPresentationProps = Omit<CartesianWidgetData, 'type'>;
|
|
3
|
+
export declare function CartesianPresentation({ data, config, series, state }: CartesianPresentationProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=CartesianPresentation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CartesianPresentation.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/CartesianPresentation.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE1D,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;AAE3E,wBAAgB,qBAAqB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,0BAA0B,2CAoBhG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartesianWidgetRenderer.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/CartesianWidgetRenderer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CartesianWidgetRenderer.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/CartesianWidgetRenderer.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAoB,MAAM,oBAAoB,CAAC;AAM5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAGvE,wBAAgB,uBAAuB,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,mBAAmB,CAAC,eAAe,CAAC,2CA6D3G"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DoughnutWidgetData } from '../widget-data';
|
|
2
|
+
export type DoughnutPresentationProps = Omit<DoughnutWidgetData, 'type'>;
|
|
3
|
+
export declare function DoughnutPresentation({ data, config, state }: DoughnutPresentationProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=DoughnutPresentation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DoughnutPresentation.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/DoughnutPresentation.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;AAEzE,wBAAgB,oBAAoB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,yBAAyB,2CAStF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DoughnutWidgetRenderer.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/DoughnutWidgetRenderer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DoughnutWidgetRenderer.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/DoughnutWidgetRenderer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAGvE,wBAAgB,sBAAsB,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,mBAAmB,CAAC,cAAc,CAAC,2CAkCzG"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { MetricGroupWidgetData } from '../widget-data';
|
|
2
|
+
export type MetricGroupPresentationProps = Omit<MetricGroupWidgetData, 'type'>;
|
|
3
|
+
export declare function MetricGroupPresentation({ items, state, skeletonCount }: MetricGroupPresentationProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=MetricGroupPresentation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetricGroupPresentation.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/MetricGroupPresentation.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAE5D,MAAM,MAAM,4BAA4B,GAAG,IAAI,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AAE/E,wBAAgB,uBAAuB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,4BAA4B,2CAEpG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetricGroupWidgetRenderer.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/MetricGroupWidgetRenderer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MetricGroupWidgetRenderer.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/MetricGroupWidgetRenderer.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAM5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAoBvE,wBAAgB,yBAAyB,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,mBAAmB,CAAC,iBAAiB,CAAC,2CAmF/G"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { MetricWidgetData } from '../widget-data';
|
|
2
|
+
export type MetricPresentationProps = Omit<MetricWidgetData, 'type'>;
|
|
3
|
+
export declare function MetricPresentation({ value, label, state, trend, trendSentiment, sparklineData, }: MetricPresentationProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=MetricPresentation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetricPresentation.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/MetricPresentation.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;AAErE,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,cAAc,EACd,aAAa,GACd,EAAE,uBAAuB,2CAWzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetricWidgetRenderer.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/MetricWidgetRenderer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MetricWidgetRenderer.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/MetricWidgetRenderer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAWvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAGvE,wBAAgB,oBAAoB,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,mBAAmB,CAAC,YAAY,CAAC,2CA6ErG"}
|