Skip to content

Commit

Permalink
[ML] fix action columns
Browse files Browse the repository at this point in the history
  • Loading branch information
darnautov committed Nov 12, 2019
1 parent 5307506 commit a9cac46
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ function stringMatch(str: string | undefined, substr: string) {
}

interface Props {
allowCreate?: boolean;
isManagementTable?: boolean;
isMlEnabledInSpace?: boolean;
blockRefresh?: boolean;
createAnalyticsForm?: any;
}
export const DataFrameAnalyticsList: FC<Props> = ({
allowCreate = true,
isManagementTable = false,
isMlEnabledInSpace = true,
blockRefresh = false,
createAnalyticsForm,
Expand Down Expand Up @@ -226,7 +226,7 @@ export const DataFrameAnalyticsList: FC<Props> = ({
</h2>
}
actions={
!allowCreate
!isManagementTable
? [
<EuiButtonEmpty
onClick={createAnalyticsForm.actions.openModal}
Expand All @@ -248,7 +248,7 @@ export const DataFrameAnalyticsList: FC<Props> = ({
const columns = getColumns(
expandedRowItemIds,
setExpandedRowItemIds,
allowCreate,
isManagementTable,
isMlEnabledInSpace
);

Expand Down Expand Up @@ -339,7 +339,7 @@ export const DataFrameAnalyticsList: FC<Props> = ({
<EuiFlexItem grow={false}>
<RefreshAnalyticsListButton />
</EuiFlexItem>
{allowCreate && (
{!isManagementTable && (
<EuiFlexItem grow={false}>
<CreateAnalyticsButton {...createAnalyticsForm} />
</EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ function getTabs(isMlEnabledInSpace: boolean): Tab[] {
content: (
<Fragment>
<EuiSpacer size="m" />
<DataFrameAnalyticsList allowCreate={false} isMlEnabledInSpace={isMlEnabledInSpace} />
<DataFrameAnalyticsList
isManagementTable={true}
isMlEnabledInSpace={isMlEnabledInSpace}
/>
</Fragment>
),
},
Expand Down

0 comments on commit a9cac46

Please sign in to comment.