@@ -155,7 +155,7 @@ export class DiscoverNoResults extends Component {
@@ -168,7 +168,7 @@ export class DiscoverNoResults extends Component {
@@ -181,7 +181,7 @@ export class DiscoverNoResults extends Component {
@@ -194,7 +194,7 @@ export class DiscoverNoResults extends Component {
@@ -210,14 +210,14 @@ export class DiscoverNoResults extends Component {
@@ -256,7 +256,7 @@ export class DiscoverNoResults extends Component {
}
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/directives/no_results.test.js b/src/plugins/discover/public/application/angular/directives/no_results.test.js
similarity index 100%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/directives/no_results.test.js
rename to src/plugins/discover/public/application/angular/directives/no_results.test.js
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/directives/render_complete.ts b/src/plugins/discover/public/application/angular/directives/render_complete.ts
similarity index 92%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/directives/render_complete.ts
rename to src/plugins/discover/public/application/angular/directives/render_complete.ts
index 7757deb806a18..635cf68f12fcb 100644
--- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/directives/render_complete.ts
+++ b/src/plugins/discover/public/application/angular/directives/render_complete.ts
@@ -17,7 +17,7 @@
* under the License.
*/
import { IScope } from 'angular';
-import { RenderCompleteHelper } from '../../../../../../../../plugins/kibana_utils/public';
+import { RenderCompleteHelper } from '../../../../../kibana_utils/public';
export function createRenderCompleteDirective() {
return {
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/directives/uninitialized.tsx b/src/plugins/discover/public/application/angular/directives/uninitialized.tsx
similarity index 92%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/directives/uninitialized.tsx
rename to src/plugins/discover/public/application/angular/directives/uninitialized.tsx
index b308607bbfbb0..d04aea0933115 100644
--- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/directives/uninitialized.tsx
+++ b/src/plugins/discover/public/application/angular/directives/uninitialized.tsx
@@ -37,7 +37,7 @@ export const DiscoverUninitialized = ({ onRefresh }: Props) => {
title={
@@ -45,7 +45,7 @@ export const DiscoverUninitialized = ({ onRefresh }: Props) => {
body={
@@ -53,7 +53,7 @@ export const DiscoverUninitialized = ({ onRefresh }: Props) => {
actions={
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.html b/src/plugins/discover/public/application/angular/discover.html
similarity index 89%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.html
rename to src/plugins/discover/public/application/angular/discover.html
index 1221b01657e45..b4db89b9275b4 100644
--- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.html
+++ b/src/plugins/discover/public/application/angular/discover.html
@@ -61,7 +61,7 @@ {{screenTitle}}
@@ -83,7 +83,7 @@ {{screenTitle}}
@@ -93,7 +93,7 @@ {{screenTitle}}
{{(hits || 0) | number:0}}
@@ -104,12 +104,12 @@ {{screenTitle}}
id="reload_saved_search"
ng-click="resetQuery()"
>
- {{::'kbn.discover.reloadSavedSearchButton' | i18n: {defaultMessage: 'Reset search'} }}
+ {{::'discover.reloadSavedSearchButton' | i18n: {defaultMessage: 'Reset search'} }}
@@ -117,7 +117,7 @@ {{screenTitle}}
@@ -141,7 +141,7 @@
{{screenTitle}}
>
{{screenTitle}}
>
{{screenTitle}}
class="dscTable__footer"
>
{{screenTitle}}
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.js b/src/plugins/discover/public/application/angular/discover.js
similarity index 93%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.js
rename to src/plugins/discover/public/application/angular/discover.js
index c1de704d1c00a..2afd0322f8701 100644
--- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.js
+++ b/src/plugins/discover/public/application/angular/discover.js
@@ -26,11 +26,8 @@ import dateMath from '@elastic/datemath';
import { i18n } from '@kbn/i18n';
import { getState, splitState } from './discover_state';
-import { RequestAdapter } from '../../../../../../../plugins/inspector/public';
-import {
- SavedObjectSaveModal,
- showSaveModal,
-} from '../../../../../../../plugins/saved_objects/public';
+import { RequestAdapter } from '../../../../inspector/public';
+import { SavedObjectSaveModal, showSaveModal } from '../../../../saved_objects/public';
import { getSortArray, getSortForSearchSource } from './doc_table';
import * as columnActions from './doc_table/actions/columns';
@@ -75,9 +72,9 @@ import {
syncQueryStateWithUrl,
getDefaultQuery,
search,
-} from '../../../../../../../plugins/data/public';
+} from '../../../../data/public';
import { getIndexPatternId } from '../helpers/get_index_pattern_id';
-import { addFatalError } from '../../../../../../../plugins/kibana_legacy/public';
+import { addFatalError } from '../../../../kibana_legacy/public';
const fetchStatuses = {
UNINITIALIZED: 'uninitialized',
@@ -99,10 +96,10 @@ app.config($routeProvider => {
}
return {
- text: i18n.translate('kbn.discover.badge.readOnly.text', {
+ text: i18n.translate('discover.badge.readOnly.text', {
defaultMessage: 'Read only',
}),
- tooltip: i18n.translate('kbn.discover.badge.readOnly.tooltip', {
+ tooltip: i18n.translate('discover.badge.readOnly.tooltip', {
defaultMessage: 'Unable to save searches',
}),
iconType: 'glasses',
@@ -333,10 +330,10 @@ function discoverController(
const getTopNavLinks = () => {
const newSearch = {
id: 'new',
- label: i18n.translate('kbn.discover.localMenu.localMenu.newSearchTitle', {
+ label: i18n.translate('discover.localMenu.localMenu.newSearchTitle', {
defaultMessage: 'New',
}),
- description: i18n.translate('kbn.discover.localMenu.newSearchDescription', {
+ description: i18n.translate('discover.localMenu.newSearchDescription', {
defaultMessage: 'New Search',
}),
run: function() {
@@ -349,10 +346,10 @@ function discoverController(
const saveSearch = {
id: 'save',
- label: i18n.translate('kbn.discover.localMenu.saveTitle', {
+ label: i18n.translate('discover.localMenu.saveTitle', {
defaultMessage: 'Save',
}),
- description: i18n.translate('kbn.discover.localMenu.saveSearchDescription', {
+ description: i18n.translate('discover.localMenu.saveSearchDescription', {
defaultMessage: 'Save Search',
}),
testId: 'discoverSaveButton',
@@ -389,7 +386,7 @@ function discoverController(
title={savedSearch.title}
showCopyOnSave={!!savedSearch.id}
objectType="search"
- description={i18n.translate('kbn.discover.localMenu.saveSaveSearchDescription', {
+ description={i18n.translate('discover.localMenu.saveSaveSearchDescription', {
defaultMessage:
'Save your Discover search so you can use it in visualizations and dashboards',
})}
@@ -402,10 +399,10 @@ function discoverController(
const openSearch = {
id: 'open',
- label: i18n.translate('kbn.discover.localMenu.openTitle', {
+ label: i18n.translate('discover.localMenu.openTitle', {
defaultMessage: 'Open',
}),
- description: i18n.translate('kbn.discover.localMenu.openSavedSearchDescription', {
+ description: i18n.translate('discover.localMenu.openSavedSearchDescription', {
defaultMessage: 'Open Saved Search',
}),
testId: 'discoverOpenButton',
@@ -419,10 +416,10 @@ function discoverController(
const shareSearch = {
id: 'share',
- label: i18n.translate('kbn.discover.localMenu.shareTitle', {
+ label: i18n.translate('discover.localMenu.shareTitle', {
defaultMessage: 'Share',
}),
- description: i18n.translate('kbn.discover.localMenu.shareSearchDescription', {
+ description: i18n.translate('discover.localMenu.shareSearchDescription', {
defaultMessage: 'Share Search',
}),
testId: 'shareTopNavButton',
@@ -446,10 +443,10 @@ function discoverController(
const inspectSearch = {
id: 'inspect',
- label: i18n.translate('kbn.discover.localMenu.inspectTitle', {
+ label: i18n.translate('discover.localMenu.inspectTitle', {
defaultMessage: 'Inspect',
}),
- description: i18n.translate('kbn.discover.localMenu.openInspectorForSearchDescription', {
+ description: i18n.translate('discover.localMenu.openInspectorForSearchDescription', {
defaultMessage: 'Open Inspector for search',
}),
testId: 'openInspectorButton',
@@ -492,7 +489,7 @@ function discoverController(
const pageTitleSuffix = savedSearch.id && savedSearch.title ? `: ${savedSearch.title}` : '';
chrome.docTitle.change(`Discover${pageTitleSuffix}`);
- const discoverBreadcrumbsTitle = i18n.translate('kbn.discover.discoverBreadcrumbTitle', {
+ const discoverBreadcrumbsTitle = i18n.translate('discover.discoverBreadcrumbTitle', {
defaultMessage: 'Discover',
});
@@ -606,16 +603,16 @@ function discoverController(
$scope.state.sort = getSortArray($scope.state.sort, $scope.indexPattern);
$scope.getBucketIntervalToolTipText = () => {
- return i18n.translate('kbn.discover.bucketIntervalTooltip', {
+ return i18n.translate('discover.bucketIntervalTooltip', {
defaultMessage:
'This interval creates {bucketsDescription} to show in the selected time range, so it has been scaled to {bucketIntervalDescription}',
values: {
bucketsDescription:
$scope.bucketInterval.scale > 1
- ? i18n.translate('kbn.discover.bucketIntervalTooltip.tooLargeBucketsText', {
+ ? i18n.translate('discover.bucketIntervalTooltip.tooLargeBucketsText', {
defaultMessage: 'buckets that are too large',
})
- : i18n.translate('kbn.discover.bucketIntervalTooltip.tooManyBucketsText', {
+ : i18n.translate('discover.bucketIntervalTooltip.tooManyBucketsText', {
defaultMessage: 'too many buckets',
}),
bucketIntervalDescription: $scope.bucketInterval.description,
@@ -748,7 +745,7 @@ function discoverController(
$scope.$evalAsync(() => {
if (id) {
toastNotifications.addSuccess({
- title: i18n.translate('kbn.discover.notifications.savedSearchTitle', {
+ title: i18n.translate('discover.notifications.savedSearchTitle', {
defaultMessage: `Search '{savedSearchTitle}' was saved`,
values: {
savedSearchTitle: savedSearch.title,
@@ -769,7 +766,7 @@ function discoverController(
return { id };
} catch (saveError) {
toastNotifications.addDanger({
- title: i18n.translate('kbn.discover.notifications.notSavedSearchTitle', {
+ title: i18n.translate('discover.notifications.notSavedSearchTitle', {
defaultMessage: `Search '{savedSearchTitle}' was not saved.`,
values: {
savedSearchTitle: savedSearch.title,
@@ -812,7 +809,7 @@ function discoverController(
$scope.fetchError = fetchError;
} else {
toastNotifications.addError(error, {
- title: i18n.translate('kbn.discover.errorLoadingData', {
+ title: i18n.translate('discover.errorLoadingData', {
defaultMessage: 'Error loading data',
}),
toastMessage: error.shortMessage || error.body?.message,
@@ -903,10 +900,10 @@ function discoverController(
function logInspectorRequest() {
inspectorAdapters.requests.reset();
- const title = i18n.translate('kbn.discover.inspectorRequestDataTitle', {
+ const title = i18n.translate('discover.inspectorRequestDataTitle', {
defaultMessage: 'data',
});
- const description = i18n.translate('kbn.discover.inspectorRequestDescription', {
+ const description = i18n.translate('discover.inspectorRequestDescription', {
defaultMessage: 'This request queries Elasticsearch to fetch the data for the search.',
});
inspectorRequest = inspectorAdapters.requests.start(title, { description });
@@ -1049,7 +1046,7 @@ function discoverController(
}
function getIndexPatternWarning(index) {
- return i18n.translate('kbn.discover.valueIsNotConfiguredIndexPatternIDWarningTitle', {
+ return i18n.translate('discover.valueIsNotConfiguredIndexPatternIDWarningTitle', {
defaultMessage: '{stateVal} is not a configured index pattern ID',
values: {
stateVal: `"${index}"`,
@@ -1076,7 +1073,7 @@ function discoverController(
if (ownIndexPattern) {
toastNotifications.addWarning({
title: warningTitle,
- text: i18n.translate('kbn.discover.showingSavedIndexPatternWarningDescription', {
+ text: i18n.translate('discover.showingSavedIndexPatternWarningDescription', {
defaultMessage:
'Showing the saved index pattern: "{ownIndexPatternTitle}" ({ownIndexPatternId})',
values: {
@@ -1090,7 +1087,7 @@ function discoverController(
toastNotifications.addWarning({
title: warningTitle,
- text: i18n.translate('kbn.discover.showingDefaultIndexPatternWarningDescription', {
+ text: i18n.translate('discover.showingDefaultIndexPatternWarningDescription', {
defaultMessage:
'Showing the default index pattern: "{loadedIndexPatternTitle}" ({loadedIndexPatternId})',
values: {
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover_state.test.ts b/src/plugins/discover/public/application/angular/discover_state.test.ts
similarity index 100%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover_state.test.ts
rename to src/plugins/discover/public/application/angular/discover_state.test.ts
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover_state.ts b/src/plugins/discover/public/application/angular/discover_state.ts
similarity index 96%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover_state.ts
rename to src/plugins/discover/public/application/angular/discover_state.ts
index 2a036f0ac60ad..46500d9fdf85e 100644
--- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover_state.ts
+++ b/src/plugins/discover/public/application/angular/discover_state.ts
@@ -24,9 +24,9 @@ import {
syncState,
ReduxLikeStateContainer,
IKbnUrlStateStorage,
-} from '../../../../../../../plugins/kibana_utils/public';
-import { esFilters, Filter, Query } from '../../../../../../../plugins/data/public';
-import { migrateLegacyQuery } from '../../../../../../../plugins/kibana_legacy/public';
+} from '../../../../kibana_utils/public';
+import { esFilters, Filter, Query } from '../../../../data/public';
+import { migrateLegacyQuery } from '../../../../kibana_legacy/public';
export interface AppState {
/**
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc.html b/src/plugins/discover/public/application/angular/doc.html
similarity index 100%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc.html
rename to src/plugins/discover/public/application/angular/doc.html
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc.ts b/src/plugins/discover/public/application/angular/doc.ts
similarity index 91%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc.ts
rename to src/plugins/discover/public/application/angular/doc.ts
index 092e3c79b1007..2d0d45e5003fb 100644
--- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc.ts
+++ b/src/plugins/discover/public/application/angular/doc.ts
@@ -49,7 +49,9 @@ app.config(($routeProvider: any) => {
})
// the new route, es 7 deprecated types, es 8 removed them
.when('/discover/doc/:indexPattern/:index', {
- controller: ($scope: LazyScope, $route: any, es: any) => {
+ // have to be written as function expression, because it's not compiled in dev mode
+ // eslint-disable-next-line object-shorthand
+ controller: function($scope: LazyScope, $route: any, es: any) {
timefilter.disableAutoRefreshSelector();
timefilter.disableTimeRangeSelector();
$scope.esClient = es;
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/_doc_table.scss b/src/plugins/discover/public/application/angular/doc_table/_doc_table.scss
similarity index 100%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/_doc_table.scss
rename to src/plugins/discover/public/application/angular/doc_table/_doc_table.scss
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/_index.scss b/src/plugins/discover/public/application/angular/doc_table/_index.scss
similarity index 100%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/_index.scss
rename to src/plugins/discover/public/application/angular/doc_table/_index.scss
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/actions/columns.ts b/src/plugins/discover/public/application/angular/doc_table/actions/columns.ts
similarity index 100%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/actions/columns.ts
rename to src/plugins/discover/public/application/angular/doc_table/actions/columns.ts
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/_index.scss b/src/plugins/discover/public/application/angular/doc_table/components/_index.scss
similarity index 100%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/_index.scss
rename to src/plugins/discover/public/application/angular/doc_table/components/_index.scss
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/_table_header.scss b/src/plugins/discover/public/application/angular/doc_table/components/_table_header.scss
similarity index 100%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/_table_header.scss
rename to src/plugins/discover/public/application/angular/doc_table/components/_table_header.scss
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/pager/__snapshots__/tool_bar_pager_buttons.test.tsx.snap b/src/plugins/discover/public/application/angular/doc_table/components/pager/__snapshots__/tool_bar_pager_buttons.test.tsx.snap
similarity index 100%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/pager/__snapshots__/tool_bar_pager_buttons.test.tsx.snap
rename to src/plugins/discover/public/application/angular/doc_table/components/pager/__snapshots__/tool_bar_pager_buttons.test.tsx.snap
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/pager/__snapshots__/tool_bar_pager_text.test.tsx.snap b/src/plugins/discover/public/application/angular/doc_table/components/pager/__snapshots__/tool_bar_pager_text.test.tsx.snap
similarity index 100%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/pager/__snapshots__/tool_bar_pager_text.test.tsx.snap
rename to src/plugins/discover/public/application/angular/doc_table/components/pager/__snapshots__/tool_bar_pager_text.test.tsx.snap
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/pager/index.ts b/src/plugins/discover/public/application/angular/doc_table/components/pager/index.ts
similarity index 100%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/pager/index.ts
rename to src/plugins/discover/public/application/angular/doc_table/components/pager/index.ts
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/pager/tool_bar_pager_buttons.test.tsx b/src/plugins/discover/public/application/angular/doc_table/components/pager/tool_bar_pager_buttons.test.tsx
similarity index 100%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/pager/tool_bar_pager_buttons.test.tsx
rename to src/plugins/discover/public/application/angular/doc_table/components/pager/tool_bar_pager_buttons.test.tsx
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/pager/tool_bar_pager_buttons.tsx b/src/plugins/discover/public/application/angular/doc_table/components/pager/tool_bar_pager_buttons.tsx
similarity index 92%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/pager/tool_bar_pager_buttons.tsx
rename to src/plugins/discover/public/application/angular/doc_table/components/pager/tool_bar_pager_buttons.tsx
index 6f1cf81e2c541..e95153d85b064 100644
--- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/pager/tool_bar_pager_buttons.tsx
+++ b/src/plugins/discover/public/application/angular/doc_table/components/pager/tool_bar_pager_buttons.tsx
@@ -35,7 +35,7 @@ export function ToolBarPagerButtons(props: Props) {
disabled={!props.hasPreviousPage}
data-test-subj="btnPrevPage"
aria-label={i18n.translate(
- 'kbn.discover.docTable.pager.toolbarPagerButtons.previousButtonAriaLabel',
+ 'discover.docTable.pager.toolbarPagerButtons.previousButtonAriaLabel',
{
defaultMessage: 'Previous page in table',
}
@@ -49,7 +49,7 @@ export function ToolBarPagerButtons(props: Props) {
disabled={!props.hasNextPage}
data-test-subj="btnNextPage"
aria-label={i18n.translate(
- 'kbn.discover.docTable.pager.toolbarPagerButtons.nextButtonAriaLabel',
+ 'discover.docTable.pager.toolbarPagerButtons.nextButtonAriaLabel',
{
defaultMessage: 'Next page in table',
}
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/pager/tool_bar_pager_text.test.tsx b/src/plugins/discover/public/application/angular/doc_table/components/pager/tool_bar_pager_text.test.tsx
similarity index 100%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/pager/tool_bar_pager_text.test.tsx
rename to src/plugins/discover/public/application/angular/doc_table/components/pager/tool_bar_pager_text.test.tsx
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/pager/tool_bar_pager_text.tsx b/src/plugins/discover/public/application/angular/doc_table/components/pager/tool_bar_pager_text.tsx
similarity index 95%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/pager/tool_bar_pager_text.tsx
rename to src/plugins/discover/public/application/angular/doc_table/components/pager/tool_bar_pager_text.tsx
index 84338d817c86b..46e3cd9511eb5 100644
--- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/pager/tool_bar_pager_text.tsx
+++ b/src/plugins/discover/public/application/angular/doc_table/components/pager/tool_bar_pager_text.tsx
@@ -30,7 +30,7 @@ export function ToolBarPagerText({ startItem, endItem, totalItems }: Props) {
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header.ts b/src/plugins/discover/public/application/angular/doc_table/components/table_header.ts
similarity index 100%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header.ts
rename to src/plugins/discover/public/application/angular/doc_table/components/table_header.ts
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header/__snapshots__/table_header.test.tsx.snap b/src/plugins/discover/public/application/angular/doc_table/components/table_header/__snapshots__/table_header.test.tsx.snap
similarity index 100%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header/__snapshots__/table_header.test.tsx.snap
rename to src/plugins/discover/public/application/angular/doc_table/components/table_header/__snapshots__/table_header.test.tsx.snap
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header/helpers.tsx b/src/plugins/discover/public/application/angular/doc_table/components/table_header/helpers.tsx
similarity index 100%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header/helpers.tsx
rename to src/plugins/discover/public/application/angular/doc_table/components/table_header/helpers.tsx
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header/table_header.test.tsx b/src/plugins/discover/public/application/angular/doc_table/components/table_header/table_header.test.tsx
similarity index 99%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header/table_header.test.tsx
rename to src/plugins/discover/public/application/angular/doc_table/components/table_header/table_header.test.tsx
index 89f73022627c5..b201bea26503e 100644
--- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header/table_header.test.tsx
+++ b/src/plugins/discover/public/application/angular/doc_table/components/table_header/table_header.test.tsx
@@ -25,8 +25,6 @@ import { findTestSubject } from '@elastic/eui/lib/test';
import { SortOrder } from './helpers';
import { IndexPattern, IFieldType } from '../../../../../kibana_services';
-jest.mock('ui/new_platform');
-
function getMockIndexPattern() {
return ({
id: 'test',
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header/table_header.tsx b/src/plugins/discover/public/application/angular/doc_table/components/table_header/table_header.tsx
similarity index 100%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header/table_header.tsx
rename to src/plugins/discover/public/application/angular/doc_table/components/table_header/table_header.tsx
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header/table_header_column.tsx b/src/plugins/discover/public/application/angular/doc_table/components/table_header/table_header_column.tsx
similarity index 88%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header/table_header_column.tsx
rename to src/plugins/discover/public/application/angular/doc_table/components/table_header/table_header_column.tsx
index d1a9a5146fb8a..4c09ff8701f30 100644
--- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header/table_header_column.tsx
+++ b/src/plugins/discover/public/application/angular/doc_table/components/table_header/table_header_column.tsx
@@ -80,21 +80,21 @@ export function TableHeaderColumn({
const getSortButtonAriaLabel = () => {
const sortAscendingMessage = i18n.translate(
- 'kbn.docTable.tableHeader.sortByColumnAscendingAriaLabel',
+ 'discover.docTable.tableHeader.sortByColumnAscendingAriaLabel',
{
defaultMessage: 'Sort {columnName} ascending',
values: { columnName: name },
}
);
const sortDescendingMessage = i18n.translate(
- 'kbn.docTable.tableHeader.sortByColumnDescendingAriaLabel',
+ 'discover.docTable.tableHeader.sortByColumnDescendingAriaLabel',
{
defaultMessage: 'Sort {columnName} descending',
values: { columnName: name },
}
);
const stopSortingMessage = i18n.translate(
- 'kbn.docTable.tableHeader.sortByColumnUnsortedAriaLabel',
+ 'discover.docTable.tableHeader.sortByColumnUnsortedAriaLabel',
{
defaultMessage: 'Stop sorting on {columnName}',
values: { columnName: name },
@@ -126,42 +126,42 @@ export function TableHeaderColumn({
// Remove Button
{
active: isRemoveable && typeof onRemoveColumn === 'function',
- ariaLabel: i18n.translate('kbn.docTable.tableHeader.removeColumnButtonAriaLabel', {
+ ariaLabel: i18n.translate('discover.docTable.tableHeader.removeColumnButtonAriaLabel', {
defaultMessage: 'Remove {columnName} column',
values: { columnName: name },
}),
className: 'fa fa-remove kbnDocTableHeader__move',
onClick: () => onRemoveColumn && onRemoveColumn(name),
testSubject: `docTableRemoveHeader-${name}`,
- tooltip: i18n.translate('kbn.docTable.tableHeader.removeColumnButtonTooltip', {
+ tooltip: i18n.translate('discover.docTable.tableHeader.removeColumnButtonTooltip', {
defaultMessage: 'Remove Column',
}),
},
// Move Left Button
{
active: colLeftIdx >= 0 && typeof onMoveColumn === 'function',
- ariaLabel: i18n.translate('kbn.docTable.tableHeader.moveColumnLeftButtonAriaLabel', {
+ ariaLabel: i18n.translate('discover.docTable.tableHeader.moveColumnLeftButtonAriaLabel', {
defaultMessage: 'Move {columnName} column to the left',
values: { columnName: name },
}),
className: 'fa fa-angle-double-left kbnDocTableHeader__move',
onClick: () => onMoveColumn && onMoveColumn(name, colLeftIdx),
testSubject: `docTableMoveLeftHeader-${name}`,
- tooltip: i18n.translate('kbn.docTable.tableHeader.moveColumnLeftButtonTooltip', {
+ tooltip: i18n.translate('discover.docTable.tableHeader.moveColumnLeftButtonTooltip', {
defaultMessage: 'Move column to the left',
}),
},
// Move Right Button
{
active: colRightIdx >= 0 && typeof onMoveColumn === 'function',
- ariaLabel: i18n.translate('kbn.docTable.tableHeader.moveColumnRightButtonAriaLabel', {
+ ariaLabel: i18n.translate('discover.docTable.tableHeader.moveColumnRightButtonAriaLabel', {
defaultMessage: 'Move {columnName} column to the right',
values: { columnName: name },
}),
className: 'fa fa-angle-double-right kbnDocTableHeader__move',
onClick: () => onMoveColumn && onMoveColumn(name, colRightIdx),
testSubject: `docTableMoveRightHeader-${name}`,
- tooltip: i18n.translate('kbn.docTable.tableHeader.moveColumnRightButtonTooltip', {
+ tooltip: i18n.translate('discover.docTable.tableHeader.moveColumnRightButtonTooltip', {
defaultMessage: 'Move column to the right',
}),
},
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_row.ts b/src/plugins/discover/public/application/angular/doc_table/components/table_row.ts
similarity index 96%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_row.ts
rename to src/plugins/discover/public/application/angular/doc_table/components/table_row.ts
index 698bfe7416d42..3b48c4c79365e 100644
--- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_row.ts
+++ b/src/plugins/discover/public/application/angular/doc_table/components/table_row.ts
@@ -23,15 +23,15 @@ import $ from 'jquery';
import rison from 'rison-node';
import '../../doc_viewer';
// @ts-ignore
-import { noWhiteSpace } from '../../../../../../common/utils/no_white_space';
+import { noWhiteSpace } from '../../../../../../../legacy/core_plugins/kibana/common/utils/no_white_space';
import openRowHtml from './table_row/open.html';
import detailsHtml from './table_row/details.html';
-import { dispatchRenderComplete } from '../../../../../../../../../plugins/kibana_utils/public';
+import { dispatchRenderComplete } from '../../../../../../kibana_utils/public';
import cellTemplateHtml from '../components/table_row/cell.html';
import truncateByHeightTemplateHtml from '../components/table_row/truncate_by_height.html';
-import { esFilters } from '../../../../../../../../../plugins/data/public';
+import { esFilters } from '../../../../../../data/public';
import { getServices } from '../../../../kibana_services';
// guesstimate at the minimum number of chars wide cells in the table should be
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_row/_cell.scss b/src/plugins/discover/public/application/angular/doc_table/components/table_row/_cell.scss
similarity index 100%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_row/_cell.scss
rename to src/plugins/discover/public/application/angular/doc_table/components/table_row/_cell.scss
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_row/_details.scss b/src/plugins/discover/public/application/angular/doc_table/components/table_row/_details.scss
similarity index 100%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_row/_details.scss
rename to src/plugins/discover/public/application/angular/doc_table/components/table_row/_details.scss
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_row/_index.scss b/src/plugins/discover/public/application/angular/doc_table/components/table_row/_index.scss
similarity index 100%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_row/_index.scss
rename to src/plugins/discover/public/application/angular/doc_table/components/table_row/_index.scss
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_row/_open.scss b/src/plugins/discover/public/application/angular/doc_table/components/table_row/_open.scss
similarity index 100%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_row/_open.scss
rename to src/plugins/discover/public/application/angular/doc_table/components/table_row/_open.scss
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_row/cell.html b/src/plugins/discover/public/application/angular/doc_table/components/table_row/cell.html
similarity index 66%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_row/cell.html
rename to src/plugins/discover/public/application/angular/doc_table/components/table_row/cell.html
index 0704016a52bbd..e8c4fceeca7ff 100644
--- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_row/cell.html
+++ b/src/plugins/discover/public/application/angular/doc_table/components/table_row/cell.html
@@ -18,17 +18,17 @@
data-column="<%- column %>"
tooltip-append-to-body="1"
data-test-subj="docTableCellFilter"
- tooltip="{{ ::'kbn.docTable.tableRow.filterForValueButtonTooltip' | i18n: {defaultMessage: 'Filter for value'} }}"
+ tooltip="{{ ::'discover.docTable.tableRow.filterForValueButtonTooltip' | i18n: {defaultMessage: 'Filter for value'} }}"
tooltip-placement="bottom"
- aria-label="{{ ::'kbn.docTable.tableRow.filterForValueButtonAriaLabel' | i18n: {defaultMessage: 'Filter for value'} }}"
+ aria-label="{{ ::'discover.docTable.tableRow.filterForValueButtonAriaLabel' | i18n: {defaultMessage: 'Filter for value'} }}"
>
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_row/details.html b/src/plugins/discover/public/application/angular/doc_table/components/table_row/details.html
similarity index 89%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_row/details.html
rename to src/plugins/discover/public/application/angular/doc_table/components/table_row/details.html
index d149a9023816a..37ae08246d1d3 100644
--- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_row/details.html
+++ b/src/plugins/discover/public/application/angular/doc_table/components/table_row/details.html
@@ -8,7 +8,7 @@
@@ -22,7 +22,7 @@
data-test-subj="docTableRowAction"
ng-href="{{ getContextAppHref() }}"
ng-if="indexPattern.isTimeBased()"
- i18n-id="kbn.docTable.tableRow.viewSurroundingDocumentsLinkText"
+ i18n-id="discover.docTable.tableRow.viewSurroundingDocumentsLinkText"
i18n-default-message="View surrounding documents"
>
@@ -31,7 +31,7 @@
class="euiLink"
data-test-subj="docTableRowAction"
ng-href="#/discover/doc/{{indexPattern.id}}/{{row._index}}?id={{uriEncodedId}}"
- i18n-id="kbn.docTable.tableRow.viewSingleDocumentLinkText"
+ i18n-id="discover.docTable.tableRow.viewSingleDocumentLinkText"
i18n-default-message="View single document"
>
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_row/open.html b/src/plugins/discover/public/application/angular/doc_table/components/table_row/open.html
similarity index 72%
rename from src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_row/open.html
rename to src/plugins/discover/public/application/angular/doc_table/components/table_row/open.html
index d6c4b858d2b47..6a14b6fc70348 100644
--- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_row/open.html
+++ b/src/plugins/discover/public/application/angular/doc_table/components/table_row/open.html
@@ -2,7 +2,7 @@