[DiscoverSession] Change the display name on reporting page (#209250)

- Closes https://github.com/elastic/kibana/issues/209239

## Summary

This PR fixes the tooltip for Discover sessions on the reporting page.

<img width="693" alt="Screenshot 2025-02-03 at 11 55 53"
src="https://github.com/user-attachments/assets/cf1a952b-ff6c-4d7c-a523-d537ce51d484"
/>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Julia Rechkunova 2025-02-10 13:00:57 +01:00 committed by GitHub
parent 7b2631a21d
commit 4b76ada490
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 12 additions and 3 deletions

View file

@ -40,4 +40,4 @@
"kibanaReact"
]
}
}
}

View file

@ -26,7 +26,7 @@ import { ListingPropsInternal } from '.';
import { prettyPrintJobType } from '../../common/job_utils';
import { Poller } from '../../common/poller';
import { ReportDeleteButton, ReportInfoFlyout, ReportStatusIndicator } from './components';
import { guessAppIconTypeFromObjectType } from './utils';
import { guessAppIconTypeFromObjectType, getDisplayNameFromObjectType } from './utils';
type TableColumn = EuiBasicTableColumn<Job>;
@ -235,7 +235,7 @@ export class ReportListingTable extends Component<ListingPropsInternal, State> {
type={guessAppIconTypeFromObjectType(job.objectType)}
size="s"
data-test-subj="reportJobType"
content={job.objectType}
content={getDisplayNameFromObjectType(job.objectType)}
/>
</div>
);

View file

@ -32,6 +32,15 @@ export const guessAppIconTypeFromObjectType = (type: string): IconType => {
}
};
export const getDisplayNameFromObjectType = (type: string): string => {
switch (type) {
case 'search':
return 'discover session';
default:
return type;
}
};
export const jobHasIssues = (job: Job): boolean => {
return (
Boolean(job.getWarnings()) ||