@grafana/scenes 6.21.0--canary.1146.15674574987.0 → 6.21.0
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/CHANGELOG.md +57 -0
- package/dist/esm/behaviors/SceneRenderProfiler.js.map +1 -1
- package/dist/esm/components/NestedScene.js +3 -2
- package/dist/esm/components/NestedScene.js.map +1 -1
- package/dist/esm/components/SceneApp/SceneAppPage.js +4 -3
- package/dist/esm/components/SceneApp/SceneAppPage.js.map +1 -1
- package/dist/esm/components/SceneCanvasText.js +3 -2
- package/dist/esm/components/SceneCanvasText.js.map +1 -1
- package/dist/esm/components/SceneDebugger/SceneDebugger.js +10 -1
- package/dist/esm/components/SceneDebugger/SceneDebugger.js.map +1 -1
- package/dist/esm/components/SceneRefreshPicker.js.map +1 -1
- package/dist/esm/components/SceneTimeRangeCompare.js +6 -2
- package/dist/esm/components/SceneTimeRangeCompare.js.map +1 -1
- package/dist/esm/components/VizPanel/VizPanel.js +2 -1
- package/dist/esm/components/VizPanel/VizPanel.js.map +1 -1
- package/dist/esm/components/VizPanel/VizPanelExploreButton.js +2 -1
- package/dist/esm/components/VizPanel/VizPanelExploreButton.js.map +1 -1
- package/dist/esm/components/VizPanel/VizPanelRenderer.js +3 -2
- package/dist/esm/components/VizPanel/VizPanelRenderer.js.map +1 -1
- package/dist/esm/components/VizPanel/VizPanelSeriesLimit.js +19 -2
- package/dist/esm/components/VizPanel/VizPanelSeriesLimit.js.map +1 -1
- package/dist/esm/components/layout/grid/SceneGridRow.js +2 -1
- package/dist/esm/components/layout/grid/SceneGridRow.js.map +1 -1
- package/dist/esm/components/layout/split/Splitter.js +2 -1
- package/dist/esm/components/layout/split/Splitter.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/locales/en-US/grafana-scenes.json.js +151 -0
- package/dist/esm/locales/en-US/grafana-scenes.json.js.map +1 -0
- package/dist/esm/utils/ControlsLabel.js +11 -1
- package/dist/esm/utils/ControlsLabel.js.map +1 -1
- package/dist/esm/utils/LoadingIndicator.js +2 -1
- package/dist/esm/utils/LoadingIndicator.js.map +1 -1
- package/dist/esm/utils/loadResources.js +23 -0
- package/dist/esm/utils/loadResources.js.map +1 -0
- package/dist/esm/variables/adhoc/AdHocFilterBuilder.js +3 -2
- package/dist/esm/variables/adhoc/AdHocFilterBuilder.js.map +1 -1
- package/dist/esm/variables/adhoc/AdHocFilterRenderer.js +20 -5
- package/dist/esm/variables/adhoc/AdHocFilterRenderer.js.map +1 -1
- package/dist/esm/variables/adhoc/AdHocFiltersCombobox/AdHocFilterPill.js +25 -3
- package/dist/esm/variables/adhoc/AdHocFiltersCombobox/AdHocFilterPill.js.map +1 -1
- package/dist/esm/variables/adhoc/AdHocFiltersCombobox/AdHocFiltersCombobox.js +11 -2
- package/dist/esm/variables/adhoc/AdHocFiltersCombobox/AdHocFiltersCombobox.js.map +1 -1
- package/dist/esm/variables/adhoc/AdHocFiltersCombobox/DropdownItem.js +5 -4
- package/dist/esm/variables/adhoc/AdHocFiltersCombobox/DropdownItem.js.map +1 -1
- package/dist/esm/variables/adhoc/AdHocFiltersCombobox/MultiValuePill.js +8 -1
- package/dist/esm/variables/adhoc/AdHocFiltersCombobox/MultiValuePill.js.map +1 -1
- package/dist/esm/variables/adhoc/getAdHocFiltersFromScopes.js +3 -1
- package/dist/esm/variables/adhoc/getAdHocFiltersFromScopes.js.map +1 -1
- package/dist/esm/variables/components/VariableValueInput.js +2 -1
- package/dist/esm/variables/components/VariableValueInput.js.map +1 -1
- package/dist/esm/variables/components/VariableValueSelect.js +2 -1
- package/dist/esm/variables/components/VariableValueSelect.js.map +1 -1
- package/dist/esm/variables/groupby/DefaultGroupByCustomIndicatorContainer.js +10 -3
- package/dist/esm/variables/groupby/DefaultGroupByCustomIndicatorContainer.js.map +1 -1
- package/dist/esm/variables/groupby/GroupByVariable.js +17 -4
- package/dist/esm/variables/groupby/GroupByVariable.js.map +1 -1
- package/dist/esm/variables/interpolation/formatRegistry.js +49 -12
- package/dist/esm/variables/interpolation/formatRegistry.js.map +1 -1
- package/dist/esm/variables/variants/DataSourceVariable.js +5 -1
- package/dist/esm/variables/variants/DataSourceVariable.js.map +1 -1
- package/dist/esm/variables/variants/IntervalVariable.js +2 -1
- package/dist/esm/variables/variants/IntervalVariable.js.map +1 -1
- package/dist/esm/variables/variants/TestVariable.js +2 -1
- package/dist/esm/variables/variants/TestVariable.js.map +1 -1
- package/dist/grafana-scenes-DCHONTnD.js +153 -0
- package/dist/grafana-scenes-DCHONTnD.js.map +1 -0
- package/dist/index.d.ts +9 -2
- package/dist/index.js +228 -62
- package/dist/index.js.map +1 -1
- package/package.json +22 -13
package/dist/index.js
CHANGED
@@ -10,6 +10,7 @@ var rxjs = require('rxjs');
|
|
10
10
|
var uuid = require('uuid');
|
11
11
|
var lodash = require('lodash');
|
12
12
|
var schema = require('@grafana/schema');
|
13
|
+
var i18n = require('@grafana/i18n');
|
13
14
|
var ui = require('@grafana/ui');
|
14
15
|
var e2eSelectors = require('@grafana/e2e-selectors');
|
15
16
|
var css = require('@emotion/css');
|
@@ -1320,7 +1321,10 @@ const formatRegistry = new data.Registry(() => {
|
|
1320
1321
|
{
|
1321
1322
|
id: schema.VariableFormatID.Raw,
|
1322
1323
|
name: "raw",
|
1323
|
-
description:
|
1324
|
+
description: i18n.t(
|
1325
|
+
"grafana-scenes.variables.format-registry.formats.description.keep-value-as-is",
|
1326
|
+
"Keep value as is"
|
1327
|
+
),
|
1324
1328
|
formatter: (value) => String(value)
|
1325
1329
|
},
|
1326
1330
|
{
|
@@ -1350,7 +1354,10 @@ const formatRegistry = new data.Registry(() => {
|
|
1350
1354
|
{
|
1351
1355
|
id: schema.VariableFormatID.Pipe,
|
1352
1356
|
name: "Pipe",
|
1353
|
-
description:
|
1357
|
+
description: i18n.t(
|
1358
|
+
"grafana-scenes.variables.format-registry.formats.description.values-are-separated-by-character",
|
1359
|
+
"Values are separated by | character"
|
1360
|
+
),
|
1354
1361
|
formatter: (value) => {
|
1355
1362
|
if (typeof value === "string") {
|
1356
1363
|
return value;
|
@@ -1364,7 +1371,10 @@ const formatRegistry = new data.Registry(() => {
|
|
1364
1371
|
{
|
1365
1372
|
id: schema.VariableFormatID.Distributed,
|
1366
1373
|
name: "Distributed",
|
1367
|
-
description:
|
1374
|
+
description: i18n.t(
|
1375
|
+
"grafana-scenes.variables.format-registry.formats.description.multiple-values-are-formatted-like-variablevalue",
|
1376
|
+
"Multiple values are formatted like variable=value"
|
1377
|
+
),
|
1368
1378
|
formatter: (value, args, variable) => {
|
1369
1379
|
if (typeof value === "string") {
|
1370
1380
|
return value;
|
@@ -1385,7 +1395,10 @@ const formatRegistry = new data.Registry(() => {
|
|
1385
1395
|
{
|
1386
1396
|
id: schema.VariableFormatID.CSV,
|
1387
1397
|
name: "Csv",
|
1388
|
-
description:
|
1398
|
+
description: i18n.t(
|
1399
|
+
"grafana-scenes.variables.format-registry.formats.description.commaseparated-values",
|
1400
|
+
"Comma-separated values"
|
1401
|
+
),
|
1389
1402
|
formatter: (value) => {
|
1390
1403
|
if (typeof value === "string") {
|
1391
1404
|
return value;
|
@@ -1399,7 +1412,10 @@ const formatRegistry = new data.Registry(() => {
|
|
1399
1412
|
{
|
1400
1413
|
id: schema.VariableFormatID.HTML,
|
1401
1414
|
name: "HTML",
|
1402
|
-
description:
|
1415
|
+
description: i18n.t(
|
1416
|
+
"grafana-scenes.variables.format-registry.formats.description.html-escaping-of-values",
|
1417
|
+
"HTML escaping of values"
|
1418
|
+
),
|
1403
1419
|
formatter: (value) => {
|
1404
1420
|
if (typeof value === "string") {
|
1405
1421
|
return data.textUtil.escapeHtml(value);
|
@@ -1413,7 +1429,10 @@ const formatRegistry = new data.Registry(() => {
|
|
1413
1429
|
{
|
1414
1430
|
id: schema.VariableFormatID.JSON,
|
1415
1431
|
name: "JSON",
|
1416
|
-
description:
|
1432
|
+
description: i18n.t(
|
1433
|
+
"grafana-scenes.variables.format-registry.formats.description.json-stringify-value",
|
1434
|
+
"JSON stringify value"
|
1435
|
+
),
|
1417
1436
|
formatter: (value) => {
|
1418
1437
|
if (typeof value === "string") {
|
1419
1438
|
return value;
|
@@ -1424,7 +1443,10 @@ const formatRegistry = new data.Registry(() => {
|
|
1424
1443
|
{
|
1425
1444
|
id: schema.VariableFormatID.PercentEncode,
|
1426
1445
|
name: "Percent encode",
|
1427
|
-
description:
|
1446
|
+
description: i18n.t(
|
1447
|
+
"grafana-scenes.variables.format-registry.formats.description.useful-for-url-escaping-values",
|
1448
|
+
"Useful for URL escaping values"
|
1449
|
+
),
|
1428
1450
|
formatter: (value) => {
|
1429
1451
|
if (lodash.isArray(value)) {
|
1430
1452
|
return encodeURIComponentStrict("{" + value.join(",") + "}");
|
@@ -1435,7 +1457,10 @@ const formatRegistry = new data.Registry(() => {
|
|
1435
1457
|
{
|
1436
1458
|
id: schema.VariableFormatID.SingleQuote,
|
1437
1459
|
name: "Single quote",
|
1438
|
-
description:
|
1460
|
+
description: i18n.t(
|
1461
|
+
"grafana-scenes.variables.format-registry.formats.description.single-quoted-values",
|
1462
|
+
"Single quoted values"
|
1463
|
+
),
|
1439
1464
|
formatter: (value) => {
|
1440
1465
|
const regExp = new RegExp(`'`, "g");
|
1441
1466
|
if (lodash.isArray(value)) {
|
@@ -1448,7 +1473,10 @@ const formatRegistry = new data.Registry(() => {
|
|
1448
1473
|
{
|
1449
1474
|
id: schema.VariableFormatID.DoubleQuote,
|
1450
1475
|
name: "Double quote",
|
1451
|
-
description:
|
1476
|
+
description: i18n.t(
|
1477
|
+
"grafana-scenes.variables.format-registry.formats.description.double-quoted-values",
|
1478
|
+
"Double quoted values"
|
1479
|
+
),
|
1452
1480
|
formatter: (value) => {
|
1453
1481
|
const regExp = new RegExp('"', "g");
|
1454
1482
|
if (lodash.isArray(value)) {
|
@@ -1467,7 +1495,10 @@ const formatRegistry = new data.Registry(() => {
|
|
1467
1495
|
{
|
1468
1496
|
id: schema.VariableFormatID.Date,
|
1469
1497
|
name: "Date",
|
1470
|
-
description:
|
1498
|
+
description: i18n.t(
|
1499
|
+
"grafana-scenes.variables.format-registry.formats.description.format-date-in-different-ways",
|
1500
|
+
"Format date in different ways"
|
1501
|
+
),
|
1471
1502
|
formatter: (value, args) => {
|
1472
1503
|
var _a;
|
1473
1504
|
let nrValue = NaN;
|
@@ -1498,7 +1529,10 @@ const formatRegistry = new data.Registry(() => {
|
|
1498
1529
|
{
|
1499
1530
|
id: schema.VariableFormatID.Glob,
|
1500
1531
|
name: "Glob",
|
1501
|
-
description:
|
1532
|
+
description: i18n.t(
|
1533
|
+
"grafana-scenes.variables.format-registry.formats.description.format-multivalued-variables-using-syntax-example",
|
1534
|
+
"Format multi-valued variables using glob syntax, example {value1,value2}"
|
1535
|
+
),
|
1502
1536
|
formatter: (value) => {
|
1503
1537
|
if (lodash.isArray(value) && value.length > 1) {
|
1504
1538
|
return "{" + value.join(",") + "}";
|
@@ -1535,7 +1569,10 @@ const formatRegistry = new data.Registry(() => {
|
|
1535
1569
|
{
|
1536
1570
|
id: schema.VariableFormatID.UriEncode,
|
1537
1571
|
name: "Percent encode as URI",
|
1538
|
-
description:
|
1572
|
+
description: i18n.t(
|
1573
|
+
"grafana-scenes.variables.format-registry.formats.description.useful-escaping-values-taking-syntax-characters",
|
1574
|
+
"Useful for URL escaping values, taking into URI syntax characters"
|
1575
|
+
),
|
1539
1576
|
formatter: (value) => {
|
1540
1577
|
if (lodash.isArray(value)) {
|
1541
1578
|
return encodeURIStrict("{" + value.join(",") + "}");
|
@@ -2805,7 +2842,7 @@ function VariableValueSelect({ model, state }) {
|
|
2805
2842
|
{
|
2806
2843
|
id: key,
|
2807
2844
|
isValidNewOption: (inputValue2) => inputValue2.trim().length > 0,
|
2808
|
-
placeholder: "Select value",
|
2845
|
+
placeholder: i18n.t("grafana-scenes.variables.variable-value-select.placeholder-select-value", "Select value"),
|
2809
2846
|
width: "auto",
|
2810
2847
|
disabled: isReadOnly,
|
2811
2848
|
value: selectValue,
|
@@ -3112,7 +3149,7 @@ function DefaultGroupByCustomIndicatorContainer(props) {
|
|
3112
3149
|
/* @__PURE__ */ React__default.default.createElement(
|
3113
3150
|
ui.IconButton,
|
3114
3151
|
{
|
3115
|
-
"aria-label": "clear",
|
3152
|
+
"aria-label": i18n.t("grafana-scenes.variables.default-group-by-custom-indicator-container.aria-label-clear", "clear"),
|
3116
3153
|
key: "clear",
|
3117
3154
|
name: "times",
|
3118
3155
|
size: "md",
|
@@ -3144,7 +3181,10 @@ function DefaultGroupByCustomIndicatorContainer(props) {
|
|
3144
3181
|
name: "history",
|
3145
3182
|
size: "md",
|
3146
3183
|
className: styles.clearIcon,
|
3147
|
-
tooltip:
|
3184
|
+
tooltip: i18n.t(
|
3185
|
+
"grafana-scenes.variables.default-group-by-custom-indicator-container.tooltip-restore-groupby-set-by-this-dashboard",
|
3186
|
+
"Restore groupby set by this dashboard."
|
3187
|
+
)
|
3148
3188
|
}
|
3149
3189
|
)
|
3150
3190
|
);
|
@@ -3155,7 +3195,10 @@ function DefaultGroupByCustomIndicatorContainer(props) {
|
|
3155
3195
|
ui.Tooltip,
|
3156
3196
|
{
|
3157
3197
|
key: "tooltip",
|
3158
|
-
content:
|
3198
|
+
content: i18n.t(
|
3199
|
+
"grafana-scenes.variables.default-group-by-custom-indicator-container.tooltip",
|
3200
|
+
"Applied by default in this dashboard. If edited, it carries over to other dashboards."
|
3201
|
+
),
|
3159
3202
|
placement: "bottom"
|
3160
3203
|
},
|
3161
3204
|
/* @__PURE__ */ React__default.default.createElement(ui.Icon, { name: "info-circle", size: "md" })
|
@@ -3409,10 +3452,16 @@ function GroupByVariableRenderer({ model }) {
|
|
3409
3452
|
return isMulti ? /* @__PURE__ */ React__default.default.createElement(
|
3410
3453
|
ui.MultiSelect,
|
3411
3454
|
{
|
3412
|
-
"aria-label":
|
3455
|
+
"aria-label": i18n.t(
|
3456
|
+
"grafana-scenes.variables.group-by-variable-renderer.aria-label-group-by-selector",
|
3457
|
+
"Group by selector"
|
3458
|
+
),
|
3413
3459
|
"data-testid": `GroupBySelect-${key}`,
|
3414
3460
|
id: key,
|
3415
|
-
placeholder:
|
3461
|
+
placeholder: i18n.t(
|
3462
|
+
"grafana-scenes.variables.group-by-variable-renderer.placeholder-group-by-label",
|
3463
|
+
"Group by label"
|
3464
|
+
),
|
3416
3465
|
width: "auto",
|
3417
3466
|
allowCustomValue,
|
3418
3467
|
inputValue,
|
@@ -3465,10 +3514,16 @@ function GroupByVariableRenderer({ model }) {
|
|
3465
3514
|
) : /* @__PURE__ */ React__default.default.createElement(
|
3466
3515
|
ui.Select,
|
3467
3516
|
{
|
3468
|
-
"aria-label":
|
3517
|
+
"aria-label": i18n.t(
|
3518
|
+
"grafana-scenes.variables.group-by-variable-renderer.aria-label-group-by-selector",
|
3519
|
+
"Group by selector"
|
3520
|
+
),
|
3469
3521
|
"data-testid": `GroupBySelect-${key}`,
|
3470
3522
|
id: key,
|
3471
|
-
placeholder:
|
3523
|
+
placeholder: i18n.t(
|
3524
|
+
"grafana-scenes.variables.group-by-variable-renderer.placeholder-group-by-label",
|
3525
|
+
"Group by label"
|
3526
|
+
),
|
3472
3527
|
width: "auto",
|
3473
3528
|
inputValue,
|
3474
3529
|
value: uncommittedValue && uncommittedValue.length > 0 ? uncommittedValue : null,
|
@@ -3525,7 +3580,7 @@ function toSelectableValue$1(input) {
|
|
3525
3580
|
}
|
3526
3581
|
|
3527
3582
|
function LoadingIndicator(props) {
|
3528
|
-
return /* @__PURE__ */ React__default.default.createElement(ui.Tooltip, { content: "Cancel query" }, /* @__PURE__ */ React__default.default.createElement(
|
3583
|
+
return /* @__PURE__ */ React__default.default.createElement(ui.Tooltip, { content: i18n.t("grafana-scenes.utils.loading-indicator.content-cancel-query", "Cancel query") }, /* @__PURE__ */ React__default.default.createElement(
|
3529
3584
|
ui.Icon,
|
3530
3585
|
{
|
3531
3586
|
className: "spin-clockwise",
|
@@ -3572,7 +3627,16 @@ function ControlsLabel(props) {
|
|
3572
3627
|
const testId = typeof props.label === "string" ? e2eSelectors.selectors.pages.Dashboard.SubMenu.submenuItemLabels(props.label) : "";
|
3573
3628
|
let labelElement;
|
3574
3629
|
if (isVertical) {
|
3575
|
-
labelElement = /* @__PURE__ */ React__default.default.createElement("label", { className: css.cx(styles.verticalLabel, props.className), "data-testid": testId, htmlFor: props.htmlFor }, props.prefix, props.label, descriptionIndicator, errorIndicator, props.icon && /* @__PURE__ */ React__default.default.createElement(ui.Icon, { name: props.icon, className: styles.normalIcon }), loadingIndicator, props.onRemove && /* @__PURE__ */ React__default.default.createElement(
|
3630
|
+
labelElement = /* @__PURE__ */ React__default.default.createElement("label", { className: css.cx(styles.verticalLabel, props.className), "data-testid": testId, htmlFor: props.htmlFor }, props.prefix, props.label, descriptionIndicator, errorIndicator, props.icon && /* @__PURE__ */ React__default.default.createElement(ui.Icon, { name: props.icon, className: styles.normalIcon }), loadingIndicator, props.onRemove && /* @__PURE__ */ React__default.default.createElement(
|
3631
|
+
ui.IconButton,
|
3632
|
+
{
|
3633
|
+
variant: "secondary",
|
3634
|
+
size: "xs",
|
3635
|
+
name: "times",
|
3636
|
+
onClick: props.onRemove,
|
3637
|
+
tooltip: i18n.t("grafana-scenes.utils.controls-label.tooltip-remove", "Remove")
|
3638
|
+
}
|
3639
|
+
), props.suffix);
|
3576
3640
|
} else {
|
3577
3641
|
labelElement = /* @__PURE__ */ React__default.default.createElement("label", { className: css.cx(styles.horizontalLabel, props.className), "data-testid": testId, htmlFor: props.htmlFor }, props.prefix, errorIndicator, props.icon && /* @__PURE__ */ React__default.default.createElement(ui.Icon, { name: props.icon, className: styles.normalIcon }), props.label, descriptionIndicator, loadingIndicator, props.suffix);
|
3578
3642
|
}
|
@@ -3721,7 +3785,10 @@ function AdHocFilterRenderer({ filter, model }) {
|
|
3721
3785
|
width: "auto",
|
3722
3786
|
value: valueValue,
|
3723
3787
|
filterOption: filterNoOp,
|
3724
|
-
placeholder:
|
3788
|
+
placeholder: i18n.t(
|
3789
|
+
"grafana-scenes.variables.ad-hoc-filter-renderer.value-select.placeholder-select-value",
|
3790
|
+
"Select value"
|
3791
|
+
),
|
3725
3792
|
options: filteredValueOptions,
|
3726
3793
|
inputValue: valueInputValue,
|
3727
3794
|
onInputChange: onValueInputChange,
|
@@ -3768,7 +3835,10 @@ function AdHocFilterRenderer({ filter, model }) {
|
|
3768
3835
|
width: "auto",
|
3769
3836
|
allowCustomValue: (_c = model.state.allowCustomValue) != null ? _c : true,
|
3770
3837
|
value: keyValue,
|
3771
|
-
placeholder:
|
3838
|
+
placeholder: i18n.t(
|
3839
|
+
"grafana-scenes.variables.ad-hoc-filter-renderer.key-select.placeholder-select-label",
|
3840
|
+
"Select label"
|
3841
|
+
),
|
3772
3842
|
options: handleOptionGroups(keys),
|
3773
3843
|
onChange: (v) => {
|
3774
3844
|
model._updateFilter(filter, {
|
@@ -3825,15 +3895,23 @@ function AdHocFilterRenderer({ filter, model }) {
|
|
3825
3895
|
const label = /* @__PURE__ */ React__default.default.createElement(ControlsLabel, { layout: "vertical", label: (_d = filter.key) != null ? _d : "", onRemove: () => model._removeFilter(filter) });
|
3826
3896
|
return /* @__PURE__ */ React__default.default.createElement(ui.Field, { label, "data-testid": `AdHocFilter-${filter.key}`, className: styles.field }, /* @__PURE__ */ React__default.default.createElement("div", { className: styles.wrapper }, operatorSelect, valueSelect));
|
3827
3897
|
} else {
|
3828
|
-
return /* @__PURE__ */ React__default.default.createElement(
|
3898
|
+
return /* @__PURE__ */ React__default.default.createElement(
|
3899
|
+
ui.Field,
|
3900
|
+
{
|
3901
|
+
label: i18n.t("grafana-scenes.variables.ad-hoc-filter-renderer.label-select-label", "Select label"),
|
3902
|
+
"data-testid": `AdHocFilter-${filter.key}`,
|
3903
|
+
className: styles.field
|
3904
|
+
},
|
3905
|
+
keySelect
|
3906
|
+
);
|
3829
3907
|
}
|
3830
3908
|
}
|
3831
3909
|
return /* @__PURE__ */ React__default.default.createElement("div", { className: styles.wrapper, "data-testid": `AdHocFilter-${filter.key}` }, keySelect, operatorSelect, valueSelect, /* @__PURE__ */ React__default.default.createElement(
|
3832
3910
|
ui.Button,
|
3833
3911
|
{
|
3834
3912
|
variant: "secondary",
|
3835
|
-
"aria-label": "Remove filter",
|
3836
|
-
title: "Remove filter",
|
3913
|
+
"aria-label": i18n.t("grafana-scenes.variables.ad-hoc-filter-renderer.aria-label-remove-filter", "Remove filter"),
|
3914
|
+
title: i18n.t("grafana-scenes.variables.ad-hoc-filter-renderer.title-remove-filter", "Remove filter"),
|
3837
3915
|
className: styles.removeButton,
|
3838
3916
|
icon: "times",
|
3839
3917
|
"data-testid": `AdHocFilter-remove-${(_e = filter.key) != null ? _e : ""}`,
|
@@ -3914,8 +3992,8 @@ function AdHocFilterBuilder({ model, addFilterButtonText }) {
|
|
3914
3992
|
{
|
3915
3993
|
variant: "secondary",
|
3916
3994
|
icon: "plus",
|
3917
|
-
title: "Add filter",
|
3918
|
-
"aria-label": "Add filter",
|
3995
|
+
title: i18n.t("grafana-scenes.variables.ad-hoc-filter-builder.title-add-filter", "Add filter"),
|
3996
|
+
"aria-label": i18n.t("grafana-scenes.variables.ad-hoc-filter-builder.aria-label-add-filter", "Add filter"),
|
3919
3997
|
"data-testid": `AdHocFilter-add`,
|
3920
3998
|
onClick: () => model._addWip()
|
3921
3999
|
},
|
@@ -4117,13 +4195,13 @@ const getStyles$e = (theme) => ({
|
|
4117
4195
|
})
|
4118
4196
|
});
|
4119
4197
|
const LoadingOptionsPlaceholder = () => {
|
4120
|
-
return /* @__PURE__ */ React__default.default.createElement(DropdownItem, { onClick: (e) => e.stopPropagation() }, "Loading options...");
|
4198
|
+
return /* @__PURE__ */ React__default.default.createElement(DropdownItem, { onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React__default.default.createElement(i18n.Trans, { i18nKey: "grafana-scenes.variables.loading-options-placeholder.loading-options" }, "Loading options..."));
|
4121
4199
|
};
|
4122
4200
|
const NoOptionsPlaceholder = () => {
|
4123
|
-
return /* @__PURE__ */ React__default.default.createElement(DropdownItem, { onClick: (e) => e.stopPropagation() }, "No options found");
|
4201
|
+
return /* @__PURE__ */ React__default.default.createElement(DropdownItem, { onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React__default.default.createElement(i18n.Trans, { i18nKey: "grafana-scenes.variables.no-options-placeholder.no-options-found" }, "No options found"));
|
4124
4202
|
};
|
4125
4203
|
const OptionsErrorPlaceholder = ({ handleFetchOptions }) => {
|
4126
|
-
return /* @__PURE__ */ React__default.default.createElement(DropdownItem, { onClick: handleFetchOptions }, "An error has occurred fetching labels. Click to retry");
|
4204
|
+
return /* @__PURE__ */ React__default.default.createElement(DropdownItem, { onClick: handleFetchOptions }, /* @__PURE__ */ React__default.default.createElement(i18n.Trans, { i18nKey: "grafana-scenes.variables.options-error-placeholder.error-occurred-fetching-labels-click-retry" }, "An error has occurred fetching labels. Click to retry"));
|
4127
4205
|
};
|
4128
4206
|
const MultiValueApplyButton = ({
|
4129
4207
|
onApply,
|
@@ -4142,7 +4220,7 @@ const MultiValueApplyButton = ({
|
|
4142
4220
|
transform: `translate(${floatingElementRect == null ? void 0 : floatingElementRect.left}px,${floatingElementRect ? floatingElementRect.top + menuHeight : 0}px)`
|
4143
4221
|
}
|
4144
4222
|
},
|
4145
|
-
/* @__PURE__ */ React__default.default.createElement(ui.Button, { onClick: onApply, size: "sm", tabIndex: -1 }, "Apply")
|
4223
|
+
/* @__PURE__ */ React__default.default.createElement(ui.Button, { onClick: onApply, size: "sm", tabIndex: -1 }, /* @__PURE__ */ React__default.default.createElement(i18n.Trans, { i18nKey: "grafana-scenes.variables.multi-value-apply-button.apply" }, "Apply"))
|
4146
4224
|
);
|
4147
4225
|
};
|
4148
4226
|
|
@@ -4404,7 +4482,13 @@ const MultiValuePill = ({
|
|
4404
4482
|
size: "sm",
|
4405
4483
|
variant: "secondary",
|
4406
4484
|
className: styles.removeButton,
|
4407
|
-
tooltip:
|
4485
|
+
tooltip: i18n.t(
|
4486
|
+
"grafana-scenes.components.adhoc-filters-combobox.remove-filter-value",
|
4487
|
+
"Remove filter value - {{itemLabel}}",
|
4488
|
+
{
|
4489
|
+
itemLabel: (_b = item.label) != null ? _b : item.value
|
4490
|
+
}
|
4491
|
+
)
|
4408
4492
|
},
|
4409
4493
|
/* @__PURE__ */ React__default.default.createElement(ui.Icon, { name: "times", size: "md", id: `${item.value}-${index}-close-icon` })
|
4410
4494
|
)
|
@@ -4829,7 +4913,10 @@ const AdHocCombobox = React.forwardRef(function AdHocCombobox2({ filter, model,
|
|
4829
4913
|
filter.origin && styles.keyPill,
|
4830
4914
|
operatorIdentifier
|
4831
4915
|
),
|
4832
|
-
"aria-label":
|
4916
|
+
"aria-label": i18n.t(
|
4917
|
+
"grafana-scenes.variables.ad-hoc-combobox.aria-label-edit-filter-operator",
|
4918
|
+
"Edit filter operator"
|
4919
|
+
),
|
4833
4920
|
tabIndex: filter.origin ? -1 : 0,
|
4834
4921
|
onClick: (event) => {
|
4835
4922
|
if (filter.origin) {
|
@@ -4936,6 +5023,7 @@ const AdHocCombobox = React.forwardRef(function AdHocCombobox2({ filter, model,
|
|
4936
5023
|
}
|
4937
5024
|
const nextItem = filteredDropDownItems[virtualItem.index + 1];
|
4938
5025
|
const shouldAddBottomBorder = nextItem && !nextItem.group && !nextItem.options && item.group;
|
5026
|
+
const itemLabel = (_a2 = item.label) != null ? _a2 : item.value;
|
4939
5027
|
return (
|
4940
5028
|
// key is included in getItemProps()
|
4941
5029
|
// eslint-disable-next-line react/jsx-key
|
@@ -4998,7 +5086,11 @@ const AdHocCombobox = React.forwardRef(function AdHocCombobox2({ filter, model,
|
|
4998
5086
|
isMultiValueEdit,
|
4999
5087
|
checked: filterMultiValues.some((val) => val.value === item.value)
|
5000
5088
|
},
|
5001
|
-
/* @__PURE__ */ React__default.default.createElement("span", null, item.isCustom ?
|
5089
|
+
/* @__PURE__ */ React__default.default.createElement("span", null, item.isCustom ? i18n.t(
|
5090
|
+
"grafana-scenes.components.adhoc-filters-combobox.use-custom-value",
|
5091
|
+
"Use custom value: {{itemLabel}}",
|
5092
|
+
{ itemLabel }
|
5093
|
+
) : itemLabel),
|
5002
5094
|
item.description ? /* @__PURE__ */ React__default.default.createElement("div", { className: styles.descriptionText }, item.description) : null
|
5003
5095
|
)
|
5004
5096
|
);
|
@@ -5168,7 +5260,13 @@ function AdHocFilterPill({ filter, model, readOnly, focusOnWipInputRef }) {
|
|
5168
5260
|
}
|
5169
5261
|
},
|
5170
5262
|
role: readOnly ? void 0 : "button",
|
5171
|
-
"aria-label":
|
5263
|
+
"aria-label": i18n.t(
|
5264
|
+
"grafana-scenes.components.adhoc-filter-pill.edit-filter-with-key",
|
5265
|
+
"Edit filter with key {{keyLabel}}",
|
5266
|
+
{
|
5267
|
+
keyLabel
|
5268
|
+
}
|
5269
|
+
),
|
5172
5270
|
tabIndex: 0,
|
5173
5271
|
ref: pillWrapperRef
|
5174
5272
|
},
|
@@ -5200,10 +5298,25 @@ function AdHocFilterPill({ filter, model, readOnly, focusOnWipInputRef }) {
|
|
5200
5298
|
name: "times",
|
5201
5299
|
size: "md",
|
5202
5300
|
className: styles.pillIcon,
|
5203
|
-
tooltip:
|
5301
|
+
tooltip: i18n.t(
|
5302
|
+
"grafana-scenes.components.adhoc-filter-pill.remove-filter-with-key",
|
5303
|
+
"Remove filter with key {{keyLabel}}",
|
5304
|
+
{
|
5305
|
+
keyLabel
|
5306
|
+
}
|
5307
|
+
)
|
5204
5308
|
}
|
5205
5309
|
) : null,
|
5206
|
-
filter.origin && filter.readOnly && /* @__PURE__ */ React__default.default.createElement(
|
5310
|
+
filter.origin && filter.readOnly && /* @__PURE__ */ React__default.default.createElement(
|
5311
|
+
ui.Tooltip,
|
5312
|
+
{
|
5313
|
+
content: i18n.t("grafana-scenes.components.adhoc-filter-pill.managed-filter", "{{origin}} managed filter", {
|
5314
|
+
origin: filter.origin
|
5315
|
+
}),
|
5316
|
+
placement: "bottom"
|
5317
|
+
},
|
5318
|
+
/* @__PURE__ */ React__default.default.createElement(ui.Icon, { name: "lock", size: "md", className: styles.readOnlyPillIcon })
|
5319
|
+
),
|
5207
5320
|
filter.origin && !filter.restorable && !filter.readOnly && /* @__PURE__ */ React__default.default.createElement(ui.Tooltip, { content: getOriginFilterTooltips(filter.origin).info, placement: "bottom" }, /* @__PURE__ */ React__default.default.createElement(ui.Icon, { name: "info-circle", size: "md", className: styles.infoPillIcon })),
|
5208
5321
|
filter.origin && filter.restorable && !filter.readOnly && /* @__PURE__ */ React__default.default.createElement(
|
5209
5322
|
ui.IconButton,
|
@@ -5391,7 +5504,6 @@ const getStyles$a = (theme) => ({
|
|
5391
5504
|
|
5392
5505
|
const reverseScopeFilterOperatorMap = Object.fromEntries(
|
5393
5506
|
Object.entries(data.scopeFilterOperatorMap).map(([symbol, operator]) => [operator, symbol])
|
5394
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
5395
5507
|
);
|
5396
5508
|
function isEqualityOrMultiOperator(value) {
|
5397
5509
|
const operators = /* @__PURE__ */ new Set(["equals", "not-equals", "one-of", "not-one-of"]);
|
@@ -5408,6 +5520,9 @@ function getAdHocFiltersFromScopes(scopes) {
|
|
5408
5520
|
}
|
5409
5521
|
function processFilter(formattedFilters, duplicatedFilters, filter) {
|
5410
5522
|
var _a, _b;
|
5523
|
+
if (!filter) {
|
5524
|
+
return;
|
5525
|
+
}
|
5411
5526
|
const existingFilter = formattedFilters.get(filter.key);
|
5412
5527
|
if (existingFilter && canValueBeMerged(existingFilter.operator, filter.operator)) {
|
5413
5528
|
mergeFilterValues(existingFilter, filter);
|
@@ -7679,10 +7794,26 @@ function VizPanelSeriesLimit({ data, showAll, seriesLimit, onShowAllSeries }) {
|
|
7679
7794
|
return null;
|
7680
7795
|
}
|
7681
7796
|
const buttonText = showAll ? "Restore limit" : `Show all ${seriesCount}`;
|
7682
|
-
return /* @__PURE__ */ React__default.default.createElement("div", { className: styles.timeSeriesDisclaimer }, !showAll && /* @__PURE__ */ React__default.default.createElement("span", { className: styles.warningMessage }, /* @__PURE__ */ React__default.default.createElement(
|
7797
|
+
return /* @__PURE__ */ React__default.default.createElement("div", { className: styles.timeSeriesDisclaimer }, !showAll && /* @__PURE__ */ React__default.default.createElement("span", { className: styles.warningMessage }, /* @__PURE__ */ React__default.default.createElement(
|
7798
|
+
ui.Icon,
|
7799
|
+
{
|
7800
|
+
title: i18n.t(
|
7801
|
+
"grafana-scenes.components.viz-panel-series-limit.warning-message",
|
7802
|
+
`Showing only {{seriesLimit}} series`,
|
7803
|
+
{
|
7804
|
+
seriesLimit
|
7805
|
+
}
|
7806
|
+
),
|
7807
|
+
name: "exclamation-triangle",
|
7808
|
+
"aria-hidden": "true"
|
7809
|
+
}
|
7810
|
+
)), /* @__PURE__ */ React__default.default.createElement(
|
7683
7811
|
ui.Tooltip,
|
7684
7812
|
{
|
7685
|
-
content:
|
7813
|
+
content: i18n.t(
|
7814
|
+
"grafana-scenes.components.viz-panel-series-limit.content-rendering-series-single-panel-impact-performance",
|
7815
|
+
"Rendering too many series in a single panel may impact performance and make data harder to read."
|
7816
|
+
)
|
7686
7817
|
},
|
7687
7818
|
/* @__PURE__ */ React__default.default.createElement(ui.Button, { variant: "secondary", size: "sm", onClick: onShowAllSeries }, buttonText)
|
7688
7819
|
));
|
@@ -7748,10 +7879,10 @@ function VizPanelRenderer({ model }) {
|
|
7748
7879
|
const titleInterpolated = model.interpolate(title, void 0, "text");
|
7749
7880
|
const alertStateStyles = ui.useStyles2(getAlertStateStyles);
|
7750
7881
|
if (!plugin) {
|
7751
|
-
return /* @__PURE__ */ React__default.default.createElement("div", null, "Loading plugin panel...");
|
7882
|
+
return /* @__PURE__ */ React__default.default.createElement("div", null, /* @__PURE__ */ React__default.default.createElement(i18n.Trans, { i18nKey: "grafana-scenes.components.viz-panel-renderer.loading-plugin-panel" }, "Loading plugin panel..."));
|
7752
7883
|
}
|
7753
7884
|
if (!plugin.panel) {
|
7754
|
-
return /* @__PURE__ */ React__default.default.createElement("div", null, "Panel plugin has no panel component");
|
7885
|
+
return /* @__PURE__ */ React__default.default.createElement("div", null, /* @__PURE__ */ React__default.default.createElement(i18n.Trans, { i18nKey: "grafana-scenes.components.viz-panel-renderer.panel-plugin-has-no-panel-component" }, "Panel plugin has no panel component"));
|
7755
7886
|
}
|
7756
7887
|
const PanelComponent = plugin.panel;
|
7757
7888
|
if (dataObject && dataObject.setContainerWidth) {
|
@@ -8163,7 +8294,7 @@ class VizPanel extends SceneObjectBase {
|
|
8163
8294
|
super({
|
8164
8295
|
options: {},
|
8165
8296
|
fieldConfig: { defaults: {}, overrides: [] },
|
8166
|
-
title: "Title",
|
8297
|
+
title: i18n.t("grafana-scenes.components.viz-panel.title.title", "Title"),
|
8167
8298
|
pluginId: "timeseries",
|
8168
8299
|
_renderCounter: 0,
|
8169
8300
|
...state
|
@@ -9985,7 +10116,10 @@ class DataSourceVariable extends MultiValueVariable {
|
|
9985
10116
|
options.push({ label: source.name, value: source.uid });
|
9986
10117
|
}
|
9987
10118
|
if (this.state.defaultOptionEnabled && isDefault(source, regex)) {
|
9988
|
-
options.push({
|
10119
|
+
options.push({
|
10120
|
+
label: i18n.t("grafana-scenes.variables.data-source-variable.label.default", "default"),
|
10121
|
+
value: "default"
|
10122
|
+
});
|
9989
10123
|
}
|
9990
10124
|
}
|
9991
10125
|
if (options.length === 0) {
|
@@ -10072,7 +10206,7 @@ class TestVariable extends MultiValueVariable {
|
|
10072
10206
|
type: "custom",
|
10073
10207
|
name: "Test",
|
10074
10208
|
value: "Value",
|
10075
|
-
text: "Text",
|
10209
|
+
text: i18n.t("grafana-scenes.variables.test-variable.text.text", "Text"),
|
10076
10210
|
query: "Query",
|
10077
10211
|
options: [],
|
10078
10212
|
refresh: data.VariableRefresh.onDashboardLoad,
|
@@ -10177,7 +10311,7 @@ function VariableValueInput({ model }) {
|
|
10177
10311
|
ui.AutoSizeInput,
|
10178
10312
|
{
|
10179
10313
|
id: key,
|
10180
|
-
placeholder: "Enter value",
|
10314
|
+
placeholder: i18n.t("grafana-scenes.variables.variable-value-input.placeholder-enter-value", "Enter value"),
|
10181
10315
|
minWidth: 15,
|
10182
10316
|
maxWidth: 30,
|
10183
10317
|
value,
|
@@ -10342,7 +10476,7 @@ IntervalVariable.Component = ({ model }) => {
|
|
10342
10476
|
ui.Select,
|
10343
10477
|
{
|
10344
10478
|
id: key,
|
10345
|
-
placeholder: "Select value",
|
10479
|
+
placeholder: i18n.t("grafana-scenes.variables.interval-variable.placeholder-select-value", "Select value"),
|
10346
10480
|
width: "auto",
|
10347
10481
|
value,
|
10348
10482
|
tabSelectsValue: false,
|
@@ -10716,7 +10850,7 @@ function VizPanelExploreButtonComponent({ model }) {
|
|
10716
10850
|
(_a = options.onClick) == null ? void 0 : _a.call(options);
|
10717
10851
|
}
|
10718
10852
|
},
|
10719
|
-
"Explore"
|
10853
|
+
/* @__PURE__ */ React__default.default.createElement(i18n.Trans, { i18nKey: "grafana-scenes.components.viz-panel-explore-button.explore" }, "Explore")
|
10720
10854
|
);
|
10721
10855
|
}
|
10722
10856
|
return null;
|
@@ -11315,7 +11449,7 @@ function SceneGridRowRenderer({ model }) {
|
|
11315
11449
|
{
|
11316
11450
|
onClick: model.onCollapseToggle,
|
11317
11451
|
className: styles.rowTitleButton,
|
11318
|
-
"aria-label": isCollapsed ? "Expand row" : "Collapse row",
|
11452
|
+
"aria-label": isCollapsed ? i18n.t("grafana-scenes.components.scene-grid-row.expand-row", "Expand row") : i18n.t("grafana-scenes.components.scene-grid-row.collapse-row", "Collapse row"),
|
11319
11453
|
"data-testid": e2eSelectors.selectors.components.DashboardRow.title(sceneGraph.interpolate(model, title, void 0, "text"))
|
11320
11454
|
},
|
11321
11455
|
isCollapsible && /* @__PURE__ */ React__default.default.createElement(ui.Icon, { name: isCollapsed ? "angle-right" : "angle-down" }),
|
@@ -11439,7 +11573,7 @@ function NestedSceneRenderer({ model }) {
|
|
11439
11573
|
variant: "default",
|
11440
11574
|
onClick: model.onRemove,
|
11441
11575
|
key: "remove-button",
|
11442
|
-
"aria-label": "Remove scene"
|
11576
|
+
"aria-label": i18n.t("grafana-scenes.components.nested-scene-renderer.remove-button-label", "Remove scene")
|
11443
11577
|
}
|
11444
11578
|
)
|
11445
11579
|
);
|
@@ -11449,7 +11583,7 @@ function NestedSceneRenderer({ model }) {
|
|
11449
11583
|
{
|
11450
11584
|
onClick: model.onToggle,
|
11451
11585
|
className: gridRow.rowTitleButton,
|
11452
|
-
"aria-label": isCollapsed ? "Expand scene" : "Collapse scene"
|
11586
|
+
"aria-label": isCollapsed ? i18n.t("grafana-scenes.components.nested-scene-renderer.expand-button-label", "Expand scene") : i18n.t("grafana-scenes.components.nested-scene-renderer.collapse-button-label", "Collapse scene")
|
11453
11587
|
},
|
11454
11588
|
canCollapse && /* @__PURE__ */ React__default.default.createElement(ui.Icon, { name: isCollapsed ? "angle-right" : "angle-down" }),
|
11455
11589
|
/* @__PURE__ */ React__default.default.createElement("span", { className: gridRow.rowTitle, role: "heading" }, sceneGraph.interpolate(model, title, void 0, "text"))
|
@@ -11490,7 +11624,8 @@ class SceneCanvasText extends SceneObjectBase {
|
|
11490
11624
|
this._variableDependency = new VariableDependencyConfig(this, { statePaths: ["text"] });
|
11491
11625
|
}
|
11492
11626
|
}
|
11493
|
-
SceneCanvasText.Component =
|
11627
|
+
SceneCanvasText.Component = SceneCanvasTextRenderer;
|
11628
|
+
function SceneCanvasTextRenderer({ model }) {
|
11494
11629
|
const { text, fontSize = 20, align = "left", key, spacing } = model.useState();
|
11495
11630
|
const theme = ui.useTheme2();
|
11496
11631
|
const style = css.css({
|
@@ -11502,7 +11637,7 @@ SceneCanvasText.Component = ({ model }) => {
|
|
11502
11637
|
justifyContent: align
|
11503
11638
|
});
|
11504
11639
|
return /* @__PURE__ */ React__default.default.createElement("div", { className: style, "data-testid": key }, sceneGraph.interpolate(model, text));
|
11505
|
-
}
|
11640
|
+
}
|
11506
11641
|
|
11507
11642
|
class SceneToolbarButton extends SceneObjectBase {
|
11508
11643
|
}
|
@@ -12021,7 +12156,10 @@ function SceneTimeRangeCompareRenderer({ model }) {
|
|
12021
12156
|
ui.ToolbarButton,
|
12022
12157
|
{
|
12023
12158
|
variant: "canvas",
|
12024
|
-
tooltip:
|
12159
|
+
tooltip: i18n.t(
|
12160
|
+
"grafana-scenes.components.scene-time-range-compare-renderer.button-tooltip",
|
12161
|
+
"Enable time frame comparison"
|
12162
|
+
),
|
12025
12163
|
onClick: (e) => {
|
12026
12164
|
e.stopPropagation();
|
12027
12165
|
e.preventDefault();
|
@@ -12029,7 +12167,7 @@ function SceneTimeRangeCompareRenderer({ model }) {
|
|
12029
12167
|
}
|
12030
12168
|
},
|
12031
12169
|
/* @__PURE__ */ React__default.default.createElement(ui.Checkbox, { label: " ", value: enabled, onClick }),
|
12032
|
-
"Comparison"
|
12170
|
+
/* @__PURE__ */ React__default.default.createElement(i18n.Trans, { i18nKey: "grafana-scenes.components.scene-time-range-compare-renderer.button-label" }, "Comparison")
|
12033
12171
|
), enabled ? /* @__PURE__ */ React__default.default.createElement(
|
12034
12172
|
ui.ButtonSelect,
|
12035
12173
|
{
|
@@ -12615,7 +12753,7 @@ function Splitter({
|
|
12615
12753
|
"aria-valuemax": 100,
|
12616
12754
|
"aria-valuenow": 50,
|
12617
12755
|
"aria-controls": `start-panel-${id}`,
|
12618
|
-
"aria-label": "Pane resize widget",
|
12756
|
+
"aria-label": i18n.t("grafana-scenes.components.splitter.aria-label-pane-resize-widget", "Pane resize widget"),
|
12619
12757
|
tabIndex: 0
|
12620
12758
|
}
|
12621
12759
|
), /* @__PURE__ */ React__default.default.createElement(
|
@@ -12925,7 +13063,15 @@ function SceneDebugger({ scene }) {
|
|
12925
13063
|
const styles = ui.useStyles2(getStyles);
|
12926
13064
|
const [isOpen, setIsOpen] = React.useState(false);
|
12927
13065
|
const [selectedObject, setSelectedObject] = React.useState();
|
12928
|
-
return /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, /* @__PURE__ */ React__default.default.createElement(ui.ToolbarButton, { variant: "canvas", icon: "bug", onClick: () => setIsOpen(true) }), isOpen && /* @__PURE__ */ React__default.default.createElement(
|
13066
|
+
return /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, /* @__PURE__ */ React__default.default.createElement(ui.ToolbarButton, { variant: "canvas", icon: "bug", onClick: () => setIsOpen(true) }), isOpen && /* @__PURE__ */ React__default.default.createElement(
|
13067
|
+
ui.Drawer,
|
13068
|
+
{
|
13069
|
+
title: i18n.t("grafana-scenes.components.scene-debugger.title-scene-debugger", "Scene debugger"),
|
13070
|
+
onClose: () => setIsOpen(false),
|
13071
|
+
size: "lg"
|
13072
|
+
},
|
13073
|
+
/* @__PURE__ */ React__default.default.createElement("div", { className: styles.panes }, /* @__PURE__ */ React__default.default.createElement("div", { className: styles.pane1 }, /* @__PURE__ */ React__default.default.createElement("div", { className: styles.paneHeading }, /* @__PURE__ */ React__default.default.createElement(i18n.Trans, { i18nKey: "grafana-scenes.components.scene-debugger.scene-graph" }, "Scene graph")), /* @__PURE__ */ React__default.default.createElement(ui.CustomScrollbar, { autoHeightMin: "100%" }, /* @__PURE__ */ React__default.default.createElement("div", { className: styles.treeWrapper }, /* @__PURE__ */ React__default.default.createElement(DebugTreeNode, { node: scene, selectedObject, onSelect: setSelectedObject })))), /* @__PURE__ */ React__default.default.createElement("div", { className: styles.pane2 }, /* @__PURE__ */ React__default.default.createElement("div", { className: styles.paneHeading }, /* @__PURE__ */ React__default.default.createElement(i18n.Trans, { i18nKey: "grafana-scenes.components.scene-debugger.object-details" }, "Object details")), selectedObject && /* @__PURE__ */ React__default.default.createElement(DebugDetails, { node: selectedObject })))
|
13074
|
+
));
|
12929
13075
|
}
|
12930
13076
|
function getStyles(theme) {
|
12931
13077
|
return {
|
@@ -13161,8 +13307,8 @@ function getFallbackRoute(page) {
|
|
13161
13307
|
function getDefaultFallbackPage() {
|
13162
13308
|
return new SceneAppPage({
|
13163
13309
|
url: "",
|
13164
|
-
title: "Not found",
|
13165
|
-
subTitle: "The url did not match any page",
|
13310
|
+
title: i18n.t("grafana-scenes.components.fallback-page.title", "Not found"),
|
13311
|
+
subTitle: i18n.t("grafana-scenes.components.fallback-page.subTitle", "The url did not match any page"),
|
13166
13312
|
routePath: "*",
|
13167
13313
|
getScene: () => {
|
13168
13314
|
return new EmbeddedScene({
|
@@ -13172,7 +13318,7 @@ function getDefaultFallbackPage() {
|
|
13172
13318
|
new SceneFlexItem({
|
13173
13319
|
body: new SceneReactObject({
|
13174
13320
|
component: () => {
|
13175
|
-
return /* @__PURE__ */ React__default.default.createElement("div", { "data-testid": "default-fallback-content" }, "If you found your way here using a link then there might be a bug in this application.");
|
13321
|
+
return /* @__PURE__ */ React__default.default.createElement("div", { "data-testid": "default-fallback-content" }, /* @__PURE__ */ React__default.default.createElement(i18n.Trans, { i18nKey: "grafana-scenes.components.fallback-page.content" }, "If you found your way here using a link then there might be a bug in this application."));
|
13176
13322
|
}
|
13177
13323
|
})
|
13178
13324
|
})
|
@@ -14092,6 +14238,25 @@ const VizConfigBuilders = {
|
|
14092
14238
|
}
|
14093
14239
|
};
|
14094
14240
|
|
14241
|
+
function __variableDynamicImportRuntime0__(path) {
|
14242
|
+
switch (path) {
|
14243
|
+
case '../locales/en-US/grafana-scenes.json': return Promise.resolve().then(function () { return require('./grafana-scenes-DCHONTnD.js'); });
|
14244
|
+
default: return new Promise(function(resolve, reject) {
|
14245
|
+
(typeof queueMicrotask === 'function' ? queueMicrotask : setTimeout)(
|
14246
|
+
reject.bind(null, new Error("Unknown variable dynamic import: " + path))
|
14247
|
+
);
|
14248
|
+
})
|
14249
|
+
}
|
14250
|
+
}
|
14251
|
+
const resources = i18n.LANGUAGES.reduce((acc, lang) => {
|
14252
|
+
acc[lang.code] = async () => await __variableDynamicImportRuntime0__(`../locales/${lang.code}/grafana-scenes.json`);
|
14253
|
+
return acc;
|
14254
|
+
}, {});
|
14255
|
+
const loadResources = async (resolvedLanguage) => {
|
14256
|
+
const translation = await resources[resolvedLanguage]();
|
14257
|
+
return translation.default;
|
14258
|
+
};
|
14259
|
+
|
14095
14260
|
const sceneUtils = {
|
14096
14261
|
getUrlWithAppState,
|
14097
14262
|
registerRuntimePanelPlugin,
|
@@ -14201,6 +14366,7 @@ exports.isDataLayer = isDataLayer;
|
|
14201
14366
|
exports.isDataRequestEnricher = isDataRequestEnricher;
|
14202
14367
|
exports.isFiltersRequestEnricher = isFiltersRequestEnricher;
|
14203
14368
|
exports.isSceneObject = isSceneObject;
|
14369
|
+
exports.loadResources = loadResources;
|
14204
14370
|
exports.registerQueryWithController = registerQueryWithController;
|
14205
14371
|
exports.registerRuntimeDataSource = registerRuntimeDataSource;
|
14206
14372
|
exports.sceneGraph = sceneGraph;
|