Commit graph

161 commits

Author SHA1 Message Date
Patrick Mueller
0156d6ffc0
adds an example rule type example.pattern (#150068)
## Summary

See the included help file for more details:
[`x-pack/examples/alerting_example/server/alert_types/pattern.md`](https://github.com/pmuellr/kibana/blob/main/x-pack/examples/alerting_example/server/alert_types/pattern.md).

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-02-07 10:33:12 -05:00
Xavier Mouligneau
585d3f0528
[RAM] Add integrated snooze component for security solution (#149752)
## Summary

We wanted to avoid duplication of code so we created a more integrated
component with API to snooze rule. we also added the information about
snooze in the task runner so security folks can manage their legacy
actions in the execution rule, it will looks like that
```ts
import { isRuleSnoozed } from '@kbn/alerting-plugin/server';

if (actions.length && !isRuleSnoozed(options.rule)) {
...
}
```

One way to integrated this new component in a EuiBasictable:
```
{
  id: 'ruleSnoozeNotify',
  name: (
    <EuiToolTip
      data-test-subj="rulesTableCell-notifyTooltip"
      content={i18n.COLUMN_NOTIFY_TOOLTIP}
    >
      <span>
        {i18n.COLUMN_NOTIFY}
        &nbsp;
        <EuiIcon size="s" color="subdued" type="questionInCircle" className="eui-alignTop" />
      </span>
    </EuiToolTip>
  ),
  width: '14%',
  'data-test-subj': 'rulesTableCell-rulesListNotify',
  render: (rule: Rule) => {
    return triggersActionsUi.getRulesListNotifyBadge({
      rule: {
        id: rule.id,
        muteAll: rule.mute_all ?? false,
        activeSnoozes: rule.active_snoozes,
        isSnoozedUntil: rule.is_snoozed_until ? new Date(rule.is_snoozed_until) : null,
        snoozeSchedule: rule?.snooze_schedule ?? [],
        isEditable: hasCRUDPermissions,
      },
      isLoading: loadingRuleIds.includes(rule.id) || isLoading,
      onRuleChanged: reFetchRules,
    });
  },
}
```

I think Security solution folks might want/need to create a new io-ts
schema for `snooze_schedule` something like that should work:
```ts
import { IsoDateString } from '@kbn/securitysolution-io-ts-types';
import * as t from 'io-ts';

const RRuleRecord = t.intersection([
  t.type({
    dtstart: IsoDateString,
    tzid: t.string,
  }),
  t.partial({
    freq: t.union([
      t.literal(0),
      t.literal(1),
      t.literal(2),
      t.literal(3),
      t.literal(4),
      t.literal(5),
      t.literal(6),
    ]),
    until: t.string,
    count: t.number,
    interval: t.number,
    wkst: t.union([
      t.literal('MO'),
      t.literal('TU'),
      t.literal('WE'),
      t.literal('TH'),
      t.literal('FR'),
      t.literal('SA'),
      t.literal('SU'),
    ]),
    byweekday: t.array(t.union([t.string, t.number])),
    bymonth: t.array(t.number),
    bysetpos: t.array(t.number),
    bymonthday: t.array(t.number),
    byyearday: t.array(t.number),
    byweekno: t.array(t.number),
    byhour: t.array(t.number),
    byminute: t.array(t.number),
    bysecond: t.array(t.number),
  }),
]);

export const RuleSnoozeSchedule = t.intersection([
  t.type({
    duration: t.number,
    rRule: RRuleRecord,
  }),
  t.partial({
    id: t.string,
    skipRecurrences: t.array(t.string),
  }),
]);
```


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-02-07 08:17:18 -05:00
Jiawei Wu
7608dfb023
[RAM][Flapping] Make rules settings link with flapping settings shareable (#149564)
## Summary
Resolves: https://github.com/elastic/kibana/issues/148760

Makes the rules setting link that opens up the flapping settings modal
shareable from the `triggers_action_ui` plugin (`getRulesSettingsLink`).

Also adds storybook entires for this component (`rulesSettingsLink`). 

To view locally, run `yarn storybook triggers_actions_ui`

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Xavier Mouligneau <xavier.mouligneau@elastic.co>
2023-01-30 13:59:19 -08:00
Andrew Tate
2ed0123c4a
[Lens] introduce unified user messages system (#147818) 2023-01-23 15:06:31 -06:00
Tiago Costa
e38350f7f9
chore(NA): upgrades uuid to v9.0.0 (#149135)
This PR upgrades uuid into its latest version `9.0.0`.
The previous default used version `v4` was kept where it was previously
used and places using `v1` or `v5` are still using it.

In this latest version they removed the deep import feature and as we
are not using tree shaking it increased our bundles by a significant
size. As such, I've moved this dependency into the `ui-shared-deps-npm`
bundle.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-01-19 19:48:07 +00:00
Mike Côté
a1923c5f6a
Make rule executors return state as an object property (#147891)
In this PR, I'm changing the return type of rule executors from `return
state;` to `return { state };`.

This change had to touch all rule type executors so they return `state`
as a key. In the future, the framework could accept more than `state` in
the object, like warnings as an example.

**Before:**
```
executor: async (...) {
  const state = {...};
  return state;
}
```

**After:**
```
executor: async (...) {
  const state = {...};
  return { state };
}
```

**Future:**
```
executor: async (...) {
  return {
    state: {...},
    warnings: [...],
    metrics: {...},
    ...
  };
}
```

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-01-12 08:27:11 -07:00
Vadim Kibana
039ed991d8
Remove UiComponent and related code (#148037)
## Summary

- Removes `UiComponent` and its usages.
- Fixes UI Actions TypeScript types.


### Checklist

Delete any items that are not applicable to this PR.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Anton Dosov <dosantappdev@gmail.com>
Co-authored-by: Dima Arnautov <arnautov.dima@gmail.com>
2023-01-09 15:34:33 -07:00
Spencer
afb09ccf8a
Transpile packages on demand, validate all TS projects (#146212)
## Dearest Reviewers 👋 

I've been working on this branch with @mistic and @tylersmalley and
we're really confident in these changes. Additionally, this changes code
in nearly every package in the repo so we don't plan to wait for reviews
to get in before merging this. If you'd like to have a concern
addressed, please feel free to leave a review, but assuming that nobody
raises a blocker in the next 24 hours we plan to merge this EOD pacific
tomorrow, 12/22.

We'll be paying close attention to any issues this causes after merging
and work on getting those fixed ASAP. 🚀

---

The operations team is not confident that we'll have the time to achieve
what we originally set out to accomplish by moving to Bazel with the
time and resources we have available. We have also bought ourselves some
headroom with improvements to babel-register, optimizer caching, and
typescript project structure.

In order to make sure we deliver packages as quickly as possible (many
teams really want them), with a usable and familiar developer
experience, this PR removes Bazel for building packages in favor of
using the same JIT transpilation we use for plugins.

Additionally, packages now use `kbn_references` (again, just copying the
dx from plugins to packages).

Because of the complex relationships between packages/plugins and in
order to prepare ourselves for automatic dependency detection tools we
plan to use in the future, this PR also introduces a "TS Project Linter"
which will validate that every tsconfig.json file meets a few
requirements:

1. the chain of base config files extended by each config includes
`tsconfig.base.json` and not `tsconfig.json`
1. the `include` config is used, and not `files`
2. the `exclude` config includes `target/**/*`
3. the `outDir` compiler option is specified as `target/types`
1. none of these compiler options are specified: `declaration`,
`declarationMap`, `emitDeclarationOnly`, `skipLibCheck`, `target`,
`paths`

4. all references to other packages/plugins use their pkg id, ie:
	
	```js
    // valid
    {
      "kbn_references": ["@kbn/core"]
    }
    // not valid
    {
      "kbn_references": [{ "path": "../../../src/core/tsconfig.json" }]
    }
    ```

5. only packages/plugins which are imported somewhere in the ts code are
listed in `kbn_references`

This linter is not only validating all of the tsconfig.json files, but
it also will fix these config files to deal with just about any
violation that can be produced. Just run `node scripts/ts_project_linter
--fix` locally to apply these fixes, or let CI take care of
automatically fixing things and pushing the changes to your PR.

> **Example:** [`64e93e5`
(#146212)](64e93e5806)
When I merged main into my PR it included a change which removed the
`@kbn/core-injected-metadata-browser` package. After resolving the
conflicts I missed a few tsconfig files which included references to the
now removed package. The TS Project Linter identified that these
references were removed from the code and pushed a change to the PR to
remove them from the tsconfig.json files.

## No bazel? Does that mean no packages??
Nope! We're still doing packages but we're pretty sure now that we won't
be using Bazel to accomplish the 'distributed caching' and 'change-based
tasks' portions of the packages project.

This PR actually makes packages much easier to work with and will be
followed up with the bundling benefits described by the original
packages RFC. Then we'll work on documentation and advocacy for using
packages for any and all new code.

We're pretty confident that implementing distributed caching and
change-based tasks will be necessary in the future, but because of
recent improvements in the repo we think we can live without them for
**at least** a year.

## Wait, there are still BUILD.bazel files in the repo
Yes, there are still three webpack bundles which are built by Bazel: the
`@kbn/ui-shared-deps-npm` DLL, `@kbn/ui-shared-deps-src` externals, and
the `@kbn/monaco` workers. These three webpack bundles are still created
during bootstrap and remotely cached using bazel. The next phase of this
project is to figure out how to get the package bundling features
described in the RFC with the current optimizer, and we expect these
bundles to go away then. Until then any package that is used in those
three bundles still needs to have a BUILD.bazel file so that they can be
referenced by the remaining webpack builds.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-12-22 19:00:29 -06:00
Andrew Tate
e2d3bb9dec
[Lens] Multi metric partition charts (#143966) 2022-11-14 16:49:39 -07:00
Joe Reuter
15c12bdd39
Rename all vis-editors and datavis to visualizations (#144589)
* rename all the vis-editors

* rename datavis to visualizations
2022-11-05 19:16:20 -04:00
Sean Sullivan
ed97fa3e9d
Add legends to custom map layers and convert wms_source to typescript (#143321)
* Add legends to custom map layers and convert wms_source to typescript

Co-authored-by: Sean Sullivan <ssullivan@spectric.com>
Co-authored-by: Nick Peihl <nickpeihl@gmail.com>
2022-11-01 13:18:16 -07:00
Jean-Louis Leysens
1ed2ec8e57
[Files] move to src (#144044) 2022-10-31 06:46:52 -07:00
spalger
52f2b33a07
[auto] migrate existing plugin/package configs 2022-10-28 14:06:46 -05:00
spalger
e5d186a6f0
[ts] stop building @types packages in bootstrap 2022-10-28 14:03:55 -05:00
Jean-Louis Leysens
f59c6da04d
[Files] Add file upload to file picker (#143969)
* memoize is selected observable

* added on upload start and upload end cbs

* listen for uploading state, also i18n for search field

* added uploading state

* updated the files example plugin

* rework the footer to include the compressed upload component

* prevent change page when uploading

* revert change to search field

* added pass through the on upload callback so that consumers can respond to upload events

* updated i18n

* export DoneNotification type from upload files state

* added test for uploading state

* added common page and page size schemas

* make sure the file$ does not collapse on error

* hide pagination if there are no files

* added a small test to check that pagination is hidden when there are no files

* do not error in send request method
2022-10-27 22:55:00 +02:00
Kurt
bbbf9f8985
Adding content type (#143800)
Co-authored-by: Larry Gregory <larry.gregory@elastic.co>
2022-10-27 08:52:35 -04:00
Jean-Louis Leysens
37454b7b9f
[Files] Fix image intersection observer behavior (#143843)
* react with loading spinner to new page or retry requests

* do not fetch on every change? in files example app

* remove lazy from the file picker image

* absolute position the image tag to ensure that it is visible, this ensures the intersection observer will fire

* remove the "lazy" prop from the image component

* remove unnecessary if

* added comment and increase page size of file picker in files example plugin

* make the empty "hidden" image occupy the full container space
2022-10-25 14:15:13 +02:00
Jean-Louis Leysens
a42f1826ff
[Files] Filepicker (#143111)
* added unscoped file client to the files components context

* wip: created some basic files and stories for new filepicker component

* fix some types after require filesclient to be passed in

* added file picker state and some basic tests

* added file picker context

* added missing file client value

* updated file picker stories

* expanded files context;

* remove the size observable and also added a test for file removal and adding of duplicates

* added error content component

* refactor upload component to not take files client as prop

* updated shared file compoennts context value

* added test for adding multiple files at once

* allow passing in string or array of strings

* added some i18n texts

* move the creation of a file kinds registry to a common location

* set file kinds only once

* a bunch of stuff: added title component, using grid, removed responsive on upload controls

* refactor layour components to own component using grid, added new i18n texts for empty state prompt

* minor copy tweak

* added basic story with some files

* added file grid and refactored picker to only exist in modal for now

* get the css grid algo that we want: auto-fill not auto-fit!

* override styling for content area of file

* split stories of files

* delete commented out code

* give the modal a fixed width

* fix upload file state, where we do not want a fixed width modal

* moved styles down to card, and combined margin removal rules

* optimize for filtering files, first pass just filter on names

* include xxl

* moved debounceTime to rxjs land, added test for filtering behaviour

* added story with more images

* big ol wip

* empty prompt when uploading a file

* added pagination

* fixed tests and added some comments

* address lint

* moved copy to i18n and updated size and color of empty error prompt

* remove use of css`

* remove non existant prop

* also reload files

* fileUpload -> files

* update logic for watching if selected

* disambiguate i18n ids

* use abort signal and call sendRequest from file$, filtering done server side now, update tests

* fix a few off by one errors and hook up the new system to the ui

* added test for in flight requests behaviour

* update the files example app

* fix minor card layout styling to make all cards the same size regardless of text or image conten

* added new file picker component

* make file cards a bit wider and text a bit smaller so that it wraps...

* fix issue of throwing abort error and prematurely setting request to completed...

* remove unused import

* replace filter i18n

* a bunch of cool changes

* added export for the file picker component

* updated example app to use multiple file upload

* added some comments and made images load eagerly in file picker for now...

* complete ux for examples

* only files that are "READY" should be in the file picker

* set loading to false if error

* install data-test-subj everywhere!

* added some react component tests

* remove unused import

* fix storybook case

* fix up where the files example plugin is listed, moved it to the developer examples area

* fix potential flashing of loader by debouncing

* do not create new observable on every render

* i18n

* have only filepicker ctx used in filepicker components

* refactor loadImageEagerly -> lazy

* useObservable instead of useEffect

* factor modal footer to own component and remove css util

* use the middle dot luke

* copy update in files example app

* added filter story

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-10-24 11:00:42 +02:00
Stratoula Kalafateli
8c4976f25d
[Lens] Rename datasources (#142553)
* Rename to textBased instead of textBasedLanguages

* [Lens] Rename datasources to textBased and formBased

* Fix css

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* Move datasources under a common foler

* Fix types

* Revert css classes

* Add migration script

* Fix lens embeddable functional tests

* Fix types

* Fixes cases test

* Adds migration script test

* Revert

* Update jest integration test

* Fix security solution tests

* Fix jest test

* Address type nit

* Fix types

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-10-12 11:25:24 +03:00
Jean-Louis Leysens
dbbf3ad42b
[Files] Use blurhash for images (#142493)
* added blurhash dep

* send blurhash from client

* added blurhash to server side

* added blurhash to headers

* added hash to files headers part ii

* move custom header name to shared

* added server side test to make sure blurhash is being stored with the file

* move blurhash logic to common components logic

* wip: moving a lot of stuff around and breaking up image component to parts

* added logic for loading blurhash client-side using header values

* reorder some stuff, added http to files context for example

* added resize files test

* tweak sizes of the blurs

* removed custom blurhash header

* renamed util to blurhash

* fixed some loading states to not show alt text, updated stories to show blurhash and removed styling on container

* remove http from filescontext

* pass blurhash to image component

* improved usability of the component by passing in wrapper props and allowing consumers to set an image size the same way they can for EuiImage

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* removed all traces of blurhash field from file saved object

* create special file image metadata type

* rename blurhash files and return full image metadata

* refactor blurhash in upload state to image metadata factory

* finish refactor of blurhash file

* pass back the original image size to the metadata

* more refactoring and added some comments to the metadata type

* pass metadata type through to endpoint

* pass metadata type through on client side

* wip

* updated files example to pass through shape of metadata

* some final touches

* updated comment

* make default size original

* rename common -> util

* update import path after refactor

* update style overrides for the blurhash story

* MyImage -> Img

* fix type lints

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-10-06 15:57:22 +02:00
Nick Peihl
fc8407d222
Fix custom raster developer example (#142664) 2022-10-04 14:18:58 -07:00
Jean-Louis Leysens
50df4630f5
[Files] Use upload component in files example (#141362)
* added modal and removed hardcoded image upload

* remove unused var

* added shared imports file and hooked up modal component to example app

* use the Image component from files and update the title for the files modal

* set and show custom metadata

* fix content type not being passed through to upload or to picker component

* remove old commented out code
2022-09-22 04:34:07 -07:00
Julian Gernun
0f7cfd16f7
137988 browser fields UI (#140516)
* first commit

* first commit

* get auth index and try field caps

* use esClient

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* wait for promise to finish

* logs for debugging

* format field capabilities

* add simplier browserFields mapper

* update response and remove width

* update response

* refactor

* types and refactor

* update api response

* fix column ids

* add columns toggle and reset

* sort visible columns id on toggle on

* merging info

* call api

* load info on browser field loaded

* remove logs

* add useColumns hook

* remove browser fields dependency

* update fn name

* update types

* update imported type package

* update mock object

* error message for no o11y alert indices

* add endpoint integration test

* activate commented tests

* add unit test

* comment uncommented tests

* fix tests

* review by Xavier

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* remove unnecessary api calls

* update types

* update param names + right type

* update types

* update id and index to be same type as rest

* update timelines id and index format

* add schema update on load

* add functional test

* fix tests

* reactivate skipped test

* update row action types to work with new api

* rollback basic fields as array update o11y render cell fn

* update cell render fn to handle strings too

* update column recovery on update

* recover previous deleted column stats

* add browser fields error handling

* add toast on error and avoid calling field api when in siem

* remove spread operator

* add toast mock

* update render cell cb when value is an object

* remove not needed prop

* fix browser field types

* fix reset fields action

* add missing hook dependency

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* fix browser field modal types

* update browser field types

* update render cell

* update export type

* fix default columns

* remove description column in browser field modal

* fix populate default fields on reset

* delete description field in triggers_actions_ui

* avoid to refetch the data because all the data is already there

* remove description tests

* insert new column in first pos + minor fixes

* update onToggleColumn callback to avoid innecesary calls

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Xavier Mouligneau <xavier.mouligneau@elastic.co>
2022-09-20 16:31:25 +02:00
Constance
98f73d674a
Upgrade EUI to v63.0.6 - updates to new EuiPageTemplate and deprecates old page components (#139524)
* Update all usages of EuiPageTemplate to EuiPageTemplate_Deprecated

* EuiPageContent_Deprecated as EuiPageContent

* EuiPageContentBody_Deprecated as EuiPageContentBody

* EuiPageContentHeader_Deprecated as EuiPageContentHeader

* EuiPageContentHeaderSection_Deprecated as EuiPageContentHeaderSection

* EuiPageSideBar_Deprecated as EuiPageSideBar

* EuiPageContent__Deprecated to EuiPageContent_Deprecated

* Fix rogue semi-colons

* WIP: NoDataConfigPage & NoDataPage converted to new template

- `withSolutionNav` not yet handled

* WIP: KibanaPageTemplateInner converted to use new template

- Pushes existing `pageHeader` prompts onto created EuiPageTemplate.PageHeader
- Uses `isEmptyState` to push `pageHeader` props to EuiPageTemplate.EmptyPrompt instead (if `children` are not supplied)

* WIP: `withSolutionNav` now renders the sidebar content properly

- Collapsing isn’t working (minWidth isn’t updating)

* Fixing stickiness of sidebar

* [Security] Fixed SecuritySolutionTemplateWrapper’s usage

- Moved `bottomBar` to EuiPageTemplate.BottomBar (now contained in just the page contents)
- Change EuiPanel children wrapper with EuiPageTemplate.Section

* [O11y] Wrap `children` with EuiPageTemplate.Section

* Fix getting_started usage

* WIP: Fixing types

* Removing `template` pass through

* Set EUI to 63.0.0

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* More import fixes

* Sidebar component update

* Expand `KibanaPageTemplate` to all namespaced EUI counterparts

- Updated `docs/tutorials` mdx page
- Fixed SolutionNav prop types

* Updated the tutorial mdx page

* [Stack Management] Updated app layout to new template

- Some temporary props applied for BWC until all other pages can be converted
- Converted `API Keys` page’s layout (and especially prompt usags) to new paradigm

* Fix circular dep

* Fix new circular dependency

- copying and pasting types from KibanaPageTemplateProps, but ah well

* [Security Solution] Remove `template` prop - no longer a prop on Kibana/EuiPageTemplate

* [O11y] Allow customizing EuiPageTemplate.Section wrapper

- converts pageBodyProps
- fixes non-centered loading template

* [Enterprise Search] Update page templates

- fix layouts by auto-wrapping an EuiPageSection for padding, while adding a `customPageSections` prop for more custom sections/layouts

- re-center 404 errors

- update tests

* Update KibanaPageTemplate tests

* Update snapshots

* Fix FTR test with removed EUI classNames

* Fix FTR tests with changed kbn classNames

* Update failing dashboard snapshots

- drop shadow changed slightly in EUI

* Fix failing Security Cypress test

* [O11y] Fix Inventory page using deprecated CSS hooks

* [O11y][Uptime] Fix missing bottom bars

- Modifies ObservabilityPageTemplate to accept a `bottomBar` prop (a la the old EuiPageTemplate behavior)

NOTE: This opinionated page layout structure is starting to feel like it could be potentially limiting / have all the same pitfalls the previous EuiPageTemplate did. If so, consider something closer to the Enterprise Search page template conversion (`customPageSections`).

- Misc cleanup: Use `KibanaPageTemplate` over `EuiPageTemplate`

* [O11y] Fix route template typing

- Since theObservabilityPageTemplate is using the new Eui/KibanaPageTemplate, its child templates and types need to be updated accordingly

* Fix broken minWidth behavior

- was an EUI issue that required a patch release
+ update snapshots

* [Security Solution] Type fixes, restore empty state

- Fix empty state logic removed in a previous commit
- bogarts KibanaPageTemplate's `isEmptyState` prop instead of using `template="noData"`

- extend template wrappers to past ...rest to underlying Kibana/EuiPageTemplate

+ replace EuiPageTemplate with KibanaPageTemplate for consistency

* Fix failing synthetics selector

* Grab EUI v63.0.6

- for deprecation tags and section tag support

* Fix Kibana Overview plugin layout

- needs to use KibanaPageTemplate.Section to get padding back

- use `bottomBorder` prop over horizontal rules

- restore previous page color via panelled=false

* Convert Home plugin to new KibanaPageTemplate

- use KibanaPageTemplate.Section instead to preserve page width/paddings

- use `bottomBorder` instead of `EuiHorizontalRule`

- NOTE: This causes margins to decrease slightly from xxl to xl (largest padding available for EuiPageSection) - this can be restored by CSS overrides if desired

- update CSS to preserve previous looks, + convert to logical properties

* [O11y] Fix non-centered empty/loading states

* [O11y] Restore subdued background on various empty state prompts

* [O11y] Fix all instances of views that require a scrollable full-height child

+ restore comment for inventory view

* [O11y][ux] Fix broken sidebar

- The entire app was missing a wrapping EuiProvider, and as such breakpoint utils were not working, and the sidebar was missing

+ misc cleanup
  - remove unnecessary fragment
  - remove role="main" attr - now that EuiPageTemplate sets a `main` tag, they'll conflict
  - add isEmptyState to center loading component

* [APM Cypress tests] harden flaky test

* [APM Cypress tests] Fix failing Cypress test, again

Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-09-07 15:35:23 -05:00
Alexey Antonov
6ed79f42db
[Lens] Introduce separate dimension groups for mosaic rows and columns (#139214)
* [Lens] Introduce separate dimension groups for mosaic rows and columns

* swap labels

* fix nits

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
2022-09-07 22:55:12 +03:00
Jean-Louis Leysens
b8a2068c58
[Files] Distinct FilesClient and ScopedFilesClient (#139718)
* FilesClient -> ScopedFilesClient

* added unscoped, global files client

* slight update to types

* also export the FilesClient type

* update JSDocs

* refactor
2022-09-07 10:56:54 +02:00
Joe Reuter
43e7050865
improve "debug in sandbox" functionality (#139724) 2022-08-31 10:27:17 +02:00
Pierre Gayvallet
383d8fab58
Move client-side application service to packages (#139502)
* deletes unused utils file

* just some fix while I see it

* creating empty packages

* moving all the things

* package build success

* start fixing usages

* fix the scoped history type issue

* export internal utils

* add default for mock

* fix test import

* fix external import

* start fixing external usages

* more usages

* more usages

* more usages

* More usages

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* fix integration test imports

* fix more test types

* remove public/utils from the core bundle

* trying to import from the package

* updating README's

* remove unused test types from mock package

* cleanup test types

* use import type

* add author to packages

* more import type

* remove dead path from some config

* remove src/core/utils/index.ts (and pray)

* update tsdoc

* fix new file usage

* fix paths

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-08-30 10:08:44 -07:00
Jean-Louis Leysens
a066ef4887
Update README.md (#139277) 2022-08-24 14:47:41 +02:00
Jean-Louis Leysens
ac0688b90f
[Files] Create files example plugin (#139019)
* created files example stub

* implementing whimsical design

* added base64d image

* updated files client and example plugin to work end-to-end with browser

* added file deletion funcitonality

* added codeowners entry

* refactor downloadSrc to getDownloadHref

* react-query -> @tanstack/react-query

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-08-23 10:38:22 +02:00
Joe Reuter
e9dd7efa8e
[Lens] Add section for how to handle refresh using search sessions (#138396)
* update readme

* use refresh in example
2022-08-12 20:57:06 +02:00
Julian Gernun
762962dcf8
[RAM] Alerts table functional tests (#137857)
* first commit

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* add triggersActionsUi as service

* use same configurationId

* add triggers action ui page object

* load infra alerts

* rollback triggers actions ui page and working test

* restore removed tests

* remove not needed fragment

* refactor test to use examples plugin

* remove import from moved resource

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-08-08 10:25:22 -07:00
Spencer
bebec37f04
[eslint] fix and skip violations for cross-boundary imports (#136911) 2022-07-29 13:57:55 -05:00
Nick Peihl
69dc7e2b77
[Maps] Custom raster source example plugin (#136761) 2022-07-26 14:41:45 -07:00
Jiawei Wu
cd3d2d79c7
[RAM] Stack management/o11y rule details parity (#136778)
* stack management/o11y rule details parity

* Hide edit button in stack management

* Add tests

* Move fetching summary out of o11y

* Undo changes to hooks in o11y

* Fix test and add new tests

* Remove customLoadExecutionLog prop

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-07-26 13:14:05 +02:00
Jiawei Wu
09872f071c
[RAM] Refactor: move shareable component sandbox to its own plugin (#134611)
* Move shareable component sandbox to its own plugin

* Add newline and fix test

* disable lint for no-default-export on example tests

* Fix lint

* Address feedback

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-07-19 09:30:11 -07:00
Joe Reuter
b5583eb5ec
[Lens] Fix rotating number example (#134234)
* fix rotating number example

* fix nav

* add label
2022-06-13 18:41:46 +02:00
Vadim Kibana
1b2c58f58e
ui_actions_enchanced to /src (#133512)
* move ui_actions_enhanced to /src

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* [CI] Auto-commit changed files from 'node scripts/build_plugin_list_docs'

* move translations to /src

* fix typescript errors

* update config files

* update ts configs

* fix config path

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-06-07 18:33:21 +02:00
Tim Sullivan
53688bf336
[Screenshotting] fix server crash with non-numeric width or height (#132384)
* throw error early if invalid layout

* add layout id test

* add new error type

* add error type to usage tracking

* fix tweak

* add comment note

* fix telemetry check

* fix ts

* fix moot change

* fix ts

* Update x-pack/plugins/screenshotting/server/layouts/create_layout.ts

Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>

* fix ts

* fix snapshots

* fix bundling issue in canvas

* convert LayoutTypes to a string literal union

* cleanup

* remove screenshotting from reporting plugin example required bundles

* export as type

* fix ts

* fix more ts

Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>
2022-06-03 09:34:54 -07:00
Matthew Kime
3de12352b8
[data views] IIndexPattern / IndexPattern => DataView (#133086)
* no more index pattern objects, only data view

* add tsconfig entry to vis default editor
2022-06-01 13:53:25 -05:00
spalger
3730dd0779 fix all violations 2022-04-16 01:37:30 -05:00
Michael Dokolin
3627b866a3
[Screenshotting] Documentation (#129794)
* Provide defaults for the screenshotting options to make usage closer to the zero-conf
* Add screenshotting example integration
* Add integration tests to cover screenshotting example
* Add screenshotting plugin readme
* Add tutorial to the developer guide
2022-04-15 08:29:05 +02:00
Michael Dokolin
2736f9ec45
[Screenshotting] Add possibility to capture expressions (#128552)
* Fix the react expression renderer to avoid unnecessary rerendering
* Add screenshotting app for expressions rendering
* Refactor screenshotting to move formatting logic inside screenshots service
* Extend screenshotting plugin to support capturing expressions
2022-04-07 12:00:26 +02:00
Nodir Latipov
3e2761d981
[Unified search] Create unified search plugin (#127651)
* [Unified search] Create unified search plugin

* add unified_search into USES_STYLED_COMPONENTS

* fix JEST group 4

* update limits for data plugin

* fix: remove unifiedSearch plugin from x-pack/plugins/file_upload

* feat: updated .github/CODEOWNERS and set @elastic/kibana-app-services as a code owner

* apply PR comments

* [CI] Auto-commit changed files from 'node scripts/build_plugin_list_docs'

* feat: moved filter bar, apply filters folders and apply filter action from Data plugin to unified search plugin

* fix Checks

* fix Checks

* fix Linting and Default CI Group #16

* fix Checks

* fix Checks

* fix Linting (with types)

* fix show FILTER_BAR

* fix Jest Tests

* feat replece indexPatternsContranct in setIndexPatterns to DataViewsContract

* feat: removed unnecessary interface in unified search

* fix Checks

* fix Checks

* fix Jest Tests, Checks

* fix Checks

* resolve comments

Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-04-05 12:23:31 +05:00
Spencer
2ad2a4c271
[eslint] ensure that all imports are resolvable (#129002) 2022-04-04 15:37:06 -04:00
Ying Mao
25d9f5d97e
[Response Ops] Renaming Alert to Rule (#129136)
* Rename all the things

* Fixing checks

* Removing unnecessary change

* Fixing checks
2022-04-04 07:32:32 -04:00
Marco Liberati
b47ee8bc1c
🐛 Fix editor crash for multiple layers (#127891) 2022-03-17 10:48:15 +01:00
Brandon Kobel
82f143c2b0
Use response-ops GitHub team everywhere, no more alerting services (#126518)
* Use response-ops GitHub team everywhere, no more alerting services

* Update x-pack/test/plugin_api_integration/plugins/event_log/kibana.json

Co-authored-by: Ying Mao <ying.mao@elastic.co>

Co-authored-by: Ying Mao <ying.mao@elastic.co>
2022-03-01 08:56:26 -08:00
Marco Liberati
f8491e2573
[Lens][Example] Change custom link example to point to playground (#126345)
*  Change custom link to point to playground

* 🐛 Add filters when navigating to playground

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-03-01 14:43:33 +01:00
Vadim Kibana
d9a3e5e7f2
Delete Discover URL generator (#125824)
* remove discover url generator

* update mock

* use locator in discover example plugin

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-02-17 13:35:49 +01:00