Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into pr/david/olm-any_…
Browse files Browse the repository at this point in the history
…policy_specific_trusted_apps_should_no_longer_reference_the_policy_when_removed-767
  • Loading branch information
paul-tavares committed Aug 18, 2021
2 parents faa0e24 + 8f7e10a commit d76e230
Show file tree
Hide file tree
Showing 324 changed files with 8,010 additions and 16,867 deletions.
Binary file modified dev_docs/assets/kibana_template_no_data_config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 7 additions & 5 deletions dev_docs/tutorials/kibana_page_template.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ This is a built-in configuration that displays a very specific UI and requires v

The `noDataConfig` is of type [`NoDataPagProps`](https://github.com/elastic/kibana/blob/master/src/plugins/kibana_react/public/page_template/no_data_page/no_data_page.tsx):

1. `solution: string`: Single name for the current solution, used to auto-generate the title, logo, description, and button label *(required)*
1. `solution: string`: Single name for the current solution, used to auto-generate the title, logo, and description *(required)*
2. `docsLink: string`: Required to set the docs link for the whole solution *(required)*
3. `logo?: string`: Optionally replace the auto-generated logo
4. `pageTitle?: string`: Optionally replace the auto-generated page title (h1)
Expand All @@ -136,7 +136,7 @@ The `noDataConfig` is of type [`NoDataPagProps`](https://github.com/elastic/kiba

There are two main actions for adding data that we promote throughout Kibana, Elastic Agent and Beats. They are added to the cards that are displayed by using the keys `elasticAgent` and `beats` respectively. For consistent messaging, these two cards are pre-configured but require specific `href`s and/or `onClick` handlers for directing the user to the right location for that solution.

It also accepts a `recommended` prop as a boolean to promote one or more of the cards through visuals added to the UI. It will also place the `recommended` ones first in the list. By default, the configuration will recommend `elasticAgent`. Optionally you can also replace the `button` label by passing a string, or the whole component by passing a `ReactNode`.
It also accepts a `recommended` prop as a boolean to promote one or more of the cards through visuals added to the UI. It will also place the `recommended` ones first in the list. Optionally you can also replace the `button` label by passing a string, or the whole component by passing a `ReactNode`.


```tsx
Expand All @@ -145,18 +145,20 @@ const hasData = checkForData();

// No data configuration
const noDataConfig: KibanaPageTemplateProps['noDataConfig'] = {
solution: 'Observability',
solution: 'Analytics',
logo: 'logoKibana',
docsLink: '#',
actions: {
elasticAgent: {
beats: {
href: '#',
},
beats: {
elasticAgent: {
href: '#',
},
},
};

// Conditionally apply the configuration if there is no data
<KibanaPageTemplate
solutionNav={/* Solution navigation still show if it exists and use the right template type */}
pageHeader={/* Page header will be ignored */}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export interface EmbeddableEditorState
| --- | --- | --- |
| [embeddableId](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.embeddableid.md) | <code>string</code> | |
| [originatingApp](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.originatingapp.md) | <code>string</code> | |
| [originatingPath](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.originatingpath.md) | <code>string</code> | |
| [searchSessionId](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.searchsessionid.md) | <code>string</code> | Pass current search session id when navigating to an editor, Editors could use it continue previous search session |
| [valueInput](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.valueinput.md) | <code>EmbeddableInput</code> | |

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) &gt; [EmbeddableEditorState](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.md) &gt; [originatingPath](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.originatingpath.md)

## EmbeddableEditorState.originatingPath property

<b>Signature:</b>

```typescript
originatingPath?: string;
```
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"dependencies": {
"@elastic/apm-rum": "^5.8.0",
"@elastic/apm-rum-react": "^1.2.11",
"@elastic/charts": "33.2.2",
"@elastic/charts": "34.0.0",
"@elastic/datemath": "link:bazel-bin/packages/elastic-datemath",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@^8.0.0-canary.17",
"@elastic/ems-client": "7.15.0",
Expand Down Expand Up @@ -379,6 +379,7 @@
"redux-saga": "^1.1.3",
"redux-thunk": "^2.3.0",
"redux-thunks": "^1.0.0",
"remark-stringify": "^9.0.0",
"regenerator-runtime": "^0.13.3",
"request": "^2.88.0",
"require-in-the-middle": "^5.0.2",
Expand Down
3 changes: 3 additions & 0 deletions packages/kbn-legacy-logging/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@kbn/babel-preset/node_preset"]
}
25 changes: 19 additions & 6 deletions packages/kbn-legacy-logging/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project")
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")
load("//src/dev/bazel:index.bzl", "jsts_transpiler")

PKG_BASE_NAME = "kbn-legacy-logging"
PKG_REQUIRE_NAME = "@kbn/legacy-logging"
Expand All @@ -23,7 +24,7 @@ NPM_MODULE_EXTRA_FILES = [
"README.md"
]

SRC_DEPS = [
RUNTIME_DEPS = [
"//packages/kbn-config-schema",
"//packages/kbn-utils",
"@npm//@elastic/numeral",
Expand All @@ -37,6 +38,13 @@ SRC_DEPS = [
]

TYPES_DEPS = [
"//packages/kbn-config-schema",
"//packages/kbn-utils",
"@npm//@elastic/numeral",
"@npm//chokidar",
"@npm//query-string",
"@npm//rxjs",
"@npm//tslib",
"@npm//@types/hapi__hapi",
"@npm//@types/hapi__podium",
"@npm//@types/jest",
Expand All @@ -45,7 +53,11 @@ TYPES_DEPS = [
"@npm//@types/node",
]

DEPS = SRC_DEPS + TYPES_DEPS
jsts_transpiler(
name = "target_node",
srcs = SRCS,
build_pkg_name = package_name(),
)

ts_config(
name = "tsconfig",
Expand All @@ -57,13 +69,14 @@ ts_config(
)

ts_project(
name = "tsc",
name = "tsc_types",
args = ['--pretty'],
srcs = SRCS,
deps = DEPS,
deps = TYPES_DEPS,
declaration = True,
declaration_map = True,
out_dir = "target",
emit_declaration_only = True,
out_dir = "target_types",
source_map = True,
root_dir = "src",
tsconfig = ":tsconfig",
Expand All @@ -72,7 +85,7 @@ ts_project(
js_library(
name = PKG_BASE_NAME,
srcs = NPM_MODULE_EXTRA_FILES,
deps = DEPS + [":tsc"],
deps = RUNTIME_DEPS + [":target_node", ":tsc_types"],
package_name = PKG_REQUIRE_NAME,
visibility = ["//visibility:public"],
)
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-legacy-logging/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"version": "1.0.0",
"private": true,
"license": "SSPL-1.0 OR Elastic License 2.0",
"main": "./target/index.js",
"types": "./target/index.d.ts"
"main": "./target_node/index.js",
"types": "./target_types/index.d.ts"
}
5 changes: 3 additions & 2 deletions packages/kbn-legacy-logging/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"extends": "../../tsconfig.bazel.json",
"compilerOptions": {
"outDir": "target",
"stripInternal": false,
"declaration": true,
"declarationMap": true,
"emitDeclarationOnly": true,
"outDir": "target_types",
"rootDir": "src",
"sourceMap": true,
"sourceRoot": "../../../../packages/kbn-legacy-logging/src",
"stripInternal": false,
"types": ["jest", "node"]
},
"include": ["src/**/*"]
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 @@ -198,6 +198,8 @@ export class DocLinksService {
transportSettings: `${ELASTICSEARCH_DOCS}modules-network.html#common-network-settings`,
typesRemoval: `${ELASTICSEARCH_DOCS}removal-of-types.html`,
deprecationLogging: `${ELASTICSEARCH_DOCS}logging.html#deprecation-logging`,
setupUpgrade: `${ELASTICSEARCH_DOCS}setup-upgrade.html`,
releaseHighlights: `${ELASTICSEARCH_DOCS}release-highlights.html`,
},
siem: {
guide: `${ELASTIC_WEBSITE_URL}guide/en/security/${DOC_LINK_VERSION}/index.html`,
Expand Down
1 change: 1 addition & 0 deletions src/plugins/embeddable/public/lib/state_transfer/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const EMBEDDABLE_EDITOR_STATE_KEY = 'embeddable_editor_state';
*/
export interface EmbeddableEditorState {
originatingApp: string;
originatingPath?: string;
embeddableId?: string;
valueInput?: EmbeddableInput;

Expand Down
2 changes: 2 additions & 0 deletions src/plugins/embeddable/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,8 @@ export interface EmbeddableEditorState {
embeddableId?: string;
// (undocumented)
originatingApp: string;
// (undocumented)
originatingPath?: string;
searchSessionId?: string;
// (undocumented)
valueInput?: EmbeddableInput;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export const getSavedObjects = (): SavedObject[] => [
fieldFormatMap:
'{"hour_of_day":{"id":"number","params":{"pattern":"00"}},"AvgTicketPrice":{"id":"number","params":{"pattern":"$0,0.[00]"}}}',
runtimeFieldMap:
'{"hour_of_day":{"type":"long","script":{"source":"emit(doc[\'timestamp\'].value.hourOfDay);"}}}',
'{"hour_of_day":{"type":"long","script":{"source":"emit(doc[\'timestamp\'].value.getHour());"}}}',
},
references: [],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
} from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { CoreStart } from 'kibana/public';
import { i18n } from '@kbn/i18n';
import {
RedirectAppLinks,
useKibana,
Expand Down Expand Up @@ -73,7 +74,9 @@ export const Overview: FC<Props> = ({ newsFetchResult, solutions, features }) =>
const manageDataFeatures = getFeaturesByCategory(FeatureCatalogueCategory.ADMIN);
const devTools = findFeatureById('console');
const noDataConfig: KibanaPageTemplateProps['noDataConfig'] = {
solution: 'Analytics',
solution: i18n.translate('kibanaOverview.noDataConfig.solutionName', {
defaultMessage: `Analytics`,
}),
logo: 'logoKibana',
actions: {
beats: {
Expand Down

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

Loading

0 comments on commit d76e230

Please sign in to comment.