Cloudwatch: Fix new ConfigEditor to add the custom namespace field (#83762)

This commit is contained in:
Ida Štambuk
2024-03-01 16:56:45 +01:00
committed by GitHub
parent 1c2b8576e1
commit 068e6f6b94
2 changed files with 14 additions and 1 deletions

View File

@ -216,6 +216,11 @@ describe('Render', () => {
await waitFor(async () => expect(screen.getByText('Assume Role ARN')).toBeInTheDocument());
});
it('should display namespace field', async () => {
setup();
await waitFor(async () => expect(screen.getByText('Namespaces of Custom Metrics')).toBeInTheDocument());
});
it('should show a deprecation warning if `arn` auth type is used', async () => {
setup({
jsonData: {

View File

@ -107,7 +107,15 @@ export const ConfigEditor = (props: Props) => {
})
}
externalId={externalId}
/>
>
<Field label="Namespaces of Custom Metrics">
<Input
placeholder="Namespace1,Namespace2"
value={options.jsonData.customMetricsNamespaces || ''}
onChange={onUpdateDatasourceJsonDataOption(props, 'customMetricsNamespaces')}
/>
</Field>
</ConnectionConfig>
{config.secureSocksDSProxyEnabled && (
<SecureSocksProxySettingsNewStyling options={options} onOptionsChange={onOptionsChange} />
)}