mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 11:32:57 +08:00
perf(X-Pack): 阈值告警预览页面
This commit is contained in:
parent
139f9974b5
commit
378fbd5020
@ -7,7 +7,6 @@
|
|||||||
import { ref, toRefs, watch, onMounted, onBeforeUnmount } from 'vue'
|
import { ref, toRefs, watch, onMounted, onBeforeUnmount } from 'vue'
|
||||||
import { useEmitt } from '@/hooks/web/useEmitt'
|
import { useEmitt } from '@/hooks/web/useEmitt'
|
||||||
import { formatDataEaseBi } from '@/utils/url'
|
import { formatDataEaseBi } from '@/utils/url'
|
||||||
import { guid } from '@/views/visualized/data/dataset/form/util'
|
|
||||||
import tinymce from 'tinymce/tinymce' // tinymce默认hidden,不引入不显示
|
import tinymce from 'tinymce/tinymce' // tinymce默认hidden,不引入不显示
|
||||||
import Editor from '@tinymce/tinymce-vue' // 编辑器引入
|
import Editor from '@tinymce/tinymce-vue' // 编辑器引入
|
||||||
import 'tinymce/themes/silver/theme' // 编辑器主题
|
import 'tinymce/themes/silver/theme' // 编辑器主题
|
||||||
@ -126,6 +125,7 @@ const init = ref({
|
|||||||
fetch: callback => {
|
fetch: callback => {
|
||||||
const items = props.fieldList.map(ele => {
|
const items = props.fieldList.map(ele => {
|
||||||
return {
|
return {
|
||||||
|
id: ele.id,
|
||||||
icon: iconMap[ele.deType],
|
icon: iconMap[ele.deType],
|
||||||
type: 'choiceitem',
|
type: 'choiceitem',
|
||||||
text: ele.name,
|
text: ele.name,
|
||||||
@ -144,11 +144,12 @@ const fieldSelect = name => {
|
|||||||
const ed = tinymce.editors[tinymceId]
|
const ed = tinymce.editors[tinymceId]
|
||||||
const obj = props.fieldList.find(ele => ele.name === name)
|
const obj = props.fieldList.find(ele => ele.name === name)
|
||||||
const field = {
|
const field = {
|
||||||
|
id: obj.id,
|
||||||
name: obj.name,
|
name: obj.name,
|
||||||
backgroundColor: obj.groupType === 'd' ? '#3370FF33' : '#00D6B933',
|
backgroundColor: obj.groupType === 'd' ? '#3370FF33' : '#00D6B933',
|
||||||
color: obj.groupType === 'd' ? '#2B5FD9' : '#04B49C'
|
color: obj.groupType === 'd' ? '#2B5FD9' : '#04B49C'
|
||||||
}
|
}
|
||||||
const fieldId = 'changeText-' + guid()
|
const fieldId = 'changeText-' + field.id || ''
|
||||||
const value =
|
const value =
|
||||||
`<span style="background: ${field.backgroundColor};color: ${field.color}" id="` +
|
`<span style="background: ${field.backgroundColor};color: ${field.color}" id="` +
|
||||||
fieldId +
|
fieldId +
|
||||||
|
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
|||||||
Subproject commit 813c95f1106779434b2b5715034cde96da491ba0
|
Subproject commit a77c9297c262ab15f600897c00e30abf02166fda
|
@ -63,4 +63,7 @@ public interface ThresholdApi {
|
|||||||
@PostMapping("/instancePager/{goPage}/{pageSize}")
|
@PostMapping("/instancePager/{goPage}/{pageSize}")
|
||||||
IPage<ThresholdInstanceVO> instancePager(@PathVariable("goPage") int goPage, @PathVariable("pageSize") int pageSize, @RequestBody ThresholdInstanceRequest request);
|
IPage<ThresholdInstanceVO> instancePager(@PathVariable("goPage") int goPage, @PathVariable("pageSize") int pageSize, @RequestBody ThresholdInstanceRequest request);
|
||||||
|
|
||||||
|
@Operation(summary = "预览信息")
|
||||||
|
@PostMapping("/preview")
|
||||||
|
String preview(@RequestBody ThresholdPreviewRequest request);
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user