|
|
@@ -31,10 +31,10 @@ public class AppConfigController {
|
|
|
this.hostQuery = hostQuery;
|
|
|
}
|
|
|
|
|
|
- /* 应用编排 */
|
|
|
- @ApiOperation(value = "添加/修改应用编排")
|
|
|
+ /* 应用配置 */
|
|
|
+ @ApiOperation(value = "添加/修改应用配置")
|
|
|
@PostMapping(produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
- public String addAppOrchestration(@Validated AppConfig app) {
|
|
|
+ public String addAppConfig(@Validated AppConfig app) {
|
|
|
Integer id = app.getId();
|
|
|
Result result;
|
|
|
if (id == null) {
|
|
|
@@ -46,9 +46,9 @@ public class AppConfigController {
|
|
|
}
|
|
|
|
|
|
// TODO 使用 @PathVariable 注解时会自动填充实体
|
|
|
- @ApiOperation(value = "复制应用编排")
|
|
|
+ @ApiOperation(value = "复制应用配置")
|
|
|
@PostMapping(value = "/copy/{id}", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
- public String copyAppOrchestration(@PathVariable("id") AppConfig app, @Validated NewApp newApp) {
|
|
|
+ public String copyAppConfig(@PathVariable("id") AppConfig app, @Validated NewApp newApp) {
|
|
|
Result result;
|
|
|
try {
|
|
|
result = appConfigService.copy(app, newApp);
|
|
|
@@ -59,10 +59,17 @@ public class AppConfigController {
|
|
|
return WebBody.result(result);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "删除应用编排")
|
|
|
+ @ApiOperation(value = "删除应用配置")
|
|
|
@DeleteMapping(value = "/{id}", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
- public String deleteAppOrchestration(@PathVariable("id") AppConfig app) {
|
|
|
+ public String deleteAppConfig(@PathVariable("id") AppConfig app) {
|
|
|
Result result = appConfigService.delete(app);
|
|
|
return WebBody.result(result);
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value = "清空应用本地仓库")
|
|
|
+ @DeleteMapping(value = "/repo/{id}", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
+ public String deleteAppLocalRepo(@PathVariable("id") AppConfig app) {
|
|
|
+ Result result = appConfigService.resetLocalRepo(app);
|
|
|
+ return WebBody.result(result);
|
|
|
+ }
|
|
|
}
|