@grafana/plugin-ui 0.14.1-dsconfig.bccd84e → 0.14.1-dsconfig.ced809d
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 +1076 -318
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +439 -115
- package/dist/cjs/schemas.cjs +14853 -0
- package/dist/cjs/schemas.cjs.map +1 -0
- package/dist/cjs/schemas.d.cts +373 -0
- package/dist/cjs/test-utils.d.cts +23 -23
- package/dist/esm/components/ConfigEditor/ConfigSection/ConfigDescriptionLink.js +2 -2
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/DatasourceConfigWizard.js +14 -9
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/DatasourceConfigWizard.js.map +1 -1
- 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 +16 -5
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/SchemaField.js.map +1 -1
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/SidebarNav.js.map +1 -1
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/TabLayout.js +9 -4
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/TabLayout.js.map +1 -1
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/fieldUtils.js +61 -11
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/fieldUtils.js.map +1 -1
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/{useDatasourceConfigForm.js → hooks/useDatasourceConfigForm.js} +71 -29
- 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/{AuthorizationHeaderField.js → inputs/AuthorizationHeaderField.js} +6 -8
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/AuthorizationHeaderField.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/{ComplexFieldNote.js → inputs/ComplexFieldNote.js} +6 -4
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/ComplexFieldNote.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/FileUploadField.js +106 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/FileUploadField.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/{IndexedPairEditor.js → inputs/IndexedPairEditor.js} +52 -52
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/IndexedPairEditor.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/ObjectArrayEditor.js +190 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/ObjectArrayEditor.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/{PdcFieldNote.js → inputs/PdcFieldNote.js} +5 -8
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/PdcFieldNote.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/{SecureFieldInput.js → inputs/SecureFieldInput.js} +8 -10
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/SecureFieldInput.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/StringArrayInput.js +80 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/StringArrayInput.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/renderFieldInput.js +76 -41
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/renderFieldInput.js.map +1 -1
- 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/tabStyles.js +4 -4
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/tabStyles.js.map +1 -1
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/wizardStyles.js +3 -3
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/wizardStyles.js.map +1 -1
- package/dist/esm/components/DataLinks/DataLink.js +2 -2
- package/dist/esm/components/DataLinks/DataLinks.js +2 -2
- package/dist/esm/components/DataSourcePicker/DataSourcePicker.js +7 -7
- package/dist/esm/components/DatePicker/styles.js +2 -2
- package/dist/esm/components/DatePickerWithInput/styles.js +2 -2
- package/dist/esm/components/QueryEditor/EditorField.js +2 -2
- package/dist/esm/components/QueryEditor/EditorHeader.js +2 -2
- package/dist/esm/components/QueryEditor/EditorRow.js +2 -2
- package/dist/esm/components/QueryEditor/EditorSwitch.js +2 -2
- package/dist/esm/components/QueryEditor/InputGroup.js +2 -2
- package/dist/esm/components/QueryEditor/Space.js +2 -2
- package/dist/esm/components/QueryEditor/query-editor-raw/RawEditor.js +2 -2
- package/dist/esm/components/QueryEditor/visual-query-builder/EditorField.js +2 -2
- package/dist/esm/components/QueryEditor/visual-query-builder/EditorRow.js +2 -2
- package/dist/esm/components/QueryEditor/visual-query-builder/Preview.js +2 -2
- package/dist/esm/components/QueryEditor/visual-query-builder/SelectRow.js +2 -2
- package/dist/esm/datasource/SqlDatasource.js +10 -10
- package/dist/esm/datasource/schema/cel.js +42 -0
- package/dist/esm/datasource/schema/cel.js.map +1 -0
- package/dist/esm/datasource/schema/config.js +37 -14
- package/dist/esm/datasource/schema/config.js.map +1 -1
- package/dist/esm/datasource/schema/datasource.js +129 -3
- package/dist/esm/datasource/schema/datasource.js.map +1 -1
- package/dist/esm/datasource/schema/datasources/alertmanager.schema.json.js +77 -0
- package/dist/esm/datasource/schema/datasources/alertmanager.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/cloudwatch.schema.json.js +384 -0
- package/dist/esm/datasource/schema/datasources/cloudwatch.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/elasticsearch.schema.json.js +287 -0
- package/dist/esm/datasource/schema/datasources/elasticsearch.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-amazonprometheus-datasource.schema.json.js +166 -0
- package/dist/esm/datasource/schema/datasources/grafana-amazonprometheus-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-appdynamics-datasource.schema.json.js +145 -0
- package/dist/esm/datasource/schema/datasources/grafana-appdynamics-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-astradb-datasource.schema.json.js +123 -0
- package/dist/esm/datasource/schema/datasources/grafana-astradb-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-athena-datasource.schema.json.js +158 -0
- package/dist/esm/datasource/schema/datasources/grafana-athena-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-azure-data-explorer-datasource.schema.json.js +204 -0
- package/dist/esm/datasource/schema/datasources/grafana-azure-data-explorer-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-azure-monitor-datasource.schema.json.js +294 -0
- package/dist/esm/datasource/schema/datasources/grafana-azure-monitor-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-azuredevops-datasource.schema.json.js +101 -0
- package/dist/esm/datasource/schema/datasources/grafana-azuredevops-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-azureprometheus-datasource.schema.json.js +125 -0
- package/dist/esm/datasource/schema/datasources/grafana-azureprometheus-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-bigquery-datasource.schema.json.js +508 -0
- package/dist/esm/datasource/schema/datasources/grafana-bigquery-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-clickhouse-datasource.schema.json.js +1400 -0
- package/dist/esm/datasource/schema/datasources/grafana-clickhouse-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-cockroachdb-datasource.schema.json.js +302 -0
- package/dist/esm/datasource/schema/datasources/grafana-cockroachdb-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-databricks-datasource.schema.json.js +291 -0
- package/dist/esm/datasource/schema/datasources/grafana-databricks-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-datadog-datasource.schema.json.js +155 -0
- package/dist/esm/datasource/schema/datasources/grafana-datadog-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-dynatrace-datasource.schema.json.js +179 -0
- package/dist/esm/datasource/schema/datasources/grafana-dynatrace-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-falconlogscale-datasource.schema.json.js +134 -0
- package/dist/esm/datasource/schema/datasources/grafana-falconlogscale-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-github-datasource.schema.json.js +156 -0
- package/dist/esm/datasource/schema/datasources/grafana-github-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-gitlab-datasource.schema.json.js +84 -0
- package/dist/esm/datasource/schema/datasources/grafana-gitlab-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-googlesheets-datasource.schema.json.js +231 -0
- package/dist/esm/datasource/schema/datasources/grafana-googlesheets-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-honeycomb-datasource.schema.json.js +87 -0
- package/dist/esm/datasource/schema/datasources/grafana-honeycomb-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-iot-sitewise-datasource.schema.json.js +159 -0
- package/dist/esm/datasource/schema/datasources/grafana-iot-sitewise-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-jira-datasource.schema.json.js +188 -0
- package/dist/esm/datasource/schema/datasources/grafana-jira-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-looker-datasource.schema.json.js +82 -0
- package/dist/esm/datasource/schema/datasources/grafana-looker-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-mongodb-datasource.schema.json.js +278 -0
- package/dist/esm/datasource/schema/datasources/grafana-mongodb-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-mqtt-datasource.schema.json.js +168 -0
- package/dist/esm/datasource/schema/datasources/grafana-mqtt-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-newrelic-datasource.schema.json.js +129 -0
- package/dist/esm/datasource/schema/datasources/grafana-newrelic-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-odbc-datasource.schema.json.js +56 -0
- package/dist/esm/datasource/schema/datasources/grafana-odbc-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-opensearch-datasource.schema.json.js +212 -0
- package/dist/esm/datasource/schema/datasources/grafana-opensearch-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-oracle-datasource.schema.json.js +186 -0
- package/dist/esm/datasource/schema/datasources/grafana-oracle-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-pagerduty-datasource.schema.json.js +85 -0
- package/dist/esm/datasource/schema/datasources/grafana-pagerduty-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-postgresql-datasource.schema.json.js +411 -0
- package/dist/esm/datasource/schema/datasources/grafana-postgresql-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-pyroscope-datasource.schema.json.js +41 -0
- package/dist/esm/datasource/schema/datasources/grafana-pyroscope-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-redshift-datasource.schema.json.js +201 -0
- package/dist/esm/datasource/schema/datasources/grafana-redshift-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-salesforce-datasource.schema.json.js +201 -0
- package/dist/esm/datasource/schema/datasources/grafana-salesforce-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-saphana-datasource.schema.json.js +208 -0
- package/dist/esm/datasource/schema/datasources/grafana-saphana-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-sentry-datasource.schema.json.js +94 -0
- package/dist/esm/datasource/schema/datasources/grafana-sentry-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-servicenow-datasource.schema.json.js +179 -0
- package/dist/esm/datasource/schema/datasources/grafana-servicenow-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-snowflake-datasource.schema.json.js +304 -0
- package/dist/esm/datasource/schema/datasources/grafana-snowflake-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-splunk-datasource.schema.json.js +319 -0
- package/dist/esm/datasource/schema/datasources/grafana-splunk-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-splunkobservability-datasource.schema.json.js +90 -0
- package/dist/esm/datasource/schema/datasources/grafana-splunkobservability-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-strava-datasource.schema.json.js +74 -0
- package/dist/esm/datasource/schema/datasources/grafana-strava-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-sumologic-datasource.schema.json.js +102 -0
- package/dist/esm/datasource/schema/datasources/grafana-sumologic-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-surrealdb-datasource.schema.json.js +92 -0
- package/dist/esm/datasource/schema/datasources/grafana-surrealdb-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-timestream-datasource.schema.json.js +145 -0
- package/dist/esm/datasource/schema/datasources/grafana-timestream-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-wavefront-datasource.schema.json.js +80 -0
- package/dist/esm/datasource/schema/datasources/grafana-wavefront-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-x-ray-datasource.schema.json.js +112 -0
- package/dist/esm/datasource/schema/datasources/grafana-x-ray-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/grafana-yugabyte-datasource.schema.json.js +114 -0
- package/dist/esm/datasource/schema/datasources/grafana-yugabyte-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/graphite.schema.json.js +104 -0
- package/dist/esm/datasource/schema/datasources/graphite.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/influxdb.schema.json.js +717 -0
- package/dist/esm/datasource/schema/datasources/influxdb.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/jaeger.schema.json.js +59 -0
- package/dist/esm/datasource/schema/datasources/jaeger.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/loki.schema.json.js +545 -0
- package/dist/esm/datasource/schema/datasources/loki.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/marcusolsson-csv-datasource.schema.json.js +45 -0
- package/dist/esm/datasource/schema/datasources/marcusolsson-csv-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/marcusolsson-json-datasource.schema.json.js +36 -0
- package/dist/esm/datasource/schema/datasources/marcusolsson-json-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/mssql.schema.json.js +292 -0
- package/dist/esm/datasource/schema/datasources/mssql.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/mysql.schema.json.js +304 -0
- package/dist/esm/datasource/schema/datasources/mysql.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/opentsdb.schema.json.js +113 -0
- package/dist/esm/datasource/schema/datasources/opentsdb.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/prometheus.schema.json.js +783 -0
- package/dist/esm/datasource/schema/datasources/prometheus.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/stackdriver.schema.json.js +224 -0
- package/dist/esm/datasource/schema/datasources/stackdriver.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/tempo.schema.json.js +664 -0
- package/dist/esm/datasource/schema/datasources/tempo.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/yesoreyeram-infinity-datasource.schema.json.js +1073 -0
- package/dist/esm/datasource/schema/datasources/yesoreyeram-infinity-datasource.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/datasources/zipkin.schema.json.js +40 -0
- package/dist/esm/datasource/schema/datasources/zipkin.schema.json.js.map +1 -0
- package/dist/esm/datasource/schema/llmHints.js.map +1 -1
- package/dist/esm/datasource/schema/provisioningYaml.js +3 -1
- package/dist/esm/datasource/schema/provisioningYaml.js.map +1 -1
- package/dist/esm/datasource/schema/schemaRegistry.js +139 -0
- package/dist/esm/datasource/schema/schemaRegistry.js.map +1 -0
- package/dist/esm/index.d.ts +439 -115
- package/dist/esm/index.js +6 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/schemas.d.ts +373 -0
- package/dist/esm/schemas.js +2 -0
- package/dist/esm/schemas.js.map +1 -0
- package/dist/esm/test-utils.d.ts +23 -23
- package/package.json +23 -6
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/AuthorizationHeaderField.js.map +0 -1
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/ComplexFieldNote.js.map +0 -1
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/IndexedPairEditor.js.map +0 -1
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/PdcFieldNote.js.map +0 -1
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/SecureFieldInput.js.map +0 -1
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/StringArrayInput.js +0 -84
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/StringArrayInput.js.map +0 -1
- package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/useDatasourceConfigForm.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datasource.js","sources":["../../../../src/datasource/schema/datasource.ts"],"sourcesContent":["import { getBackendSrv } from '@grafana/runtime';\nimport { formKey, type ConfigField } from './config';\nimport type { DatasourceResponse, DatasourceConfigPayload, FormValues } from './types';\n\nexport const SECURE_FIELD_CONFIGURED = '__CONFIGURED__';\n\nexport type FetchExistingResult = {\n values: FormValues;\n readOnly: boolean;\n error?: string;\n};\n\n/** Indexed pair item as stored in form values. Each item tracks its original storage index. */\nexport type IndexedPairItem = {\n /** Original storage index (e.g. 1 for httpHeaderName1). 0 = new item, not yet persisted. */\n index: number;\n name: string;\n value: string;\n};\n\n/**\n * Build a RegExp that matches keys produced by a pattern like \"httpHeaderName{index}\"\n * and captures the numeric index.\n */\nfunction patternToRegex(pattern: string): RegExp {\n const escaped = pattern.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n return new RegExp('^' + escaped.replace('\\\\{index\\\\}', '(\\\\d+)') + '$');\n}\n\n/**\n * Find all numeric indices present in a record for a given pattern.\n * E.g. for pattern \"httpHeaderName{index}\" and keys {httpHeaderName1, httpHeaderName3}\n * returns a sorted array [1, 3].\n */\nfunction findIndicesForPattern(record: Record<string, unknown>, pattern: string): number[] {\n const re = patternToRegex(pattern);\n const indices: number[] = [];\n for (const key of Object.keys(record)) {\n const m = key.match(re);\n if (m) {\n const n = Number(m[1]);\n if (!Number.isNaN(n)) {\n indices.push(n);\n }\n }\n }\n return indices.sort((a, b) => a - b);\n}\n\n/**\n * Expand indexed pair storage (e.g. httpHeaderName1..N / httpHeaderValue1..N)\n * into an array of {index, name, value} items for the form.\n * Each item's `index` tracks its storage position so deletes don't shift others.\n * Scans all keys in the source record to find matching indices — no gap heuristics.\n */\nexport function expandIndexedPair(field: ConfigField, ds: DatasourceResponse): IndexedPairItem[] {\n const storage = field.storage;\n if (storage?.type !== 'indexedPair' || !storage.key || !storage.value) {\n return [];\n }\n const source = storage.key.target === 'jsonData' ? (ds.jsonData ?? {}) : (ds as Record<string, unknown>);\n const indices = findIndicesForPattern(source as Record<string, unknown>, storage.key.pattern);\n const items: IndexedPairItem[] = [];\n for (const i of indices) {\n const nameKey = storage.key.pattern.replace('{index}', String(i));\n const valueKey = storage.value.pattern.replace('{index}', String(i));\n const nameVal = (source as Record<string, unknown>)[nameKey];\n if (nameVal === undefined || nameVal === null) {\n continue;\n }\n const hasValue =\n storage.value.target === 'secureJsonData' ? !!ds.secureJsonFields?.[valueKey] : !!ds.jsonData?.[valueKey];\n items.push({\n index: i,\n name: String(nameVal),\n value: hasValue ? SECURE_FIELD_CONFIGURED : '',\n });\n }\n return items;\n}\n\n/**\n * Flatten an array of indexed pair items back into individual indexed keys\n * for jsonData and secureJsonData.\n */\nexport function flattenIndexedPair(\n field: ConfigField,\n items: IndexedPairItem[],\n jsonData: Record<string, unknown>,\n secureJsonData: Record<string, string>,\n secureJsonFields: Record<string, boolean>\n) {\n const storage = field.storage;\n if (storage?.type !== 'indexedPair' || !storage.key || !storage.value) {\n return;\n }\n // Find all existing storage indices by scanning keys in jsonData.\n const existingIndices = new Set(\n storage.key.target === 'jsonData'\n ? findIndicesForPattern(jsonData as Record<string, unknown>, storage.key.pattern)\n : []\n );\n\n // Track which indices are still in use by the surviving items.\n const usedIndices = new Set<number>();\n const startIdx = storage.startIndex ?? 1;\n let nextIndex = existingIndices.size > 0 ? Math.max(...existingIndices) + 1 : startIdx;\n\n // Write each item at its original index. New items (index === 0) get the next available.\n for (const item of items) {\n let idx = item.index;\n if (idx === 0) {\n idx = nextIndex++;\n }\n usedIndices.add(idx);\n const nameKey = storage.key.pattern.replace('{index}', String(idx));\n const valueKey = storage.value.pattern.replace('{index}', String(idx));\n if (storage.key.target === 'jsonData') {\n jsonData[nameKey] = item.name;\n }\n if (storage.value.target === 'secureJsonData') {\n if (item.value === SECURE_FIELD_CONFIGURED) {\n secureJsonFields[valueKey] = true;\n } else if (item.value) {\n secureJsonData[valueKey] = item.value;\n secureJsonFields[valueKey] = false;\n }\n } else if (storage.value.target === 'jsonData') {\n jsonData[valueKey] = item.value;\n }\n }\n\n // Clear deleted indices: indices that existed before but are no longer in use.\n for (const idx of existingIndices) {\n if (usedIndices.has(idx)) {\n continue;\n }\n const nameKey = storage.key.pattern.replace('{index}', String(idx));\n const valueKey = storage.value.pattern.replace('{index}', String(idx));\n if (storage.key.target === 'jsonData') {\n delete jsonData[nameKey];\n }\n if (storage.value.target === 'secureJsonData') {\n delete secureJsonFields[valueKey];\n delete secureJsonData[valueKey];\n } else if (storage.value.target === 'jsonData') {\n delete jsonData[valueKey];\n }\n }\n}\n\n/**\n * Resolve a dotted storage path against the raw API response.\n * Handles: \"jsonData.server\", \"root.database\", \"secureJsonData.password\"\n */\nfunction resolveRawPath(ref: string, ds: DatasourceResponse): unknown {\n const trimmed = ref.trim();\n if (trimmed.startsWith('jsonData.')) {\n return ds.jsonData?.[trimmed.slice(9)];\n }\n if (trimmed.startsWith('root.')) {\n return (ds as Record<string, unknown>)[trimmed.slice(5)];\n }\n return undefined;\n}\n\nexport async function fetchExistingValues(dsUid: string, fields: ConfigField[]): Promise<FetchExistingResult> {\n try {\n const ds: DatasourceResponse = await getBackendSrv().get(`/api/datasources/uid/${dsUid}`, undefined, undefined, {\n showErrorAlert: false,\n });\n\n const values: FormValues = {};\n for (const field of fields) {\n // Expand indexedPair storage: read httpHeaderName1..N + secureJsonFields httpHeaderValue1..N\n if (field.storage?.type === 'indexedPair') {\n values[field.key] = expandIndexedPair(field, ds);\n continue;\n }\n const fk = formKey(field);\n switch (field.target) {\n case 'root':\n if (ds[field.key] !== undefined) {\n values[fk] = ds[field.key];\n }\n break;\n case 'jsonData':\n // Section-scoped fields are stored nested: jsonData.{section}.{key}\n if (field.section) {\n const sectionObj = ds.jsonData?.[field.section] as Record<string, unknown> | undefined;\n if (sectionObj?.[field.key] !== undefined) {\n values[fk] = sectionObj[field.key];\n }\n } else if (ds.jsonData?.[field.key] !== undefined) {\n values[fk] = ds.jsonData[field.key];\n }\n break;\n case 'secureJsonData':\n if (ds.secureJsonFields?.[field.key]) {\n values[fk] = SECURE_FIELD_CONFIGURED;\n }\n break;\n }\n\n // Fallback: if value is still missing and field has storage.read,\n // resolve the expression against the raw API response.\n if (values[fk] === undefined && field.storage?.type === 'computed' && field.storage.read) {\n const fallback = resolveRawPath(field.storage.read, ds);\n if (fallback !== undefined) {\n values[fk] = fallback;\n }\n }\n }\n return { values, readOnly: !!ds.readOnly };\n } catch (err: unknown) {\n const message = err instanceof Error ? err.message : 'Failed to load datasource configuration';\n return { values: {}, readOnly: false, error: message };\n }\n}\n\nexport function buildDatasourceConfigPayload(\n data: FormValues,\n fields: ConfigField[],\n existing: DatasourceResponse,\n isFieldVisible: (field: ConfigField) => boolean\n): DatasourceConfigPayload {\n const rootFields: Record<string, unknown> = {};\n const jsonData: Record<string, unknown> = { ...(existing.jsonData ?? {}) };\n const secureJsonData: Record<string, string> = {};\n const secureJsonFields: Record<string, boolean> = { ...(existing.secureJsonFields ?? {}) };\n\n for (const field of fields) {\n // Flatten indexedPair storage back into individual indexed keys\n if (field.storage?.type === 'indexedPair') {\n const items = Array.isArray(data[field.key]) ? (data[field.key] as IndexedPairItem[]) : [];\n flattenIndexedPair(field, items, jsonData, secureJsonData, secureJsonFields);\n continue;\n }\n\n // Always include fields managed by effects (tagged \"managed-by:*\")\n // even when they're hidden from the UI — their values are set by effects.\n const isManagedByEffect = field.tags?.some((t) => t.startsWith('managed-by:'));\n if (!isManagedByEffect && !isFieldVisible(field)) {\n continue;\n }\n const fk = formKey(field);\n const value = data[fk];\n\n if (field.target === 'secureJsonData') {\n if (value === SECURE_FIELD_CONFIGURED) {\n secureJsonFields[field.key] = true;\n continue;\n }\n if (value && value !== '') {\n secureJsonData[field.key] = String(value);\n secureJsonFields[field.key] = false;\n } else {\n secureJsonFields[field.key] = false;\n }\n continue;\n }\n\n if (value === undefined || value === '') {\n continue;\n }\n switch (field.target) {\n case 'root':\n rootFields[field.key] = value;\n break;\n case 'jsonData':\n // Section-scoped fields write to jsonData.{section}.{key}\n if (field.section) {\n if (!jsonData[field.section] || typeof jsonData[field.section] !== 'object') {\n jsonData[field.section] = {};\n }\n (jsonData[field.section] as Record<string, unknown>)[field.key] = value;\n } else {\n jsonData[field.key] = value;\n }\n break;\n }\n }\n\n return { rootFields, jsonData, secureJsonData, secureJsonFields };\n}\n\nexport async function submitDatasourceConfig(\n dsUid: string,\n data: FormValues,\n fields: ConfigField[],\n isFieldVisible: (field: ConfigField) => boolean\n): Promise<void> {\n const existing: DatasourceResponse = await getBackendSrv().get(`/api/datasources/uid/${dsUid}`);\n const { rootFields, jsonData, secureJsonData, secureJsonFields } = buildDatasourceConfigPayload(\n data,\n fields,\n existing,\n isFieldVisible\n );\n\n await getBackendSrv().put(`/api/datasources/uid/${dsUid}`, {\n ...existing,\n ...rootFields,\n jsonData,\n secureJsonData,\n secureJsonFields,\n });\n}\n"],"names":[],"mappings":";;;AAIO,MAAM,uBAAA,GAA0B;AAoBvC,SAAS,eAAe,OAAA,EAAyB;AAC/C,EAAA,MAAM,OAAA,GAAU,OAAA,CAAQ,OAAA,CAAQ,qBAAA,EAAuB,MAAM,CAAA;AAC7D,EAAA,OAAO,IAAI,OAAO,GAAA,GAAM,OAAA,CAAQ,QAAQ,aAAA,EAAe,QAAQ,IAAI,GAAG,CAAA;AACxE;AAOA,SAAS,qBAAA,CAAsB,QAAiC,OAAA,EAA2B;AACzF,EAAA,MAAM,EAAA,GAAK,eAAe,OAAO,CAAA;AACjC,EAAA,MAAM,UAAoB,EAAC;AAC3B,EAAA,KAAA,MAAW,GAAA,IAAO,MAAA,CAA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xB;AACA,QAAA;AAAA;AACJ,EACF;AAEA,EAAA,OAAO,EAAE,UAAA,EAAY,QAAA,EAAU,cAAA,EAAgB,gBAAA,EAAiB;AAClE;AAEA,eAAsB,sBAAA,CACpB,KAAA,EACA,IAAA,EACA,MAAA,EACA,cAAA,EACe;AACf,EAAA,MAAM,WAA+B,MAAM,aAAA,GAAgB,GAAA,CAAI,CAAA,qBAAA,EAAwB,KAAK,CAAA,CAAE,CAAA;AAC9F,EAAA,MAAM,EAAE,UAAA,EAAY,QAAA,EAAU,cAAA,EAAgB,kBAAiB,GAAI,4BAAA;AAAA,IACjE,IAAA;AAAA,IACA,MAAA;AAAA,IACA,QAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAA,MAAM,aAAA,EAAc,CAAE,GAAA,CAAI,CAAA,qBAAA,EAAwB,KAAK,CAAA,CAAA,EAAI;AAAA,IACzD,GAAG,QAAA;AAAA,IACH,GAAG,UAAA;AAAA,IACH,QAAA;AAAA,IACA,cAAA;AAAA,IACA;AAAA,GACD,CAAA;AACH;;;;"}
|
|
1
|
+
{"version":3,"file":"datasource.js","sources":["../../../../src/datasource/schema/datasource.ts"],"sourcesContent":["import { getBackendSrv } from '@grafana/runtime';\nimport type { ConfigField, FieldOverride } from './schema';\nimport { formKey } from './config';\nimport type { DatasourceResponse, DatasourceConfigPayload, FormValues } from './types';\n\nexport const SECURE_FIELD_CONFIGURED = '__CONFIGURED__';\n\n// ============================================================\n// secureKey helpers for per-item secure routing\n// ============================================================\n\n/**\n * Resolve a secureKey template string by replacing placeholders.\n *\n * Supported placeholders:\n * - `{index}` — 0-based array position\n * - `{index1}` — 1-based array position\n * - `{item.KEY}` — value of sibling field `KEY` in the same item object\n */\nexport function resolveSecureKeyTemplate(template: string, item: Record<string, unknown>, index: number): string {\n return template\n .replace(/\\{index1\\}/g, String(index + 1))\n .replace(/\\{index\\}/g, String(index))\n .replace(/\\{item\\.(\\w+)\\}/g, (_, key) => String(item[key] ?? ''));\n}\n\n/**\n * Evaluate a simple item-scoped condition like `item.secure == true`.\n * Only supports `item.KEY == VALUE` and the literal `true`.\n * Returns false for expressions it cannot evaluate.\n */\nfunction evaluateItemCondition(condition: string, item: Record<string, unknown>): boolean {\n const trimmed = condition.trim();\n if (trimmed === 'true') {\n return true;\n }\n // Match: item.KEY == VALUE (with optional quotes)\n const match = trimmed.match(/^item\\.(\\w+)\\s*==\\s*(.+)$/);\n if (!match) {\n return false;\n }\n const [, key, rawValue] = match;\n const actualValue = item[key];\n // Parse the expected value\n const expected = rawValue.trim();\n if (expected === 'true') {\n return actualValue === true;\n }\n if (expected === 'false') {\n return actualValue === false;\n }\n // String comparison (strip quotes)\n const unquoted = expected.replace(/^['\"]|['\"]$/g, '');\n return String(actualValue) === unquoted;\n}\n\n/**\n * For a given item object at a given index, find the first active secureKey\n * override across all item fields. Returns the resolved secureJsonData key\n * and the item field key whose value should be routed, or null if none active.\n */\nexport function findActiveSecureOverride(\n itemFields: ConfigField[],\n item: Record<string, unknown>,\n index: number\n): { fieldKey: string; resolvedKey: string } | null {\n for (const field of itemFields) {\n if (!field.overrides) {\n continue;\n }\n for (const override of field.overrides) {\n if (!override.secureKey) {\n continue;\n }\n if (evaluateItemCondition(override.when, item)) {\n return {\n fieldKey: field.key,\n resolvedKey: resolveSecureKeyTemplate(override.secureKey, item, index),\n };\n }\n }\n }\n return null;\n}\n\nexport type FetchExistingResult = {\n values: FormValues;\n readOnly: boolean;\n error?: string;\n};\n\n/** Indexed pair item as stored in form values. Each item tracks its original storage index. */\nexport type IndexedPairItem = {\n /** Original storage index (e.g. 1 for httpHeaderName1). 0 = new item, not yet persisted. */\n index: number;\n name: string;\n value: string;\n};\n\n/**\n * Build a RegExp that matches keys produced by a pattern like \"httpHeaderName{index}\"\n * and captures the numeric index.\n */\nfunction patternToRegex(pattern: string): RegExp {\n const escaped = pattern.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n return new RegExp('^' + escaped.replace('\\\\{index\\\\}', '(\\\\d+)') + '$');\n}\n\n/**\n * Find all numeric indices present in a record for a given pattern.\n * E.g. for pattern \"httpHeaderName{index}\" and keys {httpHeaderName1, httpHeaderName3}\n * returns a sorted array [1, 3].\n */\nfunction findIndicesForPattern(record: Record<string, unknown>, pattern: string): number[] {\n const re = patternToRegex(pattern);\n const indices: number[] = [];\n for (const key of Object.keys(record)) {\n const m = key.match(re);\n if (m) {\n const n = Number(m[1]);\n if (!Number.isNaN(n)) {\n indices.push(n);\n }\n }\n }\n return indices.sort((a, b) => a - b);\n}\n\n/**\n * Expand indexed pair storage (e.g. httpHeaderName1..N / httpHeaderValue1..N)\n * into an array of {index, name, value} items for the form.\n * Each item's `index` tracks its storage position so deletes don't shift others.\n * Scans all keys in the source record to find matching indices — no gap heuristics.\n */\nexport function expandIndexedPair(field: ConfigField, ds: DatasourceResponse): IndexedPairItem[] {\n const storage = field.storage;\n if (storage?.type !== 'indexedPair' || !storage.key || !storage.value) {\n return [];\n }\n const source = storage.key.target === 'jsonData' ? (ds.jsonData ?? {}) : (ds as Record<string, unknown>);\n const indices = findIndicesForPattern(source as Record<string, unknown>, storage.key.pattern);\n const items: IndexedPairItem[] = [];\n for (const i of indices) {\n const nameKey = storage.key.pattern.replace('{index}', String(i));\n const valueKey = storage.value.pattern.replace('{index}', String(i));\n const nameVal = (source as Record<string, unknown>)[nameKey];\n if (nameVal === undefined || nameVal === null) {\n continue;\n }\n const hasValue =\n storage.value.target === 'secureJsonData' ? !!ds.secureJsonFields?.[valueKey] : !!ds.jsonData?.[valueKey];\n items.push({\n index: i,\n name: String(nameVal),\n value: hasValue ? SECURE_FIELD_CONFIGURED : '',\n });\n }\n return items;\n}\n\n/**\n * Flatten an array of indexed pair items back into individual indexed keys\n * for jsonData and secureJsonData.\n */\nexport function flattenIndexedPair(\n field: ConfigField,\n items: IndexedPairItem[],\n jsonData: Record<string, unknown>,\n secureJsonData: Record<string, string>,\n secureJsonFields: Record<string, boolean>\n) {\n const storage = field.storage;\n if (storage?.type !== 'indexedPair' || !storage.key || !storage.value) {\n return;\n }\n // Find all existing storage indices by scanning keys in jsonData.\n const existingIndices = new Set(\n storage.key.target === 'jsonData'\n ? findIndicesForPattern(jsonData as Record<string, unknown>, storage.key.pattern)\n : []\n );\n\n // Track which indices are still in use by the surviving items.\n const usedIndices = new Set<number>();\n const startIdx = storage.startIndex ?? 1;\n let nextIndex = existingIndices.size > 0 ? Math.max(...existingIndices) + 1 : startIdx;\n\n // Write each item at its original index. New items (index === 0) get the next available.\n for (const item of items) {\n let idx = item.index;\n if (idx === 0) {\n idx = nextIndex++;\n }\n usedIndices.add(idx);\n const nameKey = storage.key.pattern.replace('{index}', String(idx));\n const valueKey = storage.value.pattern.replace('{index}', String(idx));\n if (storage.key.target === 'jsonData') {\n jsonData[nameKey] = item.name;\n }\n if (storage.value.target === 'secureJsonData') {\n if (item.value === SECURE_FIELD_CONFIGURED) {\n secureJsonFields[valueKey] = true;\n } else if (item.value) {\n secureJsonData[valueKey] = item.value;\n secureJsonFields[valueKey] = false;\n }\n } else if (storage.value.target === 'jsonData') {\n jsonData[valueKey] = item.value;\n }\n }\n\n // Clear deleted indices: indices that existed before but are no longer in use.\n for (const idx of existingIndices) {\n if (usedIndices.has(idx)) {\n continue;\n }\n const nameKey = storage.key.pattern.replace('{index}', String(idx));\n const valueKey = storage.value.pattern.replace('{index}', String(idx));\n if (storage.key.target === 'jsonData') {\n delete jsonData[nameKey];\n }\n if (storage.value.target === 'secureJsonData') {\n delete secureJsonFields[valueKey];\n delete secureJsonData[valueKey];\n } else if (storage.value.target === 'jsonData') {\n delete jsonData[valueKey];\n }\n }\n}\n\n/**\n * Resolve a dotted storage path against the raw API response.\n * Handles: \"jsonData.server\", \"root.database\", \"secureJsonData.password\"\n */\nfunction resolveRawPath(ref: string, ds: DatasourceResponse): unknown {\n const trimmed = ref.trim();\n if (trimmed.startsWith('jsonData.')) {\n return ds.jsonData?.[trimmed.slice(9)];\n }\n if (trimmed.startsWith('root.')) {\n return (ds as Record<string, unknown>)[trimmed.slice(5)];\n }\n return undefined;\n}\n\nexport async function fetchExistingValues(dsUid: string, fields: ConfigField[]): Promise<FetchExistingResult> {\n try {\n const ds: DatasourceResponse = await getBackendSrv().get(`/api/datasources/uid/${dsUid}`, undefined, undefined, {\n showErrorAlert: false,\n });\n\n const values: FormValues = {};\n for (const field of fields) {\n // Expand indexedPair storage: read httpHeaderName1..N + secureJsonFields httpHeaderValue1..N\n if (field.storage?.type === 'indexedPair') {\n values[field.key] = expandIndexedPair(field, ds);\n continue;\n }\n const fk = formKey(field);\n switch (field.target) {\n case 'root':\n if (ds[field.key] !== undefined) {\n values[fk] = ds[field.key];\n }\n break;\n case 'jsonData':\n // Section-scoped fields are stored nested: jsonData.{section}.{key}\n if (field.section) {\n const sectionObj = ds.jsonData?.[field.section] as Record<string, unknown> | undefined;\n if (sectionObj?.[field.key] !== undefined) {\n values[fk] = sectionObj[field.key];\n }\n } else if (ds.jsonData?.[field.key] !== undefined) {\n values[fk] = ds.jsonData[field.key];\n }\n break;\n case 'secureJsonData':\n if (ds.secureJsonFields?.[field.key]) {\n values[fk] = SECURE_FIELD_CONFIGURED;\n }\n break;\n }\n\n // Fallback: if value is still missing and field has storage.read,\n // resolve the expression against the raw API response.\n if (values[fk] === undefined && field.storage?.type === 'computed' && field.storage.read) {\n const fallback = resolveRawPath(field.storage.read, ds);\n if (fallback !== undefined) {\n values[fk] = fallback;\n }\n }\n }\n\n // Post-process arrays with secureKey overrides: for each item, check\n // whether the item's value is stored in secureJsonFields and mark it.\n for (const field of fields) {\n if (field.valueType !== 'array' || !field.item?.fields) {\n continue;\n }\n const itemFields = field.item.fields;\n const hasSecureOverride = itemFields.some((f) => f.overrides?.some((o) => o.secureKey));\n if (!hasSecureOverride) {\n continue;\n }\n const fk = formKey(field);\n const arr = values[fk];\n if (!Array.isArray(arr)) {\n continue;\n }\n values[fk] = arr.map((item: Record<string, unknown>, idx: number) => {\n const match = findActiveSecureOverride(itemFields, item, idx);\n if (match && ds.secureJsonFields?.[match.resolvedKey]) {\n return { ...item, [match.fieldKey]: SECURE_FIELD_CONFIGURED };\n }\n return item;\n });\n }\n\n return { values, readOnly: !!ds.readOnly };\n } catch (err: unknown) {\n const message = err instanceof Error ? err.message : 'Failed to load datasource configuration';\n return { values: {}, readOnly: false, error: message };\n }\n}\n\nexport function buildDatasourceConfigPayload(\n data: FormValues,\n fields: ConfigField[],\n existing: DatasourceResponse,\n isFieldVisible: (field: ConfigField) => boolean\n): DatasourceConfigPayload {\n const rootFields: Record<string, unknown> = {};\n const jsonData: Record<string, unknown> = { ...(existing.jsonData ?? {}) };\n const secureJsonData: Record<string, string> = {};\n const secureJsonFields: Record<string, boolean> = { ...(existing.secureJsonFields ?? {}) };\n\n for (const field of fields) {\n // Flatten indexedPair storage back into individual indexed keys\n if (field.storage?.type === 'indexedPair') {\n const items = Array.isArray(data[field.key]) ? (data[field.key] as IndexedPairItem[]) : [];\n flattenIndexedPair(field, items, jsonData, secureJsonData, secureJsonFields);\n continue;\n }\n\n // Always include fields managed by effects (tagged \"managed-by:*\")\n // even when they're hidden from the UI — their values are set by effects.\n const isManagedByEffect = field.tags?.some((t) => t.startsWith('managed-by:'));\n if (!isManagedByEffect && !isFieldVisible(field)) {\n continue;\n }\n const fk = formKey(field);\n const value = data[fk];\n\n if (field.target === 'secureJsonData') {\n if (value === SECURE_FIELD_CONFIGURED) {\n secureJsonFields[field.key] = true;\n continue;\n }\n if (value && value !== '') {\n secureJsonData[field.key] = String(value);\n secureJsonFields[field.key] = false;\n } else {\n secureJsonFields[field.key] = false;\n }\n continue;\n }\n\n if (value === undefined || value === '') {\n continue;\n }\n switch (field.target) {\n case 'root':\n rootFields[field.key] = value;\n break;\n case 'jsonData':\n // Section-scoped fields write to jsonData.{section}.{key}\n if (field.section) {\n if (!jsonData[field.section] || typeof jsonData[field.section] !== 'object') {\n jsonData[field.section] = {};\n }\n (jsonData[field.section] as Record<string, unknown>)[field.key] = value;\n } else {\n jsonData[field.key] = value;\n }\n break;\n }\n }\n\n // Post-process arrays with secureKey overrides: route values to secureJsonData\n // and clean up stale secure keys from previous saves.\n for (const field of fields) {\n if (field.valueType !== 'array' || !field.item?.fields || field.target !== 'jsonData') {\n continue;\n }\n const itemFields = field.item.fields;\n const hasSecureOverride = itemFields.some((f) => f.overrides?.some((o) => o.secureKey));\n if (!hasSecureOverride) {\n continue;\n }\n const arr = (\n field.section ? (jsonData[field.section] as Record<string, unknown>)?.[field.key] : jsonData[field.key]\n ) as Array<Record<string, unknown>> | undefined;\n if (!Array.isArray(arr)) {\n continue;\n }\n\n // Collect all secureKey patterns from this field's item overrides for cleanup\n const secureKeyOverrides: Array<{ fieldKey: string; override: FieldOverride }> = [];\n for (const f of itemFields) {\n for (const o of f.overrides ?? []) {\n if (o.secureKey) {\n secureKeyOverrides.push({ fieldKey: f.key, override: o });\n }\n }\n }\n\n // Track which secure keys are still active so we can remove stale ones\n const activeSecureKeys = new Set<string>();\n\n for (let i = 0; i < arr.length; i++) {\n const item = arr[i];\n const match = findActiveSecureOverride(itemFields, item, i);\n if (!match) {\n continue;\n }\n const resolvedKey = match.resolvedKey;\n activeSecureKeys.add(resolvedKey);\n const itemValue = item[match.fieldKey];\n\n if (itemValue === SECURE_FIELD_CONFIGURED) {\n // Value already stored in secureJsonData, keep it\n secureJsonFields[resolvedKey] = true;\n } else if (itemValue && itemValue !== '') {\n // New or updated secret value — route to secureJsonData\n secureJsonData[resolvedKey] = String(itemValue);\n secureJsonFields[resolvedKey] = false;\n // Clear the value from the inline array\n item[match.fieldKey] = '';\n }\n }\n\n // Remove stale secure keys that were previously set but are no longer in the array\n const existingSecureFields = existing.secureJsonFields ?? {};\n for (const existingKey of Object.keys(existingSecureFields)) {\n // Check if this key could have been produced by any of this field's secureKey templates\n const couldBeFromThisField = secureKeyOverrides.some((sko) => {\n // Simple heuristic: check if the existing key starts with the static prefix\n // of the template (everything before the first placeholder)\n const staticPrefix = sko.override.secureKey!.split('{')[0];\n return staticPrefix && existingKey.startsWith(staticPrefix);\n });\n if (couldBeFromThisField && !activeSecureKeys.has(existingKey)) {\n secureJsonFields[existingKey] = false;\n secureJsonData[existingKey] = '';\n }\n }\n }\n\n return { rootFields, jsonData, secureJsonData, secureJsonFields };\n}\n\nexport async function submitDatasourceConfig(\n dsUid: string,\n data: FormValues,\n fields: ConfigField[],\n isFieldVisible: (field: ConfigField) => boolean\n): Promise<void> {\n const existing: DatasourceResponse = await getBackendSrv().get(`/api/datasources/uid/${dsUid}`);\n const { rootFields, jsonData, secureJsonData, secureJsonFields } = buildDatasourceConfigPayload(\n data,\n fields,\n existing,\n isFieldVisible\n );\n\n await getBackendSrv().put(`/api/datasources/uid/${dsUid}`, {\n ...existing,\n ...rootFields,\n jsonData,\n secureJsonData,\n secureJsonFields,\n });\n}\n"],"names":["_a"],"mappings":";;;AAKO,MAAM,uBAAA,GAA0B;AAchC,SAAS,wBAAA,CAAyB,QAAA,EAAkB,IAAA,EAA+B,KAAA,EAAuB;AAC/G,EAAA,OAAO,SACJ,OAAA,CAAQ,aAAA,EAAe,OAAO,KAAA,GAAQ,CAAC,CAAC,CAAA,CACxC,OAAA,CAAQ,YAAA,EAAc,MAAA,CAAO,KAAK,CAAC,CAAA,CACnC,QAAQ,kBAAA,EAAoB,CAAC,GAAG,GAAA,KAAK;AAvB1C,IAAA,IAAA,EAAA;AAuB6C,IAAA,OAAA,MAAA,CAAA,CAAO,EAAA,GAAA,IAAA,CAAK,GAAG,CAAA,KAAR,IAAA,GAAA,EAAA,GAAa,EAAE,CAAA;AAAA,EAAA,CAAC,CAAA;AACpE;AAOA,SAAS,qBAAA,CAAsB,WAAmB,IAAA,EAAwC;AACxF,EAAA,MAAM,OAAA,GAAU,UAAU,IAAA,EAAK;AAC/B,EAAA,IAAI,YAAY,MAAA,EAAQ;AACtB,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,MAAM,KAAA,GAAQ,OAAA,CAAQ,KAAA,CAAM,2BAA2B,CAAA;AACvD,EAAA,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AAA;AAAA,IACH,GAAG,UAAA;AAAA,IACH,QAAA;AAAA,IACA,cAAA;AAAA,IACA;AAAA,GACD,CAAA;AACH;;;;"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
var $schema$_ = "../schema.json";
|
|
2
|
+
var schemaVersion$_ = "v1";
|
|
3
|
+
var pluginType$_ = "alertmanager";
|
|
4
|
+
var pluginName$_ = "Alertmanager";
|
|
5
|
+
var docURL$v = "https://grafana.com/docs/grafana/latest/datasources/alertmanager/";
|
|
6
|
+
var fields$_ = [
|
|
7
|
+
{
|
|
8
|
+
id: "jsonData.implementation",
|
|
9
|
+
key: "implementation",
|
|
10
|
+
label: "Implementation",
|
|
11
|
+
description: "The Alertmanager implementation type.",
|
|
12
|
+
valueType: "string",
|
|
13
|
+
target: "jsonData",
|
|
14
|
+
defaultValue: "mimir",
|
|
15
|
+
validations: [
|
|
16
|
+
{
|
|
17
|
+
type: "allowedValues",
|
|
18
|
+
values: [
|
|
19
|
+
"cortex",
|
|
20
|
+
"mimir",
|
|
21
|
+
"prometheus"
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
ui: {
|
|
26
|
+
component: "select",
|
|
27
|
+
options: [
|
|
28
|
+
{
|
|
29
|
+
label: "Mimir",
|
|
30
|
+
value: "mimir"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
label: "Cortex",
|
|
34
|
+
value: "cortex"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
label: "Prometheus",
|
|
38
|
+
value: "prometheus"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: "jsonData.handleGrafanaManagedAlerts",
|
|
45
|
+
key: "handleGrafanaManagedAlerts",
|
|
46
|
+
label: "Receive Grafana Alerts",
|
|
47
|
+
description: "When enabled, Grafana-managed alerts are sent to this Alertmanager.",
|
|
48
|
+
valueType: "boolean",
|
|
49
|
+
target: "jsonData",
|
|
50
|
+
defaultValue: false,
|
|
51
|
+
ui: {
|
|
52
|
+
component: "switch"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
];
|
|
56
|
+
var groups$_ = [
|
|
57
|
+
{
|
|
58
|
+
id: "settings",
|
|
59
|
+
title: "Alertmanager Settings",
|
|
60
|
+
fieldRefs: [
|
|
61
|
+
"jsonData.implementation",
|
|
62
|
+
"jsonData.handleGrafanaManagedAlerts"
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
];
|
|
66
|
+
var alertmanagerSchema = {
|
|
67
|
+
$schema: $schema$_,
|
|
68
|
+
schemaVersion: schemaVersion$_,
|
|
69
|
+
pluginType: pluginType$_,
|
|
70
|
+
pluginName: pluginName$_,
|
|
71
|
+
docURL: docURL$v,
|
|
72
|
+
fields: fields$_,
|
|
73
|
+
groups: groups$_
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export { $schema$_ as $schema, alertmanagerSchema as default, docURL$v as docURL, fields$_ as fields, groups$_ as groups, pluginName$_ as pluginName, pluginType$_ as pluginType, schemaVersion$_ as schemaVersion };
|
|
77
|
+
//# sourceMappingURL=alertmanager.schema.json.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alertmanager.schema.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
var $schema$Z = "../schema.json";
|
|
2
|
+
var schemaVersion$Z = "v1";
|
|
3
|
+
var pluginType$Z = "cloudwatch";
|
|
4
|
+
var pluginName$Z = "Amazon CloudWatch";
|
|
5
|
+
var docURL$u = "https://grafana.com/docs/grafana/latest/datasources/aws-cloudwatch/configure/";
|
|
6
|
+
var fields$Z = [
|
|
7
|
+
{
|
|
8
|
+
id: "jsonData.authType",
|
|
9
|
+
key: "authType",
|
|
10
|
+
label: "Authentication Provider",
|
|
11
|
+
description: "AWS authentication method. The default SDK provider extracts credentials from environment variables or IAM roles.",
|
|
12
|
+
valueType: "string",
|
|
13
|
+
target: "jsonData",
|
|
14
|
+
defaultValue: "default",
|
|
15
|
+
validations: [
|
|
16
|
+
{
|
|
17
|
+
type: "allowedValues",
|
|
18
|
+
values: [
|
|
19
|
+
"default",
|
|
20
|
+
"credentials",
|
|
21
|
+
"keys",
|
|
22
|
+
"ec2_iam_role",
|
|
23
|
+
"grafana_assume_role",
|
|
24
|
+
"arn"
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
ui: {
|
|
29
|
+
component: "select",
|
|
30
|
+
options: [
|
|
31
|
+
{
|
|
32
|
+
label: "AWS SDK Default",
|
|
33
|
+
value: "default"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
label: "Credentials file",
|
|
37
|
+
value: "credentials"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
label: "Access & secret key",
|
|
41
|
+
value: "keys"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
label: "EC2 IAM Role",
|
|
45
|
+
value: "ec2_iam_role"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
label: "Grafana Assume Role",
|
|
49
|
+
value: "grafana_assume_role"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
label: "Assume Role ARN (deprecated)",
|
|
53
|
+
value: "arn"
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: "jsonData.defaultRegion",
|
|
60
|
+
key: "defaultRegion",
|
|
61
|
+
label: "Default Region",
|
|
62
|
+
description: "AWS region. Example: us-west-2.",
|
|
63
|
+
valueType: "string",
|
|
64
|
+
target: "jsonData",
|
|
65
|
+
ui: {
|
|
66
|
+
component: "select"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: "jsonData.profile",
|
|
71
|
+
key: "profile",
|
|
72
|
+
label: "Credentials Profile Name",
|
|
73
|
+
description: "AWS credentials profile name from the shared credentials file.",
|
|
74
|
+
valueType: "string",
|
|
75
|
+
target: "jsonData",
|
|
76
|
+
dependsOn: "jsonData.authType == 'credentials'"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: "jsonData.assumeRoleArn",
|
|
80
|
+
key: "assumeRoleArn",
|
|
81
|
+
label: "Assume Role ARN",
|
|
82
|
+
description: "ARN of the IAM role to assume.",
|
|
83
|
+
valueType: "string",
|
|
84
|
+
target: "jsonData",
|
|
85
|
+
ui: {
|
|
86
|
+
component: "input",
|
|
87
|
+
placeholder: "arn:aws:iam::123456789012:role/grafana"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: "jsonData.externalId",
|
|
92
|
+
key: "externalId",
|
|
93
|
+
label: "External ID",
|
|
94
|
+
description: "External ID for cross-account role assumption.",
|
|
95
|
+
valueType: "string",
|
|
96
|
+
target: "jsonData"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: "jsonData.endpoint",
|
|
100
|
+
key: "endpoint",
|
|
101
|
+
label: "Endpoint",
|
|
102
|
+
description: "Optional custom endpoint for the AWS service. Leave empty for default CloudWatch endpoint.",
|
|
103
|
+
valueType: "string",
|
|
104
|
+
target: "jsonData",
|
|
105
|
+
ui: {
|
|
106
|
+
component: "input",
|
|
107
|
+
placeholder: "https://monitoring.us-east-1.amazonaws.com"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: "jsonData.customMetricsNamespaces",
|
|
112
|
+
key: "customMetricsNamespaces",
|
|
113
|
+
label: "Namespaces of Custom Metrics",
|
|
114
|
+
description: "Add custom metric namespaces, separated by commas. Custom metrics cannot be auto-loaded.",
|
|
115
|
+
valueType: "string",
|
|
116
|
+
target: "jsonData",
|
|
117
|
+
ui: {
|
|
118
|
+
component: "input",
|
|
119
|
+
placeholder: "Namespace1,Namespace2"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: "jsonData.logsTimeout",
|
|
124
|
+
key: "logsTimeout",
|
|
125
|
+
label: "Query Result Timeout",
|
|
126
|
+
description: "Grafana polls for CloudWatch Logs results every second until Done status or timeout is exceeded. Must be a valid duration string. Default is 30m.",
|
|
127
|
+
valueType: "string",
|
|
128
|
+
semanticType: "duration",
|
|
129
|
+
target: "jsonData",
|
|
130
|
+
defaultValue: "30m",
|
|
131
|
+
ui: {
|
|
132
|
+
component: "input",
|
|
133
|
+
placeholder: "30m"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
id: "jsonData.logGroups",
|
|
138
|
+
key: "logGroups",
|
|
139
|
+
label: "Default Log Groups",
|
|
140
|
+
description: "Default log groups for CloudWatch Logs queries.",
|
|
141
|
+
valueType: "array",
|
|
142
|
+
target: "jsonData",
|
|
143
|
+
item: {
|
|
144
|
+
valueType: "object",
|
|
145
|
+
fields: [
|
|
146
|
+
{
|
|
147
|
+
id: "logGroups.item.arn",
|
|
148
|
+
key: "arn",
|
|
149
|
+
label: "ARN",
|
|
150
|
+
description: "Log group ARN.",
|
|
151
|
+
valueType: "string",
|
|
152
|
+
isItemField: true,
|
|
153
|
+
required: true
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
id: "logGroups.item.name",
|
|
157
|
+
key: "name",
|
|
158
|
+
label: "Name",
|
|
159
|
+
description: "Log group name.",
|
|
160
|
+
valueType: "string",
|
|
161
|
+
isItemField: true,
|
|
162
|
+
required: true
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
id: "jsonData.defaultLogGroups",
|
|
169
|
+
key: "defaultLogGroups",
|
|
170
|
+
label: "Default Log Groups (legacy)",
|
|
171
|
+
description: "Legacy log group names. Use logGroups instead.",
|
|
172
|
+
valueType: "array",
|
|
173
|
+
target: "jsonData",
|
|
174
|
+
lifecycle: "deprecated",
|
|
175
|
+
item: {
|
|
176
|
+
valueType: "string"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
id: "jsonData.tracingDatasourceUid",
|
|
181
|
+
key: "tracingDatasourceUid",
|
|
182
|
+
label: "Application Signals Data source",
|
|
183
|
+
description: "Application Signals data source containing traces. Grafana creates links from logs containing @xrayTraceId.",
|
|
184
|
+
valueType: "string",
|
|
185
|
+
semanticType: "datasourceUid",
|
|
186
|
+
target: "jsonData"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
id: "jsonData.enableSecureSocksProxy",
|
|
190
|
+
key: "enableSecureSocksProxy",
|
|
191
|
+
label: "Secure Socks Proxy",
|
|
192
|
+
description: "Enable secure SOCKS proxy.",
|
|
193
|
+
valueType: "boolean",
|
|
194
|
+
target: "jsonData",
|
|
195
|
+
ui: {
|
|
196
|
+
component: "switch"
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
id: "jsonData.timeField",
|
|
201
|
+
key: "timeField",
|
|
202
|
+
label: "Time field",
|
|
203
|
+
description: "Field used for time-based queries.",
|
|
204
|
+
valueType: "string",
|
|
205
|
+
target: "jsonData",
|
|
206
|
+
defaultValue: "@timestamp"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
id: "jsonData.database",
|
|
210
|
+
key: "database",
|
|
211
|
+
label: "Database",
|
|
212
|
+
description: "Database name.",
|
|
213
|
+
valueType: "string",
|
|
214
|
+
target: "jsonData"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
id: "jsonData.proxyType",
|
|
218
|
+
key: "proxyType",
|
|
219
|
+
label: "Proxy type",
|
|
220
|
+
description: "HTTP proxy configuration type.",
|
|
221
|
+
valueType: "string",
|
|
222
|
+
target: "jsonData",
|
|
223
|
+
validations: [
|
|
224
|
+
{
|
|
225
|
+
type: "allowedValues",
|
|
226
|
+
values: [
|
|
227
|
+
"none",
|
|
228
|
+
"env",
|
|
229
|
+
"url"
|
|
230
|
+
]
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
ui: {
|
|
234
|
+
component: "select",
|
|
235
|
+
options: [
|
|
236
|
+
{
|
|
237
|
+
label: "None",
|
|
238
|
+
value: "none"
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
label: "Environment",
|
|
242
|
+
value: "env"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
label: "URL",
|
|
246
|
+
value: "url"
|
|
247
|
+
}
|
|
248
|
+
]
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
id: "jsonData.proxyUrl",
|
|
253
|
+
key: "proxyUrl",
|
|
254
|
+
label: "Proxy URL",
|
|
255
|
+
description: "HTTP proxy URL.",
|
|
256
|
+
valueType: "string",
|
|
257
|
+
semanticType: "url",
|
|
258
|
+
target: "jsonData",
|
|
259
|
+
dependsOn: "jsonData.proxyType == 'url'"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
id: "jsonData.proxyUsername",
|
|
263
|
+
key: "proxyUsername",
|
|
264
|
+
label: "Proxy username",
|
|
265
|
+
description: "Username for proxy authentication.",
|
|
266
|
+
valueType: "string",
|
|
267
|
+
target: "jsonData",
|
|
268
|
+
dependsOn: "jsonData.proxyType == 'url'"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
id: "secureJsonData.accessKey",
|
|
272
|
+
key: "accessKey",
|
|
273
|
+
label: "Access Key ID",
|
|
274
|
+
description: "AWS access key ID.",
|
|
275
|
+
valueType: "string",
|
|
276
|
+
semanticType: "token",
|
|
277
|
+
target: "secureJsonData",
|
|
278
|
+
dependsOn: "jsonData.authType == 'keys'"
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
id: "secureJsonData.secretKey",
|
|
282
|
+
key: "secretKey",
|
|
283
|
+
label: "Secret Access Key",
|
|
284
|
+
description: "AWS secret access key.",
|
|
285
|
+
valueType: "string",
|
|
286
|
+
semanticType: "token",
|
|
287
|
+
target: "secureJsonData",
|
|
288
|
+
dependsOn: "jsonData.authType == 'keys'"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
id: "secureJsonData.sessionToken",
|
|
292
|
+
key: "sessionToken",
|
|
293
|
+
label: "Session Token",
|
|
294
|
+
description: "AWS temporary session token (optional).",
|
|
295
|
+
valueType: "string",
|
|
296
|
+
semanticType: "token",
|
|
297
|
+
target: "secureJsonData",
|
|
298
|
+
dependsOn: "jsonData.authType == 'keys'"
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
id: "secureJsonData.proxyPassword",
|
|
302
|
+
key: "proxyPassword",
|
|
303
|
+
label: "Proxy password",
|
|
304
|
+
description: "Password for proxy authentication.",
|
|
305
|
+
valueType: "string",
|
|
306
|
+
semanticType: "password",
|
|
307
|
+
target: "secureJsonData",
|
|
308
|
+
dependsOn: "jsonData.proxyType == 'url'"
|
|
309
|
+
}
|
|
310
|
+
];
|
|
311
|
+
var groups$Z = [
|
|
312
|
+
{
|
|
313
|
+
id: "auth",
|
|
314
|
+
title: "Authentication",
|
|
315
|
+
fieldRefs: [
|
|
316
|
+
"jsonData.authType",
|
|
317
|
+
"jsonData.defaultRegion",
|
|
318
|
+
"jsonData.profile",
|
|
319
|
+
"jsonData.assumeRoleArn",
|
|
320
|
+
"jsonData.externalId",
|
|
321
|
+
"jsonData.endpoint",
|
|
322
|
+
"secureJsonData.accessKey",
|
|
323
|
+
"secureJsonData.secretKey",
|
|
324
|
+
"secureJsonData.sessionToken"
|
|
325
|
+
]
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
id: "metrics",
|
|
329
|
+
title: "CloudWatch Metrics",
|
|
330
|
+
fieldRefs: [
|
|
331
|
+
"jsonData.customMetricsNamespaces"
|
|
332
|
+
]
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
id: "logs",
|
|
336
|
+
title: "CloudWatch Logs",
|
|
337
|
+
fieldRefs: [
|
|
338
|
+
"jsonData.logsTimeout",
|
|
339
|
+
"jsonData.logGroups",
|
|
340
|
+
"jsonData.defaultLogGroups"
|
|
341
|
+
]
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
id: "tracing",
|
|
345
|
+
title: "Application Signals Trace Link",
|
|
346
|
+
fieldRefs: [
|
|
347
|
+
"jsonData.tracingDatasourceUid"
|
|
348
|
+
]
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
id: "proxy",
|
|
352
|
+
title: "Proxy",
|
|
353
|
+
fieldRefs: [
|
|
354
|
+
"jsonData.proxyType",
|
|
355
|
+
"jsonData.proxyUrl",
|
|
356
|
+
"jsonData.proxyUsername",
|
|
357
|
+
"secureJsonData.proxyPassword",
|
|
358
|
+
"jsonData.enableSecureSocksProxy"
|
|
359
|
+
]
|
|
360
|
+
}
|
|
361
|
+
];
|
|
362
|
+
var relationships$8 = [
|
|
363
|
+
{
|
|
364
|
+
type: "datasourceReference",
|
|
365
|
+
fields: [
|
|
366
|
+
"jsonData.tracingDatasourceUid"
|
|
367
|
+
],
|
|
368
|
+
description: "Application Signals data source for trace links",
|
|
369
|
+
targetPluginType: "grafana-x-ray-datasource"
|
|
370
|
+
}
|
|
371
|
+
];
|
|
372
|
+
var cloudwatchSchema = {
|
|
373
|
+
$schema: $schema$Z,
|
|
374
|
+
schemaVersion: schemaVersion$Z,
|
|
375
|
+
pluginType: pluginType$Z,
|
|
376
|
+
pluginName: pluginName$Z,
|
|
377
|
+
docURL: docURL$u,
|
|
378
|
+
fields: fields$Z,
|
|
379
|
+
groups: groups$Z,
|
|
380
|
+
relationships: relationships$8
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
export { $schema$Z as $schema, cloudwatchSchema as default, docURL$u as docURL, fields$Z as fields, groups$Z as groups, pluginName$Z as pluginName, pluginType$Z as pluginType, relationships$8 as relationships, schemaVersion$Z as schemaVersion };
|
|
384
|
+
//# sourceMappingURL=cloudwatch.schema.json.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudwatch.schema.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|