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