perf(X-Pack): 阈值告警预览页面

This commit is contained in:
fit2cloud-chenyw 2024-08-15 16:55:11 +08:00
parent 139f9974b5
commit 378fbd5020
4 changed files with 25 additions and 3 deletions

View File

@ -7,7 +7,6 @@
import { ref, toRefs, watch, onMounted, onBeforeUnmount } from 'vue'
import { useEmitt } from '@/hooks/web/useEmitt'
import { formatDataEaseBi } from '@/utils/url'
import { guid } from '@/views/visualized/data/dataset/form/util'
import tinymce from 'tinymce/tinymce' // tinymcehidden
import Editor from '@tinymce/tinymce-vue' //
import 'tinymce/themes/silver/theme' //
@ -126,6 +125,7 @@ const init = ref({
fetch: callback => {
const items = props.fieldList.map(ele => {
return {
id: ele.id,
icon: iconMap[ele.deType],
type: 'choiceitem',
text: ele.name,
@ -144,11 +144,12 @@ const fieldSelect = name => {
const ed = tinymce.editors[tinymceId]
const obj = props.fieldList.find(ele => ele.name === name)
const field = {
id: obj.id,
name: obj.name,
backgroundColor: obj.groupType === 'd' ? '#3370FF33' : '#00D6B933',
color: obj.groupType === 'd' ? '#2B5FD9' : '#04B49C'
}
const fieldId = 'changeText-' + guid()
const fieldId = 'changeText-' + field.id || ''
const value =
`<span style="background: ${field.backgroundColor};color: ${field.color}" id="` +
fieldId +

@ -1 +1 @@
Subproject commit 813c95f1106779434b2b5715034cde96da491ba0
Subproject commit a77c9297c262ab15f600897c00e30abf02166fda

View File

@ -63,4 +63,7 @@ public interface ThresholdApi {
@PostMapping("/instancePager/{goPage}/{pageSize}")
IPage<ThresholdInstanceVO> instancePager(@PathVariable("goPage") int goPage, @PathVariable("pageSize") int pageSize, @RequestBody ThresholdInstanceRequest request);
@Operation(summary = "预览信息")
@PostMapping("/preview")
String preview(@RequestBody ThresholdPreviewRequest request);
}

View File

@ -0,0 +1,18 @@
package io.dataease.api.threshold.dto;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
@Data
public class ThresholdPreviewRequest implements Serializable {
@Serial
private static final long serialVersionUID = 3609209252630995739L;
private Long tableId;
private String thresholdRules;
private String msgContent;
}