Skip to content
This repository was archived by the owner on Sep 12, 2024. It is now read-only.

Feature/druid changes fe #983

Merged
merged 2 commits into from
Jun 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions frontend/src/components/KpiExplorerForm/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,11 @@ const KpiExplorerForm = ({ onboarding, setModal, setText }) => {
const foundIndex = option.datasource.find((item) => {
return +kpiEditData.data_source === +item.id;
});
if (foundIndex && foundIndex.value === 'Druid' && !hasDruidDropDown) {
if (
foundIndex &&
foundIndex.connection_type === 'Druid' &&
!hasDruidDropDown
) {
setHasDruidDropDown(true);
}
}
Expand Down Expand Up @@ -473,6 +477,7 @@ const KpiExplorerForm = ({ onboarding, setModal, setText }) => {
optionArr.push({
value: data.name,
id: data.id,
connection_type: data.connection_type,
label: <div className="optionlabel">{datasourceIcon(data)}</div>
});
setOption({ ...option, datasource: optionArr });
Expand All @@ -482,7 +487,7 @@ const KpiExplorerForm = ({ onboarding, setModal, setText }) => {

const formOption = (e) => {
//Add extra dropDown column for Druid
if (e.value === 'Druid' && !hasDruidDropDown) {
if (e.connection_type === 'Druid' && !hasDruidDropDown) {
setHasDruidDropDown(true);
} else {
setHasDruidDropDown(false);
Expand Down