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

#356 added endpoint to fetch all cluster connectors #361

Merged
merged 2 commits into from
Apr 15, 2021

Conversation

RamazanYapparov
Copy link
Contributor

Fixes #356

Copy link
Member

@workshur workshur left a comment

Choose a reason for hiding this comment

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

LGTM

status:
type: string
enum:
- RUNNING
Copy link
Contributor

Choose a reason for hiding this comment

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

You already have this status enum, please just share it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, thanks

type:
type: string
enum:
- source
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use camel case for enums

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, thanks

@@ -43,6 +53,58 @@
);
}

public Flux<FullConnectorInfo> getAllConnectors(String clusterName) {
return getConnects(clusterName)
Copy link
Contributor

Choose a reason for hiding this comment

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

Method looks overcomplicated, could we split it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, thanks

FullConnectorInfo.StatusEnum.valueOf(triple.getLeft().getStatus().getState().name())
)
.tasksCount(triple.getRight().size())
.hasFailedTasks(triple.getRight().stream()
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we pass number of failed tasks instead? I think it will be more useful

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, thanks

.collectList()
.map(tasks -> Triple.of(pair.getLeft(), pair.getRight(), tasks))
)
.map(triple -> new FullConnectorInfo()
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please move it into mapper?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, thanks

- refactoring schema
- added connector class property
@sonarcloud
Copy link

sonarcloud bot commented Apr 9, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@sonarcloud
Copy link

sonarcloud bot commented Apr 9, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@workshur workshur merged commit eef45fc into master Apr 15, 2021
@workshur workshur deleted the feature/add_endpoint_to_fetch_all_cluster_connectors branch April 15, 2021 08:15
javalover123 pushed a commit to javalover123/kafka-ui that referenced this pull request Dec 7, 2022
…us#361)

* added endpoint to fetch all cluster connectors

* - refactoring code
- refactoring schema
- added connector class property
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add endpoint to fetch all cluster connectors
3 participants