Skip to content

Commit

Permalink
Add support for PDC (#437)
Browse files Browse the repository at this point in the history
  • Loading branch information
iwysiu authored Oct 31, 2024
1 parent 926190a commit 6cf0ffd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
3 changes: 0 additions & 3 deletions pkg/opensearch/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -606,9 +606,6 @@ func (c *baseClientImpl) ExecutePPLQuery(ctx context.Context, r *PPLRequest) (*P
},
}
}
if err != nil {
return nil, err
}
return &pr, nil
}

Expand Down
14 changes: 9 additions & 5 deletions src/configuration/ConfigEditor.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react';
import { DataSourceHttpSettings } from '@grafana/ui';
import { DataSourceHttpSettings, SecureSocksProxySettings } from '@grafana/ui';
import { DataSourcePluginOptionsEditorProps } from '@grafana/data';
import { OpenSearchOptions } from '../types';
import { OpenSearchDetails } from './OpenSearchDetails';
Expand Down Expand Up @@ -58,14 +58,18 @@ export const ConfigEditor = (props: Props) => {
showAccessOptions={true}
onChange={onOptionsChange}
sigV4AuthToggleEnabled={config.sigV4AuthEnabled}
renderSigV4Editor={<SIGV4ConnectionConfig {...props}/>}
renderSigV4Editor={<SIGV4ConnectionConfig {...props} />}
/>

{config.secureSocksDSProxyEnabled && (
<SecureSocksProxySettings options={options} onOptionsChange={onOptionsChange} />
)}

<OpenSearchDetails value={options} onChange={onOptionsChange} saveOptions={saveOptions} datasource={datasource} />

<LogsConfig
value={options.jsonData}
onChange={newValue =>
onChange={(newValue) =>
onOptionsChange({
...options,
jsonData: newValue,
Expand All @@ -75,7 +79,7 @@ export const ConfigEditor = (props: Props) => {

<DataLinks
value={options.jsonData.dataLinks}
onChange={newValue => {
onChange={(newValue) => {
onOptionsChange({
...options,
jsonData: {
Expand All @@ -96,7 +100,7 @@ function useDatasource(props: Props) {
if (props.options.version) {
getDataSourceSrv()
.get(props.options.uid)
.then(datasource => {
.then((datasource) => {
if (datasource instanceof OpenSearchDatasource) {
setDatasource(datasource);
}
Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export interface OpenSearchOptions extends DataSourceJsonData {
pplEnabled?: boolean;
sigV4Auth?: boolean;
serverless?: boolean;
enableSecureSocksProxy?: boolean;
}

interface MetricConfiguration<T extends MetricAggregationType> {
Expand Down

0 comments on commit 6cf0ffd

Please sign in to comment.