mirror of
https://github.com/dromara/hertzbeat.git
synced 2026-09-17 09:40:58 +00:00
[fix] auto generated by protocol buffer (#2842)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
This commit is contained in:
+1466
-1456
File diff suppressed because it is too large
Load Diff
@@ -38,18 +38,20 @@ enum MessageType
|
||||
GO_ONLINE = 1;
|
||||
// collector go offline to master message
|
||||
GO_OFFLINE = 2;
|
||||
// issue cyclic collect task
|
||||
ISSUE_CYCLIC_TASK = 3;
|
||||
// delete cyclic collect task
|
||||
DELETE_CYCLIC_TASK = 4;
|
||||
// issue one-time collect task
|
||||
ISSUE_ONE_TIME_TASK = 5;
|
||||
// response one-time collect data
|
||||
RESPONSE_ONE_TIME_TASK_DATA = 6;
|
||||
// response cyclic collect data
|
||||
RESPONSE_CYCLIC_TASK_DATA = 7;
|
||||
// collector go close to master
|
||||
GO_CLOSE = 8;
|
||||
GO_CLOSE = 3;
|
||||
// issue cyclic collect task
|
||||
ISSUE_CYCLIC_TASK = 4;
|
||||
// delete cyclic collect task
|
||||
DELETE_CYCLIC_TASK = 5;
|
||||
// issue one-time collect task
|
||||
ISSUE_ONE_TIME_TASK = 6;
|
||||
// response one-time collect data
|
||||
RESPONSE_ONE_TIME_TASK_DATA = 7;
|
||||
// response cyclic collect data
|
||||
RESPONSE_CYCLIC_TASK_DATA = 8;
|
||||
// response cyclic service discovery data
|
||||
RESPONSE_CYCLIC_TASK_SD_DATA = 9;
|
||||
}
|
||||
|
||||
enum Direction {
|
||||
|
||||
@@ -49,9 +49,6 @@ public class MonitorDto {
|
||||
@Schema(description = "Monitor Metrics", accessMode = READ_ONLY)
|
||||
private List<String> metrics;
|
||||
|
||||
@Schema(description = "Whether to Detect", accessMode = READ_WRITE)
|
||||
private boolean detected;
|
||||
|
||||
@Schema(description = "pinned collector, default null if system dispatch", accessMode = READ_WRITE)
|
||||
private String collector;
|
||||
|
||||
|
||||
-7
@@ -66,9 +66,6 @@ public abstract class AbstractImExportServiceImpl implements ImExportService {
|
||||
if (!CollectionUtils.isEmpty(formList)) {
|
||||
formList.forEach(monitorDto -> {
|
||||
monitorService.validate(monitorDto, false);
|
||||
if (monitorDto.isDetected()) {
|
||||
monitorService.detectMonitor(monitorDto.getMonitor(), monitorDto.getParams(), monitorDto.getCollector());
|
||||
}
|
||||
monitorService.addMonitor(monitorDto.getMonitor(), monitorDto.getParams(), monitorDto.getCollector(), monitorDto.getGrafanaDashboard());
|
||||
});
|
||||
}
|
||||
@@ -119,7 +116,6 @@ public abstract class AbstractImExportServiceImpl implements ImExportService {
|
||||
})
|
||||
.toList());
|
||||
exportMonitor.setMetrics(dto.getMetrics());
|
||||
exportMonitor.setDetected(false);
|
||||
exportMonitor.getMonitor().setCollector(dto.getCollector());
|
||||
return exportMonitor;
|
||||
}
|
||||
@@ -130,7 +126,6 @@ public abstract class AbstractImExportServiceImpl implements ImExportService {
|
||||
}
|
||||
|
||||
var monitorDto = new MonitorDto();
|
||||
monitorDto.setDetected(exportMonitor.getDetected());
|
||||
var monitor = new Monitor();
|
||||
log.debug("exportMonitor.monitor{}", exportMonitor.monitor);
|
||||
if (exportMonitor.monitor != null) { // Add one more null check
|
||||
@@ -180,8 +175,6 @@ public abstract class AbstractImExportServiceImpl implements ImExportService {
|
||||
private List<ParamDTO> params;
|
||||
@ExcelCollection(name = "Metrics")
|
||||
private List<String> metrics;
|
||||
@ExcelCollection(name = "detected")
|
||||
private Boolean detected;
|
||||
}
|
||||
|
||||
@Data
|
||||
|
||||
-5
@@ -99,8 +99,6 @@ public class ExcelImExportServiceImpl extends AbstractImExportServiceImpl{
|
||||
List<String> metricList = Arrays.stream(metrics.split(",")).collect(Collectors.toList());
|
||||
exportMonitor.setMetrics(metricList);
|
||||
}
|
||||
boolean detected = getCellValueAsBoolean(row.getCell(12));
|
||||
exportMonitor.setDetected(detected);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,9 +265,6 @@ public class ExcelImExportServiceImpl extends AbstractImExportServiceImpl{
|
||||
metricCell.setCellValue(String.join(",", metricList));
|
||||
metricCell.setCellStyle(cellStyle);
|
||||
}
|
||||
Cell detectedCell = row.createCell(12);
|
||||
detectedCell.setCellValue(monitor.getDetected() != null && monitor.getDetected());
|
||||
detectedCell.setCellStyle(cellStyle);
|
||||
}
|
||||
// Fill in parameter information
|
||||
if (i < paramList.size()) {
|
||||
|
||||
-1
@@ -74,7 +74,6 @@ class MonitorControllerTest {
|
||||
|
||||
MonitorDto monitorDto = new MonitorDto();
|
||||
monitorDto.setMonitor(monitor);
|
||||
monitorDto.setDetected(true);
|
||||
monitorDto.setParams(params);
|
||||
return monitorDto;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,6 @@ export class MonitorEditComponent implements OnInit {
|
||||
grafanaDashboard!: GrafanaDashboard;
|
||||
collectors!: Collector[];
|
||||
collector: string = '';
|
||||
detected: boolean = false;
|
||||
isSpinning: boolean = false;
|
||||
spinningTip: string = 'Loading...';
|
||||
|
||||
@@ -93,7 +92,6 @@ export class MonitorEditComponent implements OnInit {
|
||||
});
|
||||
this.paramValueMap = paramValueMap;
|
||||
}
|
||||
this.detected = false;
|
||||
if (this.monitor.tags == undefined) {
|
||||
this.monitor.tags = [];
|
||||
}
|
||||
@@ -192,17 +190,12 @@ export class MonitorEditComponent implements OnInit {
|
||||
|
||||
onSubmit(info: any) {
|
||||
let addMonitor = {
|
||||
detected: this.detected,
|
||||
monitor: info.monitor,
|
||||
collector: info.collector,
|
||||
params: info.params.concat(info.advancedParams),
|
||||
grafanaDashboard: info.grafanaDashboard
|
||||
};
|
||||
if (this.detected) {
|
||||
this.spinningTip = this.i18nSvc.fanyi('monitors.spinning-tip.detecting');
|
||||
} else {
|
||||
this.spinningTip = 'Loading...';
|
||||
}
|
||||
this.spinningTip = 'Loading...';
|
||||
this.isSpinning = true;
|
||||
this.monitorSvc.editMonitor(addMonitor).subscribe(
|
||||
message => {
|
||||
@@ -223,7 +216,6 @@ export class MonitorEditComponent implements OnInit {
|
||||
|
||||
onDetect(info: any) {
|
||||
let detectMonitor = {
|
||||
detected: this.detected,
|
||||
monitor: info.monitor,
|
||||
collector: info.collector,
|
||||
params: info.params.concat(info.advancedParams)
|
||||
|
||||
@@ -49,7 +49,6 @@ export class MonitorNewComponent implements OnInit {
|
||||
monitor!: Monitor;
|
||||
collectors!: Collector[];
|
||||
collector: string = '';
|
||||
detected: boolean = false;
|
||||
grafanaDashboard!: GrafanaDashboard;
|
||||
// whether it is loading
|
||||
isSpinning: boolean = false;
|
||||
@@ -78,7 +77,6 @@ export class MonitorNewComponent implements OnInit {
|
||||
this.router.navigateByUrl('/monitors/new?app=website');
|
||||
}
|
||||
this.titleSvc.setTitleByI18n(`monitor.app.${this.monitor.app}`);
|
||||
this.detected = false;
|
||||
this.isSpinning = true;
|
||||
return this.appDefineSvc.getAppParamsDefine(this.monitor.app);
|
||||
})
|
||||
@@ -163,17 +161,12 @@ export class MonitorNewComponent implements OnInit {
|
||||
|
||||
onSubmit(info: any) {
|
||||
let addMonitor = {
|
||||
detected: this.detected,
|
||||
monitor: info.monitor,
|
||||
collector: info.collector,
|
||||
params: info.params.concat(info.advancedParams),
|
||||
grafanaDashboard: info.grafanaDashboard
|
||||
};
|
||||
if (this.detected) {
|
||||
this.spinningTip = this.i18nSvc.fanyi('monitors.spinning-tip.detecting');
|
||||
} else {
|
||||
this.spinningTip = 'Loading...';
|
||||
}
|
||||
this.spinningTip = 'Loading...';
|
||||
this.isSpinning = true;
|
||||
this.monitorSvc.newMonitor(addMonitor).subscribe(
|
||||
message => {
|
||||
@@ -194,7 +187,6 @@ export class MonitorNewComponent implements OnInit {
|
||||
|
||||
onDetect(info: any) {
|
||||
let detectMonitor = {
|
||||
detected: true,
|
||||
monitor: info.monitor,
|
||||
collector: info.collector,
|
||||
params: info.params.concat(info.advancedParams)
|
||||
|
||||
Reference in New Issue
Block a user