-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ML] DF Analytics jobs list: persist pagination through refresh inter…
…val (#75996) * wip: switch analyticsList inMemoryTable to basic and implement search bar * move basicTable settings to custom hook and update types * update types * add types for empty prompt * ensure sorting works * add refresh to analytics management list * ensure table still updates editing job
- Loading branch information
1 parent
4762cf5
commit 70cea48
Showing
8 changed files
with
446 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
...ata_frame_analytics/pages/analytics_management/components/analytics_list/empty_prompt.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React, { FC } from 'react'; | ||
import { EuiButton, EuiEmptyPrompt } from '@elastic/eui'; | ||
import { i18n } from '@kbn/i18n'; | ||
|
||
interface Props { | ||
disabled: boolean; | ||
isManagementTable: boolean; | ||
onCreateFirstJobClick: () => void; | ||
} | ||
|
||
export const AnalyticsEmptyPrompt: FC<Props> = ({ | ||
disabled, | ||
isManagementTable, | ||
onCreateFirstJobClick, | ||
}) => ( | ||
<EuiEmptyPrompt | ||
iconType="createAdvancedJob" | ||
title={ | ||
<h2> | ||
{i18n.translate('xpack.ml.dataFrame.analyticsList.emptyPromptTitle', { | ||
defaultMessage: 'Create your first data frame analytics job', | ||
})} | ||
</h2> | ||
} | ||
actions={ | ||
!isManagementTable | ||
? [ | ||
<EuiButton | ||
onClick={onCreateFirstJobClick} | ||
isDisabled={disabled} | ||
color="primary" | ||
iconType="plusInCircle" | ||
fill | ||
data-test-subj="mlAnalyticsCreateFirstButton" | ||
> | ||
{i18n.translate('xpack.ml.dataFrame.analyticsList.emptyPromptButtonText', { | ||
defaultMessage: 'Create job', | ||
})} | ||
</EuiButton>, | ||
] | ||
: [] | ||
} | ||
data-test-subj="mlNoDataFrameAnalyticsFound" | ||
/> | ||
); |
Oops, something went wrong.