mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
* [ML] Disabling single metric viewer links for non-applicable jobs * renaming variable * renaming variable again
This commit is contained in:
parent
da0c3981c2
commit
ee478de9d6
2 changed files with 6 additions and 2 deletions
|
@ -40,9 +40,11 @@ function getLink(location, jobs) {
|
|||
|
||||
export function ResultLinks({ jobs }) {
|
||||
const tooltipJobs = (jobs.length === 1) ? jobs[0].id : `${jobs.length} jobs`;
|
||||
const singleMetricVisible = (jobs.length < 2);
|
||||
const singleMetricEnabled = (jobs.length === 1 && jobs[0].isSingleMetricViewerJob);
|
||||
return (
|
||||
<React.Fragment>
|
||||
{(jobs.length < 2) &&
|
||||
{(singleMetricVisible) &&
|
||||
<EuiToolTip
|
||||
position="bottom"
|
||||
content={`Open ${tooltipJobs} in Single Metric Viewer`}
|
||||
|
@ -52,7 +54,7 @@ export function ResultLinks({ jobs }) {
|
|||
iconType="stats"
|
||||
aria-label="View results in single metric viewer"
|
||||
className="results-button"
|
||||
|
||||
isDisabled={(singleMetricEnabled === false)}
|
||||
/>
|
||||
</EuiToolTip>
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import { datafeedsProvider } from './datafeeds';
|
|||
import { jobAuditMessagesProvider } from '../job_audit_messages';
|
||||
import { CalendarManager } from '../calendar';
|
||||
import { fillResultsWithTimeouts, isRequestTimeout } from './error_utils';
|
||||
import { isTimeSeriesViewJob } from '../../../common/util/job_utils';
|
||||
import moment from 'moment';
|
||||
import { uniq } from 'lodash';
|
||||
|
||||
|
@ -112,6 +113,7 @@ export function jobsProvider(callWithRequest) {
|
|||
datafeedState: (hasDatafeed && job.datafeed_config.state) ? job.datafeed_config.state : '',
|
||||
latestTimestampMs,
|
||||
earliestTimestampMs,
|
||||
isSingleMetricViewerJob: isTimeSeriesViewJob(job),
|
||||
nodeName: (job.node) ? job.node.name : undefined,
|
||||
};
|
||||
if (jobIds.find(j => (j === tempJob.id))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue