Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

import {
DISCOVER_APP_LOCATOR,
CANVAS_APP_LOCATOR,
DASHBOARD_APP_LOCATOR,
LENS_APP_LOCATOR,
Expand Down Expand Up @@ -62,6 +63,7 @@ export const JOB_COMPLETION_NOTIFICATIONS_SESSION_KEY =

// Allowed locator types for reporting: the "reportable" analytical apps we expect to redirect to during screenshotting
export const REPORTING_REDIRECT_ALLOWED_LOCATOR_TYPES = [
DISCOVER_APP_LOCATOR,
CANVAS_APP_LOCATOR,
DASHBOARD_APP_LOCATOR,
LENS_APP_LOCATOR,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
HasTimeRange,
} from '@kbn/discover-plugin/public';
import { LicensingPluginStart } from '@kbn/licensing-plugin/public';
import { DISCOVER_APP_LOCATOR, type DiscoverAppLocatorParams } from '@kbn/discover-plugin/common';
import { type DiscoverAppLocatorParams } from '@kbn/discover-plugin/common';
import {
apiCanAccessViewMode,
apiHasType,
Expand Down Expand Up @@ -47,6 +47,7 @@ import {
import type { ReportingAPIClient } from '@kbn/reporting-public/reporting_api_client';
import { LocatorParams } from '@kbn/reporting-common/types';
import { isOfAggregateQueryType } from '@kbn/es-query';
import { DISCOVER_APP_LOCATOR } from '@kbn/deeplinks-analytics';
import { getI18nStrings } from './strings';

export interface PanelActionDependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@
"@kbn/presentation-publishing",
"@kbn/reporting-common",
"@kbn/es-query",
"@kbn/deeplinks-analytics",
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

export const DISCOVER_APP_LOCATOR = 'DISCOVER_APP_LOCATOR';

export const CANVAS_APP_LOCATOR = 'CANVAS_APP_LOCATOR';

export const DISCOVER_APP_ID = 'discover';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

export {
DISCOVER_APP_LOCATOR,
CANVAS_APP_LOCATOR,
DASHBOARD_APP_ID,
DISCOVER_APP_ID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,15 @@ export class ReportExportsTable extends Component<ListingPropsInternal, State> {
onClick: (job) => this.setState({ selectedJob: job }),
},
{
name: i18n.translate('xpack.reporting.exports.table.openInKibanaAppLabel', {
defaultMessage: 'Open Dashboard',
}),
name: (job) =>
i18n.translate('xpack.reporting.schedules.table.openDashboard.title', {
defaultMessage: 'Open in {objectType}',
values: {
objectType: job.objectType
? getDisplayNameFromObjectType(job.objectType)
: 'Kibana',
},
}),
'data-test-subj': 'reportOpenInKibanaApp',
description: i18n.translate(
'xpack.reporting.exports.table.openInKibanaAppDescription',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,17 +204,17 @@ export const ReportSchedulesTable = (props: { apiClient: ReportingAPIClient }) =
{
name: (item) =>
i18n.translate('xpack.reporting.schedules.table.openDashboard.title', {
defaultMessage: 'Open Dashboard',
}),
description: (item) =>
i18n.translate('xpack.reporting.schedules.table.openDashboard.description', {
defaultMessage: 'Open associated {objectType}',
defaultMessage: 'Open in {objectType}',
values: {
objectType: item.payload?.objectType
? getDisplayNameFromObjectType(item.payload?.objectType)
: '',
: 'Kibana',
},
}),
description: (item) =>
i18n.translate('xpack.reporting.schedules.table.openDashboard.description', {
defaultMessage: 'Open the Kibana app where this report was generated.',
}),
'data-test-subj': (item) => `reportOpenDashboard-${item.id}`,
type: 'icon',
icon: 'dashboardApp',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* 2.0.
*/

import { capitalize } from 'lodash';
import type { IconType } from '@elastic/eui';
import { JOB_STATUS } from '@kbn/reporting-common';
import { Job } from '@kbn/reporting-public';
Expand Down Expand Up @@ -47,9 +48,9 @@ export const guessAppIconTypeFromObjectType = (type: string): IconType => {
export const getDisplayNameFromObjectType = (type: string): string => {
switch (type) {
case 'search':
return 'discover session';
return 'Discover';
default:
return type;
return capitalize(type);
}
};

Expand Down