From 0b9d87dc86bf1c48e8a3a6ef018d473e3361d169 Mon Sep 17 00:00:00 2001 From: kohinoor98 Date: Thu, 16 Nov 2023 01:15:04 -0800 Subject: [PATCH] remove last updated backported to 2.2 Signed-off-by: kohinoor98 --- .github/workflows/cypress-workflow.yml | 6 +++--- .../DestinationsList/utils/constants.js | 9 --------- .../__snapshots__/MonitorOverview.test.js.snap | 14 -------------- .../MonitorOverview/utils/getOverviewStats.js | 10 ---------- .../utils/getOverviewStats.test.js | 4 ---- .../Monitors/__snapshots__/Monitors.test.js.snap | 9 --------- .../containers/Monitors/utils/tableUtils.js | 16 ---------------- 7 files changed, 3 insertions(+), 65 deletions(-) diff --git a/.github/workflows/cypress-workflow.yml b/.github/workflows/cypress-workflow.yml index a084a1c33..fdcff7bf2 100644 --- a/.github/workflows/cypress-workflow.yml +++ b/.github/workflows/cypress-workflow.yml @@ -2,10 +2,10 @@ name: E2E Cypress tests on: pull_request: branches: - - "*" + - '*' push: branches: - - "*" + - '*' env: OPENSEARCH_DASHBOARDS_VERSION: '1.3' OPENSEARCH_VERSION: '1.3.9-SNAPSHOT' @@ -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 diff --git a/public/pages/Destinations/containers/DestinationsList/utils/constants.js b/public/pages/Destinations/containers/DestinationsList/utils/constants.js index 878c0f1d3..a1b5f16dc 100644 --- a/public/pages/Destinations/containers/DestinationsList/utils/constants.js +++ b/public/pages/Destinations/containers/DestinationsList/utils/constants.js @@ -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 : '-'), - }, ]; diff --git a/public/pages/MonitorDetails/components/MonitorOverview/__snapshots__/MonitorOverview.test.js.snap b/public/pages/MonitorDetails/components/MonitorOverview/__snapshots__/MonitorOverview.test.js.snap index 71a3418ab..2587e4d86 100644 --- a/public/pages/MonitorDetails/components/MonitorOverview/__snapshots__/MonitorOverview.test.js.snap +++ b/public/pages/MonitorDetails/components/MonitorOverview/__snapshots__/MonitorOverview.test.js.snap @@ -143,20 +143,6 @@ exports[`MonitorOverview renders 1`] = ` -
-
- - Last updated by - -
- - -
-
-
diff --git a/public/pages/MonitorDetails/components/MonitorOverview/utils/getOverviewStats.js b/public/pages/MonitorDetails/components/MonitorOverview/utils/getOverviewStats.js index aa0768a5e..1f3e5dd0f 100644 --- a/public/pages/MonitorDetails/components/MonitorOverview/utils/getOverviewStats.js +++ b/public/pages/MonitorDetails/components/MonitorOverview/utils/getOverviewStats.js @@ -114,15 +114,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 : '-', - }, ]; } diff --git a/public/pages/MonitorDetails/components/MonitorOverview/utils/getOverviewStats.test.js b/public/pages/MonitorDetails/components/MonitorOverview/utils/getOverviewStats.test.js index 2bf486470..d9c567dfe 100644 --- a/public/pages/MonitorDetails/components/MonitorOverview/utils/getOverviewStats.test.js +++ b/public/pages/MonitorDetails/components/MonitorOverview/utils/getOverviewStats.test.js @@ -46,10 +46,6 @@ describe('getOverviewStats', () => { header: 'Monitor version number', value: monitorVersion, }, - { - header: 'Last updated by', - value: monitor.user.name, - }, ]); }); }); diff --git a/public/pages/Monitors/containers/Monitors/__snapshots__/Monitors.test.js.snap b/public/pages/Monitors/containers/Monitors/__snapshots__/Monitors.test.js.snap index d664a137d..90b3fe8f5 100644 --- a/public/pages/Monitors/containers/Monitors/__snapshots__/Monitors.test.js.snap +++ b/public/pages/Monitors/containers/Monitors/__snapshots__/Monitors.test.js.snap @@ -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", diff --git a/public/pages/Monitors/containers/Monitors/utils/tableUtils.js b/public/pages/Monitors/containers/Monitors/utils/tableUtils.js index c8b92249f..0523e0200 100644 --- a/public/pages/Monitors/containers/Monitors/utils/tableUtils.js +++ b/public/pages/Monitors/containers/Monitors/utils/tableUtils.js @@ -25,22 +25,6 @@ export const columns = [ width: '150px', render: (name, item) => {name}, }, - { - 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',