From 3b6c2a3257ebc05935b46180583ce995aeadbc60 Mon Sep 17 00:00:00 2001 From: Navneet Verma Date: Tue, 5 Sep 2023 22:04:39 -0700 Subject: [PATCH 1/4] Created release notes for 2.10 release (#464) Signed-off-by: Navneet Verma --- CHANGELOG.md | 2 +- .../opensearch-dashboards-maps.release-notes-2.10.0.0.md | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 release-notes/opensearch-dashboards-maps.release-notes-2.10.0.0.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 513d14ca..ac433c59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Maintenance ### Refactoring -## [Unreleased 2.x](https://github.com/opensearch-project/dashboards-maps/compare/2.9...2.x) +## [Unreleased 2.x](https://github.com/opensearch-project/dashboards-maps/compare/2.10...2.x) ### Features * Allow filtering geo_shape fields around map extent ([#452](https://github.com/opensearch-project/dashboards-maps/pull/452)) * Support dark mode in maps-dashboards([#455](https://github.com/opensearch-project/dashboards-maps/pull/455)) diff --git a/release-notes/opensearch-dashboards-maps.release-notes-2.10.0.0.md b/release-notes/opensearch-dashboards-maps.release-notes-2.10.0.0.md new file mode 100644 index 00000000..bc2dd306 --- /dev/null +++ b/release-notes/opensearch-dashboards-maps.release-notes-2.10.0.0.md @@ -0,0 +1,9 @@ +## Version 2.10.0.0 Release Notes +Compatible with OpenSearch and OpenSearch Dashboards Version 2.10.0 + +### Features +* Allow filtering geo_shape fields around map extent ([#452](https://github.com/opensearch-project/dashboards-maps/pull/452)) +* Support dark mode in maps-dashboards([#455](https://github.com/opensearch-project/dashboards-maps/pull/455)) + +### Maintenance +* Bump cypress version to ^13.1.0 ([#462](https://github.com/opensearch-project/dashboards-maps/pull/462)) From c87750fd45f67b021580f1518b7475c50066d8d3 Mon Sep 17 00:00:00 2001 From: Heemin Kim Date: Fri, 6 Oct 2023 09:28:07 -0700 Subject: [PATCH 2/4] Add 2.11 release note (#514) Signed-off-by: Heemin Kim --- .gitignore | 1 + CHANGELOG.md | 11 +---------- ...ensearch-dashboards-maps.release-notes-2.11.0.0.md | 5 +++++ 3 files changed, 7 insertions(+), 10 deletions(-) create mode 100644 release-notes/opensearch-dashboards-maps.release-notes-2.11.0.0.md diff --git a/.gitignore b/.gitignore index 4be21c66..5100fe85 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ cypress/videos/ cypress/screenshots/ yarn-error.log .DS_Store +.idea diff --git a/CHANGELOG.md b/CHANGELOG.md index ac433c59..2cac9a74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,20 +12,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Maintenance ### Refactoring -## [Unreleased 2.x](https://github.com/opensearch-project/dashboards-maps/compare/2.10...2.x) +## [Unreleased 2.x](https://github.com/opensearch-project/dashboards-maps/compare/2.11...2.x) ### Features -* Allow filtering geo_shape fields around map extent ([#452](https://github.com/opensearch-project/dashboards-maps/pull/452)) -* Support dark mode in maps-dashboards([#455](https://github.com/opensearch-project/dashboards-maps/pull/455)) - ### Enhancements - ### Bug Fixes - ### Infrastructure - ### Documentation - ### Maintenance -* Bump cypress version to ^13.1.0 ([#462](https://github.com/opensearch-project/dashboards-maps/pull/462)) - ### Refactoring diff --git a/release-notes/opensearch-dashboards-maps.release-notes-2.11.0.0.md b/release-notes/opensearch-dashboards-maps.release-notes-2.11.0.0.md new file mode 100644 index 00000000..d5f8fcda --- /dev/null +++ b/release-notes/opensearch-dashboards-maps.release-notes-2.11.0.0.md @@ -0,0 +1,5 @@ +## Version 2.11.0.0 Release Notes +Compatible with OpenSearch and OpenSearch Dashboards Version 2.11.0 + +### Maintenance +* Increment version to 2.11.0.0 ([#476](https://github.com/opensearch-project/dashboards-maps/pull/476)) From f75b23090662b8dc9d30acc0fadc69f160f6a1cd Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Thu, 2 Nov 2023 13:45:24 -0400 Subject: [PATCH 3/4] Onboard jenkins prod docker images to github actions (#557) * Onboard jenkins prod docker images to github actions Signed-off-by: Peter Zhu * Add more Signed-off-by: Peter Zhu --------- Signed-off-by: Peter Zhu --- .github/workflows/unit-tests-workflow.yml | 49 +++++++++++++++++++++-- 1 file changed, 45 insertions(+), 4 deletions(-) diff --git a/.github/workflows/unit-tests-workflow.yml b/.github/workflows/unit-tests-workflow.yml index 3ad6e833..f28413f3 100644 --- a/.github/workflows/unit-tests-workflow.yml +++ b/.github/workflows/unit-tests-workflow.yml @@ -13,10 +13,53 @@ on: env: OPENSEARCH_DASHBOARDS_BRANCH: 'main' jobs: - tests: + Get-CI-Image-Tag: + uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main + with: + product: opensearch-dashboards + + tests-linux: + needs: Get-CI-Image-Tag + name: Run unit tests + runs-on: ubuntu-latest + container: + # using the same image which is used by opensearch-build team to build the OpenSearch Distribution + # this image tag is subject to change as more dependencies and updates will arrive over time + image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }} + # need to switch to root so that github actions can install runner binary on container without permission issues. + options: --user root + + steps: + - name: Checkout Plugin + uses: actions/checkout@v3 + with: + path: dashboards-maps + + - name: Checkout OpenSearch Dashboards + uses: actions/checkout@v3 + with: + repository: opensearch-project/OpenSearch-Dashboards + ref: ${{ env.OPENSEARCH_DASHBOARDS_BRANCH }} + path: OpenSearch-Dashboards + + - name: Move plugin to OpenSearch-Dashboard Plugins Directory + run: mv dashboards-maps OpenSearch-Dashboards/plugins/dashboards-maps + + - name: Bootstrap plugin + run: | + chown -R 1000:1000 `pwd` + cd ./OpenSearch-Dashboards/ + su `id -un 1000` -c "source $NVM_DIR/nvm.sh && nvm use && node -v && yarn -v && + cd ./plugins/dashboards-maps && + whoami && yarn osd bootstrap && yarn run test:jest --coverage" + + - name: Uploads coverage + uses: codecov/codecov-action@v1 + + tests-windows-macos: strategy: matrix: - os: [ ubuntu-latest, windows-latest, macos-latest ] + os: [ windows-latest, macos-latest ] name: Run unit tests runs-on: ${{ matrix.os }} @@ -70,5 +113,3 @@ jobs: - name: Uploads coverage uses: codecov/codecov-action@v1 - - From 843c1fcff0508527b2cc7f29ea459893affc2ced Mon Sep 17 00:00:00 2001 From: Junqiu Lei Date: Thu, 30 Nov 2023 17:17:05 -0800 Subject: [PATCH 4/4] Fixed maps tooltip display when at dark mode (#564) --- CHANGELOG.md | 1 + public/components/tooltip/create_tooltip.scss | 35 +++++++++++++++++++ public/components/tooltip/create_tooltip.tsx | 2 ++ public/components/tooltip/tooltipTable.tsx | 15 ++++---- 4 files changed, 47 insertions(+), 6 deletions(-) create mode 100644 public/components/tooltip/create_tooltip.scss diff --git a/CHANGELOG.md b/CHANGELOG.md index 2cac9a74..8cc6c097 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Features ### Enhancements ### Bug Fixes +* Fixed maps tooltip display at dark mode[#564](https://github.com/opensearch-project/dashboards-maps/pull/564) ### Infrastructure ### Documentation ### Maintenance diff --git a/public/components/tooltip/create_tooltip.scss b/public/components/tooltip/create_tooltip.scss new file mode 100644 index 00000000..add0ef11 --- /dev/null +++ b/public/components/tooltip/create_tooltip.scss @@ -0,0 +1,35 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +.mapTooltip { + div.maplibregl-popup-content.mapboxgl-popup-content { + padding: 0; + background: none; + } +} + +.maplibregl-popup-anchor-top { + .maplibregl-popup-tip { + border-bottom-color:lightOrDarkTheme($ouiColorEmptyShade, $ouiColorLightestShade) !important; + } +} + +.maplibregl-popup-anchor-bottom { + .maplibregl-popup-tip { + border-top-color:lightOrDarkTheme($ouiColorEmptyShade, $ouiColorLightestShade) !important; + } +} + +.maplibregl-popup-anchor-left { + .maplibregl-popup-tip { + border-right-color:lightOrDarkTheme($ouiColorEmptyShade, $ouiColorLightestShade) !important; + } +} + +.maplibregl-popup-anchor-right { + .maplibregl-popup-tip { + border-left-color:lightOrDarkTheme($ouiColorEmptyShade, $ouiColorLightestShade) !important; + } +} diff --git a/public/components/tooltip/create_tooltip.tsx b/public/components/tooltip/create_tooltip.tsx index 4e378aa4..93e394e7 100644 --- a/public/components/tooltip/create_tooltip.tsx +++ b/public/components/tooltip/create_tooltip.tsx @@ -5,6 +5,7 @@ import { Popup, MapGeoJSONFeature, LngLat } from 'maplibre-gl'; import { MapLayerSpecification, DocumentLayerSpecification } from '../../model/mapLayerType'; import { FeatureGroupItem, TooltipContainer } from './tooltipContainer'; import { MAX_LONGITUDE } from '../../../common'; +import './create_tooltip.scss'; interface Options { features: MapGeoJSONFeature[]; @@ -76,6 +77,7 @@ export function createPopup({ closeButton: false, closeOnClick: false, maxWidth: 'max-content', + className: 'mapTooltip', }); const featureGroup = groupFeaturesByLayers(features, layers); diff --git a/public/components/tooltip/tooltipTable.tsx b/public/components/tooltip/tooltipTable.tsx index 4ca7a571..8d10734f 100644 --- a/public/components/tooltip/tooltipTable.tsx +++ b/public/components/tooltip/tooltipTable.tsx @@ -15,13 +15,16 @@ import { } from '@elastic/eui'; import React, { useState, Fragment, useCallback, useEffect, useMemo } from 'react'; -export type RowData = { +export interface RowData { key: string; value: string; -}; +} export type PageData = RowData[]; export type TableData = PageData[]; -type Table = { table: TableData; layer: string }; +interface Table { + table: TableData; + layer: string; +} export const ALL_LAYERS = -1; @@ -66,7 +69,7 @@ const TooltipTable = ({ showPagination = true, showLayerSelection = true, }: Props) => { - const [selectedLayers, setSelectedLayers] = useState[]>([ + const [selectedLayers, setSelectedLayers] = useState>>([ { label: tables[0]?.layer ?? '', value: 0, @@ -103,7 +106,7 @@ const TooltipTable = ({ }; const handleLayerChange = useCallback( - (layerSelections: EuiComboBoxOptionOption[]) => { + (layerSelections: Array>) => { if (tables.length === 0) { return; } @@ -152,7 +155,7 @@ const TooltipTable = ({ return ( - +