fix: add query parameters to options
This commit is contained in:
parent
aab77b8ebb
commit
5cfc81a9d3
|
|
@ -146,6 +146,11 @@ const NoEntityFoundWrapper = styled.div`
|
|||
export const getDatasourceInfo = (datasource: any): string => {
|
||||
const info = [];
|
||||
const headers = get(datasource, "datasourceConfiguration.headers", []);
|
||||
const queryParamters = get(
|
||||
datasource,
|
||||
"datasourceConfiguration.queryParameters",
|
||||
[],
|
||||
);
|
||||
const authType = get(
|
||||
datasource,
|
||||
"datasourceConfiguration.authentication.authenticationType",
|
||||
|
|
@ -153,6 +158,12 @@ export const getDatasourceInfo = (datasource: any): string => {
|
|||
).toUpperCase();
|
||||
if (headers.length)
|
||||
info.push(`${headers.length} HEADER${headers.length > 1 ? "S" : ""}`);
|
||||
if (queryParamters.length)
|
||||
info.push(
|
||||
`${queryParamters.length} QUERY PARAMETER${
|
||||
queryParamters.length > 1 ? "S" : ""
|
||||
}`,
|
||||
);
|
||||
if (authType.length) info.push(authType);
|
||||
return info.join(" | ");
|
||||
};
|
||||
|
|
|
|||
|
|
@ -252,6 +252,7 @@ class DatasourceRestAPIEditor extends React.Component<Props> {
|
|||
pageId: this.props.pageId,
|
||||
appId: this.props.applicationId,
|
||||
});
|
||||
|
||||
this.props.updateDatasource(normalizedValues, onSuccess);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,9 @@ export const datasourceToFormValues = (
|
|||
isValid: datasource.isValid,
|
||||
url: datasource.datasourceConfiguration.url,
|
||||
headers: cleanupProperties(datasource.datasourceConfiguration.headers),
|
||||
queryParameters: cleanupProperties(
|
||||
datasource.datasourceConfiguration.queryParameters,
|
||||
),
|
||||
isSendSessionEnabled: isSendSessionEnabled,
|
||||
sessionSignatureKey: sessionSignatureKey,
|
||||
authType: authType,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user