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

fix: unique values only across single service #1413

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

soleksy-splunk
Copy link
Contributor

@soleksy-splunk soleksy-splunk commented Oct 30, 2024

Issue number:
https://splunk.atlassian.net/browse/ADDON-77229

resolves #1369

Summary

Ui now verifies uniqueness of inputs service names only across data for each service.

Changes

UI verification for service name to exist has been narrowed down.

User experience

Right now user can create inputs with the same name for different services.

Checklist

If your change doesn't seem to apply, please leave them unchecked.

@vtsvetkov-splunk vtsvetkov-splunk added the javascript Pull requests that update Javascript code label Nov 5, 2024
@artemrys artemrys changed the title feat:unique values only across single service feat: unique values only across single service Nov 12, 2024
@soleksy-splunk soleksy-splunk force-pushed the feat/unique-names-only-across-service branch from f083710 to 160f147 Compare January 22, 2025 12:40
@soleksy-splunk soleksy-splunk changed the title feat: unique values only across single service fix: unique values only across single service Jan 22, 2025
@soleksy-splunk soleksy-splunk marked this pull request as ready for review January 22, 2025 13:01
@soleksy-splunk soleksy-splunk requested a review from a team as a code owner January 22, 2025 13:01
@artemrys artemrys linked an issue Jan 23, 2025 that may be closed by this pull request
Copy link
Member

@artemrys artemrys left a comment

Choose a reason for hiding this comment

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

I think it's worth adding an e2e UI test to capture this behavior. Before this feature - the test would fail, after - it would succeed.

Let's find a suitable place to document it as well.

@artemrys
Copy link
Member

This would resolve #1369.

@@ -259,7 +259,7 @@ const CustomTable: React.FC<CustomTableProps> = ({
data.length &&
data.map((row) => (
<CustomTableRow // nosemgrep: typescript.react.best-practice.react-props-spreading.react-props-spreading
key={row.name || row.id}
key={`${row.serviceName}-${row.name}-row` || row.id}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
key={`${row.serviceName}-${row.name}-row` || row.id}
key={`${row.serviceName}-${row.name}-row`}

the second part is unreachable

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yea weird mistake, i probably wanted to create sth like:

key={row.name ? ${row.serviceName}-${row.name}-row : row.id}

but i think name should always be there so maybe no need for this one

@soleksy-splunk soleksy-splunk requested a review from a team as a code owner January 24, 2025 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Allow same name on different data input
3 participants