Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into nls/overview-rename
Browse files Browse the repository at this point in the history
  • Loading branch information
smith committed Oct 29, 2020
2 parents 963fd72 + 3af1099 commit e5cb2ee
Show file tree
Hide file tree
Showing 32 changed files with 429 additions and 116 deletions.
2 changes: 2 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ last 2 Chrome versions
last 2 Safari versions
> 0.25%
not ie 11
not op_mini all
not samsung 4

[dev]
last 1 chrome versions
Expand Down
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/v8_breaking_change.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ assignees: ''

---

<!--
****************************************
******* LABEL CHANGES NECESSARY ********
****************************************
Please add a "NeededFor:${TeamName}" label to denote the team that is
requesting the breaking change is surfaced in the Upgrade Assistant.
-->

## Change description

**Which release will ship the breaking change?**
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,21 +1,32 @@
[Unit]
Description=Kibana
Documentation=https://www.elastic.co
Wants=network-online.target
After=network-online.target

[Service]
Type=simple
User=kibana
Group=kibana
# Load env vars from /etc/default/ and /etc/sysconfig/ if they exist.
# Prefixing the path with '-' makes it try to load, but if the file doesn't
# exist, it continues onward.

Environment=KBN_HOME=/usr/share/kibana
Environment=KBN_PATH_CONF=/etc/kibana

EnvironmentFile=-/etc/default/kibana
EnvironmentFile=-/etc/sysconfig/kibana

ExecStart=/usr/share/kibana/bin/kibana

Restart=on-failure
RestartSec=3

StartLimitBurst=3
StartLimitInterval=60
WorkingDirectory=/

WorkingDirectory=/usr/share/kibana

StandardOutput=journal
StandardError=inherit

[Install]
WantedBy=multi-user.target
5 changes: 5 additions & 0 deletions vars/getCheckoutInfo.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ def call(branchOverride) {
def repoInfo = [
branch: branchOverride ?: env.ghprbSourceBranch,
targetBranch: env.ghprbTargetBranch,
targetsTrackedBranch: true
]

if (repoInfo.branch == null) {
Expand Down Expand Up @@ -35,6 +36,10 @@ def call(branchOverride) {
label: "determining merge point with '${repoInfo.targetBranch}' at origin",
returnStdout: true
).trim()

def pkgJson = readFile("package.json")
def releaseBranch = toJSON(pkgJson).branch
repoInfo.targetsTrackedBranch = releaseBranch == repoInfo.targetBranch
}

print "repoInfo: ${repoInfo}"
Expand Down
11 changes: 10 additions & 1 deletion vars/githubPr.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def getTestFailuresMessage() {
def getBuildStatusIncludingMetrics() {
def status = buildUtils.getBuildStatus()

if (status == 'SUCCESS' && !ciStats.getMetricsSuccess()) {
if (status == 'SUCCESS' && shouldCheckCiMetricSuccess() && !ciStats.getMetricsSuccess()) {
return 'FAILURE'
}

Expand Down Expand Up @@ -297,3 +297,12 @@ def getFailedSteps() {
step.displayName != 'Check out from version control'
}
}

def shouldCheckCiMetricSuccess() {
// disable ciMetrics success check when a PR is targetting a non-tracked branch
if (buildState.has('checkoutInfo') && !buildState.get('checkoutInfo').targetsTrackedBranch) {
return false
}

return true
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ interface Props {
loading: boolean;
}

function formatTitle(unit: string, value?: number) {
if (typeof value === 'undefined') return DATA_UNDEFINED_LABEL;
function formatTitle(unit: string, value?: number | null) {
if (typeof value === 'undefined' || value === null)
return DATA_UNDEFINED_LABEL;
return formatToSec(value, unit);
}

Expand Down Expand Up @@ -85,8 +86,8 @@ export function KeyUXMetrics({ data, loading }: Props) {
<EuiStat
titleSize="s"
title={
longTaskData?.noOfLongTasks
? numeral(longTaskData.noOfLongTasks).format('0,0')
longTaskData?.noOfLongTasks !== undefined
? numeral(longTaskData?.noOfLongTasks).format('0,0')
: DATA_UNDEFINED_LABEL
}
description={NO_OF_LONG_TASK}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ describe('KeyUXMetrics', () => {
lcpRanks: [69, 17, 14],
fidRanks: [83, 6, 11],
clsRanks: [90, 7, 3],
coreVitalPages: 1000,
}}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import React from 'react';
import React, { useContext } from 'react';
import {
EuiFlexGroup,
EuiFlexItem,
Expand All @@ -18,6 +18,7 @@ import { KeyUXMetrics } from './KeyUXMetrics';
import { useFetcher } from '../../../../hooks/useFetcher';
import { useUxQuery } from '../hooks/useUxQuery';
import { CoreVitals } from '../../../../../../observability/public';
import { CsmSharedContext } from '../CsmSharedContext';
import { useUrlParams } from '../../../../hooks/useUrlParams';
import { getPercentileLabel } from './translations';

Expand All @@ -43,6 +44,10 @@ export function UXMetrics() {
[uxQuery]
);

const {
sharedData: { totalPageViews },
} = useContext(CsmSharedContext);

return (
<EuiPanel>
<EuiFlexGroup justifyContent="spaceBetween" wrap>
Expand All @@ -62,7 +67,12 @@ export function UXMetrics() {
<EuiFlexGroup justifyContent="spaceBetween" wrap>
<EuiFlexItem grow={1} data-cy={`client-metrics`}>
<EuiSpacer size="s" />
<CoreVitals data={data} loading={status !== 'success'} />
<CoreVitals
data={data}
totalPageViews={totalPageViews}
loading={status !== 'success'}
displayTrafficMetric={true}
/>
</EuiFlexItem>
</EuiFlexGroup>
</EuiPanel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,11 @@ export function UserPercentile() {
{
value: '50',
text: I18LABELS.percentile50thMedian,
dropdownDisplay: I18LABELS.percentile50thMedian,
'data-test-subj': 'p50Percentile',
},
{
value: '75',
text: I18LABELS.percentile75th,
dropdownDisplay: I18LABELS.percentile75th,
'data-test-subj': 'p75Percentile',
},
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e5cb2ee

Please sign in to comment.