|
@@ -52,28 +52,28 @@ public class BizObjController extends BaseController {
|
|
|
private IPrometheusService prometheusService;
|
|
|
|
|
|
@ApiOperation("选择模板")
|
|
|
- @GetMapping("/tpl/select/{objId}")
|
|
|
- public TableDataInfo select(@ApiParam(value = "对象ID", required = true) @PathVariable("objId") Long objId) {
|
|
|
+ @GetMapping("/tpl/select")
|
|
|
+ public TableDataInfo select(@ApiParam(value = "对象ID", required = true) Long objId) {
|
|
|
startPage();
|
|
|
List<MetricsTpl> list = bizObjTplService.selectTplList(objId);
|
|
|
return getDataTable(list);
|
|
|
}
|
|
|
|
|
|
@ApiOperation("添加模板")
|
|
|
- @GetMapping("/tpl/add/{objId}")
|
|
|
- public AjaxResult add(@ApiParam(value = "对象ID", required = true) @PathVariable("objId") Long objId, @ApiParam(value = "指标ID数组", required = true) Long[] tplIds) {
|
|
|
+ @GetMapping("/tpl/add")
|
|
|
+ public AjaxResult add(@ApiParam(value = "对象ID", required = true) Long objId, @ApiParam(value = "指标ID数组", required = true) Long[] tplIds) {
|
|
|
return success(bizObjTplService.insertTplDetails(objId, tplIds));
|
|
|
}
|
|
|
|
|
|
@ApiOperation("删除模板")
|
|
|
- @GetMapping("/tpl/del/{objId}/{tplId}")
|
|
|
- public AjaxResult del(@ApiParam(value = "对象ID", required = true) @PathVariable("objId") Long objId, @ApiParam(value = "模板ID", required = true) @PathVariable("tplId") Long tplId) {
|
|
|
+ @GetMapping("/tpl/del")
|
|
|
+ public AjaxResult del(@ApiParam(value = "对象ID", required = true) Long objId, @ApiParam(value = "模板ID", required = true) Long tplId) {
|
|
|
return success(bizObjTplService.del(objId, tplId));
|
|
|
}
|
|
|
|
|
|
@ApiOperation("选择指标")
|
|
|
- @GetMapping("/metrics/select/{objId}")
|
|
|
- public TableDataInfo metricsSelect(@ApiParam(value = "对象ID", required = true) @PathVariable("objId") Long objId) {
|
|
|
+ @GetMapping("/metrics/select")
|
|
|
+ public TableDataInfo metricsSelect(@ApiParam(value = "对象ID", required = true) Long objId) {
|
|
|
startPage();
|
|
|
//只能选择prometheus的指标
|
|
|
List<MetricsDef> list = metricsService.selectMetricsDefList(objId);
|
|
@@ -98,8 +98,8 @@ public class BizObjController extends BaseController {
|
|
|
}
|
|
|
|
|
|
@ApiOperation("数据接口配置进度")
|
|
|
- @GetMapping("/schedule/{objId}")
|
|
|
- public AjaxResult schedule(@ApiParam(value = "对象ID", required = true) @PathVariable("objId") Long objId) {
|
|
|
+ @GetMapping("/schedule")
|
|
|
+ public AjaxResult schedule(@ApiParam(value = "对象ID", required = true) Long objId) {
|
|
|
BizObjMetrics om = new BizObjMetrics();
|
|
|
om.setObjId(objId);
|
|
|
List<BizObjMetrics> allList = metricsService.selectBizObjMetricsList(om);
|
|
@@ -113,14 +113,14 @@ public class BizObjController extends BaseController {
|
|
|
}
|
|
|
|
|
|
@ApiOperation("添加指标")
|
|
|
- @GetMapping("/metrics/add/{objId}")
|
|
|
- public AjaxResult metricsAdd(@ApiParam(value = "对象ID", required = true) @PathVariable("objId") Long objId, @ApiParam(value = "指标ID数组", required = true) Long[] metricsIds) {
|
|
|
+ @GetMapping("/metrics/add")
|
|
|
+ public AjaxResult metricsAdd(@ApiParam(value = "对象ID", required = true)Long objId, @ApiParam(value = "指标ID数组", required = true) Long[] metricsIds) {
|
|
|
return success(metricsService.insertMetricsDetails(objId, metricsIds));
|
|
|
}
|
|
|
|
|
|
@ApiOperation("完成自定义指标配置")
|
|
|
- @GetMapping("/metrics/conf/{objId}")
|
|
|
- public AjaxResult metricsConf(@ApiParam(value = "对象ID", required = true) @PathVariable("objId") Long objId) {
|
|
|
+ @GetMapping("/metrics/conf")
|
|
|
+ public AjaxResult metricsConf(@ApiParam(value = "对象ID", required = true) Long objId) {
|
|
|
boolean flag = metricsService.insertMc(objId);
|
|
|
if (flag) {
|
|
|
return success();
|
|
@@ -159,8 +159,8 @@ public class BizObjController extends BaseController {
|
|
|
*/
|
|
|
@ApiOperation("获取业务对象详细信息")
|
|
|
//@PreAuthorize("@ss.hasPermi('obj:obj:query')")
|
|
|
- @GetMapping(value = "/{objId}")
|
|
|
- public AjaxResult getInfo(@PathVariable("objId") Long objId) {
|
|
|
+ @GetMapping(value = "/detail")
|
|
|
+ public AjaxResult getInfo(Long objId) {
|
|
|
return success(bizObjService.selectBizObjByObjId(objId));
|
|
|
}
|
|
|
|
|
@@ -195,9 +195,8 @@ public class BizObjController extends BaseController {
|
|
|
@ApiOperation("删除业务对象")
|
|
|
//@PreAuthorize("@ss.hasPermi('obj:obj:remove')")
|
|
|
@Log(title = "业务对象", businessType = BusinessType.DELETE)
|
|
|
- @GetMapping("/del/{objIds}")
|
|
|
- public AjaxResult remove(@PathVariable Long[] objIds) {
|
|
|
-
|
|
|
+ @GetMapping("/del")
|
|
|
+ public AjaxResult remove(Long[] objIds) {
|
|
|
return toAjax(bizObjService.deleteBizObjByObjIds(objIds));
|
|
|
}
|
|
|
}
|