mirror of
https://github.com/dataease/dataease.git
synced 2026-05-14 21:12:33 +08:00
refactor: 阈值告警支持发布草稿
This commit is contained in:
@@ -17,31 +17,7 @@ public interface ExtChartViewMapper {
|
||||
""")
|
||||
List<ViewSelectorVO> queryViewOption(@Param("resourceId") Long resourceId);
|
||||
|
||||
@Select("""
|
||||
select
|
||||
ccv.id as chart_id,
|
||||
ccv.title as chart_name,
|
||||
ccv.type as chart_type,
|
||||
ccv.table_id,
|
||||
dvi.id as resource_id,
|
||||
dvi.name as resource_name,
|
||||
dvi.type as resource_type,
|
||||
ccv.x_axis,
|
||||
ccv.x_axis_ext,
|
||||
ccv.y_axis,
|
||||
ccv.y_axis_ext,
|
||||
ccv.ext_stack,
|
||||
ccv.ext_bubble,
|
||||
ccv.ext_label,
|
||||
ccv.ext_tooltip,
|
||||
ccv.flow_map_start_name,
|
||||
ccv.flow_map_end_name,
|
||||
ccv.ext_color
|
||||
from core_chart_view ccv
|
||||
left join data_visualization_info dvi on dvi.id = ccv.scene_id
|
||||
where ccv.id = #{id}
|
||||
""")
|
||||
ChartBasePO queryChart(@Param("id") Long id);
|
||||
ChartBasePO queryChart(@Param("id") Long id, @Param("resourceTable")String resourceTable);
|
||||
|
||||
List<CoreChartView> selectListCustom(@Param("sceneId") Long sceneId, @Param("resourceTable") String resourceTable);
|
||||
|
||||
|
||||
@@ -227,7 +227,7 @@ public class ChartDataManage {
|
||||
FilterTreeObj customLinkageFilter = null;
|
||||
// 联动条件
|
||||
if (ObjectUtils.isNotEmpty(chartExtRequest.getLinkageFilters())) {
|
||||
for(ChartExtFilterDTO linkageFilter: chartExtRequest.getLinkageFilters()) {
|
||||
for (ChartExtFilterDTO linkageFilter : chartExtRequest.getLinkageFilters()) {
|
||||
if (3 == linkageFilter.getFilterType()) {
|
||||
customLinkageFilter = linkageFilter.getCustomFilter();
|
||||
} else {
|
||||
@@ -813,9 +813,10 @@ public class ChartDataManage {
|
||||
disuseChartIdList.add(chartViewDTO.getId());
|
||||
}
|
||||
});
|
||||
if (CollectionUtils.isNotEmpty(disuseChartIdList)) {
|
||||
chartViewManege.disuse(disuseChartIdList);
|
||||
}
|
||||
// 阈值告警处理 统一在发布时处理
|
||||
// if (CollectionUtils.isNotEmpty(disuseChartIdList)) {
|
||||
// chartViewManege.disuse(disuseChartIdList);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import io.dataease.chart.dao.auto.entity.CoreChartView;
|
||||
import io.dataease.chart.dao.auto.mapper.CoreChartViewMapper;
|
||||
import io.dataease.chart.dao.ext.entity.ChartBasePO;
|
||||
import io.dataease.chart.dao.ext.mapper.ExtChartViewMapper;
|
||||
import io.dataease.constant.CommonConstants;
|
||||
import io.dataease.dataset.dao.auto.entity.CoreDatasetTableField;
|
||||
import io.dataease.dataset.dao.auto.mapper.CoreDatasetTableFieldMapper;
|
||||
import io.dataease.dataset.manage.DatasetTableFieldManage;
|
||||
@@ -114,6 +115,21 @@ public class ChartViewManege {
|
||||
public void disuse(List<Long> chartIdList) {
|
||||
}
|
||||
|
||||
//镜像操作发布
|
||||
@XpackInteract(value = "chartViewManage")
|
||||
public void publishThreshold(Long resourceId, List<Long> chartIdList) {
|
||||
}
|
||||
|
||||
//镜像操作删除
|
||||
@XpackInteract(value = "chartViewManage")
|
||||
public void removeThreshold(Long resourceId, String resourceTable) {
|
||||
|
||||
}
|
||||
|
||||
//镜像操作恢复
|
||||
public void restoreThreshold(Long resourceId, String resourceTable) {
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void deleteBySceneId(Long sceneId, List<Long> chartIds) {
|
||||
QueryWrapper<CoreChartView> wrapper = new QueryWrapper<>();
|
||||
@@ -122,10 +138,20 @@ public class ChartViewManege {
|
||||
coreChartViewMapper.delete(wrapper);
|
||||
}
|
||||
|
||||
public ChartViewDTO getDetails(Long id) {
|
||||
CoreChartView coreChartView = coreChartViewMapper.selectById(id);
|
||||
if (ObjectUtils.isEmpty(coreChartView)) {
|
||||
return null;
|
||||
public ChartViewDTO getDetails(Long id, String resourceTable) {
|
||||
CoreChartView coreChartView = null;
|
||||
if (CommonConstants.RESOURCE_TABLE.SNAPSHOT.equals(resourceTable)) {
|
||||
SnapshotCoreChartView snapshotCoreChartView = snapshotCoreChartViewMapper.selectById(id);
|
||||
if (ObjectUtils.isEmpty(snapshotCoreChartView)) {
|
||||
return null;
|
||||
}
|
||||
coreChartView = new CoreChartView();
|
||||
BeanUtils.copyBean(coreChartView, snapshotCoreChartView);
|
||||
} else {
|
||||
coreChartView = coreChartViewMapper.selectById(id);
|
||||
if (ObjectUtils.isEmpty(coreChartView)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
ChartViewDTO dto = transRecord2DTO(coreChartView);
|
||||
return dto;
|
||||
@@ -201,8 +227,8 @@ public class ChartViewManege {
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public ChartViewDTO getChart(Long id) throws Exception {
|
||||
ChartViewDTO details = getDetails(id);
|
||||
public ChartViewDTO getChart(Long id, String resourceTable) throws Exception {
|
||||
ChartViewDTO details = getDetails(id, resourceTable);
|
||||
if (details == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -314,8 +340,8 @@ public class ChartViewManege {
|
||||
coreDatasetTableFieldMapper.delete(queryWrapper);
|
||||
}
|
||||
|
||||
public ChartBaseVO chartBaseInfo(Long id) {
|
||||
ChartBasePO po = extChartViewMapper.queryChart(id);
|
||||
public ChartBaseVO chartBaseInfo(Long id, String resourceTable) {
|
||||
ChartBasePO po = extChartViewMapper.queryChart(id, resourceTable);
|
||||
if (ObjectUtils.isEmpty(po)) return null;
|
||||
ChartBaseVO vo = BeanUtils.copyBean(new ChartBaseVO(), po);
|
||||
TypeReference<List<ChartViewFieldDTO>> tokenType = new TypeReference<>() {
|
||||
|
||||
@@ -34,8 +34,8 @@ public class ChartViewThresholdManage {
|
||||
@Resource
|
||||
private ChartViewManege chartViewManege;
|
||||
|
||||
public String convertThresholdRules(Long chartId, String thresholdRules) {
|
||||
ChartViewDTO details = chartViewManege.getDetails(chartId);
|
||||
public String convertThresholdRules(Long chartId, String thresholdRules, String resourceTable) {
|
||||
ChartViewDTO details = chartViewManege.getDetails(chartId, resourceTable);
|
||||
return convertThresholdRules(details, thresholdRules);
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@ public class ChartViewThresholdManage {
|
||||
String thresholdRules = request.getThresholdRules();
|
||||
Long chartId = request.getChartId();
|
||||
try {
|
||||
ChartViewDTO chart = chartViewManege.getChart(chartId);
|
||||
ChartViewDTO chart = chartViewManege.getChart(chartId, request.getResourceTable());
|
||||
Map<String, Object> data = null;
|
||||
if (ObjectUtils.isEmpty(chart) || MapUtils.isEmpty(data = chart.getData())) {
|
||||
return new ThresholdCheckVO(false, null, "查询图表异常!", null);
|
||||
|
||||
@@ -2,6 +2,7 @@ package io.dataease.chart.server;
|
||||
|
||||
import io.dataease.api.chart.ChartViewApi;
|
||||
import io.dataease.api.chart.vo.ChartBaseVO;
|
||||
import io.dataease.constant.CommonConstants;
|
||||
import io.dataease.extensions.view.dto.ChartViewDTO;
|
||||
import io.dataease.extensions.view.dto.ChartViewFieldDTO;
|
||||
import io.dataease.api.chart.vo.ViewSelectorVO;
|
||||
@@ -27,7 +28,7 @@ public class ChartViewServer implements ChartViewApi {
|
||||
@Override
|
||||
public ChartViewDTO getData(Long id) throws Exception {
|
||||
try {
|
||||
return chartViewManege.getChart(id);
|
||||
return chartViewManege.getChart(id, CommonConstants.RESOURCE_TABLE.CORE);
|
||||
} catch (Exception e) {
|
||||
DEException.throwException(ResultCode.DATA_IS_WRONG.code(), e.getMessage());
|
||||
}
|
||||
@@ -50,8 +51,8 @@ public class ChartViewServer implements ChartViewApi {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChartViewDTO getDetail(Long id) {
|
||||
return chartViewManege.getDetails(id);
|
||||
public ChartViewDTO getDetail(Long id, String resourceTable) {
|
||||
return chartViewManege.getDetails(id, resourceTable);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -75,7 +76,7 @@ public class ChartViewServer implements ChartViewApi {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChartBaseVO chartBaseInfo(Long id) {
|
||||
return chartViewManege.chartBaseInfo(id);
|
||||
public ChartBaseVO chartBaseInfo(Long id,String resourceTable) {
|
||||
return chartViewManege.chartBaseInfo(id,resourceTable);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import io.dataease.api.visualization.request.DataVisualizationBaseRequest;
|
||||
import io.dataease.api.visualization.request.VisualizationWorkbranchQueryRequest;
|
||||
import io.dataease.api.visualization.vo.VisualizationResourceVO;
|
||||
import io.dataease.chart.dao.ext.mapper.ExtChartViewMapper;
|
||||
import io.dataease.chart.manage.ChartViewManege;
|
||||
import io.dataease.commons.constants.DataVisualizationConstants;
|
||||
import io.dataease.commons.constants.OptConstants;
|
||||
import io.dataease.constant.BusiResourceEnum;
|
||||
@@ -25,6 +26,7 @@ import io.dataease.visualization.dao.ext.mapper.*;
|
||||
import io.dataease.visualization.dao.ext.po.VisualizationNodePO;
|
||||
import io.dataease.visualization.dao.ext.po.VisualizationResourcePO;
|
||||
import io.dataease.visualization.dto.VisualizationNodeBO;
|
||||
import io.dataease.xpack.base.threshold.manage.ThresholdManage;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
@@ -66,6 +68,9 @@ public class CoreVisualizationManage {
|
||||
@Resource
|
||||
private ExtChartViewMapper extCoreChartMapper;
|
||||
|
||||
@Resource
|
||||
private ChartViewManege chartViewManege;
|
||||
|
||||
@XpackInteract(value = "visualizationResourceTree", replace = true, invalid = true)
|
||||
public List<BusiNodeVO> tree(BusiNodeRequest request) {
|
||||
List<VisualizationNodeBO> nodes = new ArrayList<>();
|
||||
@@ -266,6 +271,9 @@ public class CoreVisualizationManage {
|
||||
outerParamsMapper.deleteOuterParamsTargetWithVisualizationIdSnapshot(dvId.toString());
|
||||
outerParamsMapper.deleteOuterParamsInfoWithVisualizationIdSnapshot(dvId.toString());
|
||||
outerParamsMapper.deleteOuterParamsWithVisualizationIdSnapshot(dvId.toString());
|
||||
//xpack 阈值告警
|
||||
chartViewManege.removeThreshold(dvId,CommonConstants.RESOURCE_TABLE.SNAPSHOT);
|
||||
|
||||
}
|
||||
}
|
||||
@Transactional
|
||||
@@ -284,13 +292,17 @@ public class CoreVisualizationManage {
|
||||
outerParamsMapper.deleteOuterParamsTargetWithVisualizationId(dvId.toString());
|
||||
outerParamsMapper.deleteOuterParamsInfoWithVisualizationId(dvId.toString());
|
||||
outerParamsMapper.deleteOuterParamsWithVisualizationId(dvId.toString());
|
||||
//xpack 阈值告警
|
||||
chartViewManege.removeThreshold(dvId,CommonConstants.RESOURCE_TABLE.CORE);
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void dvSnapshotRecover(Long dvId){
|
||||
// 清理历史数据
|
||||
this.removeSnapshot(dvId);
|
||||
CoreVisualizationManage proxy = CommonBeanFactory.proxy(this.getClass());
|
||||
assert proxy != null;
|
||||
proxy.removeSnapshot(dvId);
|
||||
// 导入新数据
|
||||
extDataVisualizationMapper.snapshotDataV(dvId);
|
||||
extDataVisualizationMapper.snapshotViews(dvId);
|
||||
@@ -302,6 +314,8 @@ public class CoreVisualizationManage {
|
||||
extDataVisualizationMapper.snapshotOuterParamsTargetViewInfo(dvId);
|
||||
extDataVisualizationMapper.snapshotOuterParamsInfo(dvId);
|
||||
extDataVisualizationMapper.snapshotOuterParams(dvId);
|
||||
//xpack 阈值告警
|
||||
chartViewManege.restoreThreshold(dvId,CommonConstants.RESOURCE_TABLE.SNAPSHOT);
|
||||
}
|
||||
@Transactional
|
||||
public void dvRestore(Long dvId){
|
||||
@@ -315,6 +329,8 @@ public class CoreVisualizationManage {
|
||||
extDataVisualizationMapper.restoreOuterParamsTargetViewInfo(dvId);
|
||||
extDataVisualizationMapper.restoreOuterParamsInfo(dvId);
|
||||
extDataVisualizationMapper.restoreOuterParams(dvId);
|
||||
//xpack 阈值告警
|
||||
chartViewManege.restoreThreshold(dvId,CommonConstants.RESOURCE_TABLE.CORE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -538,6 +538,7 @@ public class DataVisualizationServer implements DataVisualizationApi {
|
||||
if(CommonConstants.DV_STATUS.PUBLISHED == request.getStatus()){
|
||||
coreVisualizationManage.removeDvCore(dvId);
|
||||
coreVisualizationManage.dvRestore(dvId);
|
||||
chartViewManege.publishThreshold(dvId,request.getActiveViewIds());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="io.dataease.chart.dao.ext.mapper.ExtChartViewMapper">
|
||||
<select id="queryChart" resultType="io.dataease.chart.dao.ext.entity.ChartBasePO">
|
||||
select
|
||||
ccv.id as chart_id,
|
||||
ccv.title as chart_name,
|
||||
ccv.type as chart_type,
|
||||
ccv.table_id,
|
||||
dvi.id as resource_id,
|
||||
dvi.name as resource_name,
|
||||
dvi.type as resource_type,
|
||||
ccv.x_axis,
|
||||
ccv.x_axis_ext,
|
||||
ccv.y_axis,
|
||||
ccv.y_axis_ext,
|
||||
ccv.ext_stack,
|
||||
ccv.ext_bubble,
|
||||
ccv.ext_label,
|
||||
ccv.ext_tooltip,
|
||||
ccv.flow_map_start_name,
|
||||
ccv.flow_map_end_name,
|
||||
ccv.ext_color
|
||||
<choose>
|
||||
<when test="resourceTable == 'snapshot'">
|
||||
from snapshot_core_chart_view ccv
|
||||
left join snapshot_data_visualization_info dvi on dvi.id = ccv.scene_id
|
||||
</when>
|
||||
<otherwise>
|
||||
from core_chart_view ccv
|
||||
left join data_visualization_info dvi on dvi.id = ccv.scene_id
|
||||
</otherwise>
|
||||
</choose>
|
||||
where ccv.id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectListCustom" resultType="io.dataease.chart.dao.auto.entity.CoreChartView">
|
||||
select * from
|
||||
|
||||
@@ -39,7 +39,12 @@ import MultiplexingCanvas from '@/views/common/MultiplexingCanvas.vue'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { getPanelAllLinkageInfo, saveLinkage } from '@/api/visualization/linkage'
|
||||
import { queryVisualizationJumpInfo } from '@/api/visualization/linkJump'
|
||||
import { canvasSave, checkCanvasChangePre, initCanvasData } from '@/utils/canvasUtils'
|
||||
import {
|
||||
canvasSave,
|
||||
checkCanvasChangePre,
|
||||
findAllViewsId,
|
||||
initCanvasData
|
||||
} from '@/utils/canvasUtils'
|
||||
import { useEmitt } from '@/hooks/web/useEmitt'
|
||||
import { copyStoreWithOut } from '@/store/modules/data-visualization/copy'
|
||||
import TabsGroup from '@/custom-component/component-group/TabsGroup.vue'
|
||||
@@ -189,11 +194,14 @@ const recoverToPublished = () => {
|
||||
}
|
||||
|
||||
const publishStatusChange = status => {
|
||||
const targetViewIds = []
|
||||
findAllViewsId(componentData.value, targetViewIds)
|
||||
// do update
|
||||
updatePublishStatus({
|
||||
id: dvInfo.value.id,
|
||||
name: dvInfo.value.name,
|
||||
mobileLayout: dvInfo.value.mobileLayout,
|
||||
activeViewIds: targetViewIds,
|
||||
status,
|
||||
type: 'dashboard'
|
||||
}).then(() => {
|
||||
|
||||
@@ -28,7 +28,12 @@ import MediaGroup from '@/custom-component/component-group/MediaGroup.vue'
|
||||
import TextGroup from '@/custom-component/component-group/TextGroup.vue'
|
||||
import CommonGroup from '@/custom-component/component-group/CommonGroup.vue'
|
||||
import DeResourceGroupOpt from '@/views/common/DeResourceGroupOpt.vue'
|
||||
import { canvasSave, checkCanvasChangePre, initCanvasData } from '@/utils/canvasUtils'
|
||||
import {
|
||||
canvasSave,
|
||||
checkCanvasChangePre,
|
||||
findAllViewsId,
|
||||
initCanvasData
|
||||
} from '@/utils/canvasUtils'
|
||||
import { changeSizeWithScale } from '@/utils/changeComponentsSizeWithScale'
|
||||
import MoreComGroup from '@/custom-component/component-group/MoreComGroup.vue'
|
||||
import { XpackComponent } from '@/components/plugin'
|
||||
@@ -313,12 +318,15 @@ const multiplexingCanvasOpen = () => {
|
||||
}
|
||||
|
||||
const publishStatusChange = status => {
|
||||
const targetViewIds = []
|
||||
findAllViewsId(componentData.value, targetViewIds)
|
||||
// do update
|
||||
updatePublishStatus({
|
||||
id: dvInfo.value.id,
|
||||
name: dvInfo.value.name,
|
||||
mobileLayout: dvInfo.value.mobileLayout,
|
||||
status,
|
||||
activeViewIds: targetViewIds,
|
||||
type: 'dataV'
|
||||
}).then(() => {
|
||||
dvMainStore.updateDvInfoCall(status)
|
||||
|
||||
@@ -334,6 +334,7 @@ const removeJumpSenior = () => {
|
||||
:chart="chart"
|
||||
:themes="themes"
|
||||
:is-screen="dvInfo.type === 'dataV'"
|
||||
:resource-table="'snapshot'"
|
||||
jsname="L2NvbXBvbmVudC90aHJlc2hvbGQtd2FybmluZy9TZW5pb3JIYW5kbGVy"
|
||||
/>
|
||||
|
||||
|
||||
@@ -150,6 +150,7 @@ const initOpenHandler = newWindow => {
|
||||
<div class="canvas-opt-button">
|
||||
<el-button
|
||||
v-if="!isIframe"
|
||||
:disabled="dvInfo.status === 0"
|
||||
secondary
|
||||
@click="() => useEmitt().emitter.emit('canvasFullscreen')"
|
||||
>
|
||||
@@ -158,7 +159,7 @@ const initOpenHandler = newWindow => {
|
||||
</template>
|
||||
{{ t('visualization.fullscreen') }}</el-button
|
||||
>
|
||||
<el-button secondary @click="preview()">
|
||||
<el-button secondary @click="preview()" :disabled="dvInfo.status === 0">
|
||||
<template #icon>
|
||||
<icon name="icon_pc_outlined"><icon_pc_outlined class="svg-icon" /></icon>
|
||||
</template>
|
||||
@@ -166,6 +167,7 @@ const initOpenHandler = newWindow => {
|
||||
</el-button>
|
||||
<ShareVisualHead
|
||||
v-if="!shareDisable"
|
||||
:disabled="dvInfo.status === 0"
|
||||
:resource-id="dvInfo.id"
|
||||
:weight="dvInfo.weight"
|
||||
:resource-type="dvInfo.type"
|
||||
@@ -176,7 +178,7 @@ const initOpenHandler = newWindow => {
|
||||
</template>
|
||||
{{ t('visualization.edit') }}</el-button
|
||||
>
|
||||
<el-dropdown popper-class="pad12" trigger="click">
|
||||
<el-dropdown :disabled="dvInfo.status === 0" popper-class="pad12" trigger="click">
|
||||
<el-icon class="head-more-icon">
|
||||
<Icon name="dv-head-more"><dvHeadMore class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<el-button
|
||||
secondary
|
||||
v-if="props.weight >= 7"
|
||||
:disabled="disabled"
|
||||
@click="openPopover"
|
||||
v-click-outside="clickOutPopover"
|
||||
>
|
||||
@@ -242,7 +243,8 @@ const { t } = useI18n()
|
||||
const props = defineProps({
|
||||
resourceId: propTypes.string.def(''),
|
||||
resourceType: propTypes.string.def(''),
|
||||
weight: propTypes.number.def(0)
|
||||
weight: propTypes.number.def(0),
|
||||
disabled: propTypes.bool.def(false)
|
||||
})
|
||||
const popoverVisible = ref(false)
|
||||
const pwdRef = ref(null)
|
||||
|
||||
2
de-xpack
2
de-xpack
Submodule de-xpack updated: 91c3c392b3...9fbb039084
@@ -38,8 +38,8 @@ public interface ChartViewApi {
|
||||
String checkSameDataSet(@PathVariable String viewIdSource, @PathVariable String viewIdTarget);
|
||||
|
||||
@Operation(summary = "查询图表详情")
|
||||
@PostMapping("getDetail/{id}")
|
||||
ChartViewDTO getDetail(@PathVariable Long id);
|
||||
@PostMapping("getDetail/{id}/{resourceTable}")
|
||||
ChartViewDTO getDetail(@PathVariable Long id, @PathVariable String resourceTable);
|
||||
|
||||
@Operation(summary = "查询仪表板下视图项")
|
||||
@GetMapping("/viewOption/{resourceId}")
|
||||
@@ -58,6 +58,6 @@ public interface ChartViewApi {
|
||||
void deleteFieldByChart(@PathVariable Long chartId);
|
||||
|
||||
@Operation(summary = "视图头部信息")
|
||||
@GetMapping("/chartBaseInfo/{id}")
|
||||
ChartBaseVO chartBaseInfo(@PathVariable("id") Long id);
|
||||
@GetMapping("/chartBaseInfo/{id}/{resourceTable}")
|
||||
ChartBaseVO chartBaseInfo(@PathVariable("id") Long id, @PathVariable String resourceTable);
|
||||
}
|
||||
|
||||
@@ -15,4 +15,6 @@ public class ThresholdCheckRequest implements Serializable {
|
||||
private String thresholdRules;
|
||||
|
||||
private String thresholdTemplate;
|
||||
|
||||
private String resourceTable;
|
||||
}
|
||||
|
||||
@@ -36,16 +36,16 @@ public interface ThresholdApi {
|
||||
IPage<ThresholdGridVO> pager(@PathVariable("goPage") int goPage, @PathVariable("pageSize") int pageSize, @RequestBody ThresholdGridRequest request);
|
||||
|
||||
@Operation(summary = "查询表单")
|
||||
@GetMapping("/formInfo/{id}")
|
||||
ThresholdCreator formInfo(@PathVariable("id") Long id);
|
||||
@GetMapping("/formInfo/{id}/{resourceTable}")
|
||||
ThresholdCreator formInfo(@PathVariable("id") Long id, @PathVariable("resourceTable") String resourceTable);
|
||||
|
||||
@Operation(summary = "切换可用")
|
||||
@PostMapping("/switch")
|
||||
void switchEnable(@RequestBody ThresholdSwitchRequest request);
|
||||
|
||||
@Operation(summary = "删除")
|
||||
@PostMapping("/delete")
|
||||
void delete(@RequestBody List<Long> idList);
|
||||
@PostMapping("/delete/{resourceTable}")
|
||||
void delete(@RequestBody List<Long> idList, @PathVariable("resourceTable") String resourceTable);
|
||||
|
||||
@Operation(summary = "批量设置接收人")
|
||||
@PostMapping("/batchReci")
|
||||
@@ -65,8 +65,8 @@ public interface ThresholdApi {
|
||||
String preview(@RequestBody ThresholdPreviewRequest request);
|
||||
|
||||
@Operation(summary = "视图是否设置了阈值告警")
|
||||
@GetMapping("/anyThreshold/{chartId}")
|
||||
boolean anyThreshold(@PathVariable("chartId") Long chartId);
|
||||
@GetMapping("/anyThreshold/{chartId}/{resourceTable}")
|
||||
boolean anyThreshold(@PathVariable("chartId") Long chartId, @PathVariable("resourceTable") String resourceTable);
|
||||
|
||||
@Operation(summary = "根据视图ID删除")
|
||||
@GetMapping("/deleteWithChart/{chartId}")
|
||||
|
||||
@@ -2,6 +2,7 @@ package io.dataease.api.threshold.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.dataease.constant.CommonConstants;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@@ -44,4 +45,6 @@ public class ThresholdCreator extends BaseReciDTO implements Serializable {
|
||||
private String msgContent;
|
||||
|
||||
private Boolean repeatSend = true;
|
||||
|
||||
private String resourceTable = CommonConstants.RESOURCE_TABLE.CORE;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package io.dataease.api.threshold.dto;
|
||||
|
||||
import io.dataease.constant.CommonConstants;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
@@ -13,6 +14,8 @@ public class ThresholdGridRequest implements Serializable {
|
||||
|
||||
private String keyword;
|
||||
|
||||
private String resourceTable = CommonConstants.RESOURCE_TABLE.CORE;
|
||||
|
||||
private List<String> resourceTypeList;
|
||||
|
||||
private List<Integer> statusList;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package io.dataease.api.threshold.dto;
|
||||
|
||||
import io.dataease.constant.CommonConstants;
|
||||
import io.dataease.model.KeywordRequest;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package io.dataease.api.threshold.dto;
|
||||
|
||||
import io.dataease.constant.CommonConstants;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
@@ -15,4 +16,6 @@ public class ThresholdPreviewRequest implements Serializable {
|
||||
private String thresholdRules;
|
||||
|
||||
private String msgContent;
|
||||
|
||||
private String resourceTable = CommonConstants.RESOURCE_TABLE.CORE;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package io.dataease.api.threshold.dto;
|
||||
|
||||
import io.dataease.constant.CommonConstants;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
@@ -13,4 +14,6 @@ public class ThresholdSwitchRequest implements Serializable {
|
||||
private Long id;
|
||||
|
||||
private Boolean enable;
|
||||
|
||||
private String resourceTable = CommonConstants.RESOURCE_TABLE.CORE;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ import io.dataease.api.visualization.vo.VisualizationExport2AppVO;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public class DataVisualizationBaseRequest extends DataVisualizationVO {
|
||||
@@ -31,6 +33,8 @@ public class DataVisualizationBaseRequest extends DataVisualizationVO {
|
||||
|
||||
private String busiFlag;
|
||||
|
||||
private List<Long> activeViewIds;
|
||||
|
||||
// 查询来源 main=主工程 report=定时报告
|
||||
private String source;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user