Skip to content

Conversation

fit2bot
Copy link
Contributor

@fit2bot fit2bot commented Jun 9, 2025

feat: add mongodb endpoint

@fit2bot fit2bot requested a review from a team June 9, 2025 08:10
@@ -43,7 +43,8 @@ export default {
canUpdate: this.$hasPerm('terminal.change_endpoint'),
updateRoute: 'EndpointUpdate',
cloneRoute: 'EndpointCreate',
canDelete: ({ row }) => row.id !== '00000000-0000-0000-0000-000000000001' && this.$hasPerm('terminal.delete_endpoint')
canDelete: ({ row }) => row.id !== '00000000-0000-0000-0000-000000000001' &&
this.$hasPerm('terminal.delete_endpoint')
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

It appears that there are no immediate violations of standards. The code is mostly following standard conventions but could be more streamlined to improve readability and maintainability:

export default {
    name,
    actions,
    httpPort: numberProperty,
    httpsPort: stringProperty,
    sshPort,
    vncPort,
    host,
    mysqlPort,
    mariadbPort,
    postgresqlPort,

This code looks generally solid but it's not clear what canUpdate, updateRoute, cloneRoute mean within the context of the given file.

canDelete = (row) => (

The use of arrow function for a condition should be avoided if it leads to confusion about its behavior, especially when dealing with multiple conditions. If you want to apply this condition using ternary operator,

   return row.id !== '00000000-0000-0000-0000-000000000001';

Copy link

sonarqubecloud bot commented Jun 9, 2025

@Aaron3S Aaron3S merged commit ddae51c into dev Jun 9, 2025
5 of 6 checks passed
@Aaron3S Aaron3S deleted the pr@dev@feat_add_mongodb_endpoint branch June 9, 2025 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants