Skip to content

Commit

Permalink
Merge branch 'dev' into DVT-243
Browse files Browse the repository at this point in the history
  • Loading branch information
omerfbolat authored Apr 18, 2024
2 parents 50abba9 + 6c75faa commit 8c67ce3
Show file tree
Hide file tree
Showing 10 changed files with 907 additions and 1,599 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const DvtProfileMenuData: DvtProfileMenuDataProps[] = [
{
title: t('Security'),
menu: [
{ label: t('List Users'), link: '/users/list/' },
{ label: t('List Users'), link: '/user/list/' },
{ label: t('List Roles'), link: '/role/list/' },
{
label: t('Row Level Security'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const StyledRange = styled.div`
display: flex;
flex-direction: column;
gap: 8px;
padding: 0 10px;
`;

const StyledPopper = styled.div`
Expand Down Expand Up @@ -88,7 +89,7 @@ const StyledRangePopover = styled.div`

const StyledRangeLabel = styled.label`
font-weight: 600;
color: ${({ theme }) => theme.colors.dvt.text.label};
color: ${({ theme }) => theme.colors.grayscale.dark2};
`;

export {
Expand Down
7 changes: 7 additions & 0 deletions superset-frontend/src/components/DvtSidebar/dvtSidebarData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,13 @@ const DvtSidebarData: SidebarDataProps[] = [
label: t('LABEL COLUMN'),
active: 'linear_regression',
},
{
placeholder: t('Training Data Ratio'),
name: 'training_data_ratio',
label: t('TRAINING DATA RATIO'),
active: 'linear_regression',
status: 'range',
},
{
placeholder: t('EPSİLON'),
name: 'epsilon',
Expand Down
26 changes: 26 additions & 0 deletions superset-frontend/src/components/DvtSidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import DvtInputSelect from '../DvtInputSelect';
import DvtDargCardList from '../DvtDragCardList';
import DvtCollapse from '../DvtCollapse';
import Icon from '../Icons/Icon';
import DvtRange from '../DvtRange';
import {
StyledDvtSidebar,
StyledDvtSidebarHeader,
Expand Down Expand Up @@ -474,6 +475,7 @@ const DvtSidebar: React.FC<DvtSidebarProps> = ({ pathName, minWidth }) => {
'featureColumn',
'groupColumn',
'labelColumn',
'training_data_ratio',
],
},
{
Expand Down Expand Up @@ -891,6 +893,30 @@ const DvtSidebar: React.FC<DvtSidebarProps> = ({ pathName, minWidth }) => {
typeDesign="chartsForm"
/>
)}
{data.status === 'range' &&
data.active ===
newTrainedTableSelector.algorithm.value && (
<DvtRange
min={0}
max={1}
step={0.01}
value={
pathTitles(pathName) === 'newTrainedTable'
? newTrainedTableSelector[data.name]
: undefined
}
setValue={value => {
updateProperty(
sidebarDataFindPathname.key,
data.name,
value,
);
}}
label={data.label}
important
popoverDirection="top"
/>
)}
{data.status === 'datepicker' && (
<DvtDatePicker
isOpen
Expand Down
Loading

0 comments on commit 8c67ce3

Please sign in to comment.