Skip to content

Commit 4e7f2af

Browse files
Fit and Finish UX Fixes (#1092) (#1093)
* remove horizontal line below search bar * space between header and panel 16px and space around table 16px * fix 16px around table and search bar * remove pagination from top of table * add button to create monitor * add tooltip to delete * remove space on trash icon * fix gutter size * move edit under actions * fix notifications breadcrumb redirect * spacing from title to panel 16 for view monitor * fix some padding and remove horiz rule for findings section * change update monitor to edit monitor * change update to save and fix padding for create monitor * change monitor details padding and fix link to new page in alerts card * remove boarder when empty state * fix search bar spacing above * make create and edit monitor panels 16px padding * rename * fix original tabs * fix spacing on original monitor page * add pagination back to the alerts page * fix spacing for alerts dashboard flyout * cleanup * fix unit tests and run yarn test:jest -u * fix cypress tests --------- (cherry picked from commit 4a2b603) Signed-off-by: Joanne Wang <jowg@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 200531d commit 4e7f2af

File tree

44 files changed

+172
-862
lines changed

Some content is hidden

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

44 files changed

+172
-862
lines changed

cypress/integration/bucket_level_monitor_spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,8 @@ describe('Bucket-Level Monitors', () => {
338338
// Add a trigger
339339
addTriggerToVisualEditorMonitor(SAMPLE_TRIGGER, 0, SAMPLE_ACTION, true);
340340

341-
// Click update button to save monitor changes
342-
cy.get('button').contains('Update').last().click({ force: true });
341+
// Click save to save monitor changes
342+
cy.get('button').contains('Save').last().click({ force: true });
343343

344344
// Confirm we can see only one row in the trigger list by checking <caption> element
345345
cy.contains('This table contains 1 row');
@@ -375,8 +375,8 @@ describe('Bucket-Level Monitors', () => {
375375
timeout: 25000,
376376
});
377377

378-
// Click the update button
379-
cy.get('button').contains('Update').last().click({ force: true });
378+
// Click the save button
379+
cy.get('button').contains('Save').last().click({ force: true });
380380

381381
// Confirm we're on the Monitor Details page by searching for the History element
382382
cy.contains('History', { timeout: 20000 });

cypress/integration/cluster_metrics_monitor_spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,8 @@ describe('ClusterMetricsMonitor', () => {
369369
'ctx.results[0].number_of_pending_tasks >= 0'
370370
);
371371

372-
// Click update button to save monitor changes
373-
cy.get('button').contains('Update').last().click({ force: true });
372+
// Click save button to save monitor changes
373+
cy.get('button').contains('Save').last().click({ force: true });
374374

375375
// Confirm we can see only one row in the trigger list by checking <caption> element
376376
cy.contains('This table contains 1 row');

cypress/integration/composite_level_monitor_spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ describe('CompositeLevelMonitor', () => {
130130

131131
it('by visual editor', () => {
132132
// Verify edit page
133+
cy.contains('Edit').click({ force: true });
133134
cy.contains('Edit monitor', { timeout: 20000 });
134135
cy.get('input[name="name"]').type('_edited');
135136

@@ -150,7 +151,7 @@ describe('CompositeLevelMonitor', () => {
150151
.type('{enter}');
151152

152153
cy.intercept('api/alerting/workflows/*').as('updateMonitorRequest');
153-
cy.get('button').contains('Update').click({ force: true });
154+
cy.get('button').contains('Save').click({ force: true });
154155

155156
// Wait for monitor to be created
156157
cy.wait('@updateMonitorRequest').then(() => {

cypress/integration/document_level_monitor_spec.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,8 @@ describe('DocumentLevelMonitor', () => {
380380

381381
// TODO: Test with Notifications plugin
382382

383-
// Click the update button
384-
cy.get('button').contains('Update').last().click({ force: true });
383+
// Click the save button
384+
cy.get('button').contains('Save').last().click({ force: true });
385385

386386
// Confirm we can see only one row in the trigger list by checking <caption> element
387387
cy.contains('This table contains 2 rows');
@@ -446,8 +446,8 @@ describe('DocumentLevelMonitor', () => {
446446

447447
// TODO: Test with Notifications plugin
448448

449-
// Click the create button
450-
cy.get('button').contains('Update').last().click({ force: true });
449+
// Click the save button
450+
cy.get('button').contains('Save').last().click({ force: true });
451451

452452
// Confirm we can see only one row in the trigger list by checking <caption> element
453453
cy.contains('This table contains 1 row');
@@ -489,8 +489,8 @@ describe('DocumentLevelMonitor', () => {
489489
cy.get('[data-test-subj="indicesComboBox"]').should('not.have.text', TESTING_INDEX_A);
490490
cy.get('[data-test-subj="indicesComboBox"]').contains(TESTING_INDEX_B, { timeout: 20000 });
491491

492-
// Click the update button
493-
cy.get('button').contains('Update').last().click({ force: true });
492+
// Click the save button
493+
cy.get('button').contains('Save').last().click({ force: true });
494494

495495
// Confirm we're on the Monitor Details page by searching for the History element
496496
cy.contains('History', { timeout: 20000 });

cypress/integration/query_level_monitor_spec.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ describe('Query-Level Monitors', () => {
178178
.clear()
179179
.type(UPDATED_MONITOR, { force: true });
180180

181-
// Click Update button
182-
cy.get('button').contains('Update').last().click({ force: true });
181+
// Click save button
182+
cy.get('button').contains('Save').last().click({ force: true });
183183

184184
// Confirm the update process is done and the page loaded
185185
cy.contains('Edit monitor');
@@ -222,8 +222,8 @@ describe('Query-Level Monitors', () => {
222222
timeout: 25000,
223223
});
224224

225-
// Click the update button
226-
cy.get('button').contains('Update').last().click();
225+
// Click the save button
226+
cy.get('button').contains('Save').last().click();
227227

228228
// Confirm we're on the Monitor Details page by searching for the History element
229229
cy.contains('History', { timeout: 25000 });
@@ -339,8 +339,8 @@ describe('Query-Level Monitors', () => {
339339
addVisualQueryLevelTrigger(trigger.name, i, true, `IS ${trigger.enum}`, `${i}`);
340340
}
341341

342-
// Click Update button
343-
cy.get('button').contains('Update').last().click({ force: true });
342+
// Click save button
343+
cy.get('button').contains('Save').last().click({ force: true });
344344

345345
// Confirm we can see the correct number of rows in the trigger list by checking <caption> element
346346
cy.contains(`This table contains ${triggers.length} rows`, { timeout: 25000 });

public/components/Breadcrumbs/Breadcrumbs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ export async function getBreadcrumb(route, routeState, httpClient) {
8282
console.error(err);
8383
}
8484
const breadcrumbs = [{ text: monitorName, href: `/monitors/${base}` }];
85-
if (action === MONITOR_ACTIONS.UPDATE_MONITOR)
86-
breadcrumbs.push({ text: 'Update monitor', href: '/' });
85+
if (action === MONITOR_ACTIONS.EDIT_MONITOR)
86+
breadcrumbs.push({ text: 'Edit monitor', href: '/' });
8787
if (action === TRIGGER_ACTIONS.CREATE_TRIGGER)
8888
breadcrumbs.push({ text: 'Create trigger', href: '/' });
8989
if (action === TRIGGER_ACTIONS.UPDATE_TRIGGER)

public/components/Breadcrumbs/Breadcrumbs.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ describe('getBreadcrumb', () => {
102102
httpClientMock.get.mockResolvedValue({ ok: true, resp: { name: 'random_name' } });
103103
expect(
104104
await getBreadcrumb(
105-
`${monitorId}?action=${MONITOR_ACTIONS.UPDATE_MONITOR}`,
105+
`${monitorId}?action=${MONITOR_ACTIONS.EDIT_MONITOR}`,
106106
{},
107107
httpClientMock
108108
)

public/components/Breadcrumbs/__snapshots__/Breadcrumbs.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Array [
7070
},
7171
Object {
7272
"href": "/",
73-
"text": "Update monitor",
73+
"text": "Edit monitor",
7474
},
7575
]
7676
`;

public/components/ContentPanel/ContentPanel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const ContentPanel = ({
1919
children,
2020
panelOptions = {},
2121
}) => (
22-
<EuiPanel style={{ paddingLeft: '0px', paddingRight: '0px', ...panelStyles }}>
22+
<EuiPanel style={{ padding: '16px', ...panelStyles }}>
2323
<EuiFlexGroup style={{ padding: '0px 10px' }} justifyContent="spaceBetween" alignItems="center">
2424
<EuiFlexItem>
2525
<EuiText size={titleSize}>

public/components/ContentPanel/__snapshots__/ContentPanel.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
exports[`ContentPanel renders 1`] = `
44
<div
55
class="euiPanel euiPanel--paddingMedium euiPanel--borderRadiusMedium euiPanel--plain euiPanel--hasShadow"
6-
style="padding-left:0px;padding-right:0px"
6+
style="padding:16px"
77
>
88
<div
99
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--justifyContentSpaceBetween euiFlexGroup--directionRow euiFlexGroup--responsive"

0 commit comments

Comments
 (0)