You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -1239,16 +1239,17 @@ Hook that returns the given feature flag from FLAGS redux state. It returns the
1239
1239
|===
1240
1240
1241
1241
[discrete]
1242
-
== `YAMLEditor`
1242
+
== `CodeEditor`
1243
1243
1244
-
A basic lazy loaded YAML editor with hover help and completion.
1244
+
A basic lazy loaded Code editor with hover help and completion.
1245
1245
1246
1246
.Example
1247
1247
[source,text]
1248
1248
----
1249
1249
<React.Suspense fallback={<LoadingBox />}>
1250
-
<YAMLEditor
1250
+
<CodeEditor
1251
1251
value={code}
1252
+
language="yaml"
1252
1253
/>
1253
1254
</React.Suspense>
1254
1255
----
@@ -1257,25 +1258,17 @@ A basic lazy loaded YAML editor with hover help and completion.
1257
1258
|===
1258
1259
|Parameter Name |Description
1259
1260
|`value` |String representing the yaml code to render.
1260
-
1261
-
|`options` |Monaco editor options.
1262
-
1261
+
|`language` |String representing the language of the editor.
1262
+
|`options` |Monaco editor options. For more details, please, visit link:https://microsoft.github.io/monaco-editor/docs.html#interfaces/editor.IStandaloneEditorConstructionOptions.html[Interface IStandAloneEditorConstructionOptions].
1263
1263
|`minHeight` |Minimum editor height in valid CSS height values.
1264
-
1265
1264
|`showShortcuts` |Boolean to show shortcuts on top of the editor.
1266
-
1267
-
|`toolbarLinks` |Array of ReactNode rendered on the toolbar links
1268
-
section on top of the editor.
1269
-
1265
+
|`toolbarLinks` |Array of ReactNode rendered on the toolbar links section on top of the editor.
1270
1266
|`onChange` |Callback for on code change event.
1271
-
1272
1267
|`onSave` |Callback called when the command CTRL / CMD + S is triggered.
1273
-
1274
-
|`ref` |React reference to `{ editor?: IStandaloneCodeEditor }`. Using
1275
-
the `editor` property, you are able to access to all methods to control
1276
-
the editor.
1268
+
|`ref` |React reference to `{ editor?: IStandaloneCodeEditor }`. Using the `editor` property, you are able to access to all methods to control the editor. For more information, visit link:https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.IStandaloneCodeEditor.html[Interface IStandaloneCodeEditor].
1277
1269
|===
1278
1270
1271
+
1279
1272
[discrete]
1280
1273
== `ResourceYAMLEditor`
1281
1274
@@ -1475,6 +1468,149 @@ Creates full page ErrorBoundaryFallbackPage component to display the "Oh no! Som
1475
1468
|`title` |title to render as the header of the error boundary page
1476
1469
|===
1477
1470
1471
+
[discrete]
1472
+
== `QueryBrowser`
1473
+
1474
+
A component that renders a graph of the results from a Prometheus PromQL query along with controls for interacting with the graph.
1475
+
1476
+
.Example
1477
+
[source,tsx]
1478
+
----
1479
+
<QueryBrowser
1480
+
defaultTimespan={15 * 60 * 1000}
1481
+
namespace={namespace}
1482
+
pollInterval={30 * 1000}
1483
+
queries={[
1484
+
'process_resident_memory_bytes{job="console"}',
1485
+
'sum(irate(container_network_receive_bytes_total[6h:5m])) by (pod)',
1486
+
]}
1487
+
/>
1488
+
----
1489
+
1490
+
[cols=",",options="header",]
1491
+
|===
1492
+
|Parameter Name |Description
1493
+
|`customDataSource` |(optional) Base URL of an API endpoint that handles PromQL queries. If provided, this is used instead of the default API for fetching data.
1494
+
|`defaultSamples` |(optional) The default number of data samples plotted for each data series. If there are many data series, QueryBrowser might automatically pick a lower number of data samples than specified here.
1495
+
|`defaultTimespan` |(optional) The default timespan for the graph in milliseconds - defaults to 1,800,000 (30 minutes).
1496
+
|`disabledSeries` |(optional) Disable (don't display) data series with these exact label / value pairs.
1497
+
|`disableZoom` |(optional) Flag to disable the graph zoom controls.
1498
+
|`filterLabels` |(optional) Optionally filter the returned data series to only those that match these label / value pairs.
1499
+
|`fixedEndTime` |(optional) Set the end time for the displayed time range rather than showing data up to the current time.
1500
+
|`formatSeriesTitle` |(optional) Function that returns a string to use as the title for a single data series.
1501
+
|`GraphLink` |(optional) Component for rendering a link to another page (for example getting more information about this query).
1502
+
|`hideControls` |(optional) Flag to hide the graph controls for changing the graph timespan, and so on.
1503
+
|`isStack` |(optional) Flag to display a stacked graph instead of a line graph. If showStackedControl is set, it will still be possible for the user to switch to a line graph.
1504
+
|`namespace` |(optional) If provided, data is only returned for this namespace (only series that have this namespace label).
1505
+
|`onZoom` |(optional) Callback called when the graph is zoomed.
1506
+
|`pollInterval` |(optional) If set, determines how often the graph is updated to show the latest data (in milliseconds).
1507
+
|`queries` |Array of PromQL queries to run and display the results in the graph.
1508
+
|`showLegend` |(optional) Flag to enable displaying a legend below the graph.
1509
+
|`showStackedControl` |Flag to enable displaying a graph control for switching between stacked graph mode and line graph mode.
1510
+
|`timespan` |(optional) The timespan that should be covered by the graph in milliseconds.
1511
+
|`units` |(optional) Units to display on the Y-axis and in the tooltip.
1512
+
|===
1513
+
1514
+
[discrete]
1515
+
== `useAnnotationsModal`
1516
+
1517
+
A hook that provides a callback to launch a modal for editing Kubernetes resource annotations.
0 commit comments