mirror of
https://github.com/dromara/hertzbeat.git
synced 2026-09-17 09:40:58 +00:00
[feature] support managing tasks by using http_sd (#2830)
Co-authored-by: Zhang Yuxuan <1373529784@qq.com> Co-authored-by: aias00 <rokkki@163.com>
This commit is contained in:
co-authored by
Zhang Yuxuan
aias00
parent
fc8be06ad5
commit
5acaf4844a
+5
@@ -26,6 +26,8 @@ import static org.apache.hertzbeat.grafana.common.GrafanaConstants.USE_DATASOURC
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
import org.apache.hertzbeat.common.entity.grafana.GrafanaDashboard;
|
||||
import org.apache.hertzbeat.common.util.JsonUtil;
|
||||
import org.apache.hertzbeat.grafana.config.GrafanaProperties;
|
||||
@@ -115,6 +117,9 @@ public class DashboardService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteDashboard(Long monitorId) {
|
||||
GrafanaDashboard grafanaDashboard = dashboardDao.findByMonitorId(monitorId);
|
||||
if (Objects.isNull(grafanaDashboard)) {
|
||||
return;
|
||||
}
|
||||
String uid = grafanaDashboard.getUid();
|
||||
List<GrafanaDashboard> grafanaDashboards = dashboardDao.findByUid(uid);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user