@grafana/scenes 6.20.2 → 6.20.3--canary.1151.15685182570.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/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 +3 -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 +15 -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/loadTranslationResources.js +16 -0
- package/dist/esm/locales/loadTranslationResources.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/wrapInSafeSerializableSceneObject.js.map +1 -1
- 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 +14 -5
- package/dist/esm/variables/adhoc/AdHocFilterRenderer.js.map +1 -1
- package/dist/esm/variables/adhoc/AdHocFiltersCombobox/AdHocFilterPill.js +17 -3
- package/dist/esm/variables/adhoc/AdHocFiltersCombobox/AdHocFilterPill.js.map +1 -1
- package/dist/esm/variables/adhoc/AdHocFiltersCombobox/AdHocFiltersCombobox.js +8 -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 +4 -1
- package/dist/esm/variables/adhoc/AdHocFiltersCombobox/MultiValuePill.js.map +1 -1
- package/dist/esm/variables/adhoc/getAdHocFiltersFromScopes.js +0 -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 +5 -4
- package/dist/esm/variables/groupby/GroupByVariable.js.map +1 -1
- package/dist/esm/variables/interpolation/formatRegistry.js +34 -12
- package/dist/esm/variables/interpolation/formatRegistry.js.map +1 -1
- package/dist/esm/variables/variants/DataSourceVariable.js +2 -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/index.d.ts +7 -2
- package/dist/index.js +160 -62
- package/dist/index.js.map +1 -1
- package/package.json +20 -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,7 @@ const formatRegistry = new data.Registry(() => {
|
|
1320
1321
|
{
|
1321
1322
|
id: schema.VariableFormatID.Raw,
|
1322
1323
|
name: "raw",
|
1323
|
-
description: "Keep value as is",
|
1324
|
+
description: i18n.t("variables.format-registry.formats.description.keep-value-as-is", "Keep value as is"),
|
1324
1325
|
formatter: (value) => String(value)
|
1325
1326
|
},
|
1326
1327
|
{
|
@@ -1350,7 +1351,10 @@ const formatRegistry = new data.Registry(() => {
|
|
1350
1351
|
{
|
1351
1352
|
id: schema.VariableFormatID.Pipe,
|
1352
1353
|
name: "Pipe",
|
1353
|
-
description:
|
1354
|
+
description: i18n.t(
|
1355
|
+
"variables.format-registry.formats.description.values-are-separated-by-character",
|
1356
|
+
"Values are separated by | character"
|
1357
|
+
),
|
1354
1358
|
formatter: (value) => {
|
1355
1359
|
if (typeof value === "string") {
|
1356
1360
|
return value;
|
@@ -1364,7 +1368,10 @@ const formatRegistry = new data.Registry(() => {
|
|
1364
1368
|
{
|
1365
1369
|
id: schema.VariableFormatID.Distributed,
|
1366
1370
|
name: "Distributed",
|
1367
|
-
description:
|
1371
|
+
description: i18n.t(
|
1372
|
+
"variables.format-registry.formats.description.multiple-values-are-formatted-like-variablevalue",
|
1373
|
+
"Multiple values are formatted like variable=value"
|
1374
|
+
),
|
1368
1375
|
formatter: (value, args, variable) => {
|
1369
1376
|
if (typeof value === "string") {
|
1370
1377
|
return value;
|
@@ -1385,7 +1392,7 @@ const formatRegistry = new data.Registry(() => {
|
|
1385
1392
|
{
|
1386
1393
|
id: schema.VariableFormatID.CSV,
|
1387
1394
|
name: "Csv",
|
1388
|
-
description: "Comma-separated values",
|
1395
|
+
description: i18n.t("variables.format-registry.formats.description.commaseparated-values", "Comma-separated values"),
|
1389
1396
|
formatter: (value) => {
|
1390
1397
|
if (typeof value === "string") {
|
1391
1398
|
return value;
|
@@ -1399,7 +1406,10 @@ const formatRegistry = new data.Registry(() => {
|
|
1399
1406
|
{
|
1400
1407
|
id: schema.VariableFormatID.HTML,
|
1401
1408
|
name: "HTML",
|
1402
|
-
description:
|
1409
|
+
description: i18n.t(
|
1410
|
+
"variables.format-registry.formats.description.html-escaping-of-values",
|
1411
|
+
"HTML escaping of values"
|
1412
|
+
),
|
1403
1413
|
formatter: (value) => {
|
1404
1414
|
if (typeof value === "string") {
|
1405
1415
|
return data.textUtil.escapeHtml(value);
|
@@ -1413,7 +1423,7 @@ const formatRegistry = new data.Registry(() => {
|
|
1413
1423
|
{
|
1414
1424
|
id: schema.VariableFormatID.JSON,
|
1415
1425
|
name: "JSON",
|
1416
|
-
description: "JSON stringify value",
|
1426
|
+
description: i18n.t("variables.format-registry.formats.description.json-stringify-value", "JSON stringify value"),
|
1417
1427
|
formatter: (value) => {
|
1418
1428
|
if (typeof value === "string") {
|
1419
1429
|
return value;
|
@@ -1424,7 +1434,10 @@ const formatRegistry = new data.Registry(() => {
|
|
1424
1434
|
{
|
1425
1435
|
id: schema.VariableFormatID.PercentEncode,
|
1426
1436
|
name: "Percent encode",
|
1427
|
-
description:
|
1437
|
+
description: i18n.t(
|
1438
|
+
"variables.format-registry.formats.description.useful-for-url-escaping-values",
|
1439
|
+
"Useful for URL escaping values"
|
1440
|
+
),
|
1428
1441
|
formatter: (value) => {
|
1429
1442
|
if (lodash.isArray(value)) {
|
1430
1443
|
return encodeURIComponentStrict("{" + value.join(",") + "}");
|
@@ -1435,7 +1448,7 @@ const formatRegistry = new data.Registry(() => {
|
|
1435
1448
|
{
|
1436
1449
|
id: schema.VariableFormatID.SingleQuote,
|
1437
1450
|
name: "Single quote",
|
1438
|
-
description: "Single quoted values",
|
1451
|
+
description: i18n.t("variables.format-registry.formats.description.single-quoted-values", "Single quoted values"),
|
1439
1452
|
formatter: (value) => {
|
1440
1453
|
const regExp = new RegExp(`'`, "g");
|
1441
1454
|
if (lodash.isArray(value)) {
|
@@ -1448,7 +1461,7 @@ const formatRegistry = new data.Registry(() => {
|
|
1448
1461
|
{
|
1449
1462
|
id: schema.VariableFormatID.DoubleQuote,
|
1450
1463
|
name: "Double quote",
|
1451
|
-
description: "Double quoted values",
|
1464
|
+
description: i18n.t("variables.format-registry.formats.description.double-quoted-values", "Double quoted values"),
|
1452
1465
|
formatter: (value) => {
|
1453
1466
|
const regExp = new RegExp('"', "g");
|
1454
1467
|
if (lodash.isArray(value)) {
|
@@ -1467,7 +1480,10 @@ const formatRegistry = new data.Registry(() => {
|
|
1467
1480
|
{
|
1468
1481
|
id: schema.VariableFormatID.Date,
|
1469
1482
|
name: "Date",
|
1470
|
-
description:
|
1483
|
+
description: i18n.t(
|
1484
|
+
"variables.format-registry.formats.description.format-date-in-different-ways",
|
1485
|
+
"Format date in different ways"
|
1486
|
+
),
|
1471
1487
|
formatter: (value, args) => {
|
1472
1488
|
var _a;
|
1473
1489
|
let nrValue = NaN;
|
@@ -1498,7 +1514,10 @@ const formatRegistry = new data.Registry(() => {
|
|
1498
1514
|
{
|
1499
1515
|
id: schema.VariableFormatID.Glob,
|
1500
1516
|
name: "Glob",
|
1501
|
-
description:
|
1517
|
+
description: i18n.t(
|
1518
|
+
"variables.format-registry.formats.description.format-multivalued-variables-using-syntax-example",
|
1519
|
+
"Format multi-valued variables using glob syntax, example {value1,value2}"
|
1520
|
+
),
|
1502
1521
|
formatter: (value) => {
|
1503
1522
|
if (lodash.isArray(value) && value.length > 1) {
|
1504
1523
|
return "{" + value.join(",") + "}";
|
@@ -1535,7 +1554,10 @@ const formatRegistry = new data.Registry(() => {
|
|
1535
1554
|
{
|
1536
1555
|
id: schema.VariableFormatID.UriEncode,
|
1537
1556
|
name: "Percent encode as URI",
|
1538
|
-
description:
|
1557
|
+
description: i18n.t(
|
1558
|
+
"variables.format-registry.formats.description.useful-escaping-values-taking-syntax-characters",
|
1559
|
+
"Useful for URL escaping values, taking into URI syntax characters"
|
1560
|
+
),
|
1539
1561
|
formatter: (value) => {
|
1540
1562
|
if (lodash.isArray(value)) {
|
1541
1563
|
return encodeURIStrict("{" + value.join(",") + "}");
|
@@ -2805,7 +2827,7 @@ function VariableValueSelect({ model, state }) {
|
|
2805
2827
|
{
|
2806
2828
|
id: key,
|
2807
2829
|
isValidNewOption: (inputValue2) => inputValue2.trim().length > 0,
|
2808
|
-
placeholder: "Select value",
|
2830
|
+
placeholder: i18n.t("variables.variable-value-select.placeholder-select-value", "Select value"),
|
2809
2831
|
width: "auto",
|
2810
2832
|
disabled: isReadOnly,
|
2811
2833
|
value: selectValue,
|
@@ -3112,7 +3134,7 @@ function DefaultGroupByCustomIndicatorContainer(props) {
|
|
3112
3134
|
/* @__PURE__ */ React__default.default.createElement(
|
3113
3135
|
ui.IconButton,
|
3114
3136
|
{
|
3115
|
-
"aria-label": "clear",
|
3137
|
+
"aria-label": i18n.t("variables.default-group-by-custom-indicator-container.aria-label-clear", "clear"),
|
3116
3138
|
key: "clear",
|
3117
3139
|
name: "times",
|
3118
3140
|
size: "md",
|
@@ -3144,7 +3166,10 @@ function DefaultGroupByCustomIndicatorContainer(props) {
|
|
3144
3166
|
name: "history",
|
3145
3167
|
size: "md",
|
3146
3168
|
className: styles.clearIcon,
|
3147
|
-
tooltip:
|
3169
|
+
tooltip: i18n.t(
|
3170
|
+
"variables.default-group-by-custom-indicator-container.tooltip-restore-groupby-set-by-this-dashboard",
|
3171
|
+
"Restore groupby set by this dashboard."
|
3172
|
+
)
|
3148
3173
|
}
|
3149
3174
|
)
|
3150
3175
|
);
|
@@ -3155,7 +3180,10 @@ function DefaultGroupByCustomIndicatorContainer(props) {
|
|
3155
3180
|
ui.Tooltip,
|
3156
3181
|
{
|
3157
3182
|
key: "tooltip",
|
3158
|
-
content:
|
3183
|
+
content: i18n.t(
|
3184
|
+
"variables.default-group-by-custom-indicator-container.tooltip",
|
3185
|
+
"Applied by default in this dashboard. If edited, it carries over to other dashboards."
|
3186
|
+
),
|
3159
3187
|
placement: "bottom"
|
3160
3188
|
},
|
3161
3189
|
/* @__PURE__ */ React__default.default.createElement(ui.Icon, { name: "info-circle", size: "md" })
|
@@ -3409,10 +3437,10 @@ function GroupByVariableRenderer({ model }) {
|
|
3409
3437
|
return isMulti ? /* @__PURE__ */ React__default.default.createElement(
|
3410
3438
|
ui.MultiSelect,
|
3411
3439
|
{
|
3412
|
-
"aria-label": "Group by selector",
|
3440
|
+
"aria-label": i18n.t("variables.group-by-variable-renderer.aria-label-group-by-selector", "Group by selector"),
|
3413
3441
|
"data-testid": `GroupBySelect-${key}`,
|
3414
3442
|
id: key,
|
3415
|
-
placeholder: "Group by label",
|
3443
|
+
placeholder: i18n.t("variables.group-by-variable-renderer.placeholder-group-by-label", "Group by label"),
|
3416
3444
|
width: "auto",
|
3417
3445
|
allowCustomValue,
|
3418
3446
|
inputValue,
|
@@ -3465,10 +3493,10 @@ function GroupByVariableRenderer({ model }) {
|
|
3465
3493
|
) : /* @__PURE__ */ React__default.default.createElement(
|
3466
3494
|
ui.Select,
|
3467
3495
|
{
|
3468
|
-
"aria-label": "Group by selector",
|
3496
|
+
"aria-label": i18n.t("variables.group-by-variable-renderer.aria-label-group-by-selector", "Group by selector"),
|
3469
3497
|
"data-testid": `GroupBySelect-${key}`,
|
3470
3498
|
id: key,
|
3471
|
-
placeholder: "Group by label",
|
3499
|
+
placeholder: i18n.t("variables.group-by-variable-renderer.placeholder-group-by-label", "Group by label"),
|
3472
3500
|
width: "auto",
|
3473
3501
|
inputValue,
|
3474
3502
|
value: uncommittedValue && uncommittedValue.length > 0 ? uncommittedValue : null,
|
@@ -3525,7 +3553,7 @@ function toSelectableValue$1(input) {
|
|
3525
3553
|
}
|
3526
3554
|
|
3527
3555
|
function LoadingIndicator(props) {
|
3528
|
-
return /* @__PURE__ */ React__default.default.createElement(ui.Tooltip, { content: "Cancel query" }, /* @__PURE__ */ React__default.default.createElement(
|
3556
|
+
return /* @__PURE__ */ React__default.default.createElement(ui.Tooltip, { content: i18n.t("utils.loading-indicator.content-cancel-query", "Cancel query") }, /* @__PURE__ */ React__default.default.createElement(
|
3529
3557
|
ui.Icon,
|
3530
3558
|
{
|
3531
3559
|
className: "spin-clockwise",
|
@@ -3572,7 +3600,16 @@ function ControlsLabel(props) {
|
|
3572
3600
|
const testId = typeof props.label === "string" ? e2eSelectors.selectors.pages.Dashboard.SubMenu.submenuItemLabels(props.label) : "";
|
3573
3601
|
let labelElement;
|
3574
3602
|
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(
|
3603
|
+
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(
|
3604
|
+
ui.IconButton,
|
3605
|
+
{
|
3606
|
+
variant: "secondary",
|
3607
|
+
size: "xs",
|
3608
|
+
name: "times",
|
3609
|
+
onClick: props.onRemove,
|
3610
|
+
tooltip: i18n.t("utils.controls-label.tooltip-remove", "Remove")
|
3611
|
+
}
|
3612
|
+
), props.suffix);
|
3576
3613
|
} else {
|
3577
3614
|
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
3615
|
}
|
@@ -3721,7 +3758,7 @@ function AdHocFilterRenderer({ filter, model }) {
|
|
3721
3758
|
width: "auto",
|
3722
3759
|
value: valueValue,
|
3723
3760
|
filterOption: filterNoOp,
|
3724
|
-
placeholder: "Select value",
|
3761
|
+
placeholder: i18n.t("variables.ad-hoc-filter-renderer.value-select.placeholder-select-value", "Select value"),
|
3725
3762
|
options: filteredValueOptions,
|
3726
3763
|
inputValue: valueInputValue,
|
3727
3764
|
onInputChange: onValueInputChange,
|
@@ -3768,7 +3805,7 @@ function AdHocFilterRenderer({ filter, model }) {
|
|
3768
3805
|
width: "auto",
|
3769
3806
|
allowCustomValue: (_c = model.state.allowCustomValue) != null ? _c : true,
|
3770
3807
|
value: keyValue,
|
3771
|
-
placeholder: "Select label",
|
3808
|
+
placeholder: i18n.t("variables.ad-hoc-filter-renderer.key-select.placeholder-select-label", "Select label"),
|
3772
3809
|
options: handleOptionGroups(keys),
|
3773
3810
|
onChange: (v) => {
|
3774
3811
|
model._updateFilter(filter, {
|
@@ -3825,15 +3862,23 @@ function AdHocFilterRenderer({ filter, model }) {
|
|
3825
3862
|
const label = /* @__PURE__ */ React__default.default.createElement(ControlsLabel, { layout: "vertical", label: (_d = filter.key) != null ? _d : "", onRemove: () => model._removeFilter(filter) });
|
3826
3863
|
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
3864
|
} else {
|
3828
|
-
return /* @__PURE__ */ React__default.default.createElement(
|
3865
|
+
return /* @__PURE__ */ React__default.default.createElement(
|
3866
|
+
ui.Field,
|
3867
|
+
{
|
3868
|
+
label: i18n.t("variables.ad-hoc-filter-renderer.label-select-label", "Select label"),
|
3869
|
+
"data-testid": `AdHocFilter-${filter.key}`,
|
3870
|
+
className: styles.field
|
3871
|
+
},
|
3872
|
+
keySelect
|
3873
|
+
);
|
3829
3874
|
}
|
3830
3875
|
}
|
3831
3876
|
return /* @__PURE__ */ React__default.default.createElement("div", { className: styles.wrapper, "data-testid": `AdHocFilter-${filter.key}` }, keySelect, operatorSelect, valueSelect, /* @__PURE__ */ React__default.default.createElement(
|
3832
3877
|
ui.Button,
|
3833
3878
|
{
|
3834
3879
|
variant: "secondary",
|
3835
|
-
"aria-label": "Remove filter",
|
3836
|
-
title: "Remove filter",
|
3880
|
+
"aria-label": i18n.t("variables.ad-hoc-filter-renderer.aria-label-remove-filter", "Remove filter"),
|
3881
|
+
title: i18n.t("variables.ad-hoc-filter-renderer.title-remove-filter", "Remove filter"),
|
3837
3882
|
className: styles.removeButton,
|
3838
3883
|
icon: "times",
|
3839
3884
|
"data-testid": `AdHocFilter-remove-${(_e = filter.key) != null ? _e : ""}`,
|
@@ -3914,8 +3959,8 @@ function AdHocFilterBuilder({ model, addFilterButtonText }) {
|
|
3914
3959
|
{
|
3915
3960
|
variant: "secondary",
|
3916
3961
|
icon: "plus",
|
3917
|
-
title: "Add filter",
|
3918
|
-
"aria-label": "Add filter",
|
3962
|
+
title: i18n.t("variables.ad-hoc-filter-builder.title-add-filter", "Add filter"),
|
3963
|
+
"aria-label": i18n.t("variables.ad-hoc-filter-builder.aria-label-add-filter", "Add filter"),
|
3919
3964
|
"data-testid": `AdHocFilter-add`,
|
3920
3965
|
onClick: () => model._addWip()
|
3921
3966
|
},
|
@@ -4117,13 +4162,13 @@ const getStyles$e = (theme) => ({
|
|
4117
4162
|
})
|
4118
4163
|
});
|
4119
4164
|
const LoadingOptionsPlaceholder = () => {
|
4120
|
-
return /* @__PURE__ */ React__default.default.createElement(DropdownItem, { onClick: (e) => e.stopPropagation() }, "Loading options...");
|
4165
|
+
return /* @__PURE__ */ React__default.default.createElement(DropdownItem, { onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React__default.default.createElement(i18n.Trans, { i18nKey: "variables.loading-options-placeholder.loading-options" }, "Loading options..."));
|
4121
4166
|
};
|
4122
4167
|
const NoOptionsPlaceholder = () => {
|
4123
|
-
return /* @__PURE__ */ React__default.default.createElement(DropdownItem, { onClick: (e) => e.stopPropagation() }, "No options found");
|
4168
|
+
return /* @__PURE__ */ React__default.default.createElement(DropdownItem, { onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React__default.default.createElement(i18n.Trans, { i18nKey: "variables.no-options-placeholder.no-options-found" }, "No options found"));
|
4124
4169
|
};
|
4125
4170
|
const OptionsErrorPlaceholder = ({ handleFetchOptions }) => {
|
4126
|
-
return /* @__PURE__ */ React__default.default.createElement(DropdownItem, { onClick: handleFetchOptions }, "An error has occurred fetching labels. Click to retry");
|
4171
|
+
return /* @__PURE__ */ React__default.default.createElement(DropdownItem, { onClick: handleFetchOptions }, /* @__PURE__ */ React__default.default.createElement(i18n.Trans, { i18nKey: "variables.options-error-placeholder.error-occurred-fetching-labels-click-retry" }, "An error has occurred fetching labels. Click to retry"));
|
4127
4172
|
};
|
4128
4173
|
const MultiValueApplyButton = ({
|
4129
4174
|
onApply,
|
@@ -4142,7 +4187,7 @@ const MultiValueApplyButton = ({
|
|
4142
4187
|
transform: `translate(${floatingElementRect == null ? void 0 : floatingElementRect.left}px,${floatingElementRect ? floatingElementRect.top + menuHeight : 0}px)`
|
4143
4188
|
}
|
4144
4189
|
},
|
4145
|
-
/* @__PURE__ */ React__default.default.createElement(ui.Button, { onClick: onApply, size: "sm", tabIndex: -1 }, "Apply")
|
4190
|
+
/* @__PURE__ */ React__default.default.createElement(ui.Button, { onClick: onApply, size: "sm", tabIndex: -1 }, /* @__PURE__ */ React__default.default.createElement(i18n.Trans, { i18nKey: "variables.multi-value-apply-button.apply" }, "Apply"))
|
4146
4191
|
);
|
4147
4192
|
};
|
4148
4193
|
|
@@ -4404,7 +4449,9 @@ const MultiValuePill = ({
|
|
4404
4449
|
size: "sm",
|
4405
4450
|
variant: "secondary",
|
4406
4451
|
className: styles.removeButton,
|
4407
|
-
tooltip:
|
4452
|
+
tooltip: i18n.t("components.adhoc-filters-combobox.remove-filter-value", "Remove filter value - {{itemLabel}}", {
|
4453
|
+
itemLabel: (_b = item.label) != null ? _b : item.value
|
4454
|
+
})
|
4408
4455
|
},
|
4409
4456
|
/* @__PURE__ */ React__default.default.createElement(ui.Icon, { name: "times", size: "md", id: `${item.value}-${index}-close-icon` })
|
4410
4457
|
)
|
@@ -4829,7 +4876,7 @@ const AdHocCombobox = React.forwardRef(function AdHocCombobox2({ filter, model,
|
|
4829
4876
|
filter.origin && styles.keyPill,
|
4830
4877
|
operatorIdentifier
|
4831
4878
|
),
|
4832
|
-
"aria-label": "Edit filter operator",
|
4879
|
+
"aria-label": i18n.t("variables.ad-hoc-combobox.aria-label-edit-filter-operator", "Edit filter operator"),
|
4833
4880
|
tabIndex: filter.origin ? -1 : 0,
|
4834
4881
|
onClick: (event) => {
|
4835
4882
|
if (filter.origin) {
|
@@ -4936,6 +4983,7 @@ const AdHocCombobox = React.forwardRef(function AdHocCombobox2({ filter, model,
|
|
4936
4983
|
}
|
4937
4984
|
const nextItem = filteredDropDownItems[virtualItem.index + 1];
|
4938
4985
|
const shouldAddBottomBorder = nextItem && !nextItem.group && !nextItem.options && item.group;
|
4986
|
+
const itemLabel = (_a2 = item.label) != null ? _a2 : item.value;
|
4939
4987
|
return (
|
4940
4988
|
// key is included in getItemProps()
|
4941
4989
|
// eslint-disable-next-line react/jsx-key
|
@@ -4998,7 +5046,11 @@ const AdHocCombobox = React.forwardRef(function AdHocCombobox2({ filter, model,
|
|
4998
5046
|
isMultiValueEdit,
|
4999
5047
|
checked: filterMultiValues.some((val) => val.value === item.value)
|
5000
5048
|
},
|
5001
|
-
/* @__PURE__ */ React__default.default.createElement("span", null, item.isCustom ?
|
5049
|
+
/* @__PURE__ */ React__default.default.createElement("span", null, item.isCustom ? i18n.t(
|
5050
|
+
"components.adhoc-filters-combobox.use-custom-value",
|
5051
|
+
"Use custom value: {{itemLabel}}",
|
5052
|
+
{ itemLabel }
|
5053
|
+
) : itemLabel),
|
5002
5054
|
item.description ? /* @__PURE__ */ React__default.default.createElement("div", { className: styles.descriptionText }, item.description) : null
|
5003
5055
|
)
|
5004
5056
|
);
|
@@ -5168,7 +5220,9 @@ function AdHocFilterPill({ filter, model, readOnly, focusOnWipInputRef }) {
|
|
5168
5220
|
}
|
5169
5221
|
},
|
5170
5222
|
role: readOnly ? void 0 : "button",
|
5171
|
-
"aria-label":
|
5223
|
+
"aria-label": i18n.t("components.adhoc-filter-pill.edit-filter-with-key", "Edit filter with key {{keyLabel}}", {
|
5224
|
+
keyLabel
|
5225
|
+
}),
|
5172
5226
|
tabIndex: 0,
|
5173
5227
|
ref: pillWrapperRef
|
5174
5228
|
},
|
@@ -5200,10 +5254,21 @@ function AdHocFilterPill({ filter, model, readOnly, focusOnWipInputRef }) {
|
|
5200
5254
|
name: "times",
|
5201
5255
|
size: "md",
|
5202
5256
|
className: styles.pillIcon,
|
5203
|
-
tooltip:
|
5257
|
+
tooltip: i18n.t("components.adhoc-filter-pill.remove-filter-with-key", "Remove filter with key {{keyLabel}}", {
|
5258
|
+
keyLabel
|
5259
|
+
})
|
5204
5260
|
}
|
5205
5261
|
) : null,
|
5206
|
-
filter.origin && filter.readOnly && /* @__PURE__ */ React__default.default.createElement(
|
5262
|
+
filter.origin && filter.readOnly && /* @__PURE__ */ React__default.default.createElement(
|
5263
|
+
ui.Tooltip,
|
5264
|
+
{
|
5265
|
+
content: i18n.t("components.adhoc-filter-pill.managed-filter", "{{origin}} managed filter", {
|
5266
|
+
origin: filter.origin
|
5267
|
+
}),
|
5268
|
+
placement: "bottom"
|
5269
|
+
},
|
5270
|
+
/* @__PURE__ */ React__default.default.createElement(ui.Icon, { name: "lock", size: "md", className: styles.readOnlyPillIcon })
|
5271
|
+
),
|
5207
5272
|
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
5273
|
filter.origin && filter.restorable && !filter.readOnly && /* @__PURE__ */ React__default.default.createElement(
|
5209
5274
|
ui.IconButton,
|
@@ -5391,7 +5456,6 @@ const getStyles$a = (theme) => ({
|
|
5391
5456
|
|
5392
5457
|
const reverseScopeFilterOperatorMap = Object.fromEntries(
|
5393
5458
|
Object.entries(data.scopeFilterOperatorMap).map(([symbol, operator]) => [operator, symbol])
|
5394
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
5395
5459
|
);
|
5396
5460
|
function isEqualityOrMultiOperator(value) {
|
5397
5461
|
const operators = /* @__PURE__ */ new Set(["equals", "not-equals", "one-of", "not-one-of"]);
|
@@ -7682,10 +7746,22 @@ function VizPanelSeriesLimit({ data, showAll, seriesLimit, onShowAllSeries }) {
|
|
7682
7746
|
return null;
|
7683
7747
|
}
|
7684
7748
|
const buttonText = showAll ? "Restore limit" : `Show all ${seriesCount}`;
|
7685
|
-
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(
|
7749
|
+
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(
|
7750
|
+
ui.Icon,
|
7751
|
+
{
|
7752
|
+
title: i18n.t("components.viz-panel-series-limit.warning-message", `Showing only {{seriesLimit}} series`, {
|
7753
|
+
seriesLimit
|
7754
|
+
}),
|
7755
|
+
name: "exclamation-triangle",
|
7756
|
+
"aria-hidden": "true"
|
7757
|
+
}
|
7758
|
+
)), /* @__PURE__ */ React__default.default.createElement(
|
7686
7759
|
ui.Tooltip,
|
7687
7760
|
{
|
7688
|
-
content:
|
7761
|
+
content: i18n.t(
|
7762
|
+
"components.viz-panel-series-limit.content-rendering-series-single-panel-impact-performance",
|
7763
|
+
"Rendering too many series in a single panel may impact performance and make data harder to read."
|
7764
|
+
)
|
7689
7765
|
},
|
7690
7766
|
/* @__PURE__ */ React__default.default.createElement(ui.Button, { variant: "secondary", size: "sm", onClick: onShowAllSeries }, buttonText)
|
7691
7767
|
));
|
@@ -7751,10 +7827,10 @@ function VizPanelRenderer({ model }) {
|
|
7751
7827
|
const titleInterpolated = model.interpolate(title, void 0, "text");
|
7752
7828
|
const alertStateStyles = ui.useStyles2(getAlertStateStyles);
|
7753
7829
|
if (!plugin) {
|
7754
|
-
return /* @__PURE__ */ React__default.default.createElement("div", null, "Loading plugin panel...");
|
7830
|
+
return /* @__PURE__ */ React__default.default.createElement("div", null, /* @__PURE__ */ React__default.default.createElement(i18n.Trans, { i18nKey: "components.viz-panel-renderer.loading-plugin-panel" }, "Loading plugin panel..."));
|
7755
7831
|
}
|
7756
7832
|
if (!plugin.panel) {
|
7757
|
-
return /* @__PURE__ */ React__default.default.createElement("div", null, "Panel plugin has no panel component");
|
7833
|
+
return /* @__PURE__ */ React__default.default.createElement("div", null, /* @__PURE__ */ React__default.default.createElement(i18n.Trans, { i18nKey: "components.viz-panel-renderer.panel-plugin-has-no-panel-component" }, "Panel plugin has no panel component"));
|
7758
7834
|
}
|
7759
7835
|
const PanelComponent = plugin.panel;
|
7760
7836
|
if (dataObject && dataObject.setContainerWidth) {
|
@@ -8166,7 +8242,7 @@ class VizPanel extends SceneObjectBase {
|
|
8166
8242
|
super({
|
8167
8243
|
options: {},
|
8168
8244
|
fieldConfig: { defaults: {}, overrides: [] },
|
8169
|
-
title: "Title",
|
8245
|
+
title: i18n.t("components.viz-panel.title.title", "Title"),
|
8170
8246
|
pluginId: "timeseries",
|
8171
8247
|
_renderCounter: 0,
|
8172
8248
|
...state
|
@@ -9988,7 +10064,7 @@ class DataSourceVariable extends MultiValueVariable {
|
|
9988
10064
|
options.push({ label: source.name, value: source.uid });
|
9989
10065
|
}
|
9990
10066
|
if (this.state.defaultOptionEnabled && isDefault(source, regex)) {
|
9991
|
-
options.push({ label: "default", value: "default" });
|
10067
|
+
options.push({ label: i18n.t("variables.data-source-variable.label.default", "default"), value: "default" });
|
9992
10068
|
}
|
9993
10069
|
}
|
9994
10070
|
if (options.length === 0) {
|
@@ -10075,7 +10151,7 @@ class TestVariable extends MultiValueVariable {
|
|
10075
10151
|
type: "custom",
|
10076
10152
|
name: "Test",
|
10077
10153
|
value: "Value",
|
10078
|
-
text: "Text",
|
10154
|
+
text: i18n.t("variables.test-variable.text.text", "Text"),
|
10079
10155
|
query: "Query",
|
10080
10156
|
options: [],
|
10081
10157
|
refresh: data.VariableRefresh.onDashboardLoad,
|
@@ -10180,7 +10256,7 @@ function VariableValueInput({ model }) {
|
|
10180
10256
|
ui.AutoSizeInput,
|
10181
10257
|
{
|
10182
10258
|
id: key,
|
10183
|
-
placeholder: "Enter value",
|
10259
|
+
placeholder: i18n.t("variables.variable-value-input.placeholder-enter-value", "Enter value"),
|
10184
10260
|
minWidth: 15,
|
10185
10261
|
maxWidth: 30,
|
10186
10262
|
value,
|
@@ -10345,7 +10421,7 @@ IntervalVariable.Component = ({ model }) => {
|
|
10345
10421
|
ui.Select,
|
10346
10422
|
{
|
10347
10423
|
id: key,
|
10348
|
-
placeholder: "Select value",
|
10424
|
+
placeholder: i18n.t("variables.interval-variable.placeholder-select-value", "Select value"),
|
10349
10425
|
width: "auto",
|
10350
10426
|
value,
|
10351
10427
|
tabSelectsValue: false,
|
@@ -10719,7 +10795,7 @@ function VizPanelExploreButtonComponent({ model }) {
|
|
10719
10795
|
(_a = options.onClick) == null ? void 0 : _a.call(options);
|
10720
10796
|
}
|
10721
10797
|
},
|
10722
|
-
"Explore"
|
10798
|
+
/* @__PURE__ */ React__default.default.createElement(i18n.Trans, { i18nKey: "components.viz-panel-explore-button.explore" }, "Explore")
|
10723
10799
|
);
|
10724
10800
|
}
|
10725
10801
|
return null;
|
@@ -11318,7 +11394,7 @@ function SceneGridRowRenderer({ model }) {
|
|
11318
11394
|
{
|
11319
11395
|
onClick: model.onCollapseToggle,
|
11320
11396
|
className: styles.rowTitleButton,
|
11321
|
-
"aria-label": isCollapsed ? "Expand row" : "Collapse row",
|
11397
|
+
"aria-label": isCollapsed ? i18n.t("components.scene-grid-row.expand-row", "Expand row") : i18n.t("components.scene-grid-row.collapse-row", "Collapse row"),
|
11322
11398
|
"data-testid": e2eSelectors.selectors.components.DashboardRow.title(sceneGraph.interpolate(model, title, void 0, "text"))
|
11323
11399
|
},
|
11324
11400
|
isCollapsible && /* @__PURE__ */ React__default.default.createElement(ui.Icon, { name: isCollapsed ? "angle-right" : "angle-down" }),
|
@@ -11442,7 +11518,7 @@ function NestedSceneRenderer({ model }) {
|
|
11442
11518
|
variant: "default",
|
11443
11519
|
onClick: model.onRemove,
|
11444
11520
|
key: "remove-button",
|
11445
|
-
"aria-label": "Remove scene"
|
11521
|
+
"aria-label": i18n.t("components.nested-scene-renderer.remove-button-label", "Remove scene")
|
11446
11522
|
}
|
11447
11523
|
)
|
11448
11524
|
);
|
@@ -11452,7 +11528,7 @@ function NestedSceneRenderer({ model }) {
|
|
11452
11528
|
{
|
11453
11529
|
onClick: model.onToggle,
|
11454
11530
|
className: gridRow.rowTitleButton,
|
11455
|
-
"aria-label": isCollapsed ? "Expand scene" : "Collapse scene"
|
11531
|
+
"aria-label": isCollapsed ? i18n.t("components.nested-scene-renderer.expand-button-label", "Expand scene") : i18n.t("components.nested-scene-renderer.collapse-button-label", "Collapse scene")
|
11456
11532
|
},
|
11457
11533
|
canCollapse && /* @__PURE__ */ React__default.default.createElement(ui.Icon, { name: isCollapsed ? "angle-right" : "angle-down" }),
|
11458
11534
|
/* @__PURE__ */ React__default.default.createElement("span", { className: gridRow.rowTitle, role: "heading" }, sceneGraph.interpolate(model, title, void 0, "text"))
|
@@ -11493,7 +11569,8 @@ class SceneCanvasText extends SceneObjectBase {
|
|
11493
11569
|
this._variableDependency = new VariableDependencyConfig(this, { statePaths: ["text"] });
|
11494
11570
|
}
|
11495
11571
|
}
|
11496
|
-
SceneCanvasText.Component =
|
11572
|
+
SceneCanvasText.Component = SceneCanvasTextRenderer;
|
11573
|
+
function SceneCanvasTextRenderer({ model }) {
|
11497
11574
|
const { text, fontSize = 20, align = "left", key, spacing } = model.useState();
|
11498
11575
|
const theme = ui.useTheme2();
|
11499
11576
|
const style = css.css({
|
@@ -11505,7 +11582,7 @@ SceneCanvasText.Component = ({ model }) => {
|
|
11505
11582
|
justifyContent: align
|
11506
11583
|
});
|
11507
11584
|
return /* @__PURE__ */ React__default.default.createElement("div", { className: style, "data-testid": key }, sceneGraph.interpolate(model, text));
|
11508
|
-
}
|
11585
|
+
}
|
11509
11586
|
|
11510
11587
|
class SceneToolbarButton extends SceneObjectBase {
|
11511
11588
|
}
|
@@ -12024,7 +12101,7 @@ function SceneTimeRangeCompareRenderer({ model }) {
|
|
12024
12101
|
ui.ToolbarButton,
|
12025
12102
|
{
|
12026
12103
|
variant: "canvas",
|
12027
|
-
tooltip: "Enable time frame comparison",
|
12104
|
+
tooltip: i18n.t("components.scene-time-range-compare-renderer.button-tooltip", "Enable time frame comparison"),
|
12028
12105
|
onClick: (e) => {
|
12029
12106
|
e.stopPropagation();
|
12030
12107
|
e.preventDefault();
|
@@ -12032,7 +12109,7 @@ function SceneTimeRangeCompareRenderer({ model }) {
|
|
12032
12109
|
}
|
12033
12110
|
},
|
12034
12111
|
/* @__PURE__ */ React__default.default.createElement(ui.Checkbox, { label: " ", value: enabled, onClick }),
|
12035
|
-
"Comparison"
|
12112
|
+
/* @__PURE__ */ React__default.default.createElement(i18n.Trans, { i18nKey: "components.scene-time-range-compare-renderer.button-label" }, "Comparison")
|
12036
12113
|
), enabled ? /* @__PURE__ */ React__default.default.createElement(
|
12037
12114
|
ui.ButtonSelect,
|
12038
12115
|
{
|
@@ -12618,7 +12695,7 @@ function Splitter({
|
|
12618
12695
|
"aria-valuemax": 100,
|
12619
12696
|
"aria-valuenow": 50,
|
12620
12697
|
"aria-controls": `start-panel-${id}`,
|
12621
|
-
"aria-label": "Pane resize widget",
|
12698
|
+
"aria-label": i18n.t("components.splitter.aria-label-pane-resize-widget", "Pane resize widget"),
|
12622
12699
|
tabIndex: 0
|
12623
12700
|
}
|
12624
12701
|
), /* @__PURE__ */ React__default.default.createElement(
|
@@ -12928,7 +13005,15 @@ function SceneDebugger({ scene }) {
|
|
12928
13005
|
const styles = ui.useStyles2(getStyles);
|
12929
13006
|
const [isOpen, setIsOpen] = React.useState(false);
|
12930
13007
|
const [selectedObject, setSelectedObject] = React.useState();
|
12931
|
-
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(
|
13008
|
+
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(
|
13009
|
+
ui.Drawer,
|
13010
|
+
{
|
13011
|
+
title: i18n.t("components.scene-debugger.title-scene-debugger", "Scene debugger"),
|
13012
|
+
onClose: () => setIsOpen(false),
|
13013
|
+
size: "lg"
|
13014
|
+
},
|
13015
|
+
/* @__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: "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: "components.scene-debugger.object-details" }, "Object details")), selectedObject && /* @__PURE__ */ React__default.default.createElement(DebugDetails, { node: selectedObject })))
|
13016
|
+
));
|
12932
13017
|
}
|
12933
13018
|
function getStyles(theme) {
|
12934
13019
|
return {
|
@@ -13164,8 +13249,8 @@ function getFallbackRoute(page) {
|
|
13164
13249
|
function getDefaultFallbackPage() {
|
13165
13250
|
return new SceneAppPage({
|
13166
13251
|
url: "",
|
13167
|
-
title: "Not found",
|
13168
|
-
subTitle: "The url did not match any page",
|
13252
|
+
title: i18n.t("components.fallback-page.title", "Not found"),
|
13253
|
+
subTitle: i18n.t("components.fallback-page.subTitle", "The url did not match any page"),
|
13169
13254
|
routePath: "*",
|
13170
13255
|
getScene: () => {
|
13171
13256
|
return new EmbeddedScene({
|
@@ -13175,7 +13260,7 @@ function getDefaultFallbackPage() {
|
|
13175
13260
|
new SceneFlexItem({
|
13176
13261
|
body: new SceneReactObject({
|
13177
13262
|
component: () => {
|
13178
|
-
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.");
|
13263
|
+
return /* @__PURE__ */ React__default.default.createElement("div", { "data-testid": "default-fallback-content" }, /* @__PURE__ */ React__default.default.createElement(i18n.Trans, { i18nKey: "components.fallback-page.content" }, "If you found your way here using a link then there might be a bug in this application."));
|
13179
13264
|
}
|
13180
13265
|
})
|
13181
13266
|
})
|
@@ -14095,6 +14180,18 @@ const VizConfigBuilders = {
|
|
14095
14180
|
}
|
14096
14181
|
};
|
14097
14182
|
|
14183
|
+
const loadTranslationResources = async (locale) => {
|
14184
|
+
switch (locale) {
|
14185
|
+
case "en-US":
|
14186
|
+
// Don't load the en-US bundle, it's the default in the source
|
14187
|
+
default:
|
14188
|
+
return Promise.resolve({});
|
14189
|
+
}
|
14190
|
+
};
|
14191
|
+
const initTranslations = () => {
|
14192
|
+
return i18n.initPluginTranslations("grafana-scenes", [loadTranslationResources]);
|
14193
|
+
};
|
14194
|
+
|
14098
14195
|
const sceneUtils = {
|
14099
14196
|
getUrlWithAppState,
|
14100
14197
|
registerRuntimePanelPlugin,
|
@@ -14199,6 +14296,7 @@ exports.behaviors = index$1;
|
|
14199
14296
|
exports.dataLayers = index;
|
14200
14297
|
exports.formatRegistry = formatRegistry;
|
14201
14298
|
exports.getExploreURL = getExploreURL;
|
14299
|
+
exports.initTranslations = initTranslations;
|
14202
14300
|
exports.isCustomVariableValue = isCustomVariableValue;
|
14203
14301
|
exports.isDataLayer = isDataLayer;
|
14204
14302
|
exports.isDataRequestEnricher = isDataRequestEnricher;
|