Skip to content

Commit

Permalink
Merge branch 'master' into reporting-common-types
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Oct 11, 2021
2 parents 39b0295 + 2dece3d commit b70e071
Show file tree
Hide file tree
Showing 51 changed files with 565 additions and 217 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/developer/advanced/images/sharing-saved-objects-step-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 9 additions & 6 deletions docs/developer/advanced/sharing-saved-objects.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,7 @@ export class MyPlugin implements Plugin<{}, {}, {}, PluginStartDeps> {
if (spacesApi && resolveResult.outcome === 'aliasMatch') {
// We found this object by a legacy URL alias from its old ID; redirect the user to the page with its new ID, preserving any URL hash
const newObjectId = resolveResult.alias_target_id!; // This is always defined if outcome === 'aliasMatch'
const newPath = http.basePath.prepend(
`path/to/this/page/${newObjectId}${window.location.hash}`
);
const newPath = `/this/page/${newObjectId}${window.location.hash}`; // Use the *local* path within this app (do not include the "/app/appId" prefix)
await spacesApi.ui.redirectLegacyUrl(newPath, OBJECT_NOUN);
return;
}
Expand All @@ -255,9 +253,7 @@ const getLegacyUrlConflictCallout = () => {
// callout with a warning for the user, and provide a way for them to navigate to the other object.
const currentObjectId = savedObject.id;
const otherObjectId = resolveResult.alias_target_id!; // This is always defined if outcome === 'conflict'
const otherObjectPath = http.basePath.prepend(
`path/to/this/page/${otherObjectId}${window.location.hash}`
);
const otherObjectPath = `/this/page/${otherObjectId}${window.location.hash}`; // Use the *local* path within this app (do not include the "/app/appId" prefix)
return (
<>
{spacesApi.ui.components.getLegacyUrlConflict({
Expand Down Expand Up @@ -391,6 +387,13 @@ These should be handled on a case-by-case basis at the plugin owner's discretion
* Any "secondary" objects on the page may handle the outcomes differently. If the secondary object ID is not important (for example, it just
functions as a page anchor), it may make more sense to ignore the different outcomes. If the secondary object _is_ important but it is not
directly represented in the UI, it may make more sense to throw a descriptive error when a `'conflict'` outcome is encountered.
- Embeddables should use `spacesApi.ui.components.getEmbeddableLegacyUrlConflict` to render conflict errors:
+
image::images/sharing-saved-objects-faq-multiple-deep-link-objects-1.png["Sharing Saved Objects embeddable legacy URL conflict"]
Viewing details shows the user how to disable the alias and fix the problem using the
<<spaces-api-disable-legacy-url-aliases,_disable_legacy_url_aliases API>>:
+
image::images/sharing-saved-objects-faq-multiple-deep-link-objects-2.png["Sharing Saved Objects embeddable legacy URL conflict (showing details)"]
- If the secondary object is resolved by an external service (such as the index pattern service), the service should simply make the full
outcome available to consumers.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ readonly links: {
datastreamsNamingScheme: string;
upgradeElasticAgent: string;
upgradeElasticAgent712lower: string;
learnMoreBlog: string;
}>;
readonly ecs: {
readonly guide: string;
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@
"@hapi/boom": "^9.1.4",
"@hapi/cookie": "^11.0.2",
"@hapi/h2o2": "^9.1.0",
"@hapi/hapi": "^20.2.0",
"@hapi/hoek": "^9.2.0",
"@hapi/hapi": "^20.2.1",
"@hapi/hoek": "^9.2.1",
"@hapi/inert": "^6.0.4",
"@hapi/wreck": "^17.1.0",
"@kbn/ace": "link:bazel-bin/packages/kbn-ace",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import Path from 'path';
import crypto from 'crypto';
import execa from 'execa';
import Axios from 'axios';
// @ts-expect-error not "public", but necessary to prevent Jest shimming from breaking things
import httpAdapter from 'axios/lib/adapters/http';

import { ToolingLog } from '../tooling_log';
import { parseConfig, Config } from './ci_stats_config';
Expand Down Expand Up @@ -225,6 +227,7 @@ export class CiStatsReporter {
baseURL: BASE_URL,
headers,
data: body,
adapter: httpAdapter,
});

return true;
Expand Down
6 changes: 5 additions & 1 deletion packages/kbn-pm/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8965,6 +8965,8 @@ var _execa = _interopRequireDefault(__webpack_require__(134));

var _axios = _interopRequireDefault(__webpack_require__(177));

var _http = _interopRequireDefault(__webpack_require__(199));

var _ci_stats_config = __webpack_require__(218);

/*
Expand All @@ -8974,6 +8976,7 @@ var _ci_stats_config = __webpack_require__(218);
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
// @ts-expect-error not "public", but necessary to prevent Jest shimming from breaking things
const BASE_URL = 'https://ci-stats.kibana.dev';

class CiStatsReporter {
Expand Down Expand Up @@ -9173,7 +9176,8 @@ class CiStatsReporter {
url: path,
baseURL: BASE_URL,
headers,
data: body
data: body,
adapter: _http.default
});
return true;
} catch (error) {
Expand Down
2 changes: 2 additions & 0 deletions src/core/public/doc_links/doc_links_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ export class DocLinksService {
datastreamsNamingScheme: `${FLEET_DOCS}data-streams.html#data-streams-naming-scheme`,
upgradeElasticAgent: `${FLEET_DOCS}upgrade-elastic-agent.html`,
upgradeElasticAgent712lower: `${FLEET_DOCS}upgrade-elastic-agent.html#upgrade-7.12-lower`,
learnMoreBlog: `${ELASTIC_WEBSITE_URL}blog/elastic-agent-and-fleet-make-it-easier-to-integrate-your-systems-with-elastic`,
},
ecs: {
guide: `${ELASTIC_WEBSITE_URL}guide/en/ecs/current/index.html`,
Expand Down Expand Up @@ -730,6 +731,7 @@ export interface DocLinksStart {
datastreamsNamingScheme: string;
upgradeElasticAgent: string;
upgradeElasticAgent712lower: string;
learnMoreBlog: string;
}>;
readonly ecs: {
readonly guide: string;
Expand Down
1 change: 1 addition & 0 deletions src/core/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,7 @@ export interface DocLinksStart {
datastreamsNamingScheme: string;
upgradeElasticAgent: string;
upgradeElasticAgent712lower: string;
learnMoreBlog: string;
}>;
readonly ecs: {
readonly guide: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,6 @@ export const useField = <T, FormType = FormData, I = T>(
if (resetValue) {
hasBeenReset.current = true;
const newValue = deserializeValue(updatedDefaultValue ?? defaultValue);
// updateStateIfMounted('value', newValue);
setValue(newValue);
return newValue;
}
Expand Down
15 changes: 7 additions & 8 deletions vars/tasks.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,13 @@ def functionalXpack(Map params = [:]) {
}
}

//temporarily disable apm e2e test since it's breaking due to a version upgrade.
// whenChanged([
// 'x-pack/plugins/apm/',
// ]) {
// if (githubPr.isPr()) {
// task(kibanaPipeline.functionalTestProcess('xpack-APMCypress', './test/scripts/jenkins_apm_cypress.sh'))
// }
// }
whenChanged([
'x-pack/plugins/apm/',
]) {
if (githubPr.isPr()) {
task(kibanaPipeline.functionalTestProcess('xpack-APMCypress', './test/scripts/jenkins_apm_cypress.sh'))
}
}

whenChanged([
'x-pack/plugins/uptime/',
Expand Down
Loading

0 comments on commit b70e071

Please sign in to comment.