Skip to content

Commit

Permalink
Rename es_ui_shared to opensearch_ui_shared plugin (#37) (#127)
Browse files Browse the repository at this point in the history
* Rename es_ui_shared to opensearch_ui_shared plugin (#37)

Signed-off-by: Bishoy Boktor <boktorbb@amazon.com>
  • Loading branch information
boktorbb authored and kavilla committed Mar 19, 2021
1 parent 18c6de2 commit 86518aa
Show file tree
Hide file tree
Showing 148 changed files with 101 additions and 101 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.kbnUiAceKeyboardHint {
.osdUiAceKeyboardHint {
position: absolute;
top: 0;
bottom: 0;
Expand All @@ -18,7 +18,7 @@
z-index: $euiZLevel1;
}

&.kbnUiAceKeyboardHint-isInactive {
&.osdUiAceKeyboardHint-isInactive {
display: none;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function useUIAceKeyboardMode(aceTextAreaElement: HTMLTextAreaElement | n
// that acts as a container and insert it just before ace's textarea element
// so that the overlay lives at the correct spot in the DOM hierarchy.
overlayMountNode.current = document.createElement('div');
overlayMountNode.current.className = 'kbnUiAceKeyboardHint';
overlayMountNode.current.className = 'osdUiAceKeyboardHint';
overlayMountNode.current.setAttribute('role', 'application');
overlayMountNode.current.tabIndex = 0;
overlayMountNode.current.addEventListener('focus', enableOverlay);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { HttpSetup } from 'kibana/public';
import { HttpSetup } from 'opensearch-dashboards/public';
import React, { createContext, useContext } from 'react';

import { useRequest } from '../../../public';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const SectionError: React.FunctionComponent<Props> = ({
}) => {
const {
error: errorString,
cause, // wrapEsError() on the server adds a "cause" array
cause, // wrapOpenSearchError() on the server adds a "cause" array
message,
} = error;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
* under the License.
*/

export { isEsError } from './is_es_error';
export { isOpenSearchError } from './is_opensearch_error';
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@

import * as legacyElasticsearch from 'elasticsearch';

const esErrorsParent = legacyElasticsearch.errors._Abstract;
const opensearchErrorsParent = legacyElasticsearch.errors._Abstract;

interface RequestError extends Error {
statusCode?: number;
}

export function isEsError(err: RequestError) {
const isInstanceOfEsError = err instanceof esErrorsParent;
export function isOpenSearchError(err: RequestError) {
const isInstanceOfOpenSearchError = err instanceof opensearchErrorsParent;
const hasStatusCode = Boolean(err.statusCode);

return isInstanceOfEsError && hasStatusCode;
return isInstanceOfOpenSearchError && hasStatusCode;
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "esUiShared",
"version": "kibana",
"id": "opensearchUiShared",
"version": "opensearchDashboards",
"ui": true,
"server": true,
"extraPublicDirs": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@

import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from '@kbn/i18n/react';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@osd/i18n/react';
import { i18n } from '@osd/i18n';

import { EuiFlexGroup, EuiFlexItem, EuiFormRow, EuiSelect } from '@elastic/eui';

export const CronDaily = ({ minute, minuteOptions, hour, hourOptions, onChange }) => (
<Fragment>
<EuiFormRow
label={
<FormattedMessage id="esUi.cronEditor.cronDaily.fieldTimeLabel" defaultMessage="Time" />
<FormattedMessage id="opensearchUi.cronEditor.cronDaily.fieldTimeLabel" defaultMessage="Time" />
}
fullWidth
data-test-subj="cronFrequencyConfiguration"
Expand All @@ -38,12 +38,12 @@ export const CronDaily = ({ minute, minuteOptions, hour, hourOptions, onChange }
<EuiSelect
options={hourOptions}
value={hour}
aria-label={i18n.translate('esUi.cronEditor.cronDaily.hourSelectLabel', {
aria-label={i18n.translate('opensearchUi.cronEditor.cronDaily.hourSelectLabel', {
defaultMessage: 'Hour',
})}
onChange={(e) => onChange({ hour: e.target.value })}
fullWidth
prepend={i18n.translate('esUi.cronEditor.cronDaily.fieldHour.textAtLabel', {
prepend={i18n.translate('opensearchUi.cronEditor.cronDaily.fieldHour.textAtLabel', {
defaultMessage: 'At',
})}
data-test-subj="cronFrequencyDailyHourSelect"
Expand All @@ -54,7 +54,7 @@ export const CronDaily = ({ minute, minuteOptions, hour, hourOptions, onChange }
<EuiSelect
options={minuteOptions}
value={minute}
aria-label={i18n.translate('esUi.cronEditor.cronDaily.minuteSelectLabel', {
aria-label={i18n.translate('opensearchUi.cronEditor.cronDaily.minuteSelectLabel', {
defaultMessage: 'Minute',
})}
onChange={(e) => onChange({ minute: e.target.value })}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import React, { Component, Fragment } from 'react';
import PropTypes from 'prop-types';
import { padStart } from 'lodash';
import { FormattedMessage } from '@kbn/i18n/react';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@osd/i18n/react';
import { i18n } from '@osd/i18n';

import { EuiSelect, EuiFormRow } from '@elastic/eui';

Expand Down Expand Up @@ -347,7 +347,7 @@ export class CronEditor extends Component {
<Fragment>
<EuiFormRow
label={
<FormattedMessage id="esUi.cronEditor.fieldFrequencyLabel" defaultMessage="Frequency" />
<FormattedMessage id="opensearchUi.cronEditor.fieldFrequencyLabel" defaultMessage="Frequency" />
}
fullWidth
>
Expand All @@ -356,7 +356,7 @@ export class CronEditor extends Component {
value={frequency}
onChange={(e) => this.onChangeFrequency(e.target.value)}
fullWidth
prepend={i18n.translate('esUi.cronEditor.textEveryLabel', {
prepend={i18n.translate('opensearchUi.cronEditor.textEveryLabel', {
defaultMessage: 'Every',
})}
data-test-subj="cronFrequencySelect"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@

import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from '@kbn/i18n/react';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@osd/i18n/react';
import { i18n } from '@osd/i18n';

import { EuiFormRow, EuiSelect } from '@elastic/eui';

export const CronHourly = ({ minute, minuteOptions, onChange }) => (
<Fragment>
<EuiFormRow
label={
<FormattedMessage id="esUi.cronEditor.cronHourly.fieldTimeLabel" defaultMessage="Minute" />
<FormattedMessage id="opensearchUi.cronEditor.cronHourly.fieldTimeLabel" defaultMessage="Minute" />
}
fullWidth
data-test-subj="cronFrequencyConfiguration"
Expand All @@ -38,7 +38,7 @@ export const CronHourly = ({ minute, minuteOptions, onChange }) => (
value={minute}
onChange={(e) => onChange({ minute: e.target.value })}
fullWidth
prepend={i18n.translate('esUi.cronEditor.cronHourly.fieldMinute.textAtLabel', {
prepend={i18n.translate('opensearchUi.cronEditor.cronHourly.fieldMinute.textAtLabel', {
defaultMessage: 'At',
})}
data-test-subj="cronFrequencyHourlyMinuteSelect"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from '@kbn/i18n/react';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@osd/i18n/react';
import { i18n } from '@osd/i18n';

import { EuiFlexGroup, EuiFlexItem, EuiFormRow, EuiSelect } from '@elastic/eui';

Expand All @@ -36,7 +36,7 @@ export const CronMonthly = ({
<Fragment>
<EuiFormRow
label={
<FormattedMessage id="esUi.cronEditor.cronMonthly.fieldDateLabel" defaultMessage="Date" />
<FormattedMessage id="opensearchUi.cronEditor.cronMonthly.fieldDateLabel" defaultMessage="Date" />
}
fullWidth
data-test-subj="cronFrequencyConfiguration"
Expand All @@ -46,7 +46,7 @@ export const CronMonthly = ({
value={date}
onChange={(e) => onChange({ date: e.target.value })}
fullWidth
prepend={i18n.translate('esUi.cronEditor.cronMonthly.textOnTheLabel', {
prepend={i18n.translate('opensearchUi.cronEditor.cronMonthly.textOnTheLabel', {
defaultMessage: 'On the',
})}
data-test-subj="cronFrequencyMonthlyDateSelect"
Expand All @@ -55,7 +55,7 @@ export const CronMonthly = ({

<EuiFormRow
label={
<FormattedMessage id="esUi.cronEditor.cronMonthly.fieldTimeLabel" defaultMessage="Time" />
<FormattedMessage id="opensearchUi.cronEditor.cronMonthly.fieldTimeLabel" defaultMessage="Time" />
}
fullWidth
data-test-subj="cronFrequencyConfiguration"
Expand All @@ -65,12 +65,12 @@ export const CronMonthly = ({
<EuiSelect
options={hourOptions}
value={hour}
aria-label={i18n.translate('esUi.cronEditor.cronMonthly.hourSelectLabel', {
aria-label={i18n.translate('opensearchUi.cronEditor.cronMonthly.hourSelectLabel', {
defaultMessage: 'Hour',
})}
onChange={(e) => onChange({ hour: e.target.value })}
fullWidth
prepend={i18n.translate('esUi.cronEditor.cronMonthly.fieldHour.textAtLabel', {
prepend={i18n.translate('opensearchUi.cronEditor.cronMonthly.fieldHour.textAtLabel', {
defaultMessage: 'At',
})}
data-test-subj="cronFrequencyMonthlyHourSelect"
Expand All @@ -81,7 +81,7 @@ export const CronMonthly = ({
<EuiSelect
options={minuteOptions}
value={minute}
aria-label={i18n.translate('esUi.cronEditor.cronMonthly.minuteSelectLabel', {
aria-label={i18n.translate('opensearchUi.cronEditor.cronMonthly.minuteSelectLabel', {
defaultMessage: 'Minute',
})}
onChange={(e) => onChange({ minute: e.target.value })}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from '@kbn/i18n/react';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@osd/i18n/react';
import { i18n } from '@osd/i18n';

import { EuiFlexGroup, EuiFlexItem, EuiFormRow, EuiSelect } from '@elastic/eui';

Expand All @@ -36,7 +36,7 @@ export const CronWeekly = ({
<Fragment>
<EuiFormRow
label={
<FormattedMessage id="esUi.cronEditor.cronWeekly.fieldDateLabel" defaultMessage="Day" />
<FormattedMessage id="opensearchUi.cronEditor.cronWeekly.fieldDateLabel" defaultMessage="Day" />
}
fullWidth
data-test-subj="cronFrequencyConfiguration"
Expand All @@ -46,7 +46,7 @@ export const CronWeekly = ({
value={day}
onChange={(e) => onChange({ day: e.target.value })}
fullWidth
prepend={i18n.translate('esUi.cronEditor.cronWeekly.textOnLabel', {
prepend={i18n.translate('opensearchUi.cronEditor.cronWeekly.textOnLabel', {
defaultMessage: 'On',
})}
data-test-subj="cronFrequencyWeeklyDaySelect"
Expand All @@ -55,7 +55,7 @@ export const CronWeekly = ({

<EuiFormRow
label={
<FormattedMessage id="esUi.cronEditor.cronWeekly.fieldTimeLabel" defaultMessage="Time" />
<FormattedMessage id="opensearchUi.cronEditor.cronWeekly.fieldTimeLabel" defaultMessage="Time" />
}
fullWidth
data-test-subj="cronFrequencyConfiguration"
Expand All @@ -65,12 +65,12 @@ export const CronWeekly = ({
<EuiSelect
options={hourOptions}
value={hour}
aria-label={i18n.translate('esUi.cronEditor.cronWeekly.hourSelectLabel', {
aria-label={i18n.translate('opensearchUi.cronEditor.cronWeekly.hourSelectLabel', {
defaultMessage: 'Hour',
})}
onChange={(e) => onChange({ hour: e.target.value })}
fullWidth
prepend={i18n.translate('esUi.cronEditor.cronWeekly.fieldHour.textAtLabel', {
prepend={i18n.translate('opensearchUi.cronEditor.cronWeekly.fieldHour.textAtLabel', {
defaultMessage: 'At',
})}
data-test-subj="cronFrequencyWeeklyHourSelect"
Expand All @@ -82,7 +82,7 @@ export const CronWeekly = ({
options={minuteOptions}
value={minute}
onChange={(e) => onChange({ minute: e.target.value })}
aria-label={i18n.translate('esUi.cronEditor.cronWeekly.minuteSelectLabel', {
aria-label={i18n.translate('opensearchUi.cronEditor.cronWeekly.minuteSelectLabel', {
defaultMessage: 'Minute',
})}
fullWidth
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from '@kbn/i18n/react';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@osd/i18n/react';
import { i18n } from '@osd/i18n';

import { EuiFlexGroup, EuiFlexItem, EuiFormRow, EuiSelect } from '@elastic/eui';

Expand All @@ -38,7 +38,7 @@ export const CronYearly = ({
<Fragment>
<EuiFormRow
label={
<FormattedMessage id="esUi.cronEditor.cronYearly.fieldMonthLabel" defaultMessage="Month" />
<FormattedMessage id="opensearchUi.cronEditor.cronYearly.fieldMonthLabel" defaultMessage="Month" />
}
fullWidth
data-test-subj="cronFrequencyConfiguration"
Expand All @@ -48,7 +48,7 @@ export const CronYearly = ({
value={month}
onChange={(e) => onChange({ month: e.target.value })}
fullWidth
prepend={i18n.translate('esUi.cronEditor.cronYearly.fieldMonth.textInLabel', {
prepend={i18n.translate('opensearchUi.cronEditor.cronYearly.fieldMonth.textInLabel', {
defaultMessage: 'In',
})}
data-test-subj="cronFrequencyYearlyMonthSelect"
Expand All @@ -57,7 +57,7 @@ export const CronYearly = ({

<EuiFormRow
label={
<FormattedMessage id="esUi.cronEditor.cronYearly.fieldDateLabel" defaultMessage="Date" />
<FormattedMessage id="opensearchUi.cronEditor.cronYearly.fieldDateLabel" defaultMessage="Date" />
}
fullWidth
data-test-subj="cronFrequencyConfiguration"
Expand All @@ -67,7 +67,7 @@ export const CronYearly = ({
value={date}
onChange={(e) => onChange({ date: e.target.value })}
fullWidth
prepend={i18n.translate('esUi.cronEditor.cronYearly.fieldDate.textOnTheLabel', {
prepend={i18n.translate('opensearchUi.cronEditor.cronYearly.fieldDate.textOnTheLabel', {
defaultMessage: 'On the',
})}
data-test-subj="cronFrequencyYearlyDateSelect"
Expand All @@ -76,7 +76,7 @@ export const CronYearly = ({

<EuiFormRow
label={
<FormattedMessage id="esUi.cronEditor.cronYearly.fieldTimeLabel" defaultMessage="Time" />
<FormattedMessage id="opensearchUi.cronEditor.cronYearly.fieldTimeLabel" defaultMessage="Time" />
}
fullWidth
data-test-subj="cronFrequencyConfiguration"
Expand All @@ -86,12 +86,12 @@ export const CronYearly = ({
<EuiSelect
options={hourOptions}
value={hour}
aria-label={i18n.translate('esUi.cronEditor.cronYearly.hourSelectLabel', {
aria-label={i18n.translate('opensearchUi.cronEditor.cronYearly.hourSelectLabel', {
defaultMessage: 'Hour',
})}
onChange={(e) => onChange({ hour: e.target.value })}
fullWidth
prepend={i18n.translate('esUi.cronEditor.cronYearly.fieldHour.textAtLabel', {
prepend={i18n.translate('opensearchUi.cronEditor.cronYearly.fieldHour.textAtLabel', {
defaultMessage: 'At',
})}
data-test-subj="cronFrequencyYearlyHourSelect"
Expand All @@ -102,7 +102,7 @@ export const CronYearly = ({
<EuiSelect
options={minuteOptions}
value={minute}
aria-label={i18n.translate('esUi.cronEditor.cronYearly.minuteSelectLabel', {
aria-label={i18n.translate('opensearchUi.cronEditor.cronYearly.minuteSelectLabel', {
defaultMessage: 'Minute',
})}
onChange={(e) => onChange({ minute: e.target.value })}
Expand Down
Loading

0 comments on commit 86518aa

Please sign in to comment.