mirror of
https://github.com/dataease/dataease.git
synced 2026-05-23 22:08:34 +08:00
Merge pull request #11530 from dataease/pr@dev-v2@perf_threshold
perf(X-Pack): 阈值告警
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package io.dataease.chart.dao.ext.mapper;
|
||||
|
||||
import io.dataease.api.chart.vo.ChartBaseVO;
|
||||
import io.dataease.api.chart.vo.ViewSelectorVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -14,4 +15,19 @@ public interface ExtChartViewMapper {
|
||||
select id, scene_id as pid, title, type from core_chart_view where type != 'VQuery' and scene_id = #{resourceId}
|
||||
""")
|
||||
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
|
||||
from core_chart_view ccv
|
||||
left join data_visualization_info dvi on dvi.id = ccv.scene_id
|
||||
where ccv.id = #{id}
|
||||
""")
|
||||
ChartBaseVO queryChart(@Param("id") Long id);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import io.dataease.api.chart.vo.ChartBaseVO;
|
||||
import io.dataease.api.chart.vo.ViewSelectorVO;
|
||||
import io.dataease.chart.dao.auto.entity.CoreChartView;
|
||||
import io.dataease.chart.dao.auto.mapper.CoreChartViewMapper;
|
||||
@@ -244,6 +245,10 @@ public class ChartViewManege {
|
||||
coreDatasetTableFieldMapper.delete(queryWrapper);
|
||||
}
|
||||
|
||||
public ChartBaseVO chartBaseInfo(Long id) {
|
||||
return extChartViewMapper.queryChart(id);
|
||||
}
|
||||
|
||||
public DatasetTableFieldDTO createCountField(Long id) {
|
||||
DatasetTableFieldDTO dto = new DatasetTableFieldDTO();
|
||||
dto.setId(-1L);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package io.dataease.chart.server;
|
||||
|
||||
import io.dataease.api.chart.ChartViewApi;
|
||||
import io.dataease.api.chart.vo.ChartBaseVO;
|
||||
import io.dataease.extensions.view.dto.ChartViewDTO;
|
||||
import io.dataease.extensions.view.dto.ChartViewFieldDTO;
|
||||
import io.dataease.api.chart.vo.ViewSelectorVO;
|
||||
@@ -72,4 +73,9 @@ public class ChartViewServer implements ChartViewApi {
|
||||
public void deleteFieldByChart(Long chartId) {
|
||||
chartViewManege.deleteFieldByChartId(chartId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChartBaseVO chartBaseInfo(Long id) {
|
||||
return chartViewManege.chartBaseInfo(id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import _403 from '@/assets/svg/403.svg'
|
||||
import APIDs from '@/assets/svg/API-ds.svg'
|
||||
import Apache_Hive from '@/assets/svg/Apache Hive.svg'
|
||||
import Checkbox from '@/assets/svg/Checkbox.svg'
|
||||
import clock from '@/assets/svg/clock.svg'
|
||||
import DM from '@/assets/svg/DM.svg'
|
||||
import DataEase from '@/assets/svg/DataEase.svg'
|
||||
import Elasticsearch from '@/assets/svg/Elasticsearch.svg'
|
||||
@@ -1340,7 +1341,8 @@ const iconMap = {
|
||||
'word-cloud': wordCloud,
|
||||
calculate,
|
||||
'icon_file-doc_colorful': icon_file_doc_colorful,
|
||||
icon_font
|
||||
icon_font,
|
||||
clock
|
||||
}
|
||||
|
||||
const props = defineProps({
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
</el-dropdown-item>
|
||||
</template>
|
||||
<xpack-component
|
||||
:chart-id="element.id"
|
||||
:chart="element"
|
||||
jsname="L2NvbXBvbmVudC90aHJlc2hvbGQtd2FybmluZy9FZGl0QmFySGFuZGxlcg=="
|
||||
/>
|
||||
<el-dropdown-item divided @click="deleteComponent" v-if="barShowCheck('delete')"
|
||||
|
||||
Reference in New Issue
Block a user