Skip to content

Commit

Permalink
remove last updated backported to 2.1 (#805)
Browse files Browse the repository at this point in the history
* remove last updated backported to 2.1

Signed-off-by: kohinoor98 <kohinoorchatterjee1998@gmail.com>

* updated test snapshot

Signed-off-by: kohinoor98 <kohinoorchatterjee1998@gmail.com>

* Removed "last updated by" sections from the UI. (#767)

* Removed "last updated by" section from the UI as the SearchMonitor API can no longer return that info.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Updated cypress workflow.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

---------

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
(cherry picked from commit 1bea77f)
Signed-off-by: kohinoor98 <kohinoorchatterjee1998@gmail.com>

---------

Signed-off-by: kohinoor98 <kohinoorchatterjee1998@gmail.com>
Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
Co-authored-by: AWSHurneyt <hurneyt@amazon.com>
  • Loading branch information
kohinoor98 and AWSHurneyt authored Nov 22, 2023
1 parent 8889b07 commit abd3d0d
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 299 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/cypress-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: E2E Cypress tests
on:
pull_request:
branches:
- "*"
- '*'
push:
branches:
- "*"
- '*'
env:
OPENSEARCH_DASHBOARDS_VERSION: '2.1.0'
OPENSEARCH_VERSION: '2.1.0-SNAPSHOT'
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Run OpenSearch Dashboards server
run: |
cd OpenSearch-Dashboards
yarn start --no-base-path --no-watch &
yarn start --no-base-path --no-watch --server.host="0.0.0.0" &
sleep 300
# timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:5601/api/status)" != "200" ]]; do sleep 5; done'
- name: Run Cypress tests
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,4 @@ export const staticColumns = [
}
},
},
{
field: 'user',
name: 'Last updated by',
sortable: true,
truncateText: true,
textOnly: true,
width: '100px',
render: (value) => (value && value.name ? value.name : '-'),
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -143,20 +143,6 @@ exports[`MonitorOverview renders 1`] = `
</div>
</div>
</div>
<div
class="euiFlexItem"
>
<div
class="euiText euiText--extraSmall"
>
<strong>
Last updated by
</strong>
<div>
-
</div>
</div>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,5 @@ export default function getOverviewStats(
header: 'Monitor version number',
value: monitorVersion,
},
{
/* There are 3 cases:
1. Monitors created by older versions and never updated.
These monitors won’t have User details in the monitor object. `monitor.user` will be null.
2. Monitors are created when security plugin is disabled, these will have empty User object.
(`monitor.user.name`, `monitor.user.roles` are empty )
3. Monitors are created when security plugin is enabled, these will have an User object. */
header: 'Last updated by',
value: monitor.user && monitor.user.name ? monitor.user.name : '-',
},
];
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ describe('getOverviewStats', () => {
header: 'Monitor version number',
value: monitorVersion,
},
{
header: 'Last updated by',
value: monitor.user.name,
},
]);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,6 @@ exports[`Monitors renders 1`] = `
"truncateText": true,
"width": "150px",
},
Object {
"field": "user",
"name": "Last updated by",
"render": [Function],
"sortable": true,
"textOnly": true,
"truncateText": true,
"width": "100px",
},
Object {
"field": "latestAlert",
"name": "Latest alert",
Expand Down
16 changes: 0 additions & 16 deletions public/pages/Monitors/containers/Monitors/utils/tableUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,6 @@ export const columns = [
width: '150px',
render: (name, item) => <EuiLink href={`${PLUGIN_NAME}#/monitors/${item.id}`}>{name}</EuiLink>,
},
{
field: 'user',
name: 'Last updated by',
sortable: true,
truncateText: true,
textOnly: true,
width: '100px',
/* There are 3 cases:
1. Monitors created by older versions and never updated.
These monitors won’t have User details in the monitor object. `monitor.user` will be null.
2. Monitors are created when security plugin is disabled, these will have empty User object.
(`monitor.user.name`, `monitor.user.roles` are empty )
3. Monitors are created when security plugin is enabled, these will have an User object. */
render: (_, item) =>
item.monitor.user && item.monitor.user.name ? item.monitor.user.name : '-',
},
{
field: 'latestAlert',
name: 'Latest alert',
Expand Down

0 comments on commit abd3d0d

Please sign in to comment.