Commit graph

87 commits

Author SHA1 Message Date
Alexey Antonov 872b56d61e
[Metric Vis] (Step 2) Shim new platform - renaming metric_vis -> vis_type_metric (#42590) 2019-08-06 11:28:08 +03:00
Vadim Dalecky 39b233a24d
Inspector 👉 New Platform (#42164)
* refactor: 💡 remove SASS and clean up InspectorView component

* refactor: 💡 clean up inspector, convert .js -> .ts

* feat: 🎸 add Inspector NP plugin boilerplate

* feat: 🎸 move view registry to NP, move types, add registerView

* docs: ✏️ move inspector README to NP plugin

* refactor: 💡 move ui/inspector/ui to NP

* refactor: 💡 move Inspector adapters to NP

* refactor: 💡 move Inspector.isAvailable to New Platform

* refactor: 💡 move Inspector.open to New Platform plugin

* test: 💍 move Inspector tests to NP plugin

* chore: 🤖 fix imports

* feat: 🎸 update translations

* test: 💍 fix failing translation snapshot

* test: 💍 fix yarn test:browser tests

* Update src/legacy/ui/public/inspector/build_tabular_inspector_data.ts

Co-Authored-By: Stacey Gammon <gammon@elastic.co>

* [ML] [Job wizards] switching to new kibana context provider

* fix: 🐛 specify translation path directly to the plugin

* docs: ✏️ add comment about Webpack config fix

* Update src/legacy/ui/public/inspector/build_tabular_inspector_data.ts

Co-Authored-By: Stacey Gammon <gammon@elastic.co>

* Update src/legacy/ui/public/inspector/build_tabular_inspector_data.ts

Co-Authored-By: Stacey Gammon <gammon@elastic.co>

* feat: 🎸 improve types as per review

* fix: 🐛 remove <InspectorView> comp and fix view layouts

* test: 💍 improve mocks
2019-08-02 17:00:35 +02:00
Alexey Antonov 9dbb00e9a2
[Table Visualization] (Step 2) Shim new platform - renaming table_vis -> vis_type_table (#41872)
* [Table Visualization] (Step 2) Shim new platform - renaming table_vis -> vis_type_table

* fix PR comment
2019-07-26 23:01:29 +03:00
Liza Katz 623b70d511
Clean up top nav \ search bar \ query bar directives (#41636)
* Move timepicker (to be deprecated) into old kbn_top_nav

* Deleted search-bar and query-bar directives!

* moved search bar to kibana_react (it's a generic react component, not a service)

* translations

* Moved superDatePicker directive to kbn_top_nav (to be deprecated)
Deleted unused react_component directives call-out and tool-bar-search-box

* TS test fix

* Delete relative options
2019-07-23 15:31:09 +03:00
Alexey Antonov 2a8ddb9603
[Vega] (Step 2) Shim new platform - renaming vega -> vis_type_vega (#41565) 2019-07-22 10:55:27 +03:00
Ahmad Bamieh 81153c2a22
[i18n] .i18nrc file as the source of truth and enhance tooling (#39774)
* scan node_modules/@kbn directory for i18n

* remove es-lint-disable-next line

* update paths

* look inside .i18nrc.json instead of traversing files

* split .i18nrc file and enhance i18n tooling

* checkout master kibana config

* include x-pack/.i18nrc.json file

* remove unused import

* fix i18n_integrate

* fix i18n_integrate

* code review changes

* code review changes

* try using scanDir

* revert to using concat

* add config type

* code review fixes

* finalize PR

* revert kibana.yml
2019-07-21 15:06:03 +03:00
Peter Pisljar c78cfbb0f5
Markdown vis type np shim (#38767) 2019-07-02 17:40:24 +02:00
Ahmad Bamieh 8c8ef33d36
[i18n] move translations into NP plugin (#39177)
* new platform xpack plugin

* update env snapshot

* update all snapshots

* plugin service tests

* fix scripts/check_ts_projects.js

* update i18nrc

* run i18n_check
2019-06-26 11:29:11 +03:00
Stacey Gammon 1bcf7ceb8e
Dashboard embeddable container plugin (#38974)
* Dashboard embeddable plugin

* comment out duplicate scss styles

* review: conform closer to NP standards

* export/import from index file in folder
2019-06-25 08:43:28 -04:00
Mike Côté 98f7c75ff4
Introduce basic alerting and actions plugin (#37042)
* Create actions plugin (#35679)

* Basic alerting plugin with actions

* Remove relative imports

* Code cleanup

* Split service into 3 parts, change connector structure

* Ability to disable plugin, ability to get actions

* Add slack connector

* Add email connector

* Ability to validate params and connector options

* Remove connectorOptionsSecrets for now

* Fix plugin config validation

* Add tests for slack connector

* Default connectors register on plugin init, console renamed to log, slack to message_slack

* Add remaining API endpoints for action CRUD

* Add list connectors API

* Change actions CRUD APIs to be closer with saved objects structure

* WIP

* Fix broken tests

* Add encrypted attribute support

* Add params and connectorOptions for email

* WIP

* Remove action's ability to have custom ids

* Remove ts-ignore

* Fix broken test

* Remove default connectors from this branch

* Fix API integration tests to use fixture connector

* Rename connector terminology to action type

* Rename actionTypeOptions to actionTypeConfig

* Code cleanup

* Fix broken tests

* Rename alerting plugin to actions

* Some code cleanup and add API unit tests

* Change signature of action type service execute function

* Add some plugin api integration tests

* Fix type check failure

* Code cleanup

* Create an actions client instead of an action service

* Apply Bill's PR feedback

* Fix broken test

* Find function to have destructured params

* Add tests to ensure encrypted attributes are not returned

* Fix broken test

* Add tests for validation

* Ensure actions can be updated without re-passing the config

* Remove dead code

* Test cleanup

* Fix eslint issue

* Apply Peter's PR feedback

* Code cleanup and fix broken tests

* Apply Brandon's PR feedback

* Add namespace support

* Fix broken test

* Pass services to action executors (#37194)

* Pass services to action executors

* Fix tests

* Apply PR feedback

* Apply PR feedback pt2

* Cleanup actions plugin (#37250)

* Cleanup actions, move code from alerting plugin PR

* Rename service terminology to registry

* Use static encryption key for encrypted attributes plugin inside of tests

* Empty data after create test is done running

* Fix type checks

* Fix inconsistent naming

* add server log action for alerting (#37530)

adds the first "builtin" alertType for performing a `server.log()`

* Create alerting plugin (#37043)

* WIP

* Rename fire function and remove @ts-ignore in all places

* Change naming in alerting service

* Remove alert instance class for now, support interval configuration

* Cleanup TS

* Split alerting between registry and client

* Use saved object alongside task manager instance

* Add remaining alerting APIs

* Change create structure

* Rename some variables, change actionGroups structure

* Use handlebars for templating strings at fire time

* Fix params given to alert type execute function

* Use alert instance class

* Alert instances support meta attributes

* Move alert instances deserialization

* Change interval to be ms

* Rename actions es archive

* Fix tests to use encrypted esArchive for action record

* Add create alert test to demo end to end flow

* Fix type check issue

* Alerts to use references to action objects

* Only update task manager tasks after saved objects are fully updated

* Use scope in task manager

* Fix type check

* Use task manager to execute actions

* Convert ids into references and back

* Apply PR feedback

* Fix broken test

* Fix some bugs

* Fix test errors

* Alert interval to be previous runAt + interval instead of now + interval

* Add range support

* Remove extra line

* Cleanup

* Add alert_instance.test.ts

* Add alert_type_registry.test.ts

* Move tests around

* Create generic task manager mock

* Add note about saved objects client mock

* Create alert_type_registry.mock.ts

* Add alerts_client.test.ts

* Add create_alert_instance_factory.test.ts

* Add create_fire_handler.test.ts

* WIP

* Fix get_create_task_runner_function.test.ts and make test pass

* Make get_create_task_runner_function.test.ts 100% coverage

* Add unit tests for routes

* Move files around

* Created transform_action_params.ts

* Add get_next_run_at.ts

* Add comment explaining why we copy nextRunAt

* Re-use state within alert instance

* Finalize code coverage in unit tests

* Create base api integration tests

* Add a test that ensures end to end functionality of an alert

* Fix ui capabilities test

* Fix broken plugin api integration test

* Fix jest tests with new saved objects client

* Fix broken integration tests

* Change api integration test fixture to make more sense, add functions for future tests

* Move alerts integration testing into own file, prep to add more tests

* Add tests to ensure failed task instances get retried

* Add get_create_task_runner_function.test.ts for actions, create encrypted saved objects mock

* Add action validation tests

* Ensure action type validation occurs on update

* Test 400 on unregistered alert types

* Ensure alertTypeId can't be updated

* Add validation test for alert create / update

* Fix broken checks / tests

* Skip failing test for now

* Cleanup jest tests

* Ensure action objects can be updated while keeping encrypted attributes readable

* Remove partial update sopport, remove ability to change actionTypeId, require config

* Ensure actionTypeConfig is validated on create and update

* Add alertTypeParams validation support

* Fix failing tests

* Ensure alert cleanup errors don't replace the original error

* Pass callCluster as a service to alerts and actions

* Only pass log to alerts client

* Pass savedObjectsClient as a service to alerting and actions

* Fix failing tests

* Remove range support, provide when current and previous task got scheduled

* Ensure Joi validation happens before every execute

* Remove skipped tests, to be done in future PR

* Apply self feedback pt1

* Apply self feedback pt2

* Fix broken tests

* Apply PR feedback

* PR feedback pt1

* Apply security team PR feedback

* PR feedback pt1

* PR feedback pt2

* PR feedback pt3

* Fix broken tests

* Fix callCluster to have signature

* Revert f11a6aeb06

* PR feedback pt4

* Remove __jest__ folders

* PR feedback pt5

* Fix Joi from leaking secrets

* Fire instance actions in parallel instead of series

* Fix failing jest tests

* Accept core api changes

* Fix saved objects client mock

* PR feedback pt1

* Fix eslint issues

* Throw error when alert instance already fired (#39251)

* Throw error when alert instance already fired

* shouldFire doesn't need its own boolean value

* Actions & alerting getting started user guides (#39093)

* Initial user guides

* Cleanup

* Typos, example changes

* Switch to tables, use ordered list for usage

* Start docs around alert instances and templating

* Documentation changes

* Some adjustments

* Apply PR feedback

* Apply suggestions from code review

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* PR feedback pt2

* Provide better examples for alert types

* Apply PR feedback

* Update README locations
2019-06-20 19:37:17 -04:00
Court Ewing 2d171c92f5 Fix path references into and out of x-pack/legacy 2019-06-20 13:34:48 -04:00
Aaron Caldwell b1911e9269
[File upload] New plugin: file upload (#36404)
* Add file upload x-pack plugin

* Clean up

* Remove unneeded cluster config

* Remove unneeded test

* First pass basic telemetry (not connected).

* Basic telemetry connected

* Review feedback

* Revise telemetry to use savedObjectRepository. Capture metrics on app and file types

* Lots of cleanup, consolidation of logic

* Clean up, reorg

* Update telem tests and telem functions

* Add back import data model

* Clean up and update telemetry tests

* Fix telemetry test issues and update corresponding code

* Up chunk limit to 30 MB

* Add file upload telemetry to saved objects management builder

* Missing space

* Add descriptive comments to dynamic keys in telemetry fields

* [Maps] [File upload] Geojson upload (#36410)

* Client side basics

* File added and default named correctly

* Connect transient layer removal to file import component

* Simplify transient layer removal

* Move file import ui over to new file upload plugin and make more generic

* Add post-processing option to file upload. Make component json-specific

* Add flag for source indexing

* Revise import layer workflow to be separate from add layer workflow

* Differentiate between normal sources and import sources. Add back layer add/next button

* Update indexing boolean in component after file upload & parse

* First pass rough indexing from maps working on specific use cases

* Update parsing logic to handle geojson formats

* Index pattern added following index creation

* Pass onsuccess callback to file_upload to add layer to maps app

* Handle mulltipolygon type in es geo utils

* Add functionality to make es layer permanent and switch to edit panel

* Add to index if exists or create new

* Make plugin API more intuitive. Set up to handle remove action

* Pass transient removal call through to file import

* Clean up layer viewing logic for temp and perm layers

* Remove change source from import screen

* Add option to provide mappings array and pass geo_point and geo_shape to array

* Add support for multiple mappings select and index naming

* Match style of import file button to add layer for now

* Remove duplicate case handling resulting from merge

* Move geo processing logic over to file upload plugin for reuse

* Remove old geo_shape formatting from geo_point code

* Set default index data type. Remove unneeded stringify request logic

* Check for custom processor object which contains function

* Move file picker to separate component

* Some cleaning. Add geojson clean & validate code

* Catch file parsing errors and notify user

* Disable index type if valid file not referenced

* Set error messaging on invalid index name used

* Add index pattern checking logic and error handling

* Dynamically populate geo index options

* Set index data type earlier in the workflow. Don't duplicate requests

* Pass back index ready status from plugin and connect to layer next button

* Increase max bytes to ~50MB

* Don't parse files over max size & warn user. Also, remove toasts and warn similarly to other components

* Uploaded file default label: 'fileToImport' -> 'Import File'

* Expand out feature properties for mapping

* Pass through telemetry data to plugin back-end

* Clean up indexing flow. Separate creation of index patterns. Add new index pattern create callbacks

* Pass back info for indexing failures but don't connect to UI yet

* Fix telemetry test issues and update corresponding code

# Conflicts:
#	x-pack/plugins/file_upload/server/telemetry/telemetry.test.ts

* Add file upload telemetry to saved objects management builder

* Missing space

* Add descriptive comments to dynamic keys in telemetry fields

* Divide up the import layer add workflow on the maps side and tweak to avoid layer color change

* Fix bug affecting file preview replacement not updating coordinate index type

* Remove index pattern. Organize effects. General clean up

* preIndexTransform -> transformDetails

* Update proptypes

* Cleaning, organizing

* Add index name guidelines. Show conditionally

* Add file size, type guidance. Filter on file size, not chunk size. Small tweaks to file/index tips

* Zoom to layer extent on preview of imported data

* Revert "Revise import layer workflow to be separate from add layer workflow"

This reverts commit 3b35f5371d.

* Handle import file determination to accomodate add layer flow. Update card wording

* Decompose addLayer component into smaller pieces. Add placeholder import progress component

* Dynamically change footer button text for context

* Move import card to top of sources

* Get basic progress tracking in place

* Allow second layer (indexed layer) to get removed. Reconnect file remove. Small UI tweaks

* Add link to management for further index mods

* Fix i18n failures

* Add file parsing progress indicator & text

* Reset importView on source reset

* Add dynamic chunking to handle fluctuating data sizes common to geo features

* Don't duplicate index request if request in flight

* Modify json upload and import to use JS classes & react class component state

* Transition remaining file_upload components over to class/component structure with state

* Move functions into index_settings class

* Review feedback

* Add fetch with timeout

* Split out import editor into separate component and clean up logic

* Clean up add layer panel/button title logic

* More cleanup

* Tweaks to success and error handling flow

* Handle success/error handling on add/view indexed data

* Jump to indexing complete on error. Handle nothing returned to client app

* Update name/location of source select css file

* Update import source card border color and icon

* Suggest name for index based upon file name

* Add validation to auto-suggested index name/pattern

* Use constants for geo_point and geo_shape in mappings

* Update geojson upload card/description

* Catch-all review feedback

* Fix internationalization syntax errors

* Review feedback

* Get index names and patterns only when needed

* Make addLayer async again to fix zoom to extent issue, waits on just the async syncDataForLayer function (which is async)

* Remove panel description as derived state and shift to function

* Remove geojson fit to extent for now

* Remove unused class selector

* Remove unneeded i18 wrapper for what's already passed in as an i18 element

* Revise import state to be handle via redux. Some json upload args changes

* Review feedback. Some cleanup and bug fixes

* Roll back store actions changes and layer_addpanel changes related to color change

* Follow scss file naming conventions for source_select

* Review feedback

* Restore clobbered layer_control view to master state. Add source_select css

* Update import to use plugin local indexPatternService, not maps'

* Review feedback, mostly i18n. Also add index to scss path

* i18n translation updates

* Assign error message to values rather than error object

* Update getMapColors to filter out transient layer

* Wrap Feature as FeatureCollection in Maps

* Add jest tests for geo processing functions. Add fixes for single feature handling

* i18n

* Review feedback. Test cleanup/fixes

* Update layer add panel footer logic to still show when source not selected

* Fix issue of not recognizing MultiPoint type. Remove throw logic for now

* Update telemetry with newly required placeholder function

* Prevent external modification of nested geojson objects

* i18n translation updates

* Revert "Fix issue of not recognizing MultiPoint type. Remove throw logic for now"

This reverts commit d692f913f8.

* Revert "Prevent external modification of nested geojson objects"

This reverts commit 0ea9fd3336.

* yarn.lock update

* [File upload] Remove dynamic fields from mappings, code and telemetry test (#38902)

* Remove dynamic fields from mappings, code and telemetry test

* Add file-upload-telemetry to spaces and es archiver test mappings

* Don't create telemetry saved object if none exists, create on first update instead

* Back out es archiver mappings update
2019-06-18 18:32:31 -06:00
Ahmad Bamieh b36aad350a
[i18n] extract untracked translations and prettier logging (#35171)
* extract untracked translations and prettier logging

* self code review

* Update src/dev/run_i18n_check.ts

Co-Authored-By: Bamieh <ahmadbamieh@gmail.com>

* updating listR

* run new i18n_check and fix errors

* kbnEmbeddables -> embeddableApi

* remove any type

* Update src/legacy/core_plugins/embeddable_api/public/panel/panel_header/panel_actions/add_panel/add_panel_flyout.tsx

Co-Authored-By: Stacey Gammon <gammon@elastic.co>

* Update src/legacy/core_plugins/embeddable_api/public/panel/panel_header/panel_actions/add_panel/add_panel_action.tsx

Co-Authored-By: Stacey Gammon <gammon@elastic.co>

* self code review fixes

* fix extract and integrate scripts

* ts-ignore js file
2019-06-17 16:03:12 +03:00
Ahmad Bamieh c308048f04
[Telemetry] move from xpack main (#35403)
* enabling xpack in new plugins

* move telemetry into separate new platform plugin

* remap constants

* resolved hacks issue

* remove extra dir

* js -> ts

* run linter

* fix tests

* reset kibana.yml

* reset kibana.yml

* ts types

* add telemetry translations to i18n

* use deprecated configs

* checkout config.yml

* fix test

* move telemetry from xpack_main in api_integration

* add telemetry apis

* hide banner

* remove routes/get_stats in favor of collectors/get_stats

* code review fixes
2019-06-12 13:53:48 +03:00
Catherine Liu cf3eab2753
[Canvas] Fixes i18n errors (#37565)
* Fixed i18n errors

* Added canvas path to .i18nrc.json
2019-05-30 17:32:11 -07:00
Ahmad Bamieh 6ab3ce3f70
[i18n] Add Japanese locale (#36940) 2019-05-23 03:15:57 +03:00
Jen Huang e2222ce7c3
Snapshot Repositories UI (#34407)
* [SR] Snapshot and restore plugin boilerplate (#32276)

* Initial plugin set up

* Set up client shell

* Add initial repository list routes

* Fix merge issues and some typings

* Decouple server from plugin.ts files, tighten up typings

* Use exported constant for required license

* Translate plugin name, more typings

* Fix more types, move list components under /home

* Remove unused var

* Change scss prefix

* Uncouple unmount logic from routing shim, and some other PR feedback

* [SR] Repository list and details UI (#33367)

* Initial pass at repositories list UI

* Add detail panel for file system repositories, and a generic detail panel with json settings view

* Add detail components for other types

* Add detail panel footer, rename `useStateValue` to `useAppState`

* Fix detail panel footer

* Fix unused vars

* PR feedback

* PR feedback

* [SR] Refactor proposal (#33690)

* Move app dependencies to its own context provider

* Add index.ts barrel file for common types

* Move Enums to constants.ts file

* Refactor function component using `React.FunctionComponent<Props>`

* Refactor service folder structure

* Fix type import

* Move REPOSITORY_DOC_PATHS from common to public constants

* Move AppCore and AppPlugins interfaces back to shim and re-export them from app types

* [SR] Create and edit repositories UI (#34020)

* Add routing and placeholder form

* Fix typings

* Set up edit repository route, and basic form UI

* Add typings for wrapCustomError, and copy extractCausedByChain from CCR wrapEsError

* Throw errors that are already boomified

* Create and edit for basic repository types (fs, url, source)

* Add repository verification UI to table and details

* Create and edit for plugin repository types (hdfs, azure, s3, gcs)

* Fix linting

* Fix test

* Fix test

* Remove unused import

* Fix duplicate i18n key

* Fix details opening on cancel edit, remove unnecessary Fragments, definition file for some EUI components to x-pack, rename saveError

* Remove breaks

* Adjust add and edit repo routes so they don't conflict with list route

* Add repo plugin and types doc links to form

* Bootstrap documentation service

* Bootstrap text service and replace RepositoryTypeName component with it

* Bootstrap breadcrumb service and replace usages

* Bootstrap httpService, remove chrome and http from app dependencies(!)

* Add request creator and replace all instances of useRequest and sendRequest with it

* Fix typo

* Simplify update repository and update repository setting methods

* Adjust copy

* Lint

* Remove unused var

* Remove unused import

* [SR] Add API for retrieving snapshots. (#34598)

* [SR] Single and multiple repository delete (#34593)

* Add single/multi repository delete API and UI

* Address PR feedback

* [SR] Add SnapshotTable and SnapshotDetails. (#34837)

* Remove associations between multiple repositories with a single snapshot.
* Retrieve complete snapshot details in getAllHandler.
* Fix cleanup function bug in useRequest hook.
* Fix bug in useRequest which prevented old data from being cleared when subsequent requests returned errors.
* Add initialValue config option to useRequest.
* Add formatDate service to text module.

* [SR] Fix linting and add (de)serialization for repositories (#35031)

* Fix eslint issues and add (de)serialization for repositories

* Add comment about flattening settings

* [SR] Surface repository errors and index failures more prominently (#35042)

* Add links to repositories from Snapshot Table and Snapshot Details.
- Rename services/breadcrumbs to services/navigation and add linkToRepository function.
- Refactor home component to update active tab when URL was changed.
* Add warning callout to let user know when their repositories contain errors.
* Sort failures by shard and add test for snapshot serialization.
* Sort failures and indices.
* Add filter for filtering snapshots by their repository.
* Surface states with humanized text, icons, and tooltips where necessary.
* Fix pluralization of seconds.
* Surface failures tab even if there are none.
- Display a '-' for missing times and durations.
- Create DataPlaceholder component.

* [SR] Polish repositories UX (#35123)

* Refactor repository detail panel to load repository based directly on route param.
* Display repository detail panel while table is loading.
* Make 'Edit repository' table action a link instead of a button.
* Render disabled EuiSelect as a readonly EuiFieldText.
* Prepend HDFS URI with hdfs:// protocol.
* Present scheme options for Read-Only URL repository as a select.

* [SR] Add client-side validation to repository form and link to snapshots from details (#35238)

* Add client side repository form validation, extract `flatten` into common lib

* Add snapshot count to repository details and link to snapshot list

* Reset validation when changing repository type

* Fix snapshot list filter deep linking for repository names with slashes and spaces

* Fix imports

* PR feedback

* [SR] Design and copywriting fixes (#35591)

* Split repository form into two steps; move `clean_settings.ts` to server

* Default to snapshots tab, adjust snapshot empty prompt, add app description

* Add minimum timeout to list view requests to avoid flicker, use EuiEmptyPrompt for loading screen, add doc link to settings step

* Add information about snapshots to delete repository behavior, add doc link for source only toggle, add size notation help text

* Add main doc link

* Copywriting and i18n fixes, and add some common settings to third party repo types

* Add fields to third party repo detail panel

* More copywriting fixes

* Use spinner for duration and end time if snapshotting is still in progress

* Show all repository type options, mark missing plugins

* Revert "Show all repository type options, mark missing plugins"

This reverts commit e34ee47cec.

* Fix space

* [SR] Add permissions UI and Cloud-specific repository type UI branch (#35833)

* Add missing permissions UI and cloud-specific repository type UI branch

* Add ES UI as owners of /snapshot_restore directory

* Add no repository types callout for Cloud edge case

* Redirect invalid section param to repositories

* Add warning empty prompt if all repositories have errrors

* Replace repository cards with EuiCard

* Add snapshot doc link to repository error empty prompt

* Remove auto-verification from list and get routes, add separate verification route, add manual verification to repository detail panel

* Update copy and remove obsolete test

* Remove unused scss files

* Final changes to repository cards
2019-05-13 07:03:37 -07:00
FrankHassanabad bb182c239a
Merge remote-tracking branch 'upstream/master' into feature-secops 2019-05-02 15:13:53 -06:00
Liza Katz b298b3ddec
Moved query bar into data plugin (#35390)
* moved query bar to data plugin
2019-04-30 15:57:12 +03:00
Matt Bargar 539bc6f3a2
Improve KQL error messages (#34900)
Attempts to make KQL syntax errors more sensical to the average user.

I initially tried to use a similar solution to the one we used for detecting usage of old lucene syntax. In other words, I tried to create rules in the grammar that would match strings containing common mistakes the user might make and throw custom error messages for each situation. This proved to be more difficult for detecting errors in the regular language. While the Lucene rules could be completely separated from the main grammar, the KQL error rules had to be mixed into the main grammar which made it much more complex and had a lot of unintended side effects.

So instead I decided to lean more heavily on PEG's built in error reporting. Giving certain rules human readable names allows the parser to use those names in the error reporting instead of auto generating a long list of possible characters that might be expected based on the matching rules. Since the PEG errors contain location information I was also able to add ascii art that points the user to exactly where the error occurred in their query string. While this approach is not quite as nice as bespoke error messages that tell the user exactly what is wrong in plain English, it's much more maintainable and I think it still results in much better error messages compared to what we have today.

I've also removed the old original kuery grammar (for queries like is(response, 200)). We were only using it to display an error if I user was still using the old syntax. This version of kuery hasn't existed since 6.3 and we've had error messages telling users this since then. I think it's safe to remove the legacy parser at this point, which greatly reduces the complexity of our error reporting.
2019-04-24 16:40:38 -04:00
Frank Hassanabad 9d816aa549
Change feature-secops to look like master (#35246)
Makes feature-secops closely mirror master of kibana
* Puts the ci/cd system back to where it mirrors master
* Removed stylelint
* Fixed accidental linter differences that accumulated along the way
* Fixed accidental package addition of `cherrio`
* Added back the translation file of `zh-CN.json`
* https://github.com/elastic/ingest-dev/issues/397
* https://github.com/elastic/ingest-dev/issues/198
2019-04-17 18:19:18 -06:00
FrankHassanabad f745a9afaa
Added exclude which mirrors master and will make the i18n scripts pass 2019-04-05 09:11:46 -06:00
Xavier Mouligneau 88f9bbaa40 Merge branch 'master' of github.com:elastic/kibana into feature-secops 2019-04-04 18:20:23 -04:00
Xavier Mouligneau 7a7f9e0ef3 rename secops to SIEM 2019-04-02 15:50:10 -04:00
Frank Hassanabad 2d34c283a7
Fix snapshots (#32834)
* Made all existing snapshots into shallow calls
* Added any missing snapshots that looked like would be useful
* Re-enabled the snapshots by removing a line in `.gitattributes`
* Removed the i18n excludes since we upgraded babel we don't need them
* https://github.com/elastic/ingest-dev/issues/314
* https://github.com/elastic/ingest-dev/issues/309
2019-03-11 21:21:22 -06:00
Garrett Spong 36a00c543d
Merge branch 'master' of github.com:elastic/kibana into feature-secops 2019-03-11 18:30:54 -06:00
Frank Hassanabad b8ab72c04e
Added zeek renderer (#32614)
* Implemented zeek.connection, zeek.dns, zeek.http, zeek.notice, zeek.ssl, and zeek.files
  * Added unit tests and snapshot tests
  * Broke out GoogleLink from Suricata
  * SHA1 hashes from files gets linked to total virus for on-clicks
  * Updated GraphQL and ECS to add more fields needed (http, url, module)
  * Swept through with TestProvider cleanup in unit tests
  * Added fix for the width for the timetable to render Suricata/Zeek the same as notes
  * https://github.com/elastic/ingest-dev/issues/298
2019-03-07 23:10:44 -07:00
Andrew Goldstein 7105ed624b
# Field Browser Part1: Infrastructure for the field browser (#32627)
This PR contains most of the infrastructure required for the timeline field browser: https://github.com/elastic/ingest-dev/issues/149

## (Visible) Features
* Hover over a column to view its properties (type, description, etc):
![column-properties-tooltip](https://user-images.githubusercontent.com/4459398/53941771-3b7ee000-4076-11e9-9320-3d6c4fee9ad6.gif)

* Resize a column via its header:
![resize-via-header](https://user-images.githubusercontent.com/4459398/53941788-46d20b80-4076-11e9-8057-9e6f4ebe20a0.gif)

* ...or resize a column via its cell:
![resize-via-cell](https://user-images.githubusercontent.com/4459398/53941794-4d608300-4076-11e9-9840-0d2aa86a23c1.gif)

* Added a spinner to the columns to provide visual feedback when a column is sorted:
![spinner-on-sort](https://user-images.githubusercontent.com/4459398/53941811-55202780-4076-11e9-8030-0091bd3e7987.gif)

* Remove columns via a new hover menu interaction:
![remove-column](https://user-images.githubusercontent.com/4459398/53941825-5fdabc80-4076-11e9-86f4-a34b66d02b2a.gif)

* A markdown formatting hint is displayed when typing a note:
![markdown-hint](https://user-images.githubusercontent.com/4459398/53941867-7e40b800-4076-11e9-87f2-3e18b8c93aaf.gif)

## Other Changes
* When toggling between Filter / Search, the KQL search placeholder text reflects the current selection:
![mode-placeholder-text](https://user-images.githubusercontent.com/4459398/53941884-8ac51080-4076-11e9-9203-4bf334f79dde.gif)
* The border drawn around a timeline row on hover has been replaced with a fill:
![row-hover-day](https://user-images.githubusercontent.com/4459398/53941844-6b2de800-4076-11e9-8adb-da525f4c53c2.gif)
* Added text truncation support
* Timeline columns that previously appeared jagged are now aligned
* The text area for adding a note in the timeline now uses most of the visible width
* Added a min-height to the timeline to prevent the Filter / Search typeahead from getting cut off
* The timeline footer is now always-visible
* The resize cursor is now always-visible when the timeline is resized
* Wrapped timeline tests in a `<TestProviders>` wrapper to reduce nesting
* Replaced most usages of `noop` with `jest.fn` in timeline tests
* The timeline Table / JSON view now appears below the row renderer output
* Added an inactive checkbox for selecting an event
2019-03-07 19:31:11 -07:00
Thomas Neirynck 5e5a49a905
[Maps] Localization (#30881)
Localize Maps-app UX with Kibana's i18n framework.
2019-03-06 18:24:41 -05:00
Aleh Zasypkin b8c9d0afa0
Get rid of Handlebars support in i18n tools. (#32190) 2019-02-28 17:16:59 +02:00
Frank Hassanabad 90fd992c09
Suricata Row Renders Upgrade (#31990)
* Fixed `event.severity` to be operational now that ECS has been updated
* Added a Suricata SID database with references
* Wired in the references
* Created a tagging system for the UI
* Added Suricata SID and made it draggable onto the filters of the timeline
* Changed the hand rolled sushi 🍣 inline flex styles to EuiFlexItem, EuiGroupItem
* Removed older CVE column renderer from the system
* Wrote unit tests
* https://github.com/elastic/ingest-dev/issues/175
* https://github.com/elastic/ingest-dev/issues/299
2019-02-27 22:10:23 -07:00
Aleh Zasypkin 2f62e6f1a5
Upgrade @babel/* dependencies. (#32031)
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2019-02-27 19:27:40 +02:00
Jen Huang 50c7da3360
Fix common license checker issues (#31339)
* Fix hardcoded plugin name and license modes in common license checker

* Fix licensePreRoutingFactory scope issues

* PR feedback adjustments

* Use minimum license string instead of array of valid license
* Pass plugin name instead of ID for UX
* Return license status instead of `showLinks` and other flags
* Adjust factory closure for readability

* Fix test

* Additional PR feedback:

* Move license status constants to `/common`
* Internationalize plugin names that are passed to check license, and its error messages
* Remove `isAvailable` flag, change pre-routing logic to use `LICENSE_STATUS.VALID` instead
* Change constant `INACTIVE` to `EXPIRED`
* Convert check license test from mocha to jest

* Fix test
2019-02-26 08:29:47 -08:00
jinmu03 da7b376a70
i18n_extract function enhancement (#31232)
* removed a file

* formatMessage -> formatErrorMessage

* refer ui in legacy folder
2019-02-15 10:29:29 -08:00
Garrett Spong 44ec857719
Merge branch 'master' of https://github.com/elastic/kibana into feature-secops 2019-02-11 15:23:30 -07:00
Court Ewing 2ce51a5be5 Update paths to ui, server, deprecation, plugin_discovery in src/legacy
This commit accompanies the four that precede it. Rather than squash
them altogether, the four previous commits all do nothing except move
files to help avoid conflicts.
2019-02-11 10:41:37 -05:00
Aleh Zasypkin 088d5f6919
Add zh-CN.json translations and respective compatibility checks via i18n tools (#30378) 2019-02-11 14:39:59 +01:00
Andrew Goldstein f05bf082d9
## Summary (#29938)
## Summary
Adds notes to events and closes Timeline issues

* closes [Add Notes to events](https://github.com/elastic/ingest-dev/issues/241)

![01-add-notes-to-events](https://user-images.githubusercontent.com/4459398/52268463-d316d480-28f8-11e9-94d7-93de52746c13.gif)

* closes [Drag and drop values from columns into data providers](https://github.com/elastic/ingest-dev/issues/153)

![02-drag-drop-from-columns](https://user-images.githubusercontent.com/4459398/52268573-1bce8d80-28f9-11e9-9d4a-0ecf22d3dacb.gif)

* closes [Increase the Information Density in Timeline Rows](https://github.com/elastic/ingest-dev/issues/238)

<img width="1680" alt="final-layout-15-inch-mbp" src="https://user-images.githubusercontent.com/4459398/52267380-1b80c300-28f6-11e9-8535-f8fa32dc74a9.png">

* closes [Make Curated Content in the Suricata Row Renderer Content Draggable to the Query](https://github.com/elastic/ingest-dev/issues/240)

![03-drag-from-suricata](https://user-images.githubusercontent.com/4459398/52206450-83bc9f80-2837-11e9-9307-b6fa5c08bf71.gif)

* closes [Values dragged from the field browser do not appear as "cards" when dragged](https://github.com/elastic/ingest-dev/issues/154)

* closes [Resize handle style](https://github.com/elastic/ingest-dev/issues/170)

<img width="1022" alt="resize-handle" src="https://user-images.githubusercontent.com/4459398/52268818-a8794b80-28f9-11e9-8293-c071fa47c429.png">

* closes [Star icon uses different icons for Favorite / Not a favorite states(https://github.com/elastic/ingest-dev/issues/164)

![star-fix](https://user-images.githubusercontent.com/4459398/52206473-99ca6000-2837-11e9-9d1b-bb7c5e917a85.gif)

* closes [Notes in the Add note modal can overflow the modal](https://github.com/elastic/ingest-dev/issues/159)

* closes [Replace "placeholder" JSON in expandable row / accordion](https://github.com/elastic/ingest-dev/issues/171) (by removing the JSON preview)
  - the inline JSON preview was removed

* closes [Add function call back to the pin column](https://github.com/elastic/ingest-dev/issues/97)

## Other changes
* timeline footer is now a single-line, and responsive

![footer](https://user-images.githubusercontent.com/4459398/52269063-5d136d00-28fa-11e9-84d5-b1d431010e51.png)

* updated the search / filter select to indicate whether it is an AND or OR operation
![styling-of-and-or](https://user-images.githubusercontent.com/4459398/52206631-09404f80-2838-11e9-912c-84c1f658d64e.png)

* tweaked styling of AND / OR badges, and updated the "Drop anything highlighted" message to use an OR badge
* added placeholders for row-selection and the field-browser
* replaced some custom flexbox CSS with EUI
* show humanized @timestamp in tooltip (in column and table views):

<img width="508" alt="timestamp-tooltip" src="https://user-images.githubusercontent.com/4459398/52269219-b7acc900-28fa-11e9-87ef-4ea32b3638eb.png">

* removed hard-coded protocol:TCP in Suricata Row Renderer
* removed the always-visible border from suricata row renderer
* headers is now a prop from mapStateToProps, in preparation for the field browser
* responsive columns widths (in preparation for resizable columns)
2019-02-05 21:59:41 -07:00
Nox911 53307404e6
[i18n] Translate fatal errors (#29410)
* Translate fatal_errors

* Update snapshot

* Update snapshots

* Fix ids

* Add path to translations in scr/core folder
2019-01-31 13:19:50 +03:00
Nox911 905ea526b2
[i18n] Translate kuery_autocomplete (#29162)
* Translate kuery_autocomplete

* Resolve review comments
2019-01-29 18:41:14 +03:00
Nox911 36c7581059
[i18n] Translate kbn_doc_views (#29095)
* Translate kbn_doc_views

* Resolve review comments
2019-01-28 11:23:00 +03:00
Xavier Mouligneau 3b51264eb3 Merge branch 'master' of github.com:elastic/kibana into feature-secops 2019-01-25 11:46:32 -05:00
Nox911 50ec75f800
[i18n] Translate inspector views (#29044)
* Translate inspector_views

* Add I18nProvider

* Replace intl.formatMessage to i18n.translate

* Remove redundant vars

* Update snapshot

* Resolve review comments

* Fix error in  inspector.tsx

* Fix test and update snapshot

* Resolve review comments

* Replace injecti18n to i18n.translate
2019-01-25 16:19:22 +03:00
CJ Cenizal bfa417c7d6
Localize strings in Rollup and ILM apps. (#29034)
* Add ILM to i18nrc.json. Fix validation errors.
* Localize CCR and Rollups checkLicense errors.
* Fix bug in Remote Clusters checkLicense error.
* Use rollupJobs namespace in checkLicense.
2019-01-23 16:36:48 -08:00
Nox911 f131dbbb99
[i18n] Translate dashboard mode (#28921)
* Translate dashboard viewer

* Add dashboardMode path to i18nrc
2019-01-23 13:25:39 +03:00
Frank Hassanabad 873763f320
i18n support for the project (#28889)
* Added support for i18n to our project
* Translated all text I could find within the project
* Added `translations.ts` cascading files to each component folder
* Utilized `i18n.translate` within the files for the majority of translations
* Wired up .i18nrc.json to our project for the builds and added ignores where needed
* Changed unit tests to use <i18nProvider> where needed
* Added `<i18nProvider>` to the root level at start_app.tsx
* Changed `moment(date).fromNow()` to use relative date times of `<FormattedRelative value={new Date(date)} />`
* Added plurals for Rows
* Ran `node scripts/i18n_check --path x-pack/plugins/secops --output /tmp --output-format json5` and then opened the `/tmp/en.json` to ensure the keys are extracted as expected
* https://github.com/elastic/ingest-dev/issues/88
* Followed advice from https://github.com/elastic/kibana/issues/27968 and did _NOT_ inject anything I did not have to.
2019-01-22 15:11:52 -07:00
Nox911 8e664fa5e5
[i18n] Translate xpack_main (#28896)
* Translate x-pack main

* Update snapshot

* Update snapshot

* Resolve review comments

* Update snapshot
2019-01-22 16:38:36 +03:00
Peter Pisljar f1a02d19f9
fixing interpreter translation ids (#29082) 2019-01-22 05:04:37 -08:00
Justin Kambic a7f249dc43
[Uptime] Localization (#28183)
* Add localization tokens.

* Fix import errors.

* Rename a translation key/message. Fix copy/paste mistake.

* Make i18n provider root element of application.

* Add xpack.uptime to .i18nrc.json.

* Remove icon.

* Update x-pack/plugins/uptime/public/components/functional/snapshot_histogram.tsx

Co-Authored-By: justinkambic <justin.kambic@elastic.co>

* Update x-pack/plugins/uptime/public/components/functional/snapshot_histogram.tsx

Co-Authored-By: justinkambic <justin.kambic@elastic.co>

* Update x-pack/plugins/uptime/public/components/queries/empty_state/empty_state.tsx

Co-Authored-By: justinkambic <justin.kambic@elastic.co>

* Replace ... with ….

* Update x-pack/plugins/uptime/public/components/queries/empty_state/empty_state.tsx

Co-Authored-By: justinkambic <justin.kambic@elastic.co>

* Update x-pack/plugins/uptime/public/components/queries/empty_state/empty_state.tsx

Co-Authored-By: justinkambic <justin.kambic@elastic.co>

* Update x-pack/plugins/uptime/public/components/queries/empty_state/empty_state.tsx

Co-Authored-By: justinkambic <justin.kambic@elastic.co>

* Move a link to formatted message value prop.

* Update x-pack/plugins/uptime/public/components/queries/error_list/error_list.tsx

Reformat naming of column localization keys.

Co-Authored-By: justinkambic <justin.kambic@elastic.co>

* Update error list table column localization keys.

* Update x-pack/plugins/uptime/public/components/queries/filter_bar/filter_bar.tsx

Update label key.

Co-Authored-By: justinkambic <justin.kambic@elastic.co>

* Update label localization keys for filter bar.

* Update x-pack/plugins/uptime/public/components/queries/filter_bar/filter_bar.tsx

Update localization key for filter bar tooltip title.

Co-Authored-By: justinkambic <justin.kambic@elastic.co>

* Update x-pack/plugins/uptime/public/components/queries/filter_bar/filter_bar.tsx

Update localization key for filter bar tooltip text.

Co-Authored-By: justinkambic <justin.kambic@elastic.co>

* Update x-pack/plugins/uptime/public/components/queries/monitor_charts/monitor_charts.tsx

Improve RTT Breakdown title localization key.

Co-Authored-By: justinkambic <justin.kambic@elastic.co>

* Add description and update a localization key.

* Update x-pack/plugins/uptime/public/components/queries/monitor_charts/monitor_charts.tsx

Co-Authored-By: justinkambic <justin.kambic@elastic.co>

* Update x-pack/plugins/uptime/public/components/queries/monitor_list/monitor_list.tsx

Co-Authored-By: justinkambic <justin.kambic@elastic.co>

* Update monitor charts localization keys.

* Extract conditional message values into separate translate calls.

* Update x-pack/plugins/uptime/public/components/queries/monitor_list/monitor_list.tsx

Co-Authored-By: justinkambic <justin.kambic@elastic.co>

* Update monitor list column header localization keys.

* Update x-pack/plugins/uptime/public/components/queries/monitor_list/monitor_list.tsx

Co-Authored-By: justinkambic <justin.kambic@elastic.co>

* Monitor list update localization key of series label.

* Update x-pack/plugins/uptime/public/components/queries/monitor_list/monitor_list.tsx

Co-Authored-By: justinkambic <justin.kambic@elastic.co>

* Update x-pack/plugins/uptime/public/components/queries/monitor_status_bar/monitor_status_bar.tsx

Co-Authored-By: justinkambic <justin.kambic@elastic.co>

* Improve destructuring in monitor status bar, extract conditional values to separate translations.

* Update x-pack/plugins/uptime/public/components/queries/monitor_status_bar/monitor_status_bar.tsx

Co-Authored-By: justinkambic <justin.kambic@elastic.co>

* Update x-pack/plugins/uptime/public/components/queries/monitor_status_bar/monitor_status_bar.tsx

Co-Authored-By: justinkambic <justin.kambic@elastic.co>

* Apply suggestions from code review

Co-Authored-By: justinkambic <justin.kambic@elastic.co>

* Update localization keys for ping list.

* Apply suggestions from code review

Implement PR suggestions for PingList component.

Co-Authored-By: justinkambic <justin.kambic@elastic.co>

* Apply suggestions from code review

Add PR suggestions for Snapshot component.

Co-Authored-By: justinkambic <justin.kambic@elastic.co>

* Update localization keys for Snapshot component.

* Remove unneeded translation.

* Update x-pack/plugins/uptime/public/register_feature.ts

Implement PR suggestion for register_feature.ts

Co-Authored-By: justinkambic <justin.kambic@elastic.co>

* Apply suggestions from code review

Implement PR suggestions for uptime app.

Co-Authored-By: justinkambic <justin.kambic@elastic.co>

* Update localization, add translations for UptimeApp.

* Run prettier to fix style problem.

* Fix duplicate localization keys.

* Update x-pack/plugins/uptime/public/uptime_app.tsx

Implement PR feedback.

Co-Authored-By: justinkambic <justin.kambic@elastic.co>

* Update x-pack/plugins/uptime/public/components/queries/snapshot/snapshot.tsx

Implement a PR suggestion.

Co-Authored-By: justinkambic <justin.kambic@elastic.co>

* Update x-pack/plugins/uptime/public/components/queries/snapshot/snapshot.tsx

Implement a PR change.

Co-Authored-By: justinkambic <justin.kambic@elastic.co>

* Implement PR feedback.
2019-01-16 17:03:16 -05:00
CJ Cenizal 2371e58590
[CCR] Remote Clusters and Cross-cluster Replication apps (#26777) 2018-12-18 17:59:10 -08:00