Skip to content

Commit

Permalink
Merge branch 'main' into uptime-load
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 authored Dec 27, 2022
2 parents 3f2fba2 + b07f5fc commit 4ce776f
Show file tree
Hide file tree
Showing 183 changed files with 1,623 additions and 1,248 deletions.
1 change: 1 addition & 0 deletions .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -290,3 +290,4 @@ enabled:
- x-pack/performance/journeys/data_stress_test_lens.ts
- x-pack/performance/journeys/ecommerce_dashboard_saved_search_only.ts
- x-pack/performance/journeys/ecommerce_dashboard_tsvb_gauge_only.ts
- x-pack/performance/journeys/dashboard_listing_page.ts
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,7 @@ packages/kbn-server-http-tools @elastic/kibana-core
packages/kbn-server-route-repository @elastic/apm-ui
packages/kbn-shared-svg @elastic/apm-ui
packages/kbn-shared-ux-utility @elastic/kibana-global-experience
packages/kbn-slo-schema @elastic/actionable-observability
packages/kbn-some-dev-log @elastic/kibana-operations
packages/kbn-sort-package-json @elastic/kibana-operations
packages/kbn-spec-to-console @elastic/platform-deployment-management
Expand Down Expand Up @@ -1071,4 +1072,6 @@ x-pack/packages/ml/agg_utils @elastic/ml-ui
x-pack/packages/ml/aiops_components @elastic/ml-ui
x-pack/packages/ml/aiops_utils @elastic/ml-ui
x-pack/packages/ml/is_populated_object @elastic/ml-ui
x-pack/packages/ml/nested_property @elastic/ml-ui
x-pack/packages/ml/string_hash @elastic/ml-ui
x-pack/packages/ml/url_state @elastic/ml-ui
2 changes: 1 addition & 1 deletion dev_docs/tutorials/adding_performance_metrics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ from performance runs and visualize the duration of events (or their breakdowns)
Run the test locally for troubleshooting purposes by running

```
node scripts/functional_test_runner --config x-pack/test/performance/journeys/$YOUR_JOURNEY_NAME/config.ts
node scripts/functional_tests --config x-pack/performance/journeys/$YOUR_JOURNEY_NAME.ts
```

#### Analyzing journey results
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,9 @@
"@kbn/mapbox-gl": "link:packages/kbn-mapbox-gl",
"@kbn/ml-agg-utils": "link:x-pack/packages/ml/agg_utils",
"@kbn/ml-is-populated-object": "link:x-pack/packages/ml/is_populated_object",
"@kbn/ml-nested-property": "link:x-pack/packages/ml/nested_property",
"@kbn/ml-string-hash": "link:x-pack/packages/ml/string_hash",
"@kbn/ml-url-state": "link:x-pack/packages/ml/url_state",
"@kbn/monaco": "link:packages/kbn-monaco",
"@kbn/osquery-io-ts-types": "link:packages/kbn-osquery-io-ts-types",
"@kbn/plugin-discovery": "link:packages/kbn-plugin-discovery",
Expand Down Expand Up @@ -425,6 +427,7 @@
"@kbn/shared-ux-storybook": "link:packages/kbn-shared-ux-storybook",
"@kbn/shared-ux-storybook-mock": "link:packages/shared-ux/storybook/mock",
"@kbn/shared-ux-utility": "link:packages/kbn-shared-ux-utility",
"@kbn/slo-schema": "link:packages/kbn-slo-schema",
"@kbn/std": "link:packages/kbn-std",
"@kbn/timelion-grammar": "link:packages/kbn-timelion-grammar",
"@kbn/tinymath": "link:packages/kbn-tinymath",
Expand Down Expand Up @@ -688,7 +691,7 @@
"vinyl": "^2.2.0",
"whatwg-fetch": "^3.0.0",
"xml2js": "^0.4.22",
"xstate": "^4.35.0",
"xstate": "^4.35.1",
"xterm": "^5.0.0",
"yauzl": "^2.10.0",
"yazl": "^2.5.1"
Expand Down
68 changes: 37 additions & 31 deletions packages/content-management/table_list/src/table_list_view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -885,40 +885,46 @@ function TableListViewComp<T extends UserContentCommonSchema>({
{showFetchError && renderFetchError()}

{/* Table of items */}
<Table<T>
dispatch={dispatch}
items={items}
isFetchingItems={isFetchingItems}
searchQuery={searchQuery}
tableColumns={tableColumns}
hasUpdatedAtMetadata={hasUpdatedAtMetadata}
tableSort={tableSort}
pagination={pagination}
selectedIds={selectedIds}
entityName={entityName}
entityNamePlural={entityNamePlural}
tagsToTableItemMap={tagsToTableItemMap}
deleteItems={deleteItems}
tableCaption={tableListTitle}
onTableChange={onTableChange}
onTableSearchChange={onTableSearchChange}
onSortChange={onSortChange}
addOrRemoveIncludeTagFilter={addOrRemoveIncludeTagFilter}
addOrRemoveExcludeTagFilter={addOrRemoveExcludeTagFilter}
clearTagSelection={clearTagSelection}
/>

{/* Delete modal */}
{showDeleteModal && (
<ConfirmDeleteModal<T>
isDeletingItems={isDeletingItems}
<div
data-test-subj={
hasInitialFetchReturned && !isFetchingItems ? 'table-is-ready' : 'table-is-loading'
}
>
<Table<T>
dispatch={dispatch}
items={items}
isFetchingItems={isFetchingItems}
searchQuery={searchQuery}
tableColumns={tableColumns}
hasUpdatedAtMetadata={hasUpdatedAtMetadata}
tableSort={tableSort}
pagination={pagination}
selectedIds={selectedIds}
entityName={entityName}
entityNamePlural={entityNamePlural}
items={selectedItems}
onConfirm={deleteSelectedItems}
onCancel={() => dispatch({ type: 'onCancelDeleteItems' })}
tagsToTableItemMap={tagsToTableItemMap}
deleteItems={deleteItems}
tableCaption={tableListTitle}
onTableChange={onTableChange}
onTableSearchChange={onTableSearchChange}
onSortChange={onSortChange}
addOrRemoveIncludeTagFilter={addOrRemoveIncludeTagFilter}
addOrRemoveExcludeTagFilter={addOrRemoveExcludeTagFilter}
clearTagSelection={clearTagSelection}
/>
)}

{/* Delete modal */}
{showDeleteModal && (
<ConfirmDeleteModal<T>
isDeletingItems={isDeletingItems}
entityName={entityName}
entityNamePlural={entityNamePlural}
items={selectedItems}
onConfirm={deleteSelectedItems}
onCancel={() => dispatch({ type: 'onCancelDeleteItems' })}
/>
)}
</div>
</KibanaPageTemplate.Section>
</PageTemplate>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import type { IHttpFetchError } from '@kbn/core-http-browser';
/** @internal */
export class HttpFetchError extends Error implements IHttpFetchError {
public readonly name: string;
public readonly req: Request;
public readonly res?: Response;

constructor(
message: string,
Expand All @@ -23,8 +21,6 @@ export class HttpFetchError extends Error implements IHttpFetchError {
) {
super(message);
this.name = name;
this.req = request;
this.res = response;

// captureStackTrace is only available in the V8 engine, so any browser using
// a different JS engine won't have access to this method.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ export function createHttpFetchError<TResponseBody>(
name,
request,
response,
req: request,
res: response,
body,
});
}
16 changes: 0 additions & 16 deletions packages/core/http/core-http-browser/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,22 +349,6 @@ export interface IHttpFetchError<TResponseBody = unknown> extends Error {
readonly name: string;
readonly request: Request;
readonly response?: Response;
/**
* @deprecated Provided for legacy compatibility. Prefer the `request` property instead.
* @removeBy 8.8.0
*
* Note to maintainers: when looking at usages, mind that typical use could be inside a `catch` block,
* so TS and code-reference navigation might not highlight them.
*/
readonly req: Request;
/**
* @deprecated Provided for legacy compatibility. Prefer the `response` property instead.
* @removeBy 8.8.0
*
* Note to maintainers: when looking at usages, mind that typical use could be inside a `catch` block,
* so TS and code-reference navigation might not highlight them.
*/
readonly res?: Response;
readonly body?: TResponseBody;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/core/http/core-http-browser/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ import type { IHttpFetchError } from './types';

/** @public */
export function isHttpFetchError<T>(error: T | IHttpFetchError): error is IHttpFetchError {
return error instanceof Error && ('request' in error || 'req' in error) && 'name' in error;
return error instanceof Error && 'request' in error && 'name' in error;
}
4 changes: 4 additions & 0 deletions packages/kbn-slo-schema/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# @kbn/slo-schema

This shared package contains the io-ts schema definition for the observability SLO project.
As well as the REST API schema specs and some common models that can be reused between public/ and server/, as the Duration model.
11 changes: 11 additions & 0 deletions packages/kbn-slo-schema/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

export * from './src/schema';
export * from './src/rest_specs';
export * from './src/models/duration';
13 changes: 13 additions & 0 deletions packages/kbn-slo-schema/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

module.exports = {
preset: '@kbn/test',
rootDir: '../..',
roots: ['<rootDir>/packages/kbn-slo-schema'],
};
5 changes: 5 additions & 0 deletions packages/kbn-slo-schema/kibana.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "shared-common",
"id": "@kbn/slo-schema",
"owner": "@elastic/actionable-observability",
}
7 changes: 7 additions & 0 deletions packages/kbn-slo-schema/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "@kbn/slo-schema",
"description": "SLO io-ts schema definition and common models shared between public and server.",
"private": true,
"version": "1.0.0",
"license": "SSPL-1.0 OR Elastic License 2.0"
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

import { Duration, DurationUnit } from './duration';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

import { assertNever } from '@kbn/std';
Expand Down
9 changes: 9 additions & 0 deletions packages/kbn-slo-schema/src/rest_specs/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

export * from './slo';
Loading

0 comments on commit 4ce776f

Please sign in to comment.