Skip to content

Commit b576780

Browse files
committed
[Rename] Refactored src/core/public directory (#93)
* [Rename] Refactored src/core/public directory Signed-off-by: Mihir Soni <mihirsoni.123@gmail.com> * [Rename] addressed review feedbacks Signed-off-by: Mihir Soni <mihirsoni.123@gmail.com>
1 parent 7a22b8e commit b576780

File tree

107 files changed

+401
-401
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+401
-401
lines changed

src/core/public/_core.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* designed to emulate root-element stretching and overflow
3-
* prevention previously handled in kbn_chrome.less
3+
* prevention previously handled in osd_chrome.less
44
*/
55
.coreSystemRootDomElement {
66
overflow-x: hidden;

src/core/public/_variables.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
@import '@elastic/eui/src/global_styling/variables/header';
22

3-
$kbnHeaderOffset: $euiHeaderHeightCompensation * 2;
3+
$osdHeaderOffset: $euiHeaderHeightCompensation * 2;

src/core/public/apm_system.test.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ describe('ApmSystem', () => {
5656
windowSpy = jest.spyOn(global as any, 'window', 'get').mockImplementation(() => ({
5757
location: {
5858
protocol: 'http:',
59-
hostname: 'mykibanadomain.com',
59+
hostname: 'myopensearch-dashboardsdomain.com',
6060
port: '5601',
6161
},
6262
}));
@@ -93,29 +93,29 @@ describe('ApmSystem', () => {
9393
expect(
9494
wrappedObserver({
9595
type: 'http-request',
96-
name: 'GET http://mykibanadomain.com:5601/asdf/qwerty',
96+
name: 'GET http://myopensearch-dashboardsdomain.com:5601/asdf/qwerty',
9797
} as Transaction)
9898
).toEqual({ type: 'http-request', name: 'GET /asdf/qwerty' });
9999

100100
// Does not modify URLs that are not on the same origin
101101
expect(
102102
wrappedObserver({
103103
type: 'http-request',
104-
name: 'GET https://mykibanadomain.com:5601/asdf/qwerty',
104+
name: 'GET https://myopensearch-dashboardsdomain.com:5601/asdf/qwerty',
105105
} as Transaction)
106106
).toEqual({
107107
type: 'http-request',
108-
name: 'GET https://mykibanadomain.com:5601/asdf/qwerty',
108+
name: 'GET https://myopensearch-dashboardsdomain.com:5601/asdf/qwerty',
109109
});
110110

111111
expect(
112112
wrappedObserver({
113113
type: 'http-request',
114-
name: 'GET http://mykibanadomain.com:9200/asdf/qwerty',
114+
name: 'GET http://myopensearch-dashboardsdomain.com:9200/asdf/qwerty',
115115
} as Transaction)
116116
).toEqual({
117117
type: 'http-request',
118-
name: 'GET http://mykibanadomain.com:9200/asdf/qwerty',
118+
name: 'GET http://myopensearch-dashboardsdomain.com:9200/asdf/qwerty',
119119
});
120120

121121
expect(
@@ -138,28 +138,28 @@ describe('ApmSystem', () => {
138138
expect(
139139
wrappedObserver({
140140
type: 'http-request',
141-
name: 'GET http://mykibanadomain.com:5601/alpha',
141+
name: 'GET http://myopensearch-dashboardsdomain.com:5601/alpha',
142142
} as Transaction)
143143
).toEqual({ type: 'http-request', name: 'GET /' });
144144

145145
expect(
146146
wrappedObserver({
147147
type: 'http-request',
148-
name: 'GET http://mykibanadomain.com:5601/alpha/',
148+
name: 'GET http://myopensearch-dashboardsdomain.com:5601/alpha/',
149149
} as Transaction)
150150
).toEqual({ type: 'http-request', name: 'GET /' });
151151

152152
expect(
153153
wrappedObserver({
154154
type: 'http-request',
155-
name: 'GET http://mykibanadomain.com:5601/alpha/beta',
155+
name: 'GET http://myopensearch-dashboardsdomain.com:5601/alpha/beta',
156156
} as Transaction)
157157
).toEqual({ type: 'http-request', name: 'GET /beta' });
158158

159159
expect(
160160
wrappedObserver({
161161
type: 'http-request',
162-
name: 'GET http://mykibanadomain.com:5601/alpha/beta/',
162+
name: 'GET http://myopensearch-dashboardsdomain.com:5601/alpha/beta/',
163163
} as Transaction)
164164
).toEqual({ type: 'http-request', name: 'GET /beta/' });
165165

src/core/public/apm_system.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
*/
1919

2020
import type { ApmBase } from '@elastic/apm-rum';
21-
import { modifyUrl } from '@kbn/std';
21+
import { modifyUrl } from '@osd/std';
2222
import type { InternalApplicationStart } from './application';
2323

2424
/** "GET protocol://hostname:port/pathname" */
2525
const HTTP_REQUEST_TRANSACTION_NAME_REGEX = /^(GET|POST|PUT|HEAD|PATCH|DELETE|OPTIONS|CONNECT|TRACE)\s(.*)$/;
2626

2727
/**
2828
* This is the entry point used to boot the frontend when serving a application
29-
* that lives in the Kibana Platform.
29+
* that lives in the OpenSearch Dashboards Platform.
3030
*/
3131

3232
interface ApmConfig {
@@ -66,10 +66,10 @@ export class ApmSystem {
6666
if (!this.enabled || !start) return;
6767
/**
6868
* Register listeners for navigation changes and capture them as
69-
* route-change transactions after Kibana app is bootstrapped
69+
* route-change transactions after OpenSearch Dashboards app is bootstrapped
7070
*/
7171
start.application.currentAppId$.subscribe((appId) => {
72-
const apmInstance = (window as any).elasticApm;
72+
const apmInstance = (window as any).opensearchApm;
7373
if (appId && apmInstance && typeof apmInstance.startTransaction === 'function') {
7474
apmInstance.startTransaction(`/app/${appId}`, 'route-change', {
7575
managed: true,

src/core/public/application/capabilities/capabilities_service.mock.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
* specific language governing permissions and limitations
1717
* under the License.
1818
*/
19-
import { deepFreeze } from '@kbn/std';
20-
import type { PublicMethodsOf } from '@kbn/utility-types';
19+
import { deepFreeze } from '@osd/std';
20+
import type { PublicMethodsOf } from '@osd/utility-types';
2121
import { CapabilitiesService, CapabilitiesStart } from './capabilities_service';
2222

2323
const createStartContractMock = (): jest.Mocked<CapabilitiesStart> => ({

src/core/public/application/capabilities/capabilities_service.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
* specific language governing permissions and limitations
1717
* under the License.
1818
*/
19-
import { RecursiveReadonly } from '@kbn/utility-types';
20-
import { deepFreeze } from '@kbn/std';
19+
import { RecursiveReadonly } from '@osd/utility-types';
20+
import { deepFreeze } from '@osd/std';
2121

2222
import { Capabilities } from '../../../types/capabilities';
2323
import { HttpStart } from '../../http';

src/core/public/application/integration_tests/utils.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import React, { ReactElement } from 'react';
2121
import { act } from 'react-dom/test-utils';
2222
import { mount } from 'enzyme';
23-
import { I18nProvider } from '@kbn/i18n/react';
23+
import { I18nProvider } from '@osd/i18n/react';
2424

2525
import { AppMountParameters } from '../types';
2626
import { MockedMounterTuple, Mountable } from '../test_types';

src/core/public/application/test_types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* specific language governing permissions and limitations
1717
* under the License.
1818
*/
19-
import type { PublicMethodsOf } from '@kbn/utility-types';
19+
import type { PublicMethodsOf } from '@osd/utility-types';
2020
import { AppUnmount, Mounter } from './types';
2121
import { ApplicationService } from './application_service';
2222

src/core/public/application/types.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
import { Observable } from 'rxjs';
2121
import { History } from 'history';
22-
import { RecursiveReadonly } from '@kbn/utility-types';
22+
import { RecursiveReadonly } from '@osd/utility-types';
2323

2424
import { MountPoint } from '../types';
2525
import { Capabilities } from './capabilities';
@@ -728,10 +728,10 @@ export interface ApplicationStart {
728728
*
729729
* @example
730730
* ```ts
731-
* // current url: `https://kibana:8080/base-path/s/my-space/app/dashboard`
731+
* // current url: `https://opensearch-dashboards:8080/base-path/s/my-space/app/dashboard`
732732
*
733733
* // will call `application.navigateToApp('discover', { path: '/some-path?foo=bar'})`
734-
* application.navigateToUrl('https://kibana:8080/base-path/s/my-space/app/discover/some-path?foo=bar')
734+
* application.navigateToUrl('https://opensearch-dashboards:8080/base-path/s/my-space/app/discover/some-path?foo=bar')
735735
* application.navigateToUrl('/base-path/s/my-space/app/discover/some-path?foo=bar')
736736
* application.navigateToUrl('./discover/some-path?foo=bar')
737737
*

src/core/public/application/ui/app_not_found_screen.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
import { EuiEmptyPrompt, EuiPage, EuiPageBody, EuiPageContent } from '@elastic/eui';
2121
import React from 'react';
22-
import { FormattedMessage } from '@kbn/i18n/react';
22+
import { FormattedMessage } from '@osd/i18n/react';
2323

2424
export const AppNotFound = () => (
2525
<EuiPage style={{ minHeight: '100%' }} data-test-subj="appNotFoundPageContent">

0 commit comments

Comments
 (0)