Skip to content

Commit

Permalink
Merge branch 'main' into bug-fix-mds
Browse files Browse the repository at this point in the history
Signed-off-by: Riya <[email protected]>
  • Loading branch information
riysaxen-amzn authored Aug 30, 2024
2 parents 1f4faf2 + 9db14ad commit dfc6310
Show file tree
Hide file tree
Showing 105 changed files with 3,605 additions and 2,993 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"@testing-library/user-event": "^14.4.3",
"@types/react-dom": "^16.9.8",
"@types/react-router-dom": "^5.3.2",
"@types/vis": "^4.21.21",
"cypress": "9.5.4",
"cypress-real-events": "1.7.6",
"cypress-recurse": "^1.27.0",
Expand All @@ -72,9 +73,8 @@
"jest-cli": "^27.5.1",
"jest-environment-jsdom": "^27.5.1",
"lint-staged": "^10.2.0",
"ts-loader": "^6.2.1",
"@types/vis": "^4.21.21",
"string.prototype.replaceall": "1.0.7"
"string.prototype.replaceall": "1.0.7",
"ts-loader": "^6.2.1"
},
"engines": {
"yarn": "^1.21.1"
Expand Down
10 changes: 5 additions & 5 deletions public/components/ContentPanel/ContentPanelActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import React from 'react';
import { EuiButton, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
import { EuiSmallButton, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
import { ModalConsumer } from '../Modal';

interface ContentPanelActionsProps {
Expand All @@ -22,22 +22,22 @@ const ContentPanelActions: React.SFC<ContentPanelActionsProps> = ({ actions }) =
<EuiFlexGroup justifyContent="spaceBetween" alignItems="center">
{actions.map(({ text, buttonProps = {}, flexItemProps = {}, modal = null }, index) => {
let button = (
<EuiButton {...buttonProps} data-test-subj={`${text}Button`}>
<EuiSmallButton {...buttonProps} data-test-subj={`${text}Button`}>
{text}
</EuiButton>
</EuiSmallButton>
);

if (modal) {
button = (
<ModalConsumer>
{({ onShow }) => (
<EuiButton
<EuiSmallButton
{...buttonProps}
onClick={modal.onClickModal(onShow)}
data-test-subj={`${text}Button`}
>
{text}
</EuiButton>
</EuiSmallButton>
)}
</ModalConsumer>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exports[`<ContentPanelActions /> spec renders the component 1`] = `
class="euiFlexItem euiFlexItem--flexGrowZero"
>
<button
class="euiButton euiButton--primary"
class="euiButton euiButton--primary euiButton--small"
data-test-subj="ContentPanelActionsButton"
type="button"
>
Expand Down
10 changes: 5 additions & 5 deletions public/components/DeleteModal/DeleteModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import React, { ChangeEvent, Component } from 'react';
import {
EuiConfirmModal,
EuiFieldText,
EuiCompressedFieldText,
EuiForm,
EuiFormRow,
EuiCompressedFormRow,
EuiOverlayMask,
EuiSpacer,
} from '@elastic/eui';
Expand Down Expand Up @@ -75,14 +75,14 @@ export default class DeleteModal extends Component<DeleteModalProps, DeleteModal
</p>
<EuiSpacer size="s" />
{!!confirmation && (
<EuiFormRow helpText={`To confirm deletion, type "${DEFAULT_DELETION_TEXT}".`}>
<EuiFieldText
<EuiCompressedFormRow helpText={`To confirm deletion, type "${DEFAULT_DELETION_TEXT}".`}>
<EuiCompressedFieldText
value={confirmDeleteText}
placeholder={DEFAULT_DELETION_TEXT}
onChange={this.onChange}
data-test-subj={'deleteTextField'}
/>
</EuiFormRow>
</EuiCompressedFormRow>
)}
</EuiForm>
</EuiConfirmModal>
Expand Down
44 changes: 22 additions & 22 deletions public/components/Notifications/NotificationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@

import {
EuiAccordion,
EuiButton,
EuiComboBox,
EuiSmallButton,
EuiCompressedComboBox,
EuiComboBoxOptionOption,
EuiFieldText,
EuiCompressedFieldText,
EuiFlexGroup,
EuiFlexItem,
EuiFormRow,
EuiCompressedFormRow,
EuiSpacer,
EuiSwitch,
EuiCompressedSwitch,
EuiText,
EuiTextArea,
EuiCompressedTextArea,
} from '@elastic/eui';
import React, { useState } from 'react';
import { NOTIFICATIONS_HREF } from '../../utils/constants';
Expand Down Expand Up @@ -64,7 +64,7 @@ export const NotificationForm: React.FC<NotificationFormProps> = ({

return (
<>
<EuiSwitch
<EuiCompressedSwitch
label="Send notification"
checked={shouldSendNotification}
onChange={(e) => {
Expand All @@ -77,14 +77,14 @@ export const NotificationForm: React.FC<NotificationFormProps> = ({
<>
<EuiFlexGroup alignItems={'flexEnd'}>
<EuiFlexItem style={{ maxWidth: 400 }}>
<EuiFormRow
<EuiCompressedFormRow
label={
<EuiText size="m">
<p>Notification channel</p>
</EuiText>
}
>
<EuiComboBox
<EuiCompressedComboBox
placeholder={'Select notification channel.'}
async={true}
isLoading={loadingNotifications}
Expand All @@ -97,17 +97,17 @@ export const NotificationForm: React.FC<NotificationFormProps> = ({
onFocus={refreshNotificationChannels}
isDisabled={!hasNotificationPlugin}
/>
</EuiFormRow>
</EuiCompressedFormRow>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButton
<EuiSmallButton
href={NOTIFICATIONS_HREF}
iconType={'popout'}
target={'_blank'}
isDisabled={!hasNotificationPlugin}
>
Manage channels
</EuiButton>
</EuiSmallButton>
</EuiFlexItem>
</EuiFlexGroup>

Expand All @@ -132,52 +132,52 @@ export const NotificationForm: React.FC<NotificationFormProps> = ({
>
<EuiFlexGroup direction={'column'} style={{ width: '75%' }}>
<EuiFlexItem>
<EuiFormRow
<EuiCompressedFormRow
label={
<EuiText size={'s'}>
<p>Message subject</p>
</EuiText>
}
fullWidth={true}
>
<EuiFieldText
<EuiCompressedFieldText
placeholder={'Enter a subject for the notification message.'}
value={action?.subject_template.source}
onChange={(e) => onMessageSubjectChange(e.target.value)}
required={true}
fullWidth={true}
/>
</EuiFormRow>
</EuiCompressedFormRow>
</EuiFlexItem>

<EuiFlexItem>
<EuiFormRow
<EuiCompressedFormRow
label={
<EuiText size="s">
<p>Message body</p>
</EuiText>
}
fullWidth={true}
>
<EuiTextArea
<EuiCompressedTextArea
placeholder={'Enter the content of the notification message.'}
value={action?.message_template.source}
onChange={(e) => onMessageBodyChange(e.target.value)}
required={true}
fullWidth={true}
/>
</EuiFormRow>
</EuiCompressedFormRow>
</EuiFlexItem>
{prepareMessage && (
<EuiFlexItem>
<EuiFormRow>
<EuiButton
<EuiCompressedFormRow>
<EuiSmallButton
fullWidth={false}
onClick={() => prepareMessage(true /* updateMessage */)}
>
Generate message
</EuiButton>
</EuiFormRow>
</EuiSmallButton>
</EuiCompressedFormRow>
</EuiFlexItem>
)}
</EuiFlexGroup>
Expand Down
9 changes: 5 additions & 4 deletions public/pages/Alerts/components/AlertFlyout/AlertFlyout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
import {
EuiBasicTable,
EuiBasicTableColumn,
EuiButton,
EuiSmallButton,
EuiButtonIcon,
EuiSmallButtonIcon,
EuiFlexGroup,
EuiFlexItem,
EuiFlyout,
Expand Down Expand Up @@ -209,7 +210,7 @@ export class AlertFlyout extends React.Component<AlertFlyoutProps, AlertFlyoutSt
<EuiFlexItem grow={8}>
<EuiFlexGroup justifyContent="flexEnd" alignItems="center">
<EuiFlexItem grow={false}>
<EuiButton
<EuiSmallButton
disabled={acknowledged || alertItem.state !== ALERT_STATE.ACTIVE}
onClick={() => {
this.setState({ acknowledged: true });
Expand All @@ -218,10 +219,10 @@ export class AlertFlyout extends React.Component<AlertFlyoutProps, AlertFlyoutSt
data-test-subj={'alert-details-flyout-acknowledge-button'}
>
Acknowledge
</EuiButton>
</EuiSmallButton>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButtonIcon
<EuiSmallButtonIcon
aria-label="close"
iconType="cross"
iconSize="m"
Expand Down
Loading

0 comments on commit dfc6310

Please sign in to comment.