Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Reporting] Remove kibana version from report flyout in serverless #196670

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kowalczyk-krzysztof
Copy link
Member

@kowalczyk-krzysztof kowalczyk-krzysztof commented Oct 17, 2024

Summary

This PR removes Kibana Version from report flyout in serverless.
Fixes: #196000

Visuals

Previous New
image chrome_FNKxcur8Ju

Checklist

@kowalczyk-krzysztof kowalczyk-krzysztof added bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Feature:Reporting:Framework Reporting issues pertaining to the overall framework labels Oct 17, 2024
@kowalczyk-krzysztof kowalczyk-krzysztof requested a review from a team as a code owner October 17, 2024 11:26
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

@kowalczyk-krzysztof kowalczyk-krzysztof self-assigned this Oct 17, 2024
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/reporting-public 106 108 +2

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
reporting 61.2KB 61.2KB +64.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
reporting 53.3KB 53.4KB +187.0B
Unknown metric groups

API count

id before after diff
@kbn/reporting-public 113 115 +2

cc @kowalczyk-krzysztof

Copy link
Member

@tsullivan tsullivan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left suggestions to use the existing flag config.statefulSettings.enabled instead of adding a new flag

const { apiClient } = useInternalApiClient();
const isServerless = apiClient.getIsServerless();
Copy link
Member

@tsullivan tsullivan Oct 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The overall changes in this PR can be simplified, since there already is an indication of whether the deployment is serverless in the config.statefulSettings.enabled value, and the config object is in scope here

@@ -139,7 +141,7 @@ export const ReportInfoFlyout: FunctionComponent<Props> = ({ config, onClose, jo
{isLoading ? (
<EuiLoadingSpinner />
) : loadingError ? undefined : !!info ? (
<ReportInfoFlyoutContent info={info} />
<ReportInfoFlyoutContent info={info} isServerless={isServerless} />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Let's change this to passing the ClientConfigType object
Suggested change
<ReportInfoFlyoutContent info={info} isServerless={isServerless} />
<ReportInfoFlyoutContent info={info} config={config} />

@@ -33,14 +33,15 @@ const UNKNOWN = i18n.translate('xpack.reporting.listing.infoPanel.unknownLabel',

interface Props {
info: Job;
isServerless: boolean;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Let's have this expect the ClientConfigType object
Suggested change
isServerless: boolean;
config: ClientConfigType;

}

const createDateFormatter = (format: string, tz: string) => (date: string) => {
const m = moment.tz(date, tz);
return m.isValid() ? m.format(format) : NA;
};

export const ReportInfoFlyoutContent: FunctionComponent<Props> = ({ info }) => {
export const ReportInfoFlyoutContent: FunctionComponent<Props> = ({ info, isServerless }) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export const ReportInfoFlyoutContent: FunctionComponent<Props> = ({ info, isServerless }) => {
export const ReportInfoFlyoutContent: FunctionComponent<Props> = ({ info, config }) => {

@@ -50,6 +51,8 @@ export const ReportInfoFlyoutContent: FunctionComponent<Props> = ({ info }) => {
? moment.tz.guess()
: uiSettings.get('dateFormat:tz');

const showKibanaVersion = Boolean(info.version) && !isServerless;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Let's use the config object to determine this flag
Suggested change
const showKibanaVersion = Boolean(info.version) && !isServerless;
const showKibanaVersion = Boolean(info.version) && config.statefulSettings.enabled;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) bug Fixes for quality problems that affect the customer experience Feature:Reporting:Framework Reporting issues pertaining to the overall framework release_note:skip Skip the PR/issue when compiling release notes Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Serverless-QA] Reporting information is printing kibana version in the info panel
3 participants