[manager] 监控参数接口修改,jar启动修复
This commit is contained in:
@@ -34,7 +34,7 @@ public class AppController {
|
||||
@ApiOperation(value = "查询监控类型的参数结构", notes = "根据app查询指定监控类型的需要输入参数的结构")
|
||||
public ResponseEntity<Message<List<ParamDefine>>> queryAppParamDefines(
|
||||
@ApiParam(value = "监控类型名称", example = "api") @PathVariable("app") String app) {
|
||||
List<ParamDefine> paramDefines = appService.getAppParamDefines(app);
|
||||
List<ParamDefine> paramDefines = appService.getAppParamDefines(app.toLowerCase());
|
||||
return ResponseEntity.ok(new Message<>(paramDefines));
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ public class AppServiceImpl implements AppService, CommandLineRunner {
|
||||
if (appFile.exists()) {
|
||||
try (FileInputStream fileInputStream = new FileInputStream(appFile)) {
|
||||
Job app = yaml.loadAs(fileInputStream, Job.class);
|
||||
appDefines.put(app.getApp(), app);
|
||||
appDefines.put(app.getApp().toLowerCase(), app);
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new IOException(e);
|
||||
@@ -91,7 +91,7 @@ public class AppServiceImpl implements AppService, CommandLineRunner {
|
||||
if (appFile.exists()) {
|
||||
try (FileInputStream fileInputStream = new FileInputStream(appFile)) {
|
||||
ParamDefineDto paramDefine = yaml.loadAs(fileInputStream, ParamDefineDto.class);
|
||||
paramDefines.put(paramDefine.getApp(), paramDefine.getParam());
|
||||
paramDefines.put(paramDefine.getApp().toLowerCase(), paramDefine.getParam());
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new IOException(e);
|
||||
|
||||
@@ -18,8 +18,6 @@ import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||
|
||||
import javax.validation.ConstraintViolationException;
|
||||
import javax.validation.ValidationException;
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import static com.usthe.common.util.CommonConstants.DETECT_FAILED;
|
||||
|
||||
@@ -28,7 +28,8 @@ param:
|
||||
required: false
|
||||
- field: ssl
|
||||
name: 启动SSL
|
||||
type: radio
|
||||
type: boolean
|
||||
required: false
|
||||
# 当type为boolean时,前端用switch展示开关
|
||||
# 当type为radio单选框,checkbox复选框时,option表示可选项值列表
|
||||
option: Yes,No
|
||||
Reference in New Issue
Block a user