mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[ML] Fixing missing new ML job link in file datavisualizer (#27889)
This commit is contained in:
parent
b9b43cce9c
commit
6c47361e56
1 changed files with 24 additions and 19 deletions
|
@ -33,25 +33,7 @@ export function checkFullLicense(Private, kbnBaseUrl, kbnUrl) {
|
|||
} else {
|
||||
|
||||
// ML is enabled
|
||||
licenseHasExpired = (features.hasExpired || false);
|
||||
// If the license has expired ML app will still work for 7 days and then
|
||||
// the job management endpoints (e.g. create job, start datafeed) will be restricted.
|
||||
// Therefore we need to keep the app enabled but show an info banner to the user.
|
||||
if(licenseHasExpired) {
|
||||
const message = features.message;
|
||||
if (expiredLicenseBannerId === undefined) {
|
||||
// Only show the banner once with no way to dismiss it
|
||||
expiredLicenseBannerId = banners.add({
|
||||
component: (
|
||||
<EuiCallOut
|
||||
iconType="iInCircle"
|
||||
color="warning"
|
||||
title={message}
|
||||
/>
|
||||
),
|
||||
});
|
||||
}
|
||||
}
|
||||
setLicenseExpired(features);
|
||||
return Promise.resolve(features);
|
||||
}
|
||||
}
|
||||
|
@ -67,6 +49,7 @@ export function checkBasicLicense(Private, kbnBaseUrl) {
|
|||
} else {
|
||||
|
||||
// ML is enabled
|
||||
setLicenseExpired(features);
|
||||
return Promise.resolve(features);
|
||||
}
|
||||
}
|
||||
|
@ -89,6 +72,28 @@ export function checkLicenseExpired(Private, kbnBaseUrl, kbnUrl) {
|
|||
});
|
||||
}
|
||||
|
||||
function setLicenseExpired(features) {
|
||||
licenseHasExpired = (features.hasExpired || false);
|
||||
// If the license has expired ML app will still work for 7 days and then
|
||||
// the job management endpoints (e.g. create job, start datafeed) will be restricted.
|
||||
// Therefore we need to keep the app enabled but show an info banner to the user.
|
||||
if(licenseHasExpired) {
|
||||
const message = features.message;
|
||||
if (expiredLicenseBannerId === undefined) {
|
||||
// Only show the banner once with no way to dismiss it
|
||||
expiredLicenseBannerId = banners.add({
|
||||
component: (
|
||||
<EuiCallOut
|
||||
iconType="iInCircle"
|
||||
color="warning"
|
||||
title={message}
|
||||
/>
|
||||
),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getFeatures(Private) {
|
||||
const xpackInfo = Private(XPackInfoProvider);
|
||||
return xpackInfo.get('features.ml');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue