diff --git a/frontend/webapp/components/overview/filters/index.tsx b/frontend/webapp/components/overview/filters/index.tsx deleted file mode 100644 index 87ee67674..000000000 --- a/frontend/webapp/components/overview/filters/index.tsx +++ /dev/null @@ -1,72 +0,0 @@ -import React, { useRef, useState } from 'react'; -import Image from 'next/image'; -import styled from 'styled-components'; -import { DropdownOption } from '@/types'; -import { useOnClickOutside } from '@/hooks'; -import { Badge, Button, Dropdown, Text } from '@/reuseable-components'; - -const RelativeContainer = styled.div` - position: relative; -`; - -const ButtonText = styled(Text)` - font-family: ${({ theme }) => theme.font_family.primary}; - font-size: 14px; - text-transform: none; - margin: 0 6px; -`; - -const CardWrapper = styled.div` - position: absolute; - top: calc(100% + 8px); - left: 0; - z-index: 10; - background-color: ${({ theme }) => theme.colors.dropdown_bg}; - border: ${({ theme }) => `1px solid ${theme.colors.border}`}; - border-radius: 24px; - width: 360px; -`; - -const CardContent = styled.div` - padding: 16px; - gap: 12px; - display: flex; - flex-direction: column; -`; - -const Filters = () => { - const [focused, setFocused] = useState(false); - const toggleFocused = () => setFocused((prev) => !prev); - const ref = useRef(null); - - useOnClickOutside(ref, () => setFocused(false)); - - const [namespace, setNamespace] = useState(undefined); - const [filters, setFilters] = useState([]); - const [metrics, setMetrics] = useState([]); - - return ( - - - - {focused && ( - - - setNamespace(val)} required /> - - {/* TODO: make this a multi-select dropwdown (with internal checkboxes) */} - setFilters((prev) => prev)} required /> - {/* TODO: make this a multi-select dropwdown (with internal checkboxes) */} - setMetrics((prev) => prev)} required /> - - - )} - - ); -}; - -export { Filters }; diff --git a/frontend/webapp/components/overview/index.tsx b/frontend/webapp/components/overview/index.tsx index 3e588e2c3..a84120e29 100644 --- a/frontend/webapp/components/overview/index.tsx +++ b/frontend/webapp/components/overview/index.tsx @@ -1,3 +1,2 @@ export * from './add-entity'; -export * from './filters'; export * from './monitors-legend'; diff --git a/frontend/webapp/containers/main/destinations/add-destination/choose-destination-menu/index.tsx b/frontend/webapp/containers/main/destinations/add-destination/choose-destination-menu/index.tsx index 7a50d5e01..87d91e948 100644 --- a/frontend/webapp/containers/main/destinations/add-destination/choose-destination-menu/index.tsx +++ b/frontend/webapp/containers/main/destinations/add-destination/choose-destination-menu/index.tsx @@ -51,7 +51,7 @@ const DestinationFilterComponent: React.FC = ({ selectedTa
- + diff --git a/frontend/webapp/containers/main/overview/overview-actions-menu/index.tsx b/frontend/webapp/containers/main/overview/overview-actions-menu/index.tsx index 750e74ca2..80aa83e14 100644 --- a/frontend/webapp/containers/main/overview/overview-actions-menu/index.tsx +++ b/frontend/webapp/containers/main/overview/overview-actions-menu/index.tsx @@ -1,8 +1,9 @@ import React from 'react'; import { Search } from './search'; +import { Filters } from './filters'; import styled from 'styled-components'; import { Divider, TabList } from '@/reuseable-components'; -import { AddEntity, Filters, MonitorsLegend } from '@/components'; +import { AddEntity, MonitorsLegend } from '@/components'; const MenuContainer = styled.div` display: flex; diff --git a/frontend/webapp/reuseable-components/dropdown/index.tsx b/frontend/webapp/reuseable-components/dropdown/index.tsx index 76a1d9da7..54803800c 100644 --- a/frontend/webapp/reuseable-components/dropdown/index.tsx +++ b/frontend/webapp/reuseable-components/dropdown/index.tsx @@ -17,7 +17,7 @@ interface DropdownProps { tooltip?: string; placeholder?: string; options: DropdownOption[]; - value: DropdownOption | undefined; + value: DropdownOption | DropdownOption[] | undefined; onSelect: (option: DropdownOption) => void; onDeselect: (option: DropdownOption) => void; isMulti?: boolean; diff --git a/tests/common/ui-tests/run_cypress_tests.sh b/tests/common/ui-tests/run_cypress_tests.sh deleted file mode 100755 index 2a3b02d21..000000000 --- a/tests/common/ui-tests/run_cypress_tests.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -run_cypress_test() { - local spec=$1 - npx cypress run --spec "$spec" - local status=$? - - if [ $status -ne 0 ]; then - echo "Cypress tests failed" - # Stop the background process - cd ../../tests/e2e/fe-synthetic || exit - kill "$(cat odigos-ui.pid)" - rm odigos-ui.pid - rm ../../odigos-ui.log - exit $status - fi -} - -echo "Running Cypress tests" -cd ../../../frontend/webapp || exit - -if [ "$1" = "include-onboarding-flow" ]; then - run_cypress_test "cypress/e2e/onboarding-flow.cy.ts" -fi - -run_cypress_test "cypress/e2e/test-overview.cy.ts" - -if [ "$2" = "action-addition" ]; then - run_cypress_test "cypress/e2e/action-testing.cy.ts" -fi - -echo "Cypress tests passed" diff --git a/tests/common/ui-tests/start_odigos_ui.sh b/tests/common/ui-tests/start_odigos_ui.sh deleted file mode 100755 index e0767cba3..000000000 --- a/tests/common/ui-tests/start_odigos_ui.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -# Ensure the script fails if any command fails -set -e - -echo "Running odigos UI setup" -../../../cli/odigos ui > ../../odigos-ui.log 2>&1 & - -# Capture the process ID -echo $! > odigos-ui.pid - -# Check the status of the process -sleep 5 -if ps -p $(cat odigos-ui.pid) > /dev/null -then - echo "Odigos UI started successfully" -else - echo "Failed to start Odigos UI" - cat ../../odigos-ui.log - exit 1 -fi \ No newline at end of file diff --git a/tests/common/ui-tests/stop_ui_and_clean.sh b/tests/common/ui-tests/stop_ui_and_clean.sh deleted file mode 100755 index c848a3e14..000000000 --- a/tests/common/ui-tests/stop_ui_and_clean.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -# Ensure the script fails if any command fails -set -e - -echo "Killing Odigos UI process" -kill "$(cat odigos-ui.pid)" -rm odigos-ui.pid -rm ../../odigos-ui.log \ No newline at end of file