Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: search series in anomaly response data #6185

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

YounixM
Copy link
Member

@YounixM YounixM commented Oct 14, 2024

Anomaly.Detection.-.Search.Series.mov

Important

Adds search functionality to filter series in AnomalyAlertEvaluationView with debounced input and updated styles.

  • Behavior:
    • Adds search functionality in AnomalyAlertEvaluationView.tsx using Search component from antd.
    • Filters series based on search input, updating filteredSeriesKeys state.
    • Displays "No series found" message if no series match the search.
  • Styles:
    • Adds .anomaly-alert-evaluation-view-series-list-search class in AnomalyAlertEvaluationView.styles.scss for search input styling.
    • Customizes scrollbar appearance for series list.
  • Misc:
    • Uses useDebouncedFn for debouncing search input changes.

This description was created by Ellipsis for a915eab. It will automatically update as commits are pushed.

@github-actions github-actions bot added the enhancement New feature or request label Oct 14, 2024
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

1 similar comment
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Reviewed everything up to 5ebafd7 in 45 seconds

More details
  • Looked at 175 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. frontend/src/container/AnomalyAlertEvaluationView/AnomalyAlertEvaluationView.tsx:65
  • Draft comment:
    Avoid using any type. Define specific types or interfaces for seriesData to ensure type safety.
  • Reason this comment was not posted:
    Comment was on unchanged code.
2. frontend/src/container/AnomalyAlertEvaluationView/AnomalyAlertEvaluationView.tsx:220
  • Draft comment:
    Trim searchText in handleSearch to avoid unnecessary spaces affecting search results.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The handleSearch function is filtering allSeries based on the search text. However, the search is case-insensitive, which is good, but it could be optimized by trimming the search text to avoid unnecessary spaces affecting the search results.

Workflow ID: wflow_ZmUl8cWazEyeHf1Y


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@YounixM YounixM force-pushed the feat/anomaly-detection-ui-search-search branch from 5ebafd7 to 150f243 Compare October 14, 2024 11:52
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Incremental review on 150f243 in 34 seconds

More details
  • Looked at 175 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. frontend/src/container/AnomalyAlertEvaluationView/AnomalyAlertEvaluationView.tsx:5
  • Draft comment:
    Import Search directly from antd to ensure proper tree-shaking and reduce bundle size.
import { Checkbox, Typography, Input } from 'antd';
const { Search } = Input;
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
2. frontend/src/container/AnomalyAlertEvaluationView/AnomalyAlertEvaluationView.tsx:80
  • Draft comment:
    Combine setAllSeries and setFilteredSeriesKeys to avoid redundancy.
const seriesKeys = Object.keys(chartData);
setAllSeries(seriesKeys);
setFilteredSeriesKeys(seriesKeys);
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The useEffect hook for setting seriesData and allSeries is correct, but the setFilteredSeriesKeys can be combined with setAllSeries to avoid redundant code.
3. frontend/src/container/AnomalyAlertEvaluationView/AnomalyAlertEvaluationView.tsx:269
  • Draft comment:
    Avoid using inline styles like strokeWidth={0.5}. Consider using CSS classes or styled components instead for better maintainability.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_k0whFWxpm4a05cJj


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@YounixM YounixM force-pushed the feat/anomaly-detection-ui-search-search branch from 150f243 to a915eab Compare October 15, 2024 04:22
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Incremental review on a915eab in 43 seconds

More details
  • Looked at 175 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. frontend/src/container/AnomalyAlertEvaluationView/AnomalyAlertEvaluationView.tsx:5
  • Draft comment:
    Import Search directly from antd to ensure proper tree-shaking and reduce bundle size.
import { Checkbox, Typography, Input } from 'antd';
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The comment is about a change made in the diff, specifically the import statement for Search. The suggestion to import directly from antd could be valid if it indeed helps with tree-shaking and bundle size. However, without specific evidence or knowledge about the project's build setup, it's speculative. The comment doesn't provide strong evidence that the current import method is problematic.
    The comment assumes that importing from antd will always result in better tree-shaking, which might not be true depending on the project's build configuration. It lacks specific evidence or context to support the claim.
    While the comment lacks specific evidence, it is a common practice to import directly from libraries like antd for better tree-shaking. However, without knowing the project's build setup, it's speculative.
    The comment is speculative and lacks strong evidence. It should be deleted as it doesn't definitively identify an issue with the current import method.

Workflow ID: wflow_aw3LaaWkr5IV7jfI


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Collaborator

@vikrantgupta25 vikrantgupta25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@YounixM YounixM merged commit 18e240e into develop Oct 15, 2024
13 of 14 checks passed
@YounixM YounixM deleted the feat/anomaly-detection-ui-search-search branch October 15, 2024 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants