Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
7241e260
提交
7241e260
authored
4月 18, 2022
作者:
taojinlong
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' of github.com:dataease/dataease into dev
上级
2069701c
58cd1c14
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
11 行增加
和
8 行删除
+11
-8
CacheUtils.java
...d/src/main/java/io/dataease/listener/util/CacheUtils.java
+7
-4
gauge.js
frontend/src/views/chart/chart/gauge/gauge.js
+1
-1
gauge_antv.js
frontend/src/views/chart/chart/gauge/gauge_antv.js
+1
-1
Threshold.vue
frontend/src/views/chart/components/senior/Threshold.vue
+2
-2
没有找到文件。
backend/src/main/java/io/dataease/listener/util/CacheUtils.java
浏览文件 @
7241e260
...
@@ -26,8 +26,8 @@ public class CacheUtils {
...
@@ -26,8 +26,8 @@ public class CacheUtils {
public
static
Object
get
(
String
cacheName
,
Object
key
)
{
public
static
Object
get
(
String
cacheName
,
Object
key
)
{
if
(
getCacheManager
()
instanceof
RedisCacheManager
)
{
if
(
getCacheManager
()
instanceof
RedisCacheManager
)
{
org
.
springframework
.
cache
.
Cache
cache
=
getCacheManager
().
getCache
(
cacheName
);
org
.
springframework
.
cache
.
Cache
cache
=
getCacheManager
().
getCache
(
cacheName
);
if
(
null
==
cache
)
return
null
;
if
(
null
==
cache
||
null
==
cache
.
get
(
key
)
)
return
null
;
return
cache
.
get
(
key
);
return
cache
.
get
(
key
)
.
get
()
;
}
}
Element
element
=
cache
(
cacheName
).
get
(
key
);
Element
element
=
cache
(
cacheName
).
get
(
key
);
if
(
null
==
element
)
return
null
;
if
(
null
==
element
)
return
null
;
...
@@ -36,9 +36,12 @@ public class CacheUtils {
...
@@ -36,9 +36,12 @@ public class CacheUtils {
public
static
void
put
(
String
cacheName
,
Object
key
,
Object
value
,
Integer
ttl
,
Integer
tti
)
{
public
static
void
put
(
String
cacheName
,
Object
key
,
Object
value
,
Integer
ttl
,
Integer
tti
)
{
if
(
getCacheManager
()
instanceof
RedisCacheManager
)
{
if
(
getCacheManager
()
instanceof
RedisCacheManager
)
{
RedisTemplate
redisTemplate
=
(
RedisTemplate
)
CommonBeanFactory
.
getBean
(
"redisTemplate"
);
/*
RedisTemplate redisTemplate = (RedisTemplate) CommonBeanFactory.getBean("redisTemplate");
ValueOperations valueOperations = redisTemplate.opsForValue();
ValueOperations valueOperations = redisTemplate.opsForValue();
valueOperations
.
set
(
cacheName
+
"::"
+
key
,
value
);
valueOperations.set(cacheName + "::" + key , value );*/
org
.
springframework
.
cache
.
Cache
cache
=
getCacheManager
().
getCache
(
cacheName
);
if
(
null
==
cache
)
return
;
cache
.
put
(
key
,
value
);
return
;
return
;
}
}
Element
e
=
new
Element
(
key
,
value
);
Element
e
=
new
Element
(
key
,
value
);
...
...
frontend/src/views/chart/chart/gauge/gauge.js
浏览文件 @
7241e260
...
@@ -62,7 +62,7 @@ export function baseGaugeOption(chart_option, chart) {
...
@@ -62,7 +62,7 @@ export function baseGaugeOption(chart_option, chart) {
const
per
=
parseFloat
(
chart
.
data
.
series
[
0
].
data
[
0
])
/
parseFloat
(
chart_option
.
series
[
0
].
max
)
const
per
=
parseFloat
(
chart
.
data
.
series
[
0
].
data
[
0
])
/
parseFloat
(
chart_option
.
series
[
0
].
max
)
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
const
ele
=
arr
[
i
]
const
ele
=
arr
[
i
]
const
p
=
parse
In
t
(
ele
)
/
100
const
p
=
parse
Floa
t
(
ele
)
/
100
range
.
push
([
p
,
hexColorToRGBA
(
customAttr
.
color
.
colors
[
i
%
customAttr
.
color
.
colors
.
length
],
customAttr
.
color
.
alpha
)])
range
.
push
([
p
,
hexColorToRGBA
(
customAttr
.
color
.
colors
[
i
%
customAttr
.
color
.
colors
.
length
],
customAttr
.
color
.
alpha
)])
if
(
!
flag
&&
per
<=
p
)
{
if
(
!
flag
&&
per
<=
p
)
{
flag
=
true
flag
=
true
...
...
frontend/src/views/chart/chart/gauge/gauge_antv.js
浏览文件 @
7241e260
...
@@ -48,7 +48,7 @@ export function baseGaugeOptionAntV(plot, container, chart, action) {
...
@@ -48,7 +48,7 @@ export function baseGaugeOptionAntV(plot, container, chart, action) {
const
arr
=
threshold
.
gaugeThreshold
.
split
(
','
)
const
arr
=
threshold
.
gaugeThreshold
.
split
(
','
)
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
const
ele
=
arr
[
i
]
const
ele
=
arr
[
i
]
const
p
=
parse
In
t
(
ele
)
/
100
const
p
=
parse
Floa
t
(
ele
)
/
100
range
.
push
(
p
)
range
.
push
(
p
)
if
(
!
flag
&&
per
<=
p
)
{
if
(
!
flag
&&
per
<=
p
)
{
flag
=
true
flag
=
true
...
...
frontend/src/views/chart/components/senior/Threshold.vue
浏览文件 @
7241e260
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<span>
,100
</span>
<span>
,100
</span>
<el-tooltip
class=
"item"
effect=
"dark"
placement=
"bottom"
>
<el-tooltip
class=
"item"
effect=
"dark"
placement=
"bottom"
>
<div
slot=
"content"
>
<div
slot=
"content"
>
阈值设置,决定仪表盘区间颜色,为空则不开启阈值,范围(0-100),
仅限整数,且
逐级递增
阈值设置,决定仪表盘区间颜色,为空则不开启阈值,范围(0-100),逐级递增
<br>
<br>
例如:输入 30,70;表示:分为3段,分别为[0,30],(30,70],(70,100]
例如:输入 30,70;表示:分为3段,分别为[0,30],(30,70],(70,100]
</div>
</div>
...
@@ -129,7 +129,7 @@ export default {
...
@@ -129,7 +129,7 @@ export default {
const
arr
=
this
.
thresholdForm
.
gaugeThreshold
.
split
(
','
)
const
arr
=
this
.
thresholdForm
.
gaugeThreshold
.
split
(
','
)
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
const
ele
=
arr
[
i
]
const
ele
=
arr
[
i
]
if
(
ele
.
indexOf
(
'.'
)
>
-
1
||
parseInt
(
ele
).
toString
()
===
'NaN'
||
parseInt
(
ele
)
<
1
||
parseIn
t
(
ele
)
>
99
)
{
if
(
parseFloat
(
ele
).
toString
()
===
'NaN'
||
parseFloat
(
ele
)
<
1
||
parseFloa
t
(
ele
)
>
99
)
{
this
.
$message
({
this
.
$message
({
message
:
this
.
$t
(
'chart.gauge_threshold_format_error'
),
message
:
this
.
$t
(
'chart.gauge_threshold_format_error'
),
type
:
'error'
,
type
:
'error'
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论