mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[ML] Data Frame Analytics: ensure page header updates with selection (#130836)
* ensure header updates with current selected id * fix multiple graphs in map view * use nullish coalescing operator instead of or
This commit is contained in:
parent
b655b48c16
commit
eedfec19cc
2 changed files with 7 additions and 6 deletions
|
@ -108,7 +108,7 @@ export const Page: FC<{
|
|||
/>
|
||||
) : null}
|
||||
{jobIdToUse !== undefined && (
|
||||
<MlPageHeader>
|
||||
<MlPageHeader key={`${jobIdToUse}-id`}>
|
||||
<FormattedMessage
|
||||
id="xpack.ml.dataframe.analyticsExploration.titleWithId"
|
||||
defaultMessage="Explore results for job ID {id}"
|
||||
|
|
|
@ -102,7 +102,7 @@ export const Page: FC = () => {
|
|||
<>
|
||||
<AnalyticsIdSelectorControls
|
||||
setIsIdSelectorFlyoutVisible={setIsIdSelectorFlyoutVisible}
|
||||
selectedId={jobId || modelId}
|
||||
selectedId={jobId ?? modelId}
|
||||
/>
|
||||
{isIdSelectorFlyoutVisible ? (
|
||||
<AnalyticsIdSelector
|
||||
|
@ -120,7 +120,7 @@ export const Page: FC = () => {
|
|||
</MlPageHeader>
|
||||
) : null}
|
||||
{jobId !== undefined ? (
|
||||
<MlPageHeader>
|
||||
<MlPageHeader key={`${jobId}-id`}>
|
||||
<FormattedMessage
|
||||
data-test-subj="mlPageDataFrameAnalyticsMapTitle"
|
||||
id="xpack.ml.dataframe.analyticsMap.analyticsIdTitle"
|
||||
|
@ -145,10 +145,11 @@ export const Page: FC = () => {
|
|||
<SavedObjectsWarning onCloseFlyout={refresh} />
|
||||
<UpgradeWarning />
|
||||
|
||||
{mapJobId || mapModelId || analyticsId ? (
|
||||
{jobId ?? modelId ? (
|
||||
<JobMap
|
||||
analyticsId={mapJobId || analyticsId?.job_id}
|
||||
modelId={mapModelId || analyticsId?.model_id}
|
||||
key={`${jobId ?? modelId}-id`}
|
||||
analyticsId={jobId}
|
||||
modelId={modelId}
|
||||
forceRefresh={isLoading}
|
||||
/>
|
||||
) : (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue