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

[ISSUE #12017] Add the console backend API for new section #12553

Conversation

RickonZhang0929
Copy link

What is the purpose of the change

For 12017

Add the console backend API for config section

Brief changelog

  • Add history handling module

Verifying this change

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
  • Run mvn -B clean package apache-rat:check findbugs:findbugs -Dmaven.test.skip=true to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test to make sure integration-test pass.

* Add service handling module

* Add instance handling module
* Add user handling module

* Add role handling module

* Add permission handling module
@RickonZhang0929 RickonZhang0929 changed the base branch from develop to summer-ospp#12017 August 26, 2024 10:16
Copy link
Collaborator

@KomachiSion KomachiSion left a comment

Choose a reason for hiding this comment

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

统一检查一下Secured注解是不是都漏了apiType

@RestController
@RequestMapping("/v3/console/auth/permission")
@ExtractorManager.Extractor(httpExtractor = ConfigDefaultHttpParamExtractor.class)
public class ConsolePermissionController {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Permission, User, Role controller should be in auth plugin module, should not in console module.
Because these api is from optional plugin

* @return history config info
*/
@GetMapping
@Secured(action = ActionTypes.READ, signType = SignType.CONFIG)
Copy link
Collaborator

Choose a reason for hiding this comment

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

ApiType是不是漏了?

Copy link
Author

Choose a reason for hiding this comment

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

当时没加,现在均已添加

*/
@GetMapping(value = "/configs")
@Secured(action = ActionTypes.READ, signType = SignType.CONFIG)
public Result<List<ConfigInfoWrapper>> getConfigsByTenant(@RequestParam("namespaceId") String namespaceId)
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个接口是干什么的?

Copy link
Author

Choose a reason for hiding this comment

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

这个是历史查询里,在查询框下拉显示配置列表的接口,可以直接选择对应的配置项

*/
@PutMapping
@Secured(action = ActionTypes.WRITE)
public Result<String> updateCluster(HttpServletRequest request) throws Exception {
Copy link
Collaborator

Choose a reason for hiding this comment

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

这两个接口不是一个类型吧, updateCluster应该是naming模块的,更新服务下cluster元数据的。

前者应该是core模块的,获取nacos节点的信息吧?

Copy link
Author

Choose a reason for hiding this comment

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

确实有误, updateCluster应该是naming模块的

Copy link
Author

Choose a reason for hiding this comment

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

我将updateCluster放入了ConsoleServiceController中

@KomachiSion
Copy link
Collaborator

另外, 有的接口是Form对象,有的接口是独立RequestParameter列举, 看下是不是能统一一下。

* @param search the type of search (accurate or blur)
* @return permission of a role
*/
@GetMapping("/list")

Choose a reason for hiding this comment

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

Monetizar

@RickonZhang0929 RickonZhang0929 changed the title [ISSUE #12017] Add the console backend API for config section [ISSUE #12017] Add the console backend API for new section Sep 3, 2024
* Updated ControllerV3 for auth section
* Add ApiType annotation

* Transfer the updateCluster method

* Fix Compilation Errors
@KomachiSion KomachiSion merged commit f1b00a3 into alibaba:summer-ospp#12017 Sep 4, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants