@grafana/plugin-ui 0.16.1 → 0.17.1
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/cjs/index.cjs +21907 -20495
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +882 -554
- package/dist/cjs/test-utils.cjs +3979 -91
- package/dist/cjs/test-utils.cjs.map +1 -1
- package/dist/cjs/test-utils.d.cts +1 -1
- package/dist/esm/_virtual/chance2.js +2 -2
- package/dist/esm/async-query-data/DatasourceWithAsyncBackend.js +7 -7
- package/dist/esm/async-query-data/DatasourceWithAsyncBackend.js.map +1 -1
- package/dist/esm/async-query-data/RunQueryButtons.js +4 -4
- package/dist/esm/async-query-data/RunQueryButtons.js.map +1 -1
- package/dist/esm/async-query-data/requestLooper.js +6 -6
- package/dist/esm/async-query-data/requestLooper.js.map +1 -1
- package/dist/esm/components/ConfigEditor/AdvancedSettings/AdvancedHttpSettings.js.map +1 -1
- package/dist/esm/components/ConfigEditor/Auth/Auth.js.map +1 -1
- package/dist/esm/components/ConfigEditor/Auth/auth-method/AuthMethodSettings.js +7 -7
- package/dist/esm/components/ConfigEditor/Auth/auth-method/AuthMethodSettings.js.map +1 -1
- package/dist/esm/components/ConfigEditor/Auth/auth-method/BasicAuth.js.map +1 -1
- package/dist/esm/components/ConfigEditor/Auth/custom-headers/CustomHeader.js.map +1 -1
- package/dist/esm/components/ConfigEditor/Auth/custom-headers/CustomHeaders.js +1 -1
- package/dist/esm/components/ConfigEditor/Auth/custom-headers/CustomHeaders.js.map +1 -1
- package/dist/esm/components/ConfigEditor/Auth/styles.js.map +1 -1
- package/dist/esm/components/ConfigEditor/Auth/tls/SelfSignedCertificate.js +1 -1
- package/dist/esm/components/ConfigEditor/Auth/tls/SelfSignedCertificate.js.map +1 -1
- package/dist/esm/components/ConfigEditor/Auth/tls/SkipTLSVerification.js.map +1 -1
- package/dist/esm/components/ConfigEditor/Auth/tls/TLSClientAuth.js +3 -3
- package/dist/esm/components/ConfigEditor/Auth/tls/TLSClientAuth.js.map +1 -1
- package/dist/esm/components/ConfigEditor/Auth/tls/TLSSettings.js.map +1 -1
- package/dist/esm/components/ConfigEditor/Auth/tls/TLSSettingsSection.js.map +1 -1
- package/dist/esm/components/ConfigEditor/Auth/types.js.map +1 -1
- package/dist/esm/components/ConfigEditor/Auth/utils.js +3 -3
- package/dist/esm/components/ConfigEditor/Auth/utils.js.map +1 -1
- package/dist/esm/components/ConfigEditor/ConfigSection/ConfigDescriptionLink.js +2 -2
- package/dist/esm/components/ConfigEditor/ConfigSection/ConfigDescriptionLink.js.map +1 -1
- package/dist/esm/components/ConfigEditor/ConfigSection/ConfigSection.js.map +1 -1
- package/dist/esm/components/ConfigEditor/ConfigSection/ConfigSubSection.js.map +1 -1
- package/dist/esm/components/ConfigEditor/ConfigSection/GenericConfigSection.js.map +1 -1
- package/dist/esm/components/ConfigEditor/Connection/ConnectionSettings.js +1 -1
- package/dist/esm/components/ConfigEditor/Connection/ConnectionSettings.js.map +1 -1
- package/dist/esm/components/ConfigEditor/DataSourceDescription.js.map +1 -1
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/DatasourceConfigWizard.js +23 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/DatasourceConfigWizard.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/DatasourceErrorBoundary.js +27 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/DatasourceErrorBoundary.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/SchemaField.js +61 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/SchemaField.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/WizardLayout.js +89 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/WizardLayout.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/cel.js +75 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/cel.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/config.js +262 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/config.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/datasource.js +354 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/datasource.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/hooks/formInterpreter.js +93 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/hooks/formInterpreter.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/hooks/useDatasourceConfigForm.js +254 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/hooks/useDatasourceConfigForm.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/hooks/useHealthChecks.js +106 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/hooks/useHealthChecks.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/AuthorizationHeaderField.js +52 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/AuthorizationHeaderField.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/ComplexFieldNote.js +32 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/ComplexFieldNote.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/FieldInput.js +110 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/FieldInput.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/FileUploadField.js +112 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/FileUploadField.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/IndexedPairEditor.js +140 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/IndexedPairEditor.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/ObjectArrayEditor.js +201 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/ObjectArrayEditor.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/PrimitiveInputs.js +103 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/PrimitiveInputs.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/SecureFieldInput.js +72 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/SecureFieldInput.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/StringArrayInput.js +94 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/StringArrayInput.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/fieldUtils.js +138 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/fieldUtils.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/layoutParts.js +82 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/layoutParts.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/resolvePluginName.js +30 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/resolvePluginName.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/styles.js +128 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/styles.js.map +1 -0
- package/dist/esm/components/ConfigEditor/SecureSocksProxyToggle.js.map +1 -1
- package/dist/esm/components/CustomHeadersSettings/CustomHeadersSettings.js +11 -11
- package/dist/esm/components/CustomHeadersSettings/CustomHeadersSettings.js.map +1 -1
- package/dist/esm/components/DataLinks/DataLink.js +5 -4
- package/dist/esm/components/DataLinks/DataLink.js.map +1 -1
- package/dist/esm/components/DataLinks/DataLinks.js +3 -3
- package/dist/esm/components/DataLinks/DataLinks.js.map +1 -1
- package/dist/esm/components/DataSourcePicker/DataSourcePicker.js +10 -10
- package/dist/esm/components/DataSourcePicker/DataSourcePicker.js.map +1 -1
- package/dist/esm/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/esm/components/DatePicker/styles.js +2 -2
- package/dist/esm/components/DatePicker/styles.js.map +1 -1
- package/dist/esm/components/DatePickerWithInput/DatePickerWithInput.js.map +1 -1
- package/dist/esm/components/DatePickerWithInput/styles.js +2 -2
- package/dist/esm/components/DatePickerWithInput/styles.js.map +1 -1
- package/dist/esm/components/DebounceInput/DebounceInput.js.map +1 -1
- package/dist/esm/components/Plugins/PluginSignatureBadge.js.map +1 -1
- package/dist/esm/components/QueryEditor/AccessoryButton.js.map +1 -1
- package/dist/esm/components/QueryEditor/CatalogSelector.js +1 -1
- package/dist/esm/components/QueryEditor/CatalogSelector.js.map +1 -1
- package/dist/esm/components/QueryEditor/ConfirmModal.js +2 -1
- package/dist/esm/components/QueryEditor/ConfirmModal.js.map +1 -1
- package/dist/esm/components/QueryEditor/DatasetSelector.js +1 -1
- package/dist/esm/components/QueryEditor/DatasetSelector.js.map +1 -1
- package/dist/esm/components/QueryEditor/EditorField.js +5 -5
- package/dist/esm/components/QueryEditor/EditorField.js.map +1 -1
- package/dist/esm/components/QueryEditor/EditorFieldGroup.js.map +1 -1
- package/dist/esm/components/QueryEditor/EditorHeader.js +2 -2
- package/dist/esm/components/QueryEditor/EditorHeader.js.map +1 -1
- package/dist/esm/components/QueryEditor/EditorList.js.map +1 -1
- package/dist/esm/components/QueryEditor/EditorRow.js +4 -4
- package/dist/esm/components/QueryEditor/EditorRow.js.map +1 -1
- package/dist/esm/components/QueryEditor/EditorRows.js +2 -2
- package/dist/esm/components/QueryEditor/EditorRows.js.map +1 -1
- package/dist/esm/components/QueryEditor/EditorStack.js +1 -1
- package/dist/esm/components/QueryEditor/EditorStack.js.map +1 -1
- package/dist/esm/components/QueryEditor/EditorSwitch.js +2 -2
- package/dist/esm/components/QueryEditor/EditorSwitch.js.map +1 -1
- package/dist/esm/components/QueryEditor/FlexItem.js.map +1 -1
- package/dist/esm/components/QueryEditor/InlineSelect.js.map +1 -1
- package/dist/esm/components/QueryEditor/InputGroup.js +2 -2
- package/dist/esm/components/QueryEditor/InputGroup.js.map +1 -1
- package/dist/esm/components/QueryEditor/QueryEditor.js +7 -7
- package/dist/esm/components/QueryEditor/QueryEditor.js.map +1 -1
- package/dist/esm/components/QueryEditor/QueryEditorRow.js.map +1 -0
- package/dist/esm/components/QueryEditor/QueryHeader.js +18 -18
- package/dist/esm/components/QueryEditor/QueryHeader.js.map +1 -1
- package/dist/esm/components/QueryEditor/RunQueryButton.js +1 -1
- package/dist/esm/components/QueryEditor/RunQueryButton.js.map +1 -1
- package/dist/esm/components/QueryEditor/Space.js +2 -2
- package/dist/esm/components/QueryEditor/Space.js.map +1 -1
- package/dist/esm/components/QueryEditor/TableSelector.js.map +1 -1
- package/dist/esm/components/QueryEditor/defaults.js +7 -7
- package/dist/esm/components/QueryEditor/defaults.js.map +1 -1
- package/dist/esm/components/QueryEditor/expressions.js.map +1 -1
- package/dist/esm/components/QueryEditor/query-editor-raw/QueryEditorRaw.js.map +1 -1
- package/dist/esm/components/QueryEditor/query-editor-raw/QueryToolbox.js +4 -4
- package/dist/esm/components/QueryEditor/query-editor-raw/QueryToolbox.js.map +1 -1
- package/dist/esm/components/QueryEditor/query-editor-raw/QueryValidator.js +4 -4
- package/dist/esm/components/QueryEditor/query-editor-raw/QueryValidator.js.map +1 -1
- package/dist/esm/components/QueryEditor/query-editor-raw/RawEditor.js +3 -3
- package/dist/esm/components/QueryEditor/query-editor-raw/RawEditor.js.map +1 -1
- package/dist/esm/components/QueryEditor/types.js.map +1 -1
- package/dist/esm/components/QueryEditor/utils/formatSQL.js.map +1 -1
- package/dist/esm/components/QueryEditor/utils/sql.utils.js +8 -8
- package/dist/esm/components/QueryEditor/utils/sql.utils.js.map +1 -1
- package/dist/esm/components/QueryEditor/utils/useSqlChange.js.map +1 -1
- package/dist/esm/components/QueryEditor/visual-query-builder/AwesomeQueryBuilder.js +28 -27
- package/dist/esm/components/QueryEditor/visual-query-builder/AwesomeQueryBuilder.js.map +1 -1
- package/dist/esm/components/QueryEditor/visual-query-builder/EditorField.js +3 -3
- package/dist/esm/components/QueryEditor/visual-query-builder/EditorField.js.map +1 -1
- package/dist/esm/components/QueryEditor/visual-query-builder/EditorRow.js +2 -2
- package/dist/esm/components/QueryEditor/visual-query-builder/EditorRow.js.map +1 -1
- package/dist/esm/components/QueryEditor/visual-query-builder/EditorRows.js.map +1 -1
- package/dist/esm/components/QueryEditor/visual-query-builder/GroupByRow.js +2 -2
- package/dist/esm/components/QueryEditor/visual-query-builder/GroupByRow.js.map +1 -1
- package/dist/esm/components/QueryEditor/visual-query-builder/OrderByRow.js +4 -4
- package/dist/esm/components/QueryEditor/visual-query-builder/OrderByRow.js.map +1 -1
- package/dist/esm/components/QueryEditor/visual-query-builder/Preview.js +2 -2
- package/dist/esm/components/QueryEditor/visual-query-builder/Preview.js.map +1 -1
- package/dist/esm/components/QueryEditor/visual-query-builder/SQLGroupByRow.js.map +1 -1
- package/dist/esm/components/QueryEditor/visual-query-builder/SQLOrderByRow.js +2 -2
- package/dist/esm/components/QueryEditor/visual-query-builder/SQLOrderByRow.js.map +1 -1
- package/dist/esm/components/QueryEditor/visual-query-builder/SQLSelectRow.js.map +1 -1
- package/dist/esm/components/QueryEditor/visual-query-builder/SQLWhereRow.js.map +1 -1
- package/dist/esm/components/QueryEditor/visual-query-builder/SelectRow.js +9 -9
- package/dist/esm/components/QueryEditor/visual-query-builder/SelectRow.js.map +1 -1
- package/dist/esm/components/QueryEditor/visual-query-builder/VisualEditor.js.map +1 -1
- package/dist/esm/components/QueryEditor/visual-query-builder/WhereRow.js.map +1 -1
- package/dist/esm/components/SQLEditor/components/SQLEditor.js +13 -13
- package/dist/esm/components/SQLEditor/components/SQLEditor.js.map +1 -1
- package/dist/esm/components/SQLEditor/hooks/useLatestCallback.js +1 -1
- package/dist/esm/components/SQLEditor/hooks/useLatestCallback.js.map +1 -1
- package/dist/esm/components/SQLEditor/mocks/Monaco.js.map +1 -1
- package/dist/esm/components/SQLEditor/mocks/TextModel.js.map +1 -1
- package/dist/esm/components/SQLEditor/mocks/queries/multiLineFullQuery.js.map +1 -1
- package/dist/esm/components/SQLEditor/mocks/queries/multiLineFullQueryWithAggregation.js.map +1 -1
- package/dist/esm/components/SQLEditor/mocks/queries/multiLineMultipleColumns.js.map +1 -1
- package/dist/esm/components/SQLEditor/mocks/queries/singleLineEmptyQuery.js.map +1 -1
- package/dist/esm/components/SQLEditor/mocks/queries/singleLineFullQuery.js.map +1 -1
- package/dist/esm/components/SQLEditor/mocks/queries/singleLineFullQueryWithAggregation.js.map +1 -1
- package/dist/esm/components/SQLEditor/mocks/queries/singleLineMultipleColumns.js.map +1 -1
- package/dist/esm/components/SQLEditor/mocks/queries/singleLineTwoQueries.js.map +1 -1
- package/dist/esm/components/SQLEditor/mocks/queries/singleLineTwoQueriesWithAggregation.js.map +1 -1
- package/dist/esm/components/SQLEditor/standardSql/definition.js.map +1 -1
- package/dist/esm/components/SQLEditor/standardSql/getStandardSuggestions.js +2 -2
- package/dist/esm/components/SQLEditor/standardSql/getStandardSuggestions.js.map +1 -1
- package/dist/esm/components/SQLEditor/standardSql/getStatementPosition.js +3 -3
- package/dist/esm/components/SQLEditor/standardSql/getStatementPosition.js.map +1 -1
- package/dist/esm/components/SQLEditor/standardSql/language.js.map +1 -1
- package/dist/esm/components/SQLEditor/standardSql/macros.js.map +1 -1
- package/dist/esm/components/SQLEditor/standardSql/standardSQLCompletionItemProvider.js +2 -2
- package/dist/esm/components/SQLEditor/standardSql/standardSQLCompletionItemProvider.js.map +1 -1
- package/dist/esm/components/SQLEditor/standardSql/standardSuggestionsRegistry.js +1 -1
- package/dist/esm/components/SQLEditor/standardSql/standardSuggestionsRegistry.js.map +1 -1
- package/dist/esm/components/SQLEditor/standardSql/statementPositionResolversRegistry.js +25 -25
- package/dist/esm/components/SQLEditor/standardSql/statementPositionResolversRegistry.js.map +1 -1
- package/dist/esm/components/SQLEditor/standardSql/suggestionsKindRegistry.js +1 -1
- package/dist/esm/components/SQLEditor/standardSql/suggestionsKindRegistry.js.map +1 -1
- package/dist/esm/components/SQLEditor/test-utils/index.js.map +1 -1
- package/dist/esm/components/SQLEditor/test-utils/statementPosition.js.map +1 -1
- package/dist/esm/components/SQLEditor/types.js.map +1 -1
- package/dist/esm/components/SQLEditor/utils/LinkedToken.js +15 -12
- package/dist/esm/components/SQLEditor/utils/LinkedToken.js.map +1 -1
- package/dist/esm/components/SQLEditor/utils/commands.js.map +1 -1
- package/dist/esm/components/SQLEditor/utils/debugger.js +1 -1
- package/dist/esm/components/SQLEditor/utils/debugger.js.map +1 -1
- package/dist/esm/components/SQLEditor/utils/getSuggestionKind.js.map +1 -1
- package/dist/esm/components/SQLEditor/utils/linkedTokenBuilder.js +1 -1
- package/dist/esm/components/SQLEditor/utils/linkedTokenBuilder.js.map +1 -1
- package/dist/esm/components/SQLEditor/utils/toCompletionItem.js +1 -1
- package/dist/esm/components/SQLEditor/utils/toCompletionItem.js.map +1 -1
- package/dist/esm/components/SQLEditor/utils/tokenType.js.map +1 -1
- package/dist/esm/components/SQLEditor/utils/tokenUtils.js +9 -9
- package/dist/esm/components/SQLEditor/utils/tokenUtils.js.map +1 -1
- package/dist/esm/components/Segment/Segment.js.map +1 -1
- package/dist/esm/components/VisualQueryBuilder/QueryModellerBase.js +8 -8
- package/dist/esm/components/VisualQueryBuilder/QueryModellerBase.js.map +1 -1
- package/dist/esm/components/VisualQueryBuilder/components/LabelFilterItem.js +11 -11
- package/dist/esm/components/VisualQueryBuilder/components/LabelFilterItem.js.map +1 -1
- package/dist/esm/components/VisualQueryBuilder/components/LabelFilters.js +1 -1
- package/dist/esm/components/VisualQueryBuilder/components/LabelFilters.js.map +1 -1
- package/dist/esm/components/VisualQueryBuilder/components/OperationEditor.js +4 -4
- package/dist/esm/components/VisualQueryBuilder/components/OperationEditor.js.map +1 -1
- package/dist/esm/components/VisualQueryBuilder/components/OperationEditorBody.js +3 -2
- package/dist/esm/components/VisualQueryBuilder/components/OperationEditorBody.js.map +1 -1
- package/dist/esm/components/VisualQueryBuilder/components/OperationExplainedBox.js +3 -3
- package/dist/esm/components/VisualQueryBuilder/components/OperationExplainedBox.js.map +1 -1
- package/dist/esm/components/VisualQueryBuilder/components/OperationHeader.js +8 -5
- package/dist/esm/components/VisualQueryBuilder/components/OperationHeader.js.map +1 -1
- package/dist/esm/components/VisualQueryBuilder/components/OperationInfoButton.js +5 -3
- package/dist/esm/components/VisualQueryBuilder/components/OperationInfoButton.js.map +1 -1
- package/dist/esm/components/VisualQueryBuilder/components/OperationList.js +3 -3
- package/dist/esm/components/VisualQueryBuilder/components/OperationList.js.map +1 -1
- package/dist/esm/components/VisualQueryBuilder/components/OperationListExplained.js +2 -2
- package/dist/esm/components/VisualQueryBuilder/components/OperationListExplained.js.map +1 -1
- package/dist/esm/components/VisualQueryBuilder/components/OperationParamEditor.js +6 -5
- package/dist/esm/components/VisualQueryBuilder/components/OperationParamEditor.js.map +1 -1
- package/dist/esm/components/VisualQueryBuilder/components/OperationsEditorRow.js +2 -2
- package/dist/esm/components/VisualQueryBuilder/components/OperationsEditorRow.js.map +1 -1
- package/dist/esm/components/VisualQueryBuilder/components/QueryBuilderHints.js +8 -8
- package/dist/esm/components/VisualQueryBuilder/components/QueryBuilderHints.js.map +1 -1
- package/dist/esm/components/VisualQueryBuilder/components/QueryEditorModeToggle.js.map +1 -1
- package/dist/esm/components/VisualQueryBuilder/components/QueryHeaderSwitch.js +2 -2
- package/dist/esm/components/VisualQueryBuilder/components/QueryHeaderSwitch.js.map +1 -1
- package/dist/esm/components/VisualQueryBuilder/components/QueryOptionGroup.js.map +1 -1
- package/dist/esm/components/VisualQueryBuilder/components/RawQuery.js +2 -2
- package/dist/esm/components/VisualQueryBuilder/components/RawQuery.js.map +1 -1
- package/dist/esm/components/VisualQueryBuilder/types.js.map +1 -1
- package/dist/esm/datasource/SqlDatasource.js +17 -16
- package/dist/esm/datasource/SqlDatasource.js.map +1 -1
- package/dist/esm/datasource/constants.js.map +1 -1
- package/dist/esm/hooks/useDebounce.js.map +1 -1
- package/dist/esm/index.d.ts +882 -554
- package/dist/esm/index.js +11 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/node_modules/chance/chance.js +3973 -88
- package/dist/esm/node_modules/chance/chance.js.map +1 -1
- package/dist/esm/node_modules/immutable/dist/immutable.es.js +6186 -0
- package/dist/esm/node_modules/immutable/dist/immutable.es.js.map +1 -0
- package/dist/esm/node_modules/js-yaml/dist/js-yaml.js +3059 -0
- package/dist/esm/node_modules/js-yaml/dist/js-yaml.js.map +1 -0
- package/dist/esm/node_modules/react-hook-form/dist/index.esm.js +2798 -0
- package/dist/esm/node_modules/react-hook-form/dist/index.esm.js.map +1 -0
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/Observable.js +2 -2
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/Observable.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/Subscriber.js +3 -3
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/Subscription.js +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/Subscription.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/config.js +1 -6
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/config.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/lastValueFrom.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/observable/empty.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js +3 -3
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/observable/merge.js +2 -2
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/observable/merge.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/observable/of.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/operators/catchError.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/operators/map.js +2 -2
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/operators/map.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/symbol/iterator.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/symbol/observable.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/util/EmptyError.js +7 -5
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/util/EmptyError.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js +2 -2
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +2 -2
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/util/isIterable.js +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/util/isIterable.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/util/isPromise.js +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/util/isPromise.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js +2 -2
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/util/lift.js +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/util/lift.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/util/noop.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/util/pipe.js.map +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map +1 -1
- package/dist/esm/node_modules/semver/classes/comparator.js.map +1 -1
- package/dist/esm/node_modules/semver/classes/range.js +24 -4
- package/dist/esm/node_modules/semver/classes/range.js.map +1 -1
- package/dist/esm/node_modules/semver/classes/semver.js +27 -10
- package/dist/esm/node_modules/semver/classes/semver.js.map +1 -1
- package/dist/esm/node_modules/semver/functions/clean.js.map +1 -1
- package/dist/esm/node_modules/semver/functions/cmp.js.map +1 -1
- package/dist/esm/node_modules/semver/functions/coerce.js.map +1 -1
- package/dist/esm/node_modules/semver/functions/compare-build.js.map +1 -1
- package/dist/esm/node_modules/semver/functions/diff.js +1 -1
- package/dist/esm/node_modules/semver/functions/diff.js.map +1 -1
- package/dist/esm/node_modules/semver/functions/inc.js.map +1 -1
- package/dist/esm/node_modules/semver/functions/parse.js.map +1 -1
- package/dist/esm/node_modules/semver/functions/prerelease.js.map +1 -1
- package/dist/esm/node_modules/semver/functions/satisfies.js.map +1 -1
- package/dist/esm/node_modules/semver/functions/truncate.js +62 -0
- package/dist/esm/node_modules/semver/functions/truncate.js.map +1 -0
- package/dist/esm/node_modules/semver/functions/valid.js +5 -5
- package/dist/esm/node_modules/semver/functions/valid.js.map +1 -1
- package/dist/esm/node_modules/semver/index.js +3 -0
- package/dist/esm/node_modules/semver/index.js.map +1 -1
- package/dist/esm/node_modules/semver/internal/debug.js.map +1 -1
- package/dist/esm/node_modules/semver/internal/identifiers.js.map +1 -1
- package/dist/esm/node_modules/semver/internal/lrucache.js.map +1 -1
- package/dist/esm/node_modules/semver/internal/parse-options.js.map +1 -1
- package/dist/esm/node_modules/semver/internal/re.js +13 -13
- package/dist/esm/node_modules/semver/internal/re.js.map +1 -1
- package/dist/esm/node_modules/semver/ranges/intersects.js.map +1 -1
- package/dist/esm/node_modules/semver/ranges/max-satisfying.js.map +1 -1
- package/dist/esm/node_modules/semver/ranges/min-satisfying.js.map +1 -1
- package/dist/esm/node_modules/semver/ranges/min-version.js.map +1 -1
- package/dist/esm/node_modules/semver/ranges/outside.js.map +1 -1
- package/dist/esm/node_modules/semver/ranges/simplify.js.map +1 -1
- package/dist/esm/node_modules/semver/ranges/subset.js +3 -3
- package/dist/esm/node_modules/semver/ranges/subset.js.map +1 -1
- package/dist/esm/node_modules/semver/ranges/valid.js.map +1 -1
- package/dist/esm/node_modules/tslib/tslib.es6.js +2 -2
- package/dist/esm/node_modules/tslib/tslib.es6.js.map +1 -1
- package/dist/esm/schema/utils/dsconfig.js +97 -0
- package/dist/esm/schema/utils/dsconfig.js.map +1 -0
- package/dist/esm/schema/utils/llm.js +54 -0
- package/dist/esm/schema/utils/llm.js.map +1 -0
- package/dist/esm/schema/utils/provisioning.js +389 -0
- package/dist/esm/schema/utils/provisioning.js.map +1 -0
- package/dist/esm/schema/utils/registry.js +31 -0
- package/dist/esm/schema/utils/registry.js.map +1 -0
- package/dist/esm/test/mocks/DataQuery.js.map +1 -1
- package/dist/esm/test/mocks/Datasource.js +1 -1
- package/dist/esm/test/mocks/Datasource.js.map +1 -1
- package/dist/esm/test/mocks/Plugin.js +5 -2
- package/dist/esm/test/mocks/Plugin.js.map +1 -1
- package/dist/esm/test/mocks/QueryEditorProps.js.map +1 -1
- package/dist/esm/test/mocks/utils.js +2 -2
- package/dist/esm/test/mocks/utils.js.map +1 -1
- package/dist/esm/test-utils.d.ts +1 -1
- package/package.json +67 -66
- package/dist/esm/components/QueryEditorRow/QueryEditorRow.js.map +0 -1
- package/dist/esm/schema/registry/alertmanager.schema.json.js +0 -77
- package/dist/esm/schema/registry/alertmanager.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/cloudwatch.schema.json.js +0 -384
- package/dist/esm/schema/registry/cloudwatch.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/elasticsearch.schema.json.js +0 -287
- package/dist/esm/schema/registry/elasticsearch.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-amazonprometheus-datasource.schema.json.js +0 -166
- package/dist/esm/schema/registry/grafana-amazonprometheus-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-appdynamics-datasource.schema.json.js +0 -145
- package/dist/esm/schema/registry/grafana-appdynamics-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-astradb-datasource.schema.json.js +0 -123
- package/dist/esm/schema/registry/grafana-astradb-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-athena-datasource.schema.json.js +0 -158
- package/dist/esm/schema/registry/grafana-athena-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-azure-data-explorer-datasource.schema.json.js +0 -204
- package/dist/esm/schema/registry/grafana-azure-data-explorer-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-azure-monitor-datasource.schema.json.js +0 -294
- package/dist/esm/schema/registry/grafana-azure-monitor-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-azuredevops-datasource.schema.json.js +0 -101
- package/dist/esm/schema/registry/grafana-azuredevops-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-azureprometheus-datasource.schema.json.js +0 -125
- package/dist/esm/schema/registry/grafana-azureprometheus-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-bigquery-datasource.schema.json.js +0 -508
- package/dist/esm/schema/registry/grafana-bigquery-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-clickhouse-datasource.schema.json.js +0 -1400
- package/dist/esm/schema/registry/grafana-clickhouse-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-cockroachdb-datasource.schema.json.js +0 -302
- package/dist/esm/schema/registry/grafana-cockroachdb-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-databricks-datasource.schema.json.js +0 -291
- package/dist/esm/schema/registry/grafana-databricks-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-datadog-datasource.schema.json.js +0 -155
- package/dist/esm/schema/registry/grafana-datadog-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-dynatrace-datasource.schema.json.js +0 -179
- package/dist/esm/schema/registry/grafana-dynatrace-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-falconlogscale-datasource.schema.json.js +0 -134
- package/dist/esm/schema/registry/grafana-falconlogscale-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-github-datasource.schema.json.js +0 -156
- package/dist/esm/schema/registry/grafana-github-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-gitlab-datasource.schema.json.js +0 -84
- package/dist/esm/schema/registry/grafana-gitlab-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-googlesheets-datasource.schema.json.js +0 -231
- package/dist/esm/schema/registry/grafana-googlesheets-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-honeycomb-datasource.schema.json.js +0 -87
- package/dist/esm/schema/registry/grafana-honeycomb-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-iot-sitewise-datasource.schema.json.js +0 -159
- package/dist/esm/schema/registry/grafana-iot-sitewise-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-jira-datasource.schema.json.js +0 -188
- package/dist/esm/schema/registry/grafana-jira-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-looker-datasource.schema.json.js +0 -82
- package/dist/esm/schema/registry/grafana-looker-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-mongodb-datasource.schema.json.js +0 -278
- package/dist/esm/schema/registry/grafana-mongodb-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-mqtt-datasource.schema.json.js +0 -168
- package/dist/esm/schema/registry/grafana-mqtt-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-newrelic-datasource.schema.json.js +0 -129
- package/dist/esm/schema/registry/grafana-newrelic-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-odbc-datasource.schema.json.js +0 -56
- package/dist/esm/schema/registry/grafana-odbc-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-opensearch-datasource.schema.json.js +0 -212
- package/dist/esm/schema/registry/grafana-opensearch-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-oracle-datasource.schema.json.js +0 -186
- package/dist/esm/schema/registry/grafana-oracle-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-pagerduty-datasource.schema.json.js +0 -85
- package/dist/esm/schema/registry/grafana-pagerduty-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-postgresql-datasource.schema.json.js +0 -411
- package/dist/esm/schema/registry/grafana-postgresql-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-pyroscope-datasource.schema.json.js +0 -41
- package/dist/esm/schema/registry/grafana-pyroscope-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-redshift-datasource.schema.json.js +0 -201
- package/dist/esm/schema/registry/grafana-redshift-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-salesforce-datasource.schema.json.js +0 -201
- package/dist/esm/schema/registry/grafana-salesforce-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-saphana-datasource.schema.json.js +0 -208
- package/dist/esm/schema/registry/grafana-saphana-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-sentry-datasource.schema.json.js +0 -94
- package/dist/esm/schema/registry/grafana-sentry-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-servicenow-datasource.schema.json.js +0 -179
- package/dist/esm/schema/registry/grafana-servicenow-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-snowflake-datasource.schema.json.js +0 -304
- package/dist/esm/schema/registry/grafana-snowflake-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-splunk-datasource.schema.json.js +0 -319
- package/dist/esm/schema/registry/grafana-splunk-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-splunkobservability-datasource.schema.json.js +0 -90
- package/dist/esm/schema/registry/grafana-splunkobservability-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-strava-datasource.schema.json.js +0 -74
- package/dist/esm/schema/registry/grafana-strava-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-sumologic-datasource.schema.json.js +0 -102
- package/dist/esm/schema/registry/grafana-sumologic-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-surrealdb-datasource.schema.json.js +0 -92
- package/dist/esm/schema/registry/grafana-surrealdb-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-timestream-datasource.schema.json.js +0 -145
- package/dist/esm/schema/registry/grafana-timestream-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-wavefront-datasource.schema.json.js +0 -80
- package/dist/esm/schema/registry/grafana-wavefront-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-x-ray-datasource.schema.json.js +0 -112
- package/dist/esm/schema/registry/grafana-x-ray-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/grafana-yugabyte-datasource.schema.json.js +0 -114
- package/dist/esm/schema/registry/grafana-yugabyte-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/graphite.schema.json.js +0 -104
- package/dist/esm/schema/registry/graphite.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/index.js +0 -27
- package/dist/esm/schema/registry/index.js.map +0 -1
- package/dist/esm/schema/registry/influxdb.schema.json.js +0 -717
- package/dist/esm/schema/registry/influxdb.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/jaeger.schema.json.js +0 -59
- package/dist/esm/schema/registry/jaeger.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/loki.schema.json.js +0 -545
- package/dist/esm/schema/registry/loki.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/marcusolsson-csv-datasource.schema.json.js +0 -45
- package/dist/esm/schema/registry/marcusolsson-csv-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/marcusolsson-json-datasource.schema.json.js +0 -36
- package/dist/esm/schema/registry/marcusolsson-json-datasource.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/mssql.schema.json.js +0 -292
- package/dist/esm/schema/registry/mssql.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/mysql.schema.json.js +0 -304
- package/dist/esm/schema/registry/mysql.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/opentsdb.schema.json.js +0 -113
- package/dist/esm/schema/registry/opentsdb.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/prometheus.schema.json.js +0 -783
- package/dist/esm/schema/registry/prometheus.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/stackdriver.schema.json.js +0 -224
- package/dist/esm/schema/registry/stackdriver.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/staticRegistry.js +0 -135
- package/dist/esm/schema/registry/staticRegistry.js.map +0 -1
- package/dist/esm/schema/registry/tempo.schema.json.js +0 -664
- package/dist/esm/schema/registry/tempo.schema.json.js.map +0 -1
- package/dist/esm/schema/registry/zipkin.schema.json.js +0 -40
- package/dist/esm/schema/registry/zipkin.schema.json.js.map +0 -1
- /package/dist/esm/components/{QueryEditorRow → QueryEditor}/QueryEditorRow.js +0 -0
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React, { ComponentProps, PureComponent, ReactElement, ReactNode, FunctionComponent, HTMLProps } from 'react';
|
|
1
|
+
import React, { ComponentProps, PureComponent, ReactElement, ReactNode, Component, ErrorInfo, FunctionComponent, HTMLProps } from 'react';
|
|
2
2
|
import { Input, Segment as Segment$1, monacoTypes, Monaco, ButtonProps, Field, PopoverContent, Switch, SelectCommonProps, InlineLabel } from '@grafana/ui';
|
|
3
|
-
import { DataSourceInstanceSettings, SelectableValue, DataSourceJsonData, VariableSuggestion, TimeRange, DataFrame, MetricFindValue, ThemeSpacingTokens, ScopedVars,
|
|
3
|
+
import { DataSourceInstanceSettings, SelectableValue, DataSourceJsonData, VariableSuggestion, TimeRange, DataFrame, MetricFindValue, ThemeSpacingTokens, ScopedVars, VariableModel, DataFrameView, QueryEditorProps as QueryEditorProps$1, DataSourceSettings, RegistryItem, DataSourceApi, Registry, DataQuery as DataQuery$1, PanelData, DataQueryRequest, DataQueryResponse, LoadingState } from '@grafana/data';
|
|
4
4
|
import { DataSourceSrv, DataSourceWithBackend, TemplateSrv } from '@grafana/runtime';
|
|
5
5
|
import { JsonTree } from '@react-awesome-query-builder/ui';
|
|
6
6
|
import { DataQuery } from '@grafana/schema';
|
|
@@ -481,7 +481,17 @@ declare const testData_singleLineMultipleColumns: typeof singleLineMultipleColum
|
|
|
481
481
|
declare const testData_singleLineTwoQueries: typeof singleLineTwoQueries;
|
|
482
482
|
declare const testData_singleLineTwoQueriesWithAggregation: typeof singleLineTwoQueriesWithAggregation;
|
|
483
483
|
declare namespace testData {
|
|
484
|
-
export {
|
|
484
|
+
export {
|
|
485
|
+
testData_multiLineFullQuery as multiLineFullQuery,
|
|
486
|
+
testData_multiLineFullQueryWithAggregation as multiLineFullQueryWithAggregation,
|
|
487
|
+
testData_multiLineMultipleColumns as multiLineMultipleColumns,
|
|
488
|
+
testData_singleLineEmptyQuery as singleLineEmptyQuery,
|
|
489
|
+
testData_singleLineFullQuery as singleLineFullQuery,
|
|
490
|
+
testData_singleLineFullQueryWithAggregation as singleLineFullQueryWithAggregation,
|
|
491
|
+
testData_singleLineMultipleColumns as singleLineMultipleColumns,
|
|
492
|
+
testData_singleLineTwoQueries as singleLineTwoQueries,
|
|
493
|
+
testData_singleLineTwoQueriesWithAggregation as singleLineTwoQueriesWithAggregation,
|
|
494
|
+
};
|
|
485
495
|
}
|
|
486
496
|
|
|
487
497
|
declare const SQLEditorTestUtils: {
|
|
@@ -1014,287 +1024,6 @@ type Props$a<C extends Config = Config> = {
|
|
|
1014
1024
|
};
|
|
1015
1025
|
declare const AdvancedHttpSettings: <C extends Config = Config>(props: Props$a<C>) => JSX.Element;
|
|
1016
1026
|
|
|
1017
|
-
interface CustomHeader {
|
|
1018
|
-
id: string;
|
|
1019
|
-
name: string;
|
|
1020
|
-
value: string;
|
|
1021
|
-
configured: boolean;
|
|
1022
|
-
}
|
|
1023
|
-
type CustomHeaders = CustomHeader[];
|
|
1024
|
-
interface Props$9 {
|
|
1025
|
-
dataSourceConfig: DataSourceSettings<any, any>;
|
|
1026
|
-
onChange: (config: DataSourceSettings) => void;
|
|
1027
|
-
}
|
|
1028
|
-
interface State {
|
|
1029
|
-
headers: CustomHeaders;
|
|
1030
|
-
}
|
|
1031
|
-
declare class CustomHeadersSettings extends PureComponent<Props$9, State> {
|
|
1032
|
-
state: State;
|
|
1033
|
-
constructor(props: Props$9);
|
|
1034
|
-
updateSettings: () => void;
|
|
1035
|
-
onHeaderAdd: () => void;
|
|
1036
|
-
onHeaderChange: (headerIndex: number, value: CustomHeader) => void;
|
|
1037
|
-
onHeaderReset: (headerId: string) => void;
|
|
1038
|
-
onHeaderRemove: (headerId: string) => void;
|
|
1039
|
-
render(): React.JSX.Element;
|
|
1040
|
-
}
|
|
1041
|
-
|
|
1042
|
-
interface QueryBuilderLabelFilter {
|
|
1043
|
-
label: string;
|
|
1044
|
-
op: string;
|
|
1045
|
-
value: string;
|
|
1046
|
-
}
|
|
1047
|
-
interface QueryBuilderOperation {
|
|
1048
|
-
id: string;
|
|
1049
|
-
params: QueryBuilderOperationParamValue[];
|
|
1050
|
-
disabled?: boolean;
|
|
1051
|
-
}
|
|
1052
|
-
interface QueryBuilderOperationDefinition<T = any> extends RegistryItem {
|
|
1053
|
-
documentation?: string;
|
|
1054
|
-
params: QueryBuilderOperationParamDef[];
|
|
1055
|
-
defaultParams: QueryBuilderOperationParamValue[];
|
|
1056
|
-
category: string;
|
|
1057
|
-
hideFromList?: boolean;
|
|
1058
|
-
alternativesKey?: string;
|
|
1059
|
-
/** Can be used to control operation placement when adding a new operations, lower are placed first */
|
|
1060
|
-
orderRank?: number;
|
|
1061
|
-
renderer: QueryBuilderOperationRenderer;
|
|
1062
|
-
addOperationHandler: QueryBuilderAddOperationHandler<T>;
|
|
1063
|
-
paramChangedHandler?: QueryBuilderOnParamChangedHandler;
|
|
1064
|
-
explainHandler?: QueryBuilderExplainOperationHandler;
|
|
1065
|
-
changeTypeHandler?: (op: QueryBuilderOperation, newDef: QueryBuilderOperationDefinition<T>) => QueryBuilderOperation;
|
|
1066
|
-
toggleable?: boolean;
|
|
1067
|
-
}
|
|
1068
|
-
type QueryBuilderAddOperationHandler<T> = (def: QueryBuilderOperationDefinition, query: T, modeller: VisualQueryModeller) => T;
|
|
1069
|
-
type QueryBuilderExplainOperationHandler = (op: QueryBuilderOperation, def?: QueryBuilderOperationDefinition) => string;
|
|
1070
|
-
type QueryBuilderOnParamChangedHandler = (index: number, operation: QueryBuilderOperation, operationDef: QueryBuilderOperationDefinition) => QueryBuilderOperation;
|
|
1071
|
-
type QueryBuilderOperationRenderer = (model: QueryBuilderOperation, def: QueryBuilderOperationDefinition, innerQuery: string) => string;
|
|
1072
|
-
type QueryBuilderOperationParamValue = string | number | boolean;
|
|
1073
|
-
interface QueryBuilderOperationParamDef {
|
|
1074
|
-
name: string;
|
|
1075
|
-
type: 'string' | 'number' | 'boolean';
|
|
1076
|
-
options?: string[] | number[] | Array<SelectableValue<string>>;
|
|
1077
|
-
hideName?: boolean;
|
|
1078
|
-
restParam?: boolean;
|
|
1079
|
-
optional?: boolean;
|
|
1080
|
-
placeholder?: string;
|
|
1081
|
-
description?: string;
|
|
1082
|
-
minWidth?: number;
|
|
1083
|
-
editor?: FunctionComponent<QueryBuilderOperationParamEditorProps>;
|
|
1084
|
-
runQueryOnEnter?: boolean;
|
|
1085
|
-
}
|
|
1086
|
-
interface QueryBuilderOperationParamEditorProps {
|
|
1087
|
-
value?: QueryBuilderOperationParamValue;
|
|
1088
|
-
paramDef: QueryBuilderOperationParamDef;
|
|
1089
|
-
/** Parameter index */
|
|
1090
|
-
index: number;
|
|
1091
|
-
operation: QueryBuilderOperation;
|
|
1092
|
-
operationId: string;
|
|
1093
|
-
query: any;
|
|
1094
|
-
datasource: DataSourceApi;
|
|
1095
|
-
timeRange?: TimeRange;
|
|
1096
|
-
onChange: (index: number, value: QueryBuilderOperationParamValue) => void;
|
|
1097
|
-
onRunQuery: () => void;
|
|
1098
|
-
queryModeller: VisualQueryModeller;
|
|
1099
|
-
}
|
|
1100
|
-
declare enum QueryEditorMode {
|
|
1101
|
-
Code = "code",
|
|
1102
|
-
Builder = "builder"
|
|
1103
|
-
}
|
|
1104
|
-
type QueryStats = {
|
|
1105
|
-
bytes: number;
|
|
1106
|
-
message?: string;
|
|
1107
|
-
};
|
|
1108
|
-
interface VisualQueryModeller {
|
|
1109
|
-
getOperationsForCategory(category: string): QueryBuilderOperationDefinition[];
|
|
1110
|
-
getAlternativeOperations(key: string): QueryBuilderOperationDefinition[];
|
|
1111
|
-
getCategories(): string[];
|
|
1112
|
-
getOperationDefinition(id: string): QueryBuilderOperationDefinition | undefined;
|
|
1113
|
-
renderQuery(query: VisualQuery, nested?: boolean): string;
|
|
1114
|
-
renderLabels(labels: QueryBuilderLabelFilter[]): string;
|
|
1115
|
-
innerQueryPlaceholder: string;
|
|
1116
|
-
}
|
|
1117
|
-
interface VisualQueryBinary<T> {
|
|
1118
|
-
operator: string;
|
|
1119
|
-
vectorMatchesType?: 'on' | 'ignoring';
|
|
1120
|
-
vectorMatches?: string;
|
|
1121
|
-
query: T;
|
|
1122
|
-
}
|
|
1123
|
-
declare const BINARY_OPERATIONS_KEY = "Binary operations";
|
|
1124
|
-
interface VisualQuery {
|
|
1125
|
-
metric?: string;
|
|
1126
|
-
labels: QueryBuilderLabelFilter[];
|
|
1127
|
-
operations: QueryBuilderOperation[];
|
|
1128
|
-
binaryQueries?: Array<VisualQueryBinary<VisualQuery>>;
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
declare abstract class QueryModellerBase implements VisualQueryModeller {
|
|
1132
|
-
protected operationsRegistry: Registry<QueryBuilderOperationDefinition>;
|
|
1133
|
-
private categories;
|
|
1134
|
-
innerQueryPlaceholder: string;
|
|
1135
|
-
constructor(operationDefinitions: QueryBuilderOperationDefinition[], innerQueryPlaceholder?: string);
|
|
1136
|
-
protected setOperationCategories(categories: string[]): void;
|
|
1137
|
-
abstract renderOperations(queryString: string, operations: QueryBuilderOperation[]): string;
|
|
1138
|
-
abstract renderBinaryQueries(queryString: string, binaryQueries?: Array<VisualQueryBinary<VisualQuery>>): string;
|
|
1139
|
-
abstract renderLabels(labels: QueryBuilderLabelFilter[]): string;
|
|
1140
|
-
abstract renderQuery(query: VisualQuery, nested?: boolean): string;
|
|
1141
|
-
getOperationsForCategory(category: string): QueryBuilderOperationDefinition<any>[];
|
|
1142
|
-
getAlternativeOperations(key: string): QueryBuilderOperationDefinition<any>[];
|
|
1143
|
-
getCategories(): string[];
|
|
1144
|
-
getOperationDefinition(id: string): QueryBuilderOperationDefinition | undefined;
|
|
1145
|
-
hasBinaryOp(query: VisualQuery): boolean;
|
|
1146
|
-
}
|
|
1147
|
-
|
|
1148
|
-
interface Props$8 {
|
|
1149
|
-
labelsFilters: QueryBuilderLabelFilter[];
|
|
1150
|
-
onChange: (labelFilters: QueryBuilderLabelFilter[]) => void;
|
|
1151
|
-
onGetLabelNames: (forLabel: Partial<QueryBuilderLabelFilter>) => Promise<SelectableValue[]>;
|
|
1152
|
-
onGetLabelValues: (forLabel: Partial<QueryBuilderLabelFilter>) => Promise<SelectableValue[]>;
|
|
1153
|
-
/** If set to true, component will show error message until at least 1 filter is selected */
|
|
1154
|
-
labelFilterRequired?: boolean;
|
|
1155
|
-
multiValueSeparator?: string;
|
|
1156
|
-
}
|
|
1157
|
-
declare function LabelFilters({ labelsFilters, onChange, onGetLabelNames, onGetLabelValues, labelFilterRequired, multiValueSeparator, }: Props$8): React.JSX.Element;
|
|
1158
|
-
|
|
1159
|
-
interface Props$7 {
|
|
1160
|
-
title?: React.ReactNode;
|
|
1161
|
-
markdown?: string;
|
|
1162
|
-
stepNumber?: number;
|
|
1163
|
-
}
|
|
1164
|
-
declare function OperationExplainedBox({ title, stepNumber, markdown, children }: React.PropsWithChildren<Props$7>): React.JSX.Element;
|
|
1165
|
-
|
|
1166
|
-
interface Props$6<T extends VisualQuery> {
|
|
1167
|
-
query: T;
|
|
1168
|
-
datasource: DataSourceApi;
|
|
1169
|
-
onChange: (query: T) => void;
|
|
1170
|
-
onRunQuery: () => void;
|
|
1171
|
-
queryModeller: VisualQueryModeller;
|
|
1172
|
-
explainMode?: boolean;
|
|
1173
|
-
highlightedOp?: QueryBuilderOperation;
|
|
1174
|
-
timeRange?: TimeRange;
|
|
1175
|
-
isConflictingOperation?: (operation: QueryBuilderOperation, otherOperations: QueryBuilderOperation[]) => boolean;
|
|
1176
|
-
}
|
|
1177
|
-
declare function OperationList<T extends VisualQuery>({ query, datasource, queryModeller, onChange, onRunQuery, highlightedOp, timeRange, isConflictingOperation, }: Props$6<T>): React.JSX.Element;
|
|
1178
|
-
|
|
1179
|
-
interface Props$5<T extends VisualQuery> {
|
|
1180
|
-
query: T;
|
|
1181
|
-
queryModeller: VisualQueryModeller;
|
|
1182
|
-
explainMode?: boolean;
|
|
1183
|
-
stepNumber: number;
|
|
1184
|
-
language: {
|
|
1185
|
-
grammar: Grammar;
|
|
1186
|
-
name: string;
|
|
1187
|
-
};
|
|
1188
|
-
onMouseEnter?: (op: QueryBuilderOperation, index: number) => void;
|
|
1189
|
-
onMouseLeave?: (op: QueryBuilderOperation, index: number) => void;
|
|
1190
|
-
}
|
|
1191
|
-
declare function OperationListExplained<T extends VisualQuery>({ query, queryModeller, stepNumber, language, onMouseEnter, onMouseLeave, }: Props$5<T>): React.JSX.Element;
|
|
1192
|
-
|
|
1193
|
-
declare function OperationsEditorRow({ children }: React.PropsWithChildren<{}>): React.JSX.Element;
|
|
1194
|
-
|
|
1195
|
-
interface Props$4<TVisualQuery extends VisualQuery, TDataQuery extends DataQuery$1> {
|
|
1196
|
-
query: TVisualQuery;
|
|
1197
|
-
datasource: DataSourceApi<TDataQuery>;
|
|
1198
|
-
queryModeller: VisualQueryModeller;
|
|
1199
|
-
buildVisualQueryFromString: (queryString: string) => {
|
|
1200
|
-
query: TVisualQuery;
|
|
1201
|
-
};
|
|
1202
|
-
buildDataQueryFromQueryString: (queryString: string) => TDataQuery;
|
|
1203
|
-
buildQueryStringFromDataQuery: (dataQuery: TDataQuery) => string;
|
|
1204
|
-
onChange: (update: TVisualQuery) => void;
|
|
1205
|
-
data?: PanelData;
|
|
1206
|
-
}
|
|
1207
|
-
declare const QueryBuilderHints: {
|
|
1208
|
-
<TVisualQuery extends VisualQuery, TDataQuery extends DataQuery$1>({ datasource, query: visualQuery, onChange, data, queryModeller, buildVisualQueryFromString, buildDataQueryFromQueryString, buildQueryStringFromDataQuery, }: Props$4<TVisualQuery, TDataQuery>): React.JSX.Element;
|
|
1209
|
-
displayName: string;
|
|
1210
|
-
};
|
|
1211
|
-
|
|
1212
|
-
interface Props$3 {
|
|
1213
|
-
mode: QueryEditorMode;
|
|
1214
|
-
onChange: (mode: QueryEditorMode) => void;
|
|
1215
|
-
}
|
|
1216
|
-
declare function QueryEditorModeToggle({ mode, onChange }: Props$3): React.JSX.Element;
|
|
1217
|
-
|
|
1218
|
-
interface Props$2 extends Omit<HTMLProps<HTMLInputElement>, 'value' | 'ref'> {
|
|
1219
|
-
value?: boolean;
|
|
1220
|
-
label: string;
|
|
1221
|
-
}
|
|
1222
|
-
declare function QueryHeaderSwitch({ label, ...inputProps }: Props$2): React.JSX.Element;
|
|
1223
|
-
|
|
1224
|
-
interface Props$1 {
|
|
1225
|
-
title: string;
|
|
1226
|
-
collapsedInfo: string[];
|
|
1227
|
-
queryStats?: QueryStats | null;
|
|
1228
|
-
}
|
|
1229
|
-
declare function QueryOptionGroup({ title, children, collapsedInfo, queryStats }: React.PropsWithChildren<Props$1>): React.JSX.Element;
|
|
1230
|
-
|
|
1231
|
-
interface Props {
|
|
1232
|
-
query: string;
|
|
1233
|
-
language: {
|
|
1234
|
-
grammar: Grammar;
|
|
1235
|
-
name: string;
|
|
1236
|
-
};
|
|
1237
|
-
className?: string;
|
|
1238
|
-
}
|
|
1239
|
-
declare function RawQuery({ query, language, className }: Props): React.JSX.Element;
|
|
1240
|
-
|
|
1241
|
-
interface CustomMeta {
|
|
1242
|
-
queryID: string;
|
|
1243
|
-
status: string;
|
|
1244
|
-
}
|
|
1245
|
-
interface RunningQueryInfo {
|
|
1246
|
-
queryID?: string;
|
|
1247
|
-
shouldCancel?: boolean;
|
|
1248
|
-
}
|
|
1249
|
-
declare class DatasourceWithAsyncBackend<TQuery extends DataQuery$1 = DataQuery$1, TOptions extends DataSourceJsonData = DataSourceJsonData> extends DataSourceWithBackend<TQuery, TOptions> {
|
|
1250
|
-
private runningQueries;
|
|
1251
|
-
private requestCounter;
|
|
1252
|
-
private requestIdPrefix;
|
|
1253
|
-
constructor(instanceSettings: DataSourceInstanceSettings<TOptions>);
|
|
1254
|
-
query(request: DataQueryRequest<TQuery>): Observable<DataQueryResponse>;
|
|
1255
|
-
storeQuery(target: TQuery, queryInfo: RunningQueryInfo): void;
|
|
1256
|
-
getQuery(target: TQuery): RunningQueryInfo;
|
|
1257
|
-
removeQuery(target: TQuery): void;
|
|
1258
|
-
doSingle(target: TQuery, request: DataQueryRequest<TQuery>): Observable<DataQueryResponse>;
|
|
1259
|
-
cancel: (target: TQuery) => void;
|
|
1260
|
-
}
|
|
1261
|
-
|
|
1262
|
-
interface RunQueryButtonsProps<TQuery extends DataQuery$1> {
|
|
1263
|
-
enableRun?: boolean;
|
|
1264
|
-
onRunQuery: () => void;
|
|
1265
|
-
onCancelQuery: (query: TQuery) => void;
|
|
1266
|
-
query: TQuery;
|
|
1267
|
-
state?: LoadingState;
|
|
1268
|
-
}
|
|
1269
|
-
declare const RunQueryButtons: <TQuery extends DataQuery$1>(props: RunQueryButtonsProps<TQuery>) => React.JSX.Element;
|
|
1270
|
-
|
|
1271
|
-
interface RequestLoopOptions<TQuery extends DataQuery$1 = DataQuery$1> {
|
|
1272
|
-
/**
|
|
1273
|
-
* If the response needs an additional request to execute, return it here
|
|
1274
|
-
*/
|
|
1275
|
-
getNextQuery: (rsp: DataQueryResponse) => TQuery | undefined;
|
|
1276
|
-
/**
|
|
1277
|
-
* The datasource execute method
|
|
1278
|
-
*/
|
|
1279
|
-
query: (req: DataQueryRequest<TQuery>) => Observable<DataQueryResponse>;
|
|
1280
|
-
/**
|
|
1281
|
-
* Process the results
|
|
1282
|
-
*/
|
|
1283
|
-
process: (data: DataFrame[]) => DataFrame[];
|
|
1284
|
-
/**
|
|
1285
|
-
* Check if the query should be cancelled
|
|
1286
|
-
*/
|
|
1287
|
-
shouldCancel: () => boolean;
|
|
1288
|
-
/**
|
|
1289
|
-
* Callback that gets executed when unsubscribed
|
|
1290
|
-
*/
|
|
1291
|
-
onCancel: () => void;
|
|
1292
|
-
}
|
|
1293
|
-
/**
|
|
1294
|
-
* Continue executing requests as long as `getNextQuery` returns a query
|
|
1295
|
-
*/
|
|
1296
|
-
declare function getRequestLooper<T extends DataQuery$1 = DataQuery$1>(req: DataQueryRequest<T>, options: RequestLoopOptions<T>): Observable<DataQueryResponse>;
|
|
1297
|
-
|
|
1298
1027
|
interface DatasourceConfigSchema {
|
|
1299
1028
|
/**
|
|
1300
1029
|
* Schema version (required)
|
|
@@ -1316,6 +1045,13 @@ interface DatasourceConfigSchema {
|
|
|
1316
1045
|
* Optional documentation URL
|
|
1317
1046
|
*/
|
|
1318
1047
|
docURL?: string;
|
|
1048
|
+
/**
|
|
1049
|
+
* SDK field packs to merge into this schema before validation.
|
|
1050
|
+
* Pack fields are prepended to `fields` in declaration order.
|
|
1051
|
+
* Plugin-declared fields with a matching ID take precedence over pack fields.
|
|
1052
|
+
* Call `resolveBaseFields()` before consuming the schema.
|
|
1053
|
+
*/
|
|
1054
|
+
baseFields?: BaseFieldRef[];
|
|
1319
1055
|
/**
|
|
1320
1056
|
* Source of truth for configuration
|
|
1321
1057
|
*/
|
|
@@ -1324,11 +1060,62 @@ interface DatasourceConfigSchema {
|
|
|
1324
1060
|
* Optional UI grouping
|
|
1325
1061
|
*/
|
|
1326
1062
|
groups?: ConfigGroup[];
|
|
1063
|
+
/**
|
|
1064
|
+
* Optional instructions rendered alongside the config form.
|
|
1065
|
+
*/
|
|
1066
|
+
instructions?: Instruction[];
|
|
1327
1067
|
/**
|
|
1328
1068
|
* Relationships between fields
|
|
1329
1069
|
*/
|
|
1330
1070
|
relationships?: FieldRelationship[];
|
|
1331
1071
|
}
|
|
1072
|
+
interface Instruction {
|
|
1073
|
+
msg: string;
|
|
1074
|
+
tags?: string[];
|
|
1075
|
+
}
|
|
1076
|
+
/**
|
|
1077
|
+
* Identifier of a built-in field pack defined by grafana/dsconfig.
|
|
1078
|
+
* Convention: `<sdk_name>_settings`.
|
|
1079
|
+
*/
|
|
1080
|
+
type FieldPackID = 'plugin_sdk_settings' | 'aws_sdk_settings' | 'azure_sdk_settings' | 'google_sdk_settings' | 'sqleng_settings';
|
|
1081
|
+
/**
|
|
1082
|
+
* Declares a single field pack to compose into the schema.
|
|
1083
|
+
*/
|
|
1084
|
+
interface BaseFieldRef {
|
|
1085
|
+
/** Identifier of a built-in field pack. */
|
|
1086
|
+
from: FieldPackID;
|
|
1087
|
+
/**
|
|
1088
|
+
* Field IDs from the pack to omit entirely.
|
|
1089
|
+
* Each ID must exist in the pack (else resolution fails).
|
|
1090
|
+
*/
|
|
1091
|
+
exclude?: string[];
|
|
1092
|
+
/**
|
|
1093
|
+
* Presentation-only overrides keyed by pack field ID.
|
|
1094
|
+
* Structural properties (id, key, valueType, target, role) cannot be patched.
|
|
1095
|
+
*/
|
|
1096
|
+
patch?: Record<string, FieldPatch>;
|
|
1097
|
+
}
|
|
1098
|
+
/**
|
|
1099
|
+
* Safe-to-override presentation properties for a pack field.
|
|
1100
|
+
* Only non-undefined values are applied.
|
|
1101
|
+
*/
|
|
1102
|
+
interface FieldPatch {
|
|
1103
|
+
label?: string;
|
|
1104
|
+
description?: string;
|
|
1105
|
+
placeholder?: string;
|
|
1106
|
+
defaultValue?: unknown;
|
|
1107
|
+
required?: boolean;
|
|
1108
|
+
/** When true, the field is dropped from the resolved schema. */
|
|
1109
|
+
hidden?: boolean;
|
|
1110
|
+
}
|
|
1111
|
+
/**
|
|
1112
|
+
* Named set of ConfigField definitions provided by an SDK.
|
|
1113
|
+
* Pack field IDs are namespaced with the pack ID, e.g. `plugin_sdk_settings.url`.
|
|
1114
|
+
*/
|
|
1115
|
+
interface FieldPack {
|
|
1116
|
+
id: FieldPackID;
|
|
1117
|
+
fields: ConfigField[];
|
|
1118
|
+
}
|
|
1332
1119
|
interface ConfigField {
|
|
1333
1120
|
/**
|
|
1334
1121
|
* Globally unique identifier
|
|
@@ -1343,342 +1130,883 @@ interface ConfigField {
|
|
|
1343
1130
|
/**
|
|
1344
1131
|
* UI metadata
|
|
1345
1132
|
*/
|
|
1346
|
-
label?: string;
|
|
1347
|
-
description?: string;
|
|
1348
|
-
docURL?: string;
|
|
1133
|
+
label?: string;
|
|
1134
|
+
description?: string;
|
|
1135
|
+
docURL?: string;
|
|
1136
|
+
/**
|
|
1137
|
+
* Core type of the field
|
|
1138
|
+
*/
|
|
1139
|
+
valueType: ValueType;
|
|
1140
|
+
/**
|
|
1141
|
+
* Storage location (required for storage fields)
|
|
1142
|
+
*/
|
|
1143
|
+
target?: TargetLocation;
|
|
1144
|
+
/**
|
|
1145
|
+
* Semantic role identifying what a field represents to the SDK.
|
|
1146
|
+
* Field packs annotate their fields with roles (e.g. `endpoint.baseUrl`).
|
|
1147
|
+
*/
|
|
1148
|
+
role?: Role;
|
|
1149
|
+
/**
|
|
1150
|
+
* Dotted path prefix within the target for nested objects.
|
|
1151
|
+
* Example: for jsonData.tracesToLogs.datasourceUid,
|
|
1152
|
+
* target="jsonData", section="tracesToLogs", key="datasourceUid".
|
|
1153
|
+
*/
|
|
1154
|
+
section?: string;
|
|
1155
|
+
/**
|
|
1156
|
+
* Field kind.
|
|
1157
|
+
* @default "storage"
|
|
1158
|
+
*/
|
|
1159
|
+
kind?: FieldKind;
|
|
1160
|
+
/**
|
|
1161
|
+
* True if field belongs to array item schema
|
|
1162
|
+
*/
|
|
1163
|
+
isItemField?: boolean;
|
|
1164
|
+
/**
|
|
1165
|
+
* UI rendering hints
|
|
1166
|
+
*/
|
|
1167
|
+
ui?: FieldUI;
|
|
1168
|
+
/**
|
|
1169
|
+
* Validations rules
|
|
1170
|
+
*/
|
|
1171
|
+
validations?: FieldValidationRule[];
|
|
1172
|
+
/**
|
|
1173
|
+
* Visibility condition (CEL expression)
|
|
1174
|
+
*/
|
|
1175
|
+
dependsOn?: Expression;
|
|
1176
|
+
/**
|
|
1177
|
+
* Always required
|
|
1178
|
+
*/
|
|
1179
|
+
required?: boolean;
|
|
1180
|
+
/**
|
|
1181
|
+
* Conditionally required
|
|
1182
|
+
*/
|
|
1183
|
+
requiredWhen?: Expression;
|
|
1184
|
+
/**
|
|
1185
|
+
* Disabled condition
|
|
1186
|
+
*/
|
|
1187
|
+
disabledWhen?: Expression;
|
|
1188
|
+
/**
|
|
1189
|
+
* Dynamic overrides
|
|
1190
|
+
*/
|
|
1191
|
+
overrides?: FieldOverride[];
|
|
1192
|
+
/**
|
|
1193
|
+
* Declarative multi-field write side-effects.
|
|
1194
|
+
* When this field's value matches a condition, the listed target
|
|
1195
|
+
* fields are set to specified values. Typically used on virtual
|
|
1196
|
+
* selector fields (e.g. auth method dropdown).
|
|
1197
|
+
*/
|
|
1198
|
+
effects?: FieldEffect[];
|
|
1199
|
+
/**
|
|
1200
|
+
* Item schema for array elements or map values.
|
|
1201
|
+
* Required if valueType === "array" or "map".
|
|
1202
|
+
*/
|
|
1203
|
+
item?: FieldItemSchema;
|
|
1204
|
+
/**
|
|
1205
|
+
* Legacy indexed fields (deprecated)
|
|
1206
|
+
*/
|
|
1207
|
+
repeatable?: boolean;
|
|
1208
|
+
pattern?: string;
|
|
1209
|
+
/**
|
|
1210
|
+
* Storage mapping
|
|
1211
|
+
*/
|
|
1212
|
+
storage?: StorageMapping;
|
|
1213
|
+
/**
|
|
1214
|
+
* Metadata
|
|
1215
|
+
*/
|
|
1216
|
+
tags?: string[];
|
|
1217
|
+
examples?: unknown[];
|
|
1218
|
+
defaultValue?: unknown;
|
|
1219
|
+
}
|
|
1220
|
+
interface FieldItemSchema {
|
|
1221
|
+
/**
|
|
1222
|
+
* Type of array items or map values.
|
|
1223
|
+
* For arrays, describes each element.
|
|
1224
|
+
* For maps, describes each value (keys are always strings).
|
|
1225
|
+
*/
|
|
1226
|
+
valueType: ValueType;
|
|
1227
|
+
/**
|
|
1228
|
+
* Sub-fields for object items. Optional even when valueType = "object"
|
|
1229
|
+
* (omitting allows an unconstrained object).
|
|
1230
|
+
*/
|
|
1231
|
+
fields?: ConfigField[];
|
|
1232
|
+
}
|
|
1233
|
+
/**
|
|
1234
|
+
* CEL expression string
|
|
1235
|
+
*/
|
|
1236
|
+
type Expression = string;
|
|
1237
|
+
type ValueType = 'string' | 'number' | 'boolean' | 'array' | 'object' | 'map' | 'any';
|
|
1238
|
+
type FieldKind = 'storage' | 'virtual';
|
|
1239
|
+
type TargetLocation = 'root' | 'jsonData' | 'secureJsonData';
|
|
1240
|
+
/**
|
|
1241
|
+
* Semantic role identifying what a field represents to the SDK.
|
|
1242
|
+
* Kept as `string` for forward compatibility with newer packs from
|
|
1243
|
+
* grafana/dsconfig; see that repo for the canonical role list.
|
|
1244
|
+
*/
|
|
1245
|
+
type Role = string;
|
|
1246
|
+
type UIComponent = 'input' | 'textarea' | 'select' | 'multiselect' | 'radio' | 'checkbox' | 'switch' | 'code' | 'keyvalue' | 'list' | 'fileUpload';
|
|
1247
|
+
type UIWidth = 'full' | 'half';
|
|
1248
|
+
/**
|
|
1249
|
+
* UI configuration
|
|
1250
|
+
*/
|
|
1251
|
+
interface FieldUI {
|
|
1252
|
+
component: UIComponent;
|
|
1253
|
+
multiline?: boolean;
|
|
1254
|
+
rows?: number;
|
|
1255
|
+
options?: FieldOption[];
|
|
1256
|
+
allowCustom?: boolean;
|
|
1257
|
+
width?: UIWidth;
|
|
1258
|
+
placeholder?: string;
|
|
1259
|
+
/**
|
|
1260
|
+
* Language hint for code editor components.
|
|
1261
|
+
* Example: "promql", "logql", "traceql", "sql", "json"
|
|
1262
|
+
*/
|
|
1263
|
+
language?: string;
|
|
1349
1264
|
/**
|
|
1350
|
-
*
|
|
1265
|
+
* Layout row index for item fields inside object arrays.
|
|
1266
|
+
* Fields with the same row number are rendered horizontally.
|
|
1267
|
+
* Fields without a row number use auto-layout:
|
|
1268
|
+
* - ≤3 fields: all on one row
|
|
1269
|
+
* - >3 fields: each on its own row
|
|
1351
1270
|
*/
|
|
1352
|
-
|
|
1271
|
+
row?: number;
|
|
1353
1272
|
/**
|
|
1354
|
-
*
|
|
1273
|
+
* Accepted file types for fileUpload component.
|
|
1274
|
+
* Uses HTML accept attribute format with leading dot.
|
|
1275
|
+
* Example: [".json"]
|
|
1355
1276
|
*/
|
|
1356
|
-
|
|
1277
|
+
accept?: string[];
|
|
1357
1278
|
/**
|
|
1358
|
-
*
|
|
1359
|
-
*
|
|
1360
|
-
*
|
|
1279
|
+
* Maps keys in an uploaded JSON file to target field IDs.
|
|
1280
|
+
* Used by fileUpload to distribute parsed values to other form fields.
|
|
1281
|
+
* Example: { "private_key": "secureJsonData.privateKey", "client_email": "jsonData.clientEmail" }
|
|
1361
1282
|
*/
|
|
1362
|
-
|
|
1283
|
+
fileMapping?: Record<string, string>;
|
|
1284
|
+
}
|
|
1285
|
+
type FieldValidationRule = PatternValidationRule | RangeValidationRule | LengthValidationRule | ItemCountValidationRule | AllowedValuesValidationRule | CustomValidationRule;
|
|
1286
|
+
interface BaseValidationRule {
|
|
1363
1287
|
/**
|
|
1364
|
-
*
|
|
1365
|
-
*
|
|
1288
|
+
* Optional stable ID for the validation rule.
|
|
1289
|
+
* Useful for docs, localization, and test snapshots.
|
|
1366
1290
|
*/
|
|
1367
|
-
|
|
1291
|
+
id?: string;
|
|
1368
1292
|
/**
|
|
1369
|
-
*
|
|
1293
|
+
* Human-readable validation error message.
|
|
1370
1294
|
*/
|
|
1371
|
-
|
|
1295
|
+
message?: string;
|
|
1296
|
+
}
|
|
1297
|
+
interface PatternValidationRule extends BaseValidationRule {
|
|
1298
|
+
type: 'pattern';
|
|
1299
|
+
pattern: string;
|
|
1300
|
+
}
|
|
1301
|
+
interface RangeValidationRule extends BaseValidationRule {
|
|
1302
|
+
type: 'range';
|
|
1303
|
+
min?: number;
|
|
1304
|
+
max?: number;
|
|
1305
|
+
}
|
|
1306
|
+
interface LengthValidationRule extends BaseValidationRule {
|
|
1307
|
+
type: 'length';
|
|
1308
|
+
min?: number;
|
|
1309
|
+
max?: number;
|
|
1310
|
+
}
|
|
1311
|
+
interface ItemCountValidationRule extends BaseValidationRule {
|
|
1312
|
+
type: 'itemCount';
|
|
1313
|
+
min?: number;
|
|
1314
|
+
max?: number;
|
|
1315
|
+
}
|
|
1316
|
+
interface AllowedValuesValidationRule extends BaseValidationRule {
|
|
1317
|
+
type: 'allowedValues';
|
|
1318
|
+
values: unknown[];
|
|
1319
|
+
}
|
|
1320
|
+
interface CustomValidationRule extends BaseValidationRule {
|
|
1321
|
+
type: 'custom';
|
|
1372
1322
|
/**
|
|
1373
|
-
*
|
|
1323
|
+
* CEL expression.
|
|
1324
|
+
*
|
|
1325
|
+
* Should evaluate to true when the field value is valid.
|
|
1374
1326
|
*/
|
|
1375
|
-
|
|
1327
|
+
expression: Expression;
|
|
1328
|
+
}
|
|
1329
|
+
interface FieldOverride {
|
|
1376
1330
|
/**
|
|
1377
|
-
*
|
|
1331
|
+
* CEL condition
|
|
1378
1332
|
*/
|
|
1379
|
-
|
|
1333
|
+
when: Expression;
|
|
1334
|
+
defaultValue?: unknown;
|
|
1380
1335
|
/**
|
|
1381
|
-
*
|
|
1336
|
+
* When true, the field is disabled/read-only while this override is active.
|
|
1382
1337
|
*/
|
|
1383
|
-
|
|
1338
|
+
readOnly?: boolean;
|
|
1339
|
+
description?: string;
|
|
1340
|
+
placeholder?: string;
|
|
1341
|
+
tooltip?: string;
|
|
1342
|
+
validations?: FieldValidationRule[];
|
|
1343
|
+
options?: FieldOption[];
|
|
1384
1344
|
/**
|
|
1385
|
-
*
|
|
1345
|
+
* When present on an `isItemField` field, the value is routed to
|
|
1346
|
+
* `secureJsonData` under the resolved key instead of being stored
|
|
1347
|
+
* inline in the parent array.
|
|
1348
|
+
*
|
|
1349
|
+
* The template string supports placeholders:
|
|
1350
|
+
* - `{index}` — 0-based array position
|
|
1351
|
+
* - `{index1}` — 1-based array position
|
|
1352
|
+
* - `{item.KEY}` — value of sibling item field `KEY`
|
|
1353
|
+
*
|
|
1354
|
+
* Examples:
|
|
1355
|
+
* - `"secureHttpHeaders.{item.name}"` (ClickHouse)
|
|
1356
|
+
* - `"httpHeaderValue{index1}"` (Grafana core headers)
|
|
1386
1357
|
*/
|
|
1387
|
-
|
|
1358
|
+
secureKey?: string;
|
|
1359
|
+
}
|
|
1360
|
+
/**
|
|
1361
|
+
* Declares that when a field's value matches a condition,
|
|
1362
|
+
* listed target fields should be set to specified values.
|
|
1363
|
+
*
|
|
1364
|
+
* Use "value" in the `when` expression to refer to the field's value.
|
|
1365
|
+
*/
|
|
1366
|
+
interface FieldEffect {
|
|
1388
1367
|
/**
|
|
1389
|
-
*
|
|
1368
|
+
* CEL expression. Example: "value == 'basic-auth'"
|
|
1390
1369
|
*/
|
|
1391
|
-
|
|
1370
|
+
when: Expression;
|
|
1392
1371
|
/**
|
|
1393
|
-
*
|
|
1372
|
+
* Maps field IDs to the values they should be set to.
|
|
1373
|
+
* Must contain at least one entry.
|
|
1394
1374
|
*/
|
|
1395
|
-
|
|
1375
|
+
set: Record<string, unknown> & {
|
|
1376
|
+
[k: string]: unknown;
|
|
1377
|
+
};
|
|
1378
|
+
}
|
|
1379
|
+
type StorageMapping = DirectMapping | IndexedPairMapping | ComputedMapping;
|
|
1380
|
+
/**
|
|
1381
|
+
* Direct mapping
|
|
1382
|
+
*/
|
|
1383
|
+
interface DirectMapping {
|
|
1384
|
+
type: 'direct';
|
|
1385
|
+
}
|
|
1386
|
+
/**
|
|
1387
|
+
* Indexed pair mapping (headers)
|
|
1388
|
+
*/
|
|
1389
|
+
interface IndexedPairMapping {
|
|
1390
|
+
type: 'indexedPair';
|
|
1391
|
+
key: MappingField;
|
|
1392
|
+
value: MappingField;
|
|
1393
|
+
startIndex?: number;
|
|
1394
|
+
}
|
|
1395
|
+
/**
|
|
1396
|
+
* Computed mapping (virtual fields).
|
|
1397
|
+
* At least one of `read` or `write` must be provided.
|
|
1398
|
+
*/
|
|
1399
|
+
type ComputedMapping = {
|
|
1400
|
+
type: 'computed';
|
|
1401
|
+
read: Expression;
|
|
1402
|
+
write?: Expression;
|
|
1403
|
+
} | {
|
|
1404
|
+
type: 'computed';
|
|
1405
|
+
read?: Expression;
|
|
1406
|
+
write: Expression;
|
|
1407
|
+
};
|
|
1408
|
+
/**
|
|
1409
|
+
* Mapping field
|
|
1410
|
+
*/
|
|
1411
|
+
interface MappingField {
|
|
1412
|
+
target: TargetLocation;
|
|
1413
|
+
pattern: string;
|
|
1414
|
+
}
|
|
1415
|
+
interface FieldOption {
|
|
1416
|
+
label: string;
|
|
1396
1417
|
/**
|
|
1397
|
-
*
|
|
1418
|
+
* Must match parent field valueType.
|
|
1419
|
+
* Must not be null.
|
|
1398
1420
|
*/
|
|
1399
|
-
|
|
1421
|
+
value: NonNullable<unknown>;
|
|
1400
1422
|
/**
|
|
1401
|
-
*
|
|
1402
|
-
* When this field's value matches a condition, the listed target
|
|
1403
|
-
* fields are set to specified values. Typically used on virtual
|
|
1404
|
-
* selector fields (e.g. auth method dropdown).
|
|
1423
|
+
* Optional human-readable description of the option.
|
|
1405
1424
|
*/
|
|
1406
|
-
|
|
1425
|
+
description?: string;
|
|
1426
|
+
}
|
|
1427
|
+
interface ConfigGroup {
|
|
1428
|
+
id: string;
|
|
1429
|
+
title: string;
|
|
1430
|
+
description?: string;
|
|
1431
|
+
order?: number;
|
|
1407
1432
|
/**
|
|
1408
|
-
*
|
|
1409
|
-
* Required if valueType === "array" or "map".
|
|
1433
|
+
* When true, the group is optional and can be collapsed/hidden by default.
|
|
1410
1434
|
*/
|
|
1411
|
-
|
|
1435
|
+
optional?: boolean;
|
|
1412
1436
|
/**
|
|
1413
|
-
*
|
|
1437
|
+
* References field IDs (not keys)
|
|
1414
1438
|
*/
|
|
1415
|
-
|
|
1416
|
-
|
|
1439
|
+
fieldRefs: string[];
|
|
1440
|
+
}
|
|
1441
|
+
type RelationshipType = 'pair' | 'group' | 'datasourceReference';
|
|
1442
|
+
interface FieldRelationship {
|
|
1443
|
+
type: RelationshipType;
|
|
1417
1444
|
/**
|
|
1418
|
-
*
|
|
1445
|
+
* References field IDs
|
|
1419
1446
|
*/
|
|
1420
|
-
|
|
1447
|
+
fields: string[];
|
|
1448
|
+
description?: string;
|
|
1421
1449
|
/**
|
|
1422
|
-
*
|
|
1450
|
+
* Constrains the datasource UID to a specific plugin type.
|
|
1451
|
+
* Only applicable when type is "datasourceReference".
|
|
1423
1452
|
*/
|
|
1424
|
-
|
|
1425
|
-
|
|
1453
|
+
targetPluginType?: string;
|
|
1454
|
+
}
|
|
1455
|
+
type SecureFieldState = {
|
|
1456
|
+
type: 'unset';
|
|
1457
|
+
} | {
|
|
1458
|
+
type: 'configured';
|
|
1459
|
+
} | {
|
|
1460
|
+
type: 'updated';
|
|
1461
|
+
value: string;
|
|
1462
|
+
};
|
|
1463
|
+
interface FormState {
|
|
1464
|
+
values: Record<string, unknown>;
|
|
1465
|
+
secure: Record<string, SecureFieldState>;
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
type DatasourceConfigWizardProps = {
|
|
1469
|
+
schema: DatasourceConfigSchema;
|
|
1470
|
+
dsUid: string;
|
|
1471
|
+
dsName: string;
|
|
1472
|
+
onSuccess: (status: string, message?: string) => void;
|
|
1473
|
+
onSaving?: (saving: boolean) => void;
|
|
1474
|
+
onRetest?: () => void;
|
|
1475
|
+
onFollowup?: (intent: string) => void;
|
|
1476
|
+
healthError?: string;
|
|
1477
|
+
/** Optional render prop for custom action buttons (e.g. analyze/troubleshoot). */
|
|
1478
|
+
renderActions?: (props: {
|
|
1479
|
+
dsUid: string;
|
|
1480
|
+
dsName: string;
|
|
1481
|
+
dsType: string;
|
|
1482
|
+
healthError?: string;
|
|
1483
|
+
}) => ReactNode;
|
|
1484
|
+
};
|
|
1485
|
+
declare function DatasourceConfigWizard(props: DatasourceConfigWizardProps): React.JSX.Element;
|
|
1486
|
+
|
|
1487
|
+
/** Lightweight error boundary scoped to datasource config widgets — won't crash the host UI. */
|
|
1488
|
+
declare class DatasourceErrorBoundary extends Component<{
|
|
1489
|
+
children: ReactNode;
|
|
1490
|
+
dsName?: string;
|
|
1491
|
+
}, {
|
|
1492
|
+
error: Error | null;
|
|
1493
|
+
}> {
|
|
1494
|
+
state: {
|
|
1495
|
+
error: Error | null;
|
|
1496
|
+
};
|
|
1497
|
+
static getDerivedStateFromError(error: Error): {
|
|
1498
|
+
error: Error;
|
|
1499
|
+
};
|
|
1500
|
+
componentDidCatch(error: Error, info: ErrorInfo): void;
|
|
1501
|
+
render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
type HealthState = 'pending' | 'checking' | 'done';
|
|
1505
|
+
interface DatasourceHealth {
|
|
1506
|
+
state: HealthState;
|
|
1507
|
+
status?: string;
|
|
1508
|
+
message?: string;
|
|
1509
|
+
}
|
|
1510
|
+
/**
|
|
1511
|
+
* Health check hook — on-demand only.
|
|
1512
|
+
* Call `checkUids(uids)` to trigger checks for specific UIDs.
|
|
1513
|
+
* Call `retry(uid)` to force re-check a single UID.
|
|
1514
|
+
* UIDs that have already been checked (or are in-flight) are automatically skipped.
|
|
1515
|
+
*/
|
|
1516
|
+
declare function useHealthChecks(): {
|
|
1517
|
+
healthMap: Record<string, DatasourceHealth>;
|
|
1518
|
+
checkUids: (uids: string[]) => void;
|
|
1519
|
+
retry: (uid: string) => void;
|
|
1520
|
+
};
|
|
1521
|
+
|
|
1522
|
+
declare function resolvePluginName(pluginType: string): string;
|
|
1523
|
+
|
|
1524
|
+
/**
|
|
1525
|
+
* CEL (Common Expression Language) expression evaluator for schema conditions.
|
|
1526
|
+
*
|
|
1527
|
+
* Used by `dependsOn`, `requiredWhen`, `disabledWhen`, and `overrides[].when`.
|
|
1528
|
+
* Wraps @marcbachmann/cel-js with field-ID-aware context building.
|
|
1529
|
+
*
|
|
1530
|
+
* Go equivalent: github.com/google/cel-go
|
|
1531
|
+
*/
|
|
1532
|
+
/**
|
|
1533
|
+
* Build a nested context object from flat form values keyed by field IDs.
|
|
1534
|
+
*
|
|
1535
|
+
* CEL interprets dots as property access, so `jsonData.auth_method == 'oauth2'`
|
|
1536
|
+
* requires `{ jsonData: { auth_method: 'oauth2' } }`.
|
|
1537
|
+
*
|
|
1538
|
+
* This function takes flat key-value pairs (from react-hook-form `watch()`)
|
|
1539
|
+
* and builds the nested structure CEL expects.
|
|
1540
|
+
*
|
|
1541
|
+
* @param values - Flat map of form keys to values (e.g. `{ "auth_method": "oauth2", "oauth2.oauth2_type": "jwt" }`)
|
|
1542
|
+
* @param fieldIdToFormKey - Optional map from field ID to form key for translation
|
|
1543
|
+
*/
|
|
1544
|
+
declare function buildCelContext(values: Record<string, unknown>): Record<string, unknown>;
|
|
1545
|
+
/**
|
|
1546
|
+
* Evaluate a CEL expression against a context of field values.
|
|
1547
|
+
* Returns the boolean result, or `defaultValue` if the expression is invalid.
|
|
1548
|
+
*
|
|
1549
|
+
* @example
|
|
1550
|
+
* ```ts
|
|
1551
|
+
* evaluateCelExpression("jsonData.auth_method == 'oauth2'", { jsonData: { auth_method: 'oauth2' } })
|
|
1552
|
+
* // => true
|
|
1553
|
+
*
|
|
1554
|
+
* evaluateCelExpression("auth_method == 'oauth2' && oauth2_type == 'jwt'", { auth_method: 'oauth2', oauth2_type: 'jwt' })
|
|
1555
|
+
* // => true
|
|
1556
|
+
* ```
|
|
1557
|
+
*/
|
|
1558
|
+
declare function evaluateCelExpression(expr: string, context: Record<string, unknown>, defaultValue?: boolean): boolean;
|
|
1559
|
+
/**
|
|
1560
|
+
* Evaluate a CEL expression directly using `evaluate` (no caching).
|
|
1561
|
+
* Useful for one-off evaluations or testing.
|
|
1562
|
+
*/
|
|
1563
|
+
declare function evaluateCelDirect(expr: string, context: Record<string, unknown>): unknown;
|
|
1564
|
+
/**
|
|
1565
|
+
* Validate that a CEL expression can be parsed without errors.
|
|
1566
|
+
* Returns true if valid, false otherwise.
|
|
1567
|
+
*/
|
|
1568
|
+
declare function isValidCelExpression(expr: string): boolean;
|
|
1569
|
+
/**
|
|
1570
|
+
* Extract all field ID references from a simple expression.
|
|
1571
|
+
* Used by `resolveRequiredFieldsGroup` to find dependency relationships.
|
|
1572
|
+
*
|
|
1573
|
+
* For simple expressions like `fieldA == 'x'`, returns `['fieldA']`.
|
|
1574
|
+
* For compound expressions like `fieldA == 'x' && fieldB == 'y'`, returns `['fieldA', 'fieldB']`.
|
|
1575
|
+
*
|
|
1576
|
+
* This uses regex extraction (not AST walking) for simplicity and speed.
|
|
1577
|
+
*/
|
|
1578
|
+
declare function extractFieldRefs(expr: string): string[];
|
|
1579
|
+
/**
|
|
1580
|
+
* Clear the expression cache. Useful for testing.
|
|
1581
|
+
*/
|
|
1582
|
+
declare function clearExpressionCache(): void;
|
|
1583
|
+
|
|
1584
|
+
type TroubleShootingContext = {
|
|
1585
|
+
label: string;
|
|
1586
|
+
key: string;
|
|
1587
|
+
target: string;
|
|
1588
|
+
type: string;
|
|
1589
|
+
required: boolean;
|
|
1590
|
+
description?: string;
|
|
1426
1591
|
defaultValue?: unknown;
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
* For arrays, describes each element.
|
|
1432
|
-
* For maps, describes each value (keys are always strings).
|
|
1433
|
-
*/
|
|
1434
|
-
valueType: ValueType;
|
|
1435
|
-
/**
|
|
1436
|
-
* Sub-fields for object items. Optional even when valueType = "object"
|
|
1437
|
-
* (omitting allows an unconstrained object).
|
|
1438
|
-
*/
|
|
1439
|
-
fields?: ConfigField[];
|
|
1440
|
-
}
|
|
1592
|
+
options?: string[];
|
|
1593
|
+
section?: string;
|
|
1594
|
+
dependsOn?: string;
|
|
1595
|
+
};
|
|
1441
1596
|
/**
|
|
1442
|
-
*
|
|
1597
|
+
* Generate LLM hints for select fields (used when creating datasources).
|
|
1443
1598
|
*/
|
|
1444
|
-
|
|
1445
|
-
type ValueType = 'string' | 'number' | 'boolean' | 'array' | 'object' | 'map' | 'any';
|
|
1446
|
-
type FieldKind = 'storage' | 'virtual';
|
|
1447
|
-
type TargetLocation = 'root' | 'jsonData' | 'secureJsonData';
|
|
1448
|
-
type UIComponent = 'input' | 'textarea' | 'select' | 'multiselect' | 'radio' | 'checkbox' | 'switch' | 'code' | 'keyvalue' | 'list' | 'fileUpload';
|
|
1449
|
-
type UIWidth = 'full' | 'half';
|
|
1599
|
+
declare function generateLLMHint(schema: DatasourceConfigSchema): string;
|
|
1450
1600
|
/**
|
|
1451
|
-
*
|
|
1601
|
+
* Generate comprehensive structured field data for troubleshooting context.
|
|
1602
|
+
* Returns an array of field descriptors the LLM can use to render rich tables.
|
|
1452
1603
|
*/
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1604
|
+
declare function generateTroubleshootingFields(schema: DatasourceConfigSchema): TroubleShootingContext[];
|
|
1605
|
+
|
|
1606
|
+
type ProvisioningYamlOptions = {
|
|
1607
|
+
/** Include comments with field descriptions. Default: true for template, false for export. */
|
|
1608
|
+
comments?: boolean;
|
|
1609
|
+
/** Override the emitted datasource name. */
|
|
1610
|
+
name?: string;
|
|
1611
|
+
};
|
|
1612
|
+
/**
|
|
1613
|
+
* Generate a Grafana provisioning YAML template from a dsconfig schema.
|
|
1614
|
+
* Emits every schema field with sensible defaults and (by default) explanatory comments.
|
|
1615
|
+
*/
|
|
1616
|
+
declare function generateProvisioningTemplate(schema: DatasourceConfigSchema, options?: ProvisioningYamlOptions): string;
|
|
1617
|
+
/**
|
|
1618
|
+
* Generate provisioning YAML from an existing Grafana datasource API response.
|
|
1619
|
+
* If a dsconfig schema is available, uses it for field ordering and comments.
|
|
1620
|
+
* If not, generates basic YAML from the raw API response.
|
|
1621
|
+
*/
|
|
1622
|
+
declare function datasourceToProvisioningYaml(ds: Record<string, unknown>, schema: DatasourceConfigSchema | null): string;
|
|
1623
|
+
declare const formatYamlDiff: (existing: Record<string, unknown>, body: Record<string, unknown>) => string;
|
|
1624
|
+
|
|
1625
|
+
declare const ROOT_CONFIG_FIELDS: readonly ["name", "type", "id", "uid", "access", "url", "basicAuth", "basicAuthUser", "user", "isDefault", "database", "withCredentials"];
|
|
1626
|
+
type DatasourceConfig = Record<any, any>;
|
|
1627
|
+
declare const buildCreateDatasourcePayload: (input: DatasourceConfig) => DatasourceConfig;
|
|
1628
|
+
declare const buildCloneDatasourcePayload: (source: DatasourceConfig, name: string) => DatasourceConfig;
|
|
1629
|
+
declare const buildUpdateDatasourcePayload: (existing: DatasourceConfig, input: DatasourceConfig) => {
|
|
1630
|
+
body: DatasourceConfig;
|
|
1631
|
+
hasChanges: boolean;
|
|
1632
|
+
};
|
|
1633
|
+
|
|
1634
|
+
declare function getConfigSchema(pluginType: string): Promise<DatasourceConfigSchema | null>;
|
|
1635
|
+
|
|
1636
|
+
/**
|
|
1637
|
+
* Pure helper functions for working with DatasourceConfigSchema.
|
|
1638
|
+
*
|
|
1639
|
+
* Types are defined in schema.ts — import them from there directly.
|
|
1640
|
+
*/
|
|
1641
|
+
|
|
1642
|
+
/** A group paired with its resolved ConfigField objects (in fieldRefs order). */
|
|
1643
|
+
type ResolvedGroup = {
|
|
1644
|
+
group: ConfigGroup;
|
|
1645
|
+
fields: ConfigField[];
|
|
1646
|
+
};
|
|
1647
|
+
/**
|
|
1648
|
+
* Group ids that denote the authentication section. Registry schemas use the
|
|
1649
|
+
* full form `authentication`; `auth` is accepted for backwards compatibility
|
|
1650
|
+
* with older/short-form schemas.
|
|
1651
|
+
*/
|
|
1652
|
+
declare const AUTH_GROUP_IDS: readonly string[];
|
|
1653
|
+
/** Whether a group id denotes the authentication group. */
|
|
1654
|
+
declare function isAuthGroupId(id: string): boolean;
|
|
1655
|
+
/**
|
|
1656
|
+
* Resolve a schema's groups into arrays of ConfigField objects.
|
|
1657
|
+
* If the schema has no groups, returns a single group containing all non-virtual fields.
|
|
1658
|
+
*/
|
|
1659
|
+
declare function resolveGroups(schema: DatasourceConfigSchema): ResolvedGroup[];
|
|
1660
|
+
/**
|
|
1661
|
+
* Build a virtual "Required" group containing all required fields, any parent
|
|
1662
|
+
* fields they depend on (via `dependsOn`), and any child fields that depend on
|
|
1663
|
+
* required fields. When the schema contains an authentication group (id
|
|
1664
|
+
* `authentication` or `auth`), its fields are also pulled in (auth is
|
|
1665
|
+
* effectively required for Prometheus/Loki/Tempo style datasources). Fields
|
|
1666
|
+
* are returned in schema order and de-duplicated.
|
|
1667
|
+
* Returns `null` when the virtual group would be empty.
|
|
1668
|
+
*/
|
|
1669
|
+
declare function resolveRequiredFieldsGroup(schema: DatasourceConfigSchema): ResolvedGroup | null;
|
|
1670
|
+
/**
|
|
1671
|
+
* Unique form key for a field. Section-scoped fields (e.g. section:"logs", key:"defaultTable")
|
|
1672
|
+
* get a prefixed key ("logs.defaultTable") so they don't collide with top-level fields that
|
|
1673
|
+
* share the same key name.
|
|
1674
|
+
*/
|
|
1675
|
+
declare function formKey(field: ConfigField): string;
|
|
1676
|
+
/**
|
|
1677
|
+
* Resolve a possibly-dotted key against watchedValues from react-hook-form.
|
|
1678
|
+
* RHF's `watch()` returns nested objects for dotted Controller names
|
|
1679
|
+
* (e.g. "logs.otelEnabled" → { logs: { otelEnabled: true } }),
|
|
1680
|
+
* so a flat `obj["logs.otelEnabled"]` lookup misses.
|
|
1681
|
+
*
|
|
1682
|
+
* For dotted keys we must try the nested path **first**: react-hook-form's
|
|
1683
|
+
* Controller `onChange` writes nested objects via its internal `set()`, but
|
|
1684
|
+
* `reset()` may have created a flat dotted key with the same name. After user
|
|
1685
|
+
* interaction the nested value is authoritative; the stale flat key must not
|
|
1686
|
+
* shadow it. This mirrors RHF's own `get()` semantics (nested-first, flat
|
|
1687
|
+
* fallback).
|
|
1688
|
+
*/
|
|
1689
|
+
declare function getWatchedValue(watchedValues: Record<string, unknown>, key: string): unknown;
|
|
1690
|
+
/**
|
|
1691
|
+
* Parse a simple CEL-like dependsOn expression: "fieldId == 'value'" or "fieldId != 'value'".
|
|
1692
|
+
* Only single comparisons are supported — no &&, ||, or parentheses.
|
|
1693
|
+
* Field IDs may contain dots and underscores (e.g. "jsonData.oauth2.oauth2_type").
|
|
1694
|
+
* Values may be single-quoted, double-quoted, or unquoted literals (true/false/numbers).
|
|
1695
|
+
* Returns { field, value, negate } or null if unparseable.
|
|
1696
|
+
*/
|
|
1697
|
+
declare function parseDependsOn(expr: string): {
|
|
1698
|
+
field: string;
|
|
1699
|
+
value: string;
|
|
1700
|
+
negate: boolean;
|
|
1701
|
+
} | null;
|
|
1702
|
+
/**
|
|
1703
|
+
* Evaluate a parsed dependsOn condition against a value.
|
|
1704
|
+
* Handles both == and != operators.
|
|
1705
|
+
*/
|
|
1706
|
+
declare function evaluateDependsOn(parsed: {
|
|
1707
|
+
value: string;
|
|
1708
|
+
negate: boolean;
|
|
1709
|
+
}, currentValue: unknown): boolean;
|
|
1710
|
+
/**
|
|
1711
|
+
* Resolve the first matching override for a field given current form values.
|
|
1712
|
+
* Override `when` uses the same "fieldId == 'value'" syntax as dependsOn.
|
|
1713
|
+
* Returns the matching override or undefined if none match.
|
|
1714
|
+
*/
|
|
1715
|
+
declare function resolveActiveOverride(field: ConfigField, watchedValues: Record<string, unknown>, fieldById: Map<string, ConfigField>): FieldOverride | undefined;
|
|
1716
|
+
/**
|
|
1717
|
+
* Evaluate a simple computed.read expression against form values.
|
|
1718
|
+
* Supports patterns used in dsconfig schemas:
|
|
1719
|
+
* - "fieldRef == true ? 'a' : (fieldRef == true ? 'b' : 'c')"
|
|
1720
|
+
* - Simple ternary chains with equality checks
|
|
1721
|
+
* Falls back to the field's defaultValue if the expression can't be evaluated.
|
|
1722
|
+
*/
|
|
1723
|
+
declare function evaluateComputedRead(expr: string, values: Record<string, unknown>, fields: ConfigField[]): unknown;
|
|
1724
|
+
/**
|
|
1725
|
+
* Compute initial values for all virtual fields that have storage.computed.read expressions.
|
|
1726
|
+
* Call after loading existing storage field values.
|
|
1727
|
+
*/
|
|
1728
|
+
declare function computeVirtualFieldValues(schema: DatasourceConfigSchema, existingValues: Record<string, unknown>): Record<string, unknown>;
|
|
1729
|
+
|
|
1730
|
+
interface CustomHeader {
|
|
1731
|
+
id: string;
|
|
1732
|
+
name: string;
|
|
1733
|
+
value: string;
|
|
1734
|
+
configured: boolean;
|
|
1735
|
+
}
|
|
1736
|
+
type CustomHeaders = CustomHeader[];
|
|
1737
|
+
interface Props$9 {
|
|
1738
|
+
dataSourceConfig: DataSourceSettings<any, any>;
|
|
1739
|
+
onChange: (config: DataSourceSettings) => void;
|
|
1740
|
+
}
|
|
1741
|
+
interface State {
|
|
1742
|
+
headers: CustomHeaders;
|
|
1743
|
+
}
|
|
1744
|
+
declare class CustomHeadersSettings extends PureComponent<Props$9, State> {
|
|
1745
|
+
state: State;
|
|
1746
|
+
constructor(props: Props$9);
|
|
1747
|
+
updateSettings: () => void;
|
|
1748
|
+
onHeaderAdd: () => void;
|
|
1749
|
+
onHeaderChange: (headerIndex: number, value: CustomHeader) => void;
|
|
1750
|
+
onHeaderReset: (headerId: string) => void;
|
|
1751
|
+
onHeaderRemove: (headerId: string) => void;
|
|
1752
|
+
render(): React.JSX.Element;
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
interface QueryBuilderLabelFilter {
|
|
1756
|
+
label: string;
|
|
1757
|
+
op: string;
|
|
1758
|
+
value: string;
|
|
1759
|
+
}
|
|
1760
|
+
interface QueryBuilderOperation {
|
|
1761
|
+
id: string;
|
|
1762
|
+
params: QueryBuilderOperationParamValue[];
|
|
1763
|
+
disabled?: boolean;
|
|
1764
|
+
}
|
|
1765
|
+
interface QueryBuilderOperationDefinition<T = any> extends RegistryItem {
|
|
1766
|
+
documentation?: string;
|
|
1767
|
+
params: QueryBuilderOperationParamDef[];
|
|
1768
|
+
defaultParams: QueryBuilderOperationParamValue[];
|
|
1769
|
+
category: string;
|
|
1770
|
+
hideFromList?: boolean;
|
|
1771
|
+
alternativesKey?: string;
|
|
1772
|
+
/** Can be used to control operation placement when adding a new operations, lower are placed first */
|
|
1773
|
+
orderRank?: number;
|
|
1774
|
+
renderer: QueryBuilderOperationRenderer;
|
|
1775
|
+
addOperationHandler: QueryBuilderAddOperationHandler<T>;
|
|
1776
|
+
paramChangedHandler?: QueryBuilderOnParamChangedHandler;
|
|
1777
|
+
explainHandler?: QueryBuilderExplainOperationHandler;
|
|
1778
|
+
changeTypeHandler?: (op: QueryBuilderOperation, newDef: QueryBuilderOperationDefinition<T>) => QueryBuilderOperation;
|
|
1779
|
+
toggleable?: boolean;
|
|
1780
|
+
}
|
|
1781
|
+
type QueryBuilderAddOperationHandler<T> = (def: QueryBuilderOperationDefinition, query: T, modeller: VisualQueryModeller) => T;
|
|
1782
|
+
type QueryBuilderExplainOperationHandler = (op: QueryBuilderOperation, def?: QueryBuilderOperationDefinition) => string;
|
|
1783
|
+
type QueryBuilderOnParamChangedHandler = (index: number, operation: QueryBuilderOperation, operationDef: QueryBuilderOperationDefinition) => QueryBuilderOperation;
|
|
1784
|
+
type QueryBuilderOperationRenderer = (model: QueryBuilderOperation, def: QueryBuilderOperationDefinition, innerQuery: string) => string;
|
|
1785
|
+
type QueryBuilderOperationParamValue = string | number | boolean;
|
|
1786
|
+
interface QueryBuilderOperationParamDef {
|
|
1787
|
+
name: string;
|
|
1788
|
+
type: 'string' | 'number' | 'boolean';
|
|
1789
|
+
options?: string[] | number[] | Array<SelectableValue<string>>;
|
|
1790
|
+
hideName?: boolean;
|
|
1791
|
+
restParam?: boolean;
|
|
1792
|
+
optional?: boolean;
|
|
1460
1793
|
placeholder?: string;
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
language?: string;
|
|
1466
|
-
/**
|
|
1467
|
-
* Layout row index for item fields inside object arrays.
|
|
1468
|
-
* Fields with the same row number are rendered horizontally.
|
|
1469
|
-
* Fields without a row number use auto-layout:
|
|
1470
|
-
* - ≤3 fields: all on one row
|
|
1471
|
-
* - >3 fields: each on its own row
|
|
1472
|
-
*/
|
|
1473
|
-
row?: number;
|
|
1474
|
-
/**
|
|
1475
|
-
* Accepted file types for fileUpload component.
|
|
1476
|
-
* Uses HTML accept attribute format with leading dot.
|
|
1477
|
-
* Example: [".json"]
|
|
1478
|
-
*/
|
|
1479
|
-
accept?: string[];
|
|
1480
|
-
/**
|
|
1481
|
-
* Maps keys in an uploaded JSON file to target field IDs.
|
|
1482
|
-
* Used by fileUpload to distribute parsed values to other form fields.
|
|
1483
|
-
* Example: { "private_key": "secureJsonData.privateKey", "client_email": "jsonData.clientEmail" }
|
|
1484
|
-
*/
|
|
1485
|
-
fileMapping?: Record<string, string>;
|
|
1794
|
+
description?: string;
|
|
1795
|
+
minWidth?: number;
|
|
1796
|
+
editor?: FunctionComponent<QueryBuilderOperationParamEditorProps>;
|
|
1797
|
+
runQueryOnEnter?: boolean;
|
|
1486
1798
|
}
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1799
|
+
interface QueryBuilderOperationParamEditorProps {
|
|
1800
|
+
value?: QueryBuilderOperationParamValue;
|
|
1801
|
+
paramDef: QueryBuilderOperationParamDef;
|
|
1802
|
+
/** Parameter index */
|
|
1803
|
+
index: number;
|
|
1804
|
+
operation: QueryBuilderOperation;
|
|
1805
|
+
operationId: string;
|
|
1806
|
+
query: any;
|
|
1807
|
+
datasource: DataSourceApi;
|
|
1808
|
+
timeRange?: TimeRange;
|
|
1809
|
+
onChange: (index: number, value: QueryBuilderOperationParamValue) => void;
|
|
1810
|
+
onRunQuery: () => void;
|
|
1811
|
+
queryModeller: VisualQueryModeller;
|
|
1812
|
+
}
|
|
1813
|
+
declare enum QueryEditorMode {
|
|
1814
|
+
Code = "code",
|
|
1815
|
+
Builder = "builder"
|
|
1816
|
+
}
|
|
1817
|
+
type QueryStats = {
|
|
1818
|
+
bytes: number;
|
|
1497
1819
|
message?: string;
|
|
1820
|
+
};
|
|
1821
|
+
interface VisualQueryModeller {
|
|
1822
|
+
getOperationsForCategory(category: string): QueryBuilderOperationDefinition[];
|
|
1823
|
+
getAlternativeOperations(key: string): QueryBuilderOperationDefinition[];
|
|
1824
|
+
getCategories(): string[];
|
|
1825
|
+
getOperationDefinition(id: string): QueryBuilderOperationDefinition | undefined;
|
|
1826
|
+
renderQuery(query: VisualQuery, nested?: boolean): string;
|
|
1827
|
+
renderLabels(labels: QueryBuilderLabelFilter[]): string;
|
|
1828
|
+
innerQueryPlaceholder: string;
|
|
1498
1829
|
}
|
|
1499
|
-
interface
|
|
1500
|
-
|
|
1501
|
-
|
|
1830
|
+
interface VisualQueryBinary<T> {
|
|
1831
|
+
operator: string;
|
|
1832
|
+
vectorMatchesType?: 'on' | 'ignoring';
|
|
1833
|
+
vectorMatches?: string;
|
|
1834
|
+
query: T;
|
|
1502
1835
|
}
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1836
|
+
declare const BINARY_OPERATIONS_KEY = "Binary operations";
|
|
1837
|
+
interface VisualQuery {
|
|
1838
|
+
metric?: string;
|
|
1839
|
+
labels: QueryBuilderLabelFilter[];
|
|
1840
|
+
operations: QueryBuilderOperation[];
|
|
1841
|
+
binaryQueries?: Array<VisualQueryBinary<VisualQuery>>;
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1844
|
+
declare abstract class QueryModellerBase implements VisualQueryModeller {
|
|
1845
|
+
protected operationsRegistry: Registry<QueryBuilderOperationDefinition>;
|
|
1846
|
+
private categories;
|
|
1847
|
+
innerQueryPlaceholder: string;
|
|
1848
|
+
constructor(operationDefinitions: QueryBuilderOperationDefinition[], innerQueryPlaceholder?: string);
|
|
1849
|
+
protected setOperationCategories(categories: string[]): void;
|
|
1850
|
+
abstract renderOperations(queryString: string, operations: QueryBuilderOperation[]): string;
|
|
1851
|
+
abstract renderBinaryQueries(queryString: string, binaryQueries?: Array<VisualQueryBinary<VisualQuery>>): string;
|
|
1852
|
+
abstract renderLabels(labels: QueryBuilderLabelFilter[]): string;
|
|
1853
|
+
abstract renderQuery(query: VisualQuery, nested?: boolean): string;
|
|
1854
|
+
getOperationsForCategory(category: string): QueryBuilderOperationDefinition<any>[];
|
|
1855
|
+
getAlternativeOperations(key: string): QueryBuilderOperationDefinition<any>[];
|
|
1856
|
+
getCategories(): string[];
|
|
1857
|
+
getOperationDefinition(id: string): QueryBuilderOperationDefinition | undefined;
|
|
1858
|
+
hasBinaryOp(query: VisualQuery): boolean;
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1861
|
+
interface Props$8 {
|
|
1862
|
+
labelsFilters: QueryBuilderLabelFilter[];
|
|
1863
|
+
onChange: (labelFilters: QueryBuilderLabelFilter[]) => void;
|
|
1864
|
+
onGetLabelNames: (forLabel: Partial<QueryBuilderLabelFilter>) => Promise<SelectableValue[]>;
|
|
1865
|
+
onGetLabelValues: (forLabel: Partial<QueryBuilderLabelFilter>) => Promise<SelectableValue[]>;
|
|
1866
|
+
/** If set to true, component will show error message until at least 1 filter is selected */
|
|
1867
|
+
labelFilterRequired?: boolean;
|
|
1868
|
+
multiValueSeparator?: string;
|
|
1869
|
+
}
|
|
1870
|
+
declare function LabelFilters({ labelsFilters, onChange, onGetLabelNames, onGetLabelValues, labelFilterRequired, multiValueSeparator, }: Props$8): React.JSX.Element;
|
|
1871
|
+
|
|
1872
|
+
interface Props$7 {
|
|
1873
|
+
title?: React.ReactNode;
|
|
1874
|
+
markdown?: string;
|
|
1875
|
+
stepNumber?: number;
|
|
1507
1876
|
}
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1877
|
+
declare function OperationExplainedBox({ title, stepNumber, markdown, children }: React.PropsWithChildren<Props$7>): React.JSX.Element;
|
|
1878
|
+
|
|
1879
|
+
interface Props$6<T extends VisualQuery> {
|
|
1880
|
+
query: T;
|
|
1881
|
+
datasource: DataSourceApi;
|
|
1882
|
+
onChange: (query: T) => void;
|
|
1883
|
+
onRunQuery: () => void;
|
|
1884
|
+
queryModeller: VisualQueryModeller;
|
|
1885
|
+
explainMode?: boolean;
|
|
1886
|
+
highlightedOp?: QueryBuilderOperation;
|
|
1887
|
+
timeRange?: TimeRange;
|
|
1888
|
+
isConflictingOperation?: (operation: QueryBuilderOperation, otherOperations: QueryBuilderOperation[]) => boolean;
|
|
1512
1889
|
}
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1890
|
+
declare function OperationList<T extends VisualQuery>({ query, datasource, queryModeller, onChange, onRunQuery, highlightedOp, timeRange, isConflictingOperation, }: Props$6<T>): React.JSX.Element;
|
|
1891
|
+
|
|
1892
|
+
interface Props$5<T extends VisualQuery> {
|
|
1893
|
+
query: T;
|
|
1894
|
+
queryModeller: VisualQueryModeller;
|
|
1895
|
+
explainMode?: boolean;
|
|
1896
|
+
stepNumber: number;
|
|
1897
|
+
language: {
|
|
1898
|
+
grammar: Grammar;
|
|
1899
|
+
name: string;
|
|
1900
|
+
};
|
|
1901
|
+
onMouseEnter?: (op: QueryBuilderOperation, index: number) => void;
|
|
1902
|
+
onMouseLeave?: (op: QueryBuilderOperation, index: number) => void;
|
|
1517
1903
|
}
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1904
|
+
declare function OperationListExplained<T extends VisualQuery>({ query, queryModeller, stepNumber, language, onMouseEnter, onMouseLeave, }: Props$5<T>): React.JSX.Element;
|
|
1905
|
+
|
|
1906
|
+
declare function OperationsEditorRow({ children }: React.PropsWithChildren<{}>): React.JSX.Element;
|
|
1907
|
+
|
|
1908
|
+
interface Props$4<TVisualQuery extends VisualQuery, TDataQuery extends DataQuery$1> {
|
|
1909
|
+
query: TVisualQuery;
|
|
1910
|
+
datasource: DataSourceApi<TDataQuery>;
|
|
1911
|
+
queryModeller: VisualQueryModeller;
|
|
1912
|
+
buildVisualQueryFromString: (queryString: string) => {
|
|
1913
|
+
query: TVisualQuery;
|
|
1914
|
+
};
|
|
1915
|
+
buildDataQueryFromQueryString: (queryString: string) => TDataQuery;
|
|
1916
|
+
buildQueryStringFromDataQuery: (dataQuery: TDataQuery) => string;
|
|
1917
|
+
onChange: (update: TVisualQuery) => void;
|
|
1918
|
+
data?: PanelData;
|
|
1521
1919
|
}
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1920
|
+
declare const QueryBuilderHints: {
|
|
1921
|
+
<TVisualQuery extends VisualQuery, TDataQuery extends DataQuery$1>({ datasource, query: visualQuery, onChange, data, queryModeller, buildVisualQueryFromString, buildDataQueryFromQueryString, buildQueryStringFromDataQuery, }: Props$4<TVisualQuery, TDataQuery>): React.JSX.Element;
|
|
1922
|
+
displayName: string;
|
|
1923
|
+
};
|
|
1924
|
+
|
|
1925
|
+
interface Props$3 {
|
|
1926
|
+
mode: QueryEditorMode;
|
|
1927
|
+
onChange: (mode: QueryEditorMode) => void;
|
|
1530
1928
|
}
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
defaultValue?: unknown;
|
|
1537
|
-
/**
|
|
1538
|
-
* When true, the field is disabled/read-only while this override is active.
|
|
1539
|
-
*/
|
|
1540
|
-
readOnly?: boolean;
|
|
1541
|
-
description?: string;
|
|
1542
|
-
placeholder?: string;
|
|
1543
|
-
tooltip?: string;
|
|
1544
|
-
validations?: FieldValidationRule[];
|
|
1545
|
-
options?: FieldOption[];
|
|
1546
|
-
/**
|
|
1547
|
-
* When present on an `isItemField` field, the value is routed to
|
|
1548
|
-
* `secureJsonData` under the resolved key instead of being stored
|
|
1549
|
-
* inline in the parent array.
|
|
1550
|
-
*
|
|
1551
|
-
* The template string supports placeholders:
|
|
1552
|
-
* - `{index}` — 0-based array position
|
|
1553
|
-
* - `{index1}` — 1-based array position
|
|
1554
|
-
* - `{item.KEY}` — value of sibling item field `KEY`
|
|
1555
|
-
*
|
|
1556
|
-
* Examples:
|
|
1557
|
-
* - `"secureHttpHeaders.{item.name}"` (ClickHouse)
|
|
1558
|
-
* - `"httpHeaderValue{index1}"` (Grafana core headers)
|
|
1559
|
-
*/
|
|
1560
|
-
secureKey?: string;
|
|
1929
|
+
declare function QueryEditorModeToggle({ mode, onChange }: Props$3): React.JSX.Element;
|
|
1930
|
+
|
|
1931
|
+
interface Props$2 extends Omit<HTMLProps<HTMLInputElement>, 'value' | 'ref'> {
|
|
1932
|
+
value?: boolean;
|
|
1933
|
+
label: string;
|
|
1561
1934
|
}
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
*/
|
|
1577
|
-
set: Record<string, unknown> & {
|
|
1578
|
-
[k: string]: unknown;
|
|
1935
|
+
declare function QueryHeaderSwitch({ label, ...inputProps }: Props$2): React.JSX.Element;
|
|
1936
|
+
|
|
1937
|
+
interface Props$1 {
|
|
1938
|
+
title: string;
|
|
1939
|
+
collapsedInfo: string[];
|
|
1940
|
+
queryStats?: QueryStats | null;
|
|
1941
|
+
}
|
|
1942
|
+
declare function QueryOptionGroup({ title, children, collapsedInfo, queryStats }: React.PropsWithChildren<Props$1>): React.JSX.Element;
|
|
1943
|
+
|
|
1944
|
+
interface Props {
|
|
1945
|
+
query: string;
|
|
1946
|
+
language: {
|
|
1947
|
+
grammar: Grammar;
|
|
1948
|
+
name: string;
|
|
1579
1949
|
};
|
|
1950
|
+
className?: string;
|
|
1580
1951
|
}
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
type: 'direct';
|
|
1952
|
+
declare function RawQuery({ query, language, className }: Props): React.JSX.Element;
|
|
1953
|
+
|
|
1954
|
+
interface CustomMeta {
|
|
1955
|
+
queryID: string;
|
|
1956
|
+
status: string;
|
|
1587
1957
|
}
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
interface IndexedPairMapping {
|
|
1592
|
-
type: 'indexedPair';
|
|
1593
|
-
key: MappingField;
|
|
1594
|
-
value: MappingField;
|
|
1595
|
-
startIndex?: number;
|
|
1958
|
+
interface RunningQueryInfo {
|
|
1959
|
+
queryID?: string;
|
|
1960
|
+
shouldCancel?: boolean;
|
|
1596
1961
|
}
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
write: Expression;
|
|
1609
|
-
};
|
|
1610
|
-
/**
|
|
1611
|
-
* Mapping field
|
|
1612
|
-
*/
|
|
1613
|
-
interface MappingField {
|
|
1614
|
-
target: TargetLocation;
|
|
1615
|
-
pattern: string;
|
|
1962
|
+
declare class DatasourceWithAsyncBackend<TQuery extends DataQuery$1 = DataQuery$1, TOptions extends DataSourceJsonData = DataSourceJsonData> extends DataSourceWithBackend<TQuery, TOptions> {
|
|
1963
|
+
private runningQueries;
|
|
1964
|
+
private requestCounter;
|
|
1965
|
+
private requestIdPrefix;
|
|
1966
|
+
constructor(instanceSettings: DataSourceInstanceSettings<TOptions>);
|
|
1967
|
+
query(request: DataQueryRequest<TQuery>): Observable<DataQueryResponse>;
|
|
1968
|
+
storeQuery(target: TQuery, queryInfo: RunningQueryInfo): void;
|
|
1969
|
+
getQuery(target: TQuery): RunningQueryInfo;
|
|
1970
|
+
removeQuery(target: TQuery): void;
|
|
1971
|
+
doSingle(target: TQuery, request: DataQueryRequest<TQuery>): Observable<DataQueryResponse>;
|
|
1972
|
+
cancel: (target: TQuery) => void;
|
|
1616
1973
|
}
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1974
|
+
|
|
1975
|
+
interface RunQueryButtonsProps<TQuery extends DataQuery$1> {
|
|
1976
|
+
enableRun?: boolean;
|
|
1977
|
+
onRunQuery: () => void;
|
|
1978
|
+
onCancelQuery: (query: TQuery) => void;
|
|
1979
|
+
query: TQuery;
|
|
1980
|
+
state?: LoadingState;
|
|
1981
|
+
}
|
|
1982
|
+
declare const RunQueryButtons: <TQuery extends DataQuery$1>(props: RunQueryButtonsProps<TQuery>) => React.JSX.Element;
|
|
1983
|
+
|
|
1984
|
+
interface RequestLoopOptions<TQuery extends DataQuery$1 = DataQuery$1> {
|
|
1624
1985
|
/**
|
|
1625
|
-
*
|
|
1986
|
+
* If the response needs an additional request to execute, return it here
|
|
1626
1987
|
*/
|
|
1627
|
-
|
|
1628
|
-
}
|
|
1629
|
-
interface ConfigGroup {
|
|
1630
|
-
id: string;
|
|
1631
|
-
title: string;
|
|
1632
|
-
description?: string;
|
|
1633
|
-
order?: number;
|
|
1988
|
+
getNextQuery: (rsp: DataQueryResponse) => TQuery | undefined;
|
|
1634
1989
|
/**
|
|
1635
|
-
*
|
|
1990
|
+
* The datasource execute method
|
|
1636
1991
|
*/
|
|
1637
|
-
|
|
1992
|
+
query: (req: DataQueryRequest<TQuery>) => Observable<DataQueryResponse>;
|
|
1638
1993
|
/**
|
|
1639
|
-
*
|
|
1994
|
+
* Process the results
|
|
1640
1995
|
*/
|
|
1641
|
-
|
|
1642
|
-
}
|
|
1643
|
-
type RelationshipType = 'pair' | 'group' | 'datasourceReference';
|
|
1644
|
-
interface FieldRelationship {
|
|
1645
|
-
type: RelationshipType;
|
|
1996
|
+
process: (data: DataFrame[]) => DataFrame[];
|
|
1646
1997
|
/**
|
|
1647
|
-
*
|
|
1998
|
+
* Check if the query should be cancelled
|
|
1648
1999
|
*/
|
|
1649
|
-
|
|
1650
|
-
description?: string;
|
|
2000
|
+
shouldCancel: () => boolean;
|
|
1651
2001
|
/**
|
|
1652
|
-
*
|
|
1653
|
-
* Only applicable when type is "datasourceReference".
|
|
2002
|
+
* Callback that gets executed when unsubscribed
|
|
1654
2003
|
*/
|
|
1655
|
-
|
|
1656
|
-
}
|
|
1657
|
-
type SecureFieldState = {
|
|
1658
|
-
type: 'unset';
|
|
1659
|
-
} | {
|
|
1660
|
-
type: 'configured';
|
|
1661
|
-
} | {
|
|
1662
|
-
type: 'updated';
|
|
1663
|
-
value: string;
|
|
1664
|
-
};
|
|
1665
|
-
interface FormState {
|
|
1666
|
-
values: Record<string, unknown>;
|
|
1667
|
-
secure: Record<string, SecureFieldState>;
|
|
2004
|
+
onCancel: () => void;
|
|
1668
2005
|
}
|
|
1669
|
-
|
|
1670
|
-
/**
|
|
1671
|
-
* Bundled datasource config schemas, used as a fallback when a schema cannot be
|
|
1672
|
-
* fetched from the Grafana plugins CDN (for example, when the CDN returns 404).
|
|
1673
|
-
*/
|
|
1674
|
-
declare const staticSchemaRegistry: Map<string, DatasourceConfigSchema>;
|
|
1675
2006
|
/**
|
|
1676
|
-
*
|
|
1677
|
-
* bundled.
|
|
2007
|
+
* Continue executing requests as long as `getNextQuery` returns a query
|
|
1678
2008
|
*/
|
|
1679
|
-
declare function
|
|
1680
|
-
|
|
1681
|
-
declare function getConfigSchemaUrl(pluginType: string): string;
|
|
1682
|
-
declare function getConfigSchema(pluginType: string): Promise<DatasourceConfigSchema | null>;
|
|
2009
|
+
declare function getRequestLooper<T extends DataQuery$1 = DataQuery$1>(req: DataQueryRequest<T>, options: RequestLoopOptions<T>): Observable<DataQueryResponse>;
|
|
1683
2010
|
|
|
1684
|
-
export { AccessoryButton, AdvancedHttpSettings,
|
|
2011
|
+
export { AUTH_GROUP_IDS, AccessoryButton, AdvancedHttpSettings, Auth, AuthMethod, BINARY_OPERATIONS_KEY, CatalogSelector, CompletionItemInsertTextRule, CompletionItemKind, CompletionItemPriority, ConfigDescriptionLink, ConfigSection, ConfigSubSection, ConnectionSettings, CustomHeadersSettings, DataLink, DataLinks, DataSourceDescription, DataSourcePicker, DatasetSelector, DatasourceConfigWizard, DatasourceErrorBoundary, DatasourceWithAsyncBackend, DatePicker, DatePickerWithInput, DebounceInput, EditorField, EditorFieldGroup, EditorHeader, EditorList, EditorMode, EditorRow, EditorRows, EditorStack, EditorSwitch, FlexItem, GroupByRow, InlineSelect, InputGroup, LabelFilters, LinkedToken, MacroType, OperationExplainedBox, OperationList, OperationListExplained, OperationsEditorRow, OperatorType, QUERY_FORMAT_OPTIONS, QueryBuilderHints, QueryEditorMode, QueryEditorModeToggle, QueryEditorRow, QueryFormat, QueryHeaderSwitch, QueryModellerBase, QueryOptionGroup, ROOT_CONFIG_FIELDS, RawQuery, RunQueryButton, RunQueryButtons, SQLEditor, SQLEditorMode, SQLEditorTestUtils, SecureSocksProxyToggle, Segment, Space, SqlDatasource, SqlQueryEditor, StatementPosition, SuggestionKind, TLSSettings, TableSelector, TokenType, buildCelContext, buildCloneDatasourcePayload, buildCreateDatasourcePayload, buildUpdateDatasourcePayload, clearExpressionCache, computeVirtualFieldValues, convertLegacyAuthProps, datasourceToProvisioningYaml, evaluateCelDirect, evaluateCelExpression, evaluateComputedRead, evaluateDependsOn, extractFieldRefs, formKey, formatDate, formatYamlDiff, generateLLMHint, generateProvisioningTemplate, generateTroubleshootingFields, getConfigSchema, getRequestLooper, getStandardSQLCompletionProvider, getWatchedValue, language as grafanaStandardSQLLanguage, conf as grafanaStandardSQLLanguageConf, isAuthGroupId, isValidCelExpression, parseDependsOn, resolveActiveOverride, resolveGroups, resolvePluginName, resolveRequiredFieldsGroup, toOption, useHealthChecks };
|
|
2012
|
+
export type { Aggregate, AllowedValuesValidationRule, Props$c as AuthProps, BaseFieldRef, BaseValidationRule, ColumnDefinition, ComputedMapping, ConfigField, ConfigGroup, CustomMeta, CustomValidationRule, DB, DataLinkConfig, DatasourceConfigSchema, DatasourceConfigWizardProps, DatasourceHealth, DatePickerProps, DatePickerWithInputProps, DebounceInputProps, DirectMapping, Expression, FieldEffect, FieldItemSchema, FieldKind, FieldOption, FieldOverride, FieldPack, FieldPackID, FieldPatch, FieldRelationship, FieldUI, FieldValidationRule, FormState, HealthState, IndexedPairMapping, Instruction, ItemCountValidationRule, LanguageCompletionProvider, LanguageDefinition, LengthValidationRule, MappingField, MetaDefinition, NameValue, PatternValidationRule, PositionContext, Props$s as Props, QueryBuilderLabelFilter, QueryBuilderOperation, QueryBuilderOperationDefinition, QueryBuilderOperationParamDef, QueryBuilderOperationParamEditorProps, QueryBuilderOperationParamValue, QueryEditorProps, QueryRowFilter, QueryStats, QueryWithDefaults, RAQBFieldTypes, RangeValidationRule, RelationshipType, RequestLoopOptions, ResolvedGroup, ResourceSelectorProps, ResponseParser, Role, RunQueryButtonsProps, RunningQueryInfo, SQLConnectionLimits, SQLExpression, SQLFilters, SQLMonarchLanguage, SQLOptions, SQLQuery, SQLSelectableValue, SchemaDefinition, SecureFieldState, SegmentProps, SqlQueryForInterpolation, SqlQueryModel, State$1 as State, StatementPlacementProvider, StorageMapping, SuggestionKindProvider, Props$f as TLSSettingsProps, TableDefinition, TableFieldSchema, TableIdentifier, TableSchema, TargetLocation, TestQueryModel, UIComponent, UIWidth, ValidationResults, ValueType, VisualQuery, VisualQueryBinary, VisualQueryModeller };
|