Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
25e5fb40
提交
25e5fb40
authored
5月 27, 2022
作者:
taojinlong
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' of github.com:dataease/dataease into dev
上级
33f43369
44c32293
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
94 行增加
和
92 行删除
+94
-92
XssAndSqlHttpServletRequestWrapper.java
...e/commons/wrapper/XssAndSqlHttpServletRequestWrapper.java
+1
-3
CommonConfig.java
backend/src/main/java/io/dataease/config/CommonConfig.java
+0
-2
ApiDefinition.java
...dataease/controller/request/datasource/ApiDefinition.java
+2
-2
ApiDefinitionRequest.java
...e/controller/request/datasource/ApiDefinitionRequest.java
+3
-3
DatasourceDTO.java
backend/src/main/java/io/dataease/dto/DatasourceDTO.java
+2
-2
ApiProvider.java
...ain/java/io/dataease/provider/datasource/ApiProvider.java
+0
-0
EsProvider.java
...main/java/io/dataease/provider/datasource/EsProvider.java
+5
-4
DataSetTableService.java
...java/io/dataease/service/dataset/DataSetTableService.java
+4
-4
ExtractDataService.java
.../java/io/dataease/service/dataset/ExtractDataService.java
+2
-5
PermissionService.java
...n/java/io/dataease/service/dataset/PermissionService.java
+4
-3
DatasourceService.java
...ava/io/dataease/service/datasource/DatasourceService.java
+0
-0
EngineService.java
...c/main/java/io/dataease/service/engine/EngineService.java
+37
-31
PanelGroupExtendDataService.java
...o/dataease/service/panel/PanelGroupExtendDataService.java
+3
-3
PanelGroupService.java
...ain/java/io/dataease/service/panel/PanelGroupService.java
+4
-4
PanelViewService.java
...main/java/io/dataease/service/panel/PanelViewService.java
+23
-23
StaticResourceService.java
...ataease/service/staticResource/StaticResourceService.java
+3
-2
shareProxy.js
frontend/src/api/panel/shareProxy.js
+1
-1
没有找到文件。
backend/src/main/java/io/dataease/commons/wrapper/XssAndSqlHttpServletRequestWrapper.java
浏览文件 @
25e5fb40
...
@@ -13,7 +13,6 @@ import javax.servlet.ServletInputStream;
...
@@ -13,7 +13,6 @@ import javax.servlet.ServletInputStream;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequestWrapper
;
import
javax.servlet.http.HttpServletRequestWrapper
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
io.dataease.commons.holder.ThreadLocalContextHolder
;
import
io.dataease.commons.holder.ThreadLocalContextHolder
;
import
io.dataease.commons.utils.CommonBeanFactory
;
import
io.dataease.commons.utils.CommonBeanFactory
;
...
@@ -346,9 +345,8 @@ public class XssAndSqlHttpServletRequestWrapper extends HttpServletRequestWrappe
...
@@ -346,9 +345,8 @@ public class XssAndSqlHttpServletRequestWrapper extends HttpServletRequestWrappe
private
static
String
orders
(
String
json
)
{
private
static
String
orders
(
String
json
)
{
if
(
StringUtils
.
isEmpty
(
json
))
return
null
;
if
(
StringUtils
.
isEmpty
(
json
))
return
null
;
try
{
try
{
Map
<
String
,
Object
>
map
=
JSONObject
.
parseObject
(
json
,
Map
.
class
);
Map
<
String
,
Object
>
map
=
new
Gson
().
fromJson
(
json
,
Map
.
class
);
Object
orders
=
map
.
get
(
"orders"
);
Object
orders
=
map
.
get
(
"orders"
);
if
(
orders
!=
null
)
{
if
(
orders
!=
null
)
{
...
...
backend/src/main/java/io/dataease/config/CommonConfig.java
浏览文件 @
25e5fb40
package
io
.
dataease
.
config
;
package
io
.
dataease
.
config
;
import
com.alibaba.fastjson.JSONObject
;
import
com.fit2cloud.autoconfigure.QuartzAutoConfiguration
;
import
com.fit2cloud.autoconfigure.QuartzAutoConfiguration
;
import
io.dataease.plugins.common.base.domain.Datasource
;
import
io.dataease.commons.utils.CommonThreadPool
;
import
io.dataease.commons.utils.CommonThreadPool
;
import
org.pentaho.di.core.KettleEnvironment
;
import
org.pentaho.di.core.KettleEnvironment
;
import
org.pentaho.di.repository.filerep.KettleFileRepository
;
import
org.pentaho.di.repository.filerep.KettleFileRepository
;
...
...
backend/src/main/java/io/dataease/controller/request/datasource/ApiDefinition.java
浏览文件 @
25e5fb40
package
io
.
dataease
.
controller
.
request
.
datasource
;
package
io
.
dataease
.
controller
.
request
.
datasource
;
import
com.
alibaba.fastjson.JSON
Object
;
import
com.
google.gson.Json
Object
;
import
io.dataease.plugins.common.base.domain.DatasetTableField
;
import
io.dataease.plugins.common.base.domain.DatasetTableField
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -17,5 +17,5 @@ public class ApiDefinition {
...
@@ -17,5 +17,5 @@ public class ApiDefinition {
private
String
request
;
private
String
request
;
private
String
dataPath
;
private
String
dataPath
;
private
String
status
;
private
String
status
;
private
List
<
J
SON
Object
>
datas
=
new
ArrayList
<>();
private
List
<
J
son
Object
>
datas
=
new
ArrayList
<>();
}
}
backend/src/main/java/io/dataease/controller/request/datasource/ApiDefinitionRequest.java
浏览文件 @
25e5fb40
package
io
.
dataease
.
controller
.
request
.
datasource
;
package
io
.
dataease
.
controller
.
request
.
datasource
;
import
com.
alibaba.fastjson.JSON
Object
;
import
com.
google.gson.Json
Object
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
@Data
@Data
public
class
ApiDefinitionRequest
{
public
class
ApiDefinitionRequest
{
private
List
<
J
SON
Object
>
headers
=
new
ArrayList
<>();
private
List
<
J
son
Object
>
headers
=
new
ArrayList
<>();
private
J
SONObject
body
=
new
JSON
Object
();
private
J
sonObject
body
=
new
Json
Object
();
private
AuthManager
authManager
=
new
AuthManager
();
private
AuthManager
authManager
=
new
AuthManager
();
...
...
backend/src/main/java/io/dataease/dto/DatasourceDTO.java
浏览文件 @
25e5fb40
package
io
.
dataease
.
dto
;
package
io
.
dataease
.
dto
;
import
com.
alibaba.fastjson.JSON
Array
;
import
com.
google.gson.Json
Array
;
import
io.dataease.plugins.common.base.domain.Datasource
;
import
io.dataease.plugins.common.base.domain.Datasource
;
import
io.dataease.plugins.common.constants.DatasourceCalculationMode
;
import
io.dataease.plugins.common.constants.DatasourceCalculationMode
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -16,7 +16,7 @@ public class DatasourceDTO extends Datasource {
...
@@ -16,7 +16,7 @@ public class DatasourceDTO extends Datasource {
@ApiModelProperty
(
"权限"
)
@ApiModelProperty
(
"权限"
)
private
String
privileges
;
private
String
privileges
;
private
J
SON
Array
apiConfiguration
;
private
J
son
Array
apiConfiguration
;
private
String
typeDesc
;
private
String
typeDesc
;
private
DatasourceCalculationMode
calculationMode
;
private
DatasourceCalculationMode
calculationMode
;
}
}
backend/src/main/java/io/dataease/provider/datasource/ApiProvider.java
浏览文件 @
25e5fb40
差异被折叠。
点击展开。
backend/src/main/java/io/dataease/provider/datasource/EsProvider.java
浏览文件 @
25e5fb40
package
io
.
dataease
.
provider
.
datasource
;
package
io
.
dataease
.
provider
.
datasource
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
com.google.gson.JsonParser
;
import
io.dataease.commons.utils.HttpClientConfig
;
import
io.dataease.commons.utils.HttpClientConfig
;
import
io.dataease.commons.utils.HttpClientUtil
;
import
io.dataease.commons.utils.HttpClientUtil
;
import
io.dataease.controller.request.datasource.es.EsReponse
;
import
io.dataease.controller.request.datasource.es.EsReponse
;
...
@@ -254,13 +254,14 @@ public class EsProvider extends Provider {
...
@@ -254,13 +254,14 @@ public class EsProvider extends Provider {
@Override
@Override
public
String
checkStatus
(
DatasourceRequest
datasourceRequest
)
throws
Exception
{
public
String
checkStatus
(
DatasourceRequest
datasourceRequest
)
throws
Exception
{
Gson
gson
=
new
Gson
();
EsConfiguration
esConfiguration
=
new
Gson
().
fromJson
(
datasourceRequest
.
getDatasource
().
getConfiguration
(),
EsConfiguration
.
class
);
EsConfiguration
esConfiguration
=
new
Gson
().
fromJson
(
datasourceRequest
.
getDatasource
().
getConfiguration
(),
EsConfiguration
.
class
);
String
response
=
exexGetQuery
(
datasourceRequest
);
String
response
=
exexGetQuery
(
datasourceRequest
);
if
(
J
SONObject
.
parseObject
(
response
).
getJSON
Object
(
"error"
)
!=
null
)
{
if
(
J
sonParser
.
parseString
(
response
).
getAsJsonObject
().
getAsJson
Object
(
"error"
)
!=
null
)
{
throw
new
Exception
(
J
SONObject
.
parseObject
(
response
).
getJSONObject
(
"error"
).
getString
(
"reason"
));
throw
new
Exception
(
J
sonParser
.
parseString
(
response
).
getAsJsonObject
().
getAsJsonObject
(
"error"
).
get
(
"reason"
).
getAsString
(
));
}
}
String
version
=
J
SONObject
.
parseObject
(
response
).
getJSONObject
(
"version"
).
getString
(
"number"
);
String
version
=
J
sonParser
.
parseString
(
response
).
getAsJsonObject
().
getAsJsonObject
(
"version"
).
get
(
"number"
).
getAsString
(
);
String
[]
versionList
=
version
.
split
(
"\\."
);
String
[]
versionList
=
version
.
split
(
"\\."
);
if
(
Integer
.
valueOf
(
versionList
[
0
])
<
7
&&
Integer
.
valueOf
(
versionList
[
1
])
<
3
)
{
if
(
Integer
.
valueOf
(
versionList
[
0
])
<
7
&&
Integer
.
valueOf
(
versionList
[
1
])
<
3
)
{
throw
new
Exception
(
Translator
.
get
(
"i18n_es_limit"
));
throw
new
Exception
(
Translator
.
get
(
"i18n_es_limit"
));
...
...
backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java
浏览文件 @
25e5fb40
package
io
.
dataease
.
service
.
dataset
;
package
io
.
dataease
.
service
.
dataset
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
com.google.gson.JsonObject
;
import
com.google.gson.JsonParser
;
import
io.dataease.auth.annotation.DeCleaner
;
import
io.dataease.auth.annotation.DeCleaner
;
import
io.dataease.auth.api.dto.CurrentUserDto
;
import
io.dataease.auth.api.dto.CurrentUserDto
;
import
io.dataease.dto.SysLogDTO
;
import
io.dataease.dto.SysLogDTO
;
...
@@ -1341,8 +1341,8 @@ public class DataSetTableService {
...
@@ -1341,8 +1341,8 @@ public class DataSetTableService {
String
keyword
=
datasourceTypes
.
getKeywordPrefix
()
+
"%s"
+
datasourceTypes
.
getKeywordSuffix
();
String
keyword
=
datasourceTypes
.
getKeywordPrefix
()
+
"%s"
+
datasourceTypes
.
getKeywordSuffix
();
String
configuration
=
ds
.
getConfiguration
();
String
configuration
=
ds
.
getConfiguration
();
J
SONObject
jsonObject
=
JSON
.
parseObject
(
configuration
);
J
sonObject
jsonObject
=
JsonParser
.
parseString
(
configuration
).
getAsJsonObject
(
);
String
schema
=
jsonObject
.
get
String
(
"schema"
);
String
schema
=
jsonObject
.
get
(
"schema"
).
getAsString
(
);
String
joinPrefix
=
""
;
String
joinPrefix
=
""
;
if
(
StringUtils
.
isNotEmpty
(
schema
)
&&
(
StringUtils
.
equalsIgnoreCase
(
ds
.
getType
(),
DatasourceTypes
.
db2
.
getType
())
||
if
(
StringUtils
.
isNotEmpty
(
schema
)
&&
(
StringUtils
.
equalsIgnoreCase
(
ds
.
getType
(),
DatasourceTypes
.
db2
.
getType
())
||
StringUtils
.
equalsIgnoreCase
(
ds
.
getType
(),
DatasourceTypes
.
sqlServer
.
getType
())
||
StringUtils
.
equalsIgnoreCase
(
ds
.
getType
(),
DatasourceTypes
.
sqlServer
.
getType
())
||
...
...
backend/src/main/java/io/dataease/service/dataset/ExtractDataService.java
浏览文件 @
25e5fb40
package
io
.
dataease
.
service
.
dataset
;
package
io
.
dataease
.
service
.
dataset
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
com.google.gson.reflect.TypeToken
;
import
io.dataease.ext.ExtChartViewMapper
;
import
io.dataease.ext.ExtChartViewMapper
;
import
io.dataease.commons.constants.*
;
import
io.dataease.commons.constants.*
;
import
io.dataease.commons.model.AuthURD
;
import
io.dataease.commons.model.AuthURD
;
import
io.dataease.commons.utils.*
;
import
io.dataease.commons.utils.*
;
import
io.dataease.controller.request.datasource.ApiDefinition
;
import
io.dataease.controller.request.datasource.ApiDefinition
;
import
io.dataease.plugins.common.base.domain.*
;
import
io.dataease.plugins.common.base.domain.*
;
import
io.dataease.plugins.common.base.mapper.DatasetTableMapper
;
import
io.dataease.plugins.common.base.mapper.DatasetTableTaskMapper
;
import
io.dataease.plugins.common.base.mapper.DatasourceMapper
;
import
io.dataease.plugins.common.constants.DatasourceTypes
;
import
io.dataease.plugins.common.constants.DatasourceTypes
;
import
io.dataease.plugins.common.constants.DeTypeConstants
;
import
io.dataease.plugins.common.constants.DeTypeConstants
;
import
io.dataease.plugins.common.dto.datasource.TableField
;
import
io.dataease.plugins.common.dto.datasource.TableField
;
...
@@ -435,7 +432,7 @@ public class ExtractDataService {
...
@@ -435,7 +432,7 @@ public class ExtractDataService {
}
}
private
void
extractApiData
(
DatasetTable
datasetTable
,
Datasource
datasource
,
List
<
DatasetTableField
>
datasetTableFields
,
String
extractType
)
throws
Exception
{
private
void
extractApiData
(
DatasetTable
datasetTable
,
Datasource
datasource
,
List
<
DatasetTableField
>
datasetTableFields
,
String
extractType
)
throws
Exception
{
List
<
ApiDefinition
>
lists
=
JSONObject
.
parseArray
(
datasource
.
getConfiguration
(),
ApiDefinition
.
class
);
List
<
ApiDefinition
>
lists
=
new
Gson
().
fromJson
(
datasource
.
getConfiguration
(),
new
TypeToken
<
ArrayList
<
ApiDefinition
>>(){}.
getType
()
);
lists
=
lists
.
stream
().
filter
(
item
->
item
.
getName
().
equalsIgnoreCase
(
new
Gson
().
fromJson
(
datasetTable
.
getInfo
(),
DataTableInfoDTO
.
class
).
getTable
())).
collect
(
Collectors
.
toList
());
lists
=
lists
.
stream
().
filter
(
item
->
item
.
getName
().
equalsIgnoreCase
(
new
Gson
().
fromJson
(
datasetTable
.
getInfo
(),
DataTableInfoDTO
.
class
).
getTable
())).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
lists
))
{
if
(
CollectionUtils
.
isEmpty
(
lists
))
{
throw
new
Exception
(
"未找到API数据表"
);
throw
new
Exception
(
"未找到API数据表"
);
...
...
backend/src/main/java/io/dataease/service/dataset/PermissionService.java
浏览文件 @
25e5fb40
package
io
.
dataease
.
service
.
dataset
;
package
io
.
dataease
.
service
.
dataset
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.gson.Gson
;
import
com.google.gson.reflect.TypeToken
;
import
io.dataease.auth.api.dto.CurrentRoleDto
;
import
io.dataease.auth.api.dto.CurrentRoleDto
;
import
io.dataease.auth.entity.SysUserEntity
;
import
io.dataease.auth.entity.SysUserEntity
;
import
io.dataease.auth.service.AuthUserService
;
import
io.dataease.auth.service.AuthUserService
;
...
@@ -46,7 +47,7 @@ public class PermissionService {
...
@@ -46,7 +47,7 @@ public class PermissionService {
if
(
StringUtils
.
isEmpty
(
datasetRowPermissions
.
getFilter
()))
{
if
(
StringUtils
.
isEmpty
(
datasetRowPermissions
.
getFilter
()))
{
continue
;
continue
;
}
}
List
<
ChartCustomFilterItemDTO
>
lists
=
JSONObject
.
parseArray
(
datasetRowPermissions
.
getFilter
(),
ChartCustomFilterItemDTO
.
class
);
List
<
ChartCustomFilterItemDTO
>
lists
=
new
Gson
().
fromJson
(
datasetRowPermissions
.
getFilter
(),
new
TypeToken
<
ArrayList
<
ChartCustomFilterItemDTO
>>(){}.
getType
()
);
lists
.
forEach
(
chartCustomFilterDTO
->
{
lists
.
forEach
(
chartCustomFilterDTO
->
{
chartCustomFilterDTO
.
setFieldId
(
field
.
getId
());
chartCustomFilterDTO
.
setFieldId
(
field
.
getId
());
if
(
datasetRowPermissions
.
getAuthTargetType
().
equalsIgnoreCase
(
"sysParams"
)){
if
(
datasetRowPermissions
.
getAuthTargetType
().
equalsIgnoreCase
(
"sysParams"
)){
...
@@ -77,7 +78,7 @@ public class PermissionService {
...
@@ -77,7 +78,7 @@ public class PermissionService {
List
<
DatasetTableField
>
result
=
new
ArrayList
<>();
List
<
DatasetTableField
>
result
=
new
ArrayList
<>();
List
<
ColumnPermissionItem
>
allColumnPermissionItems
=
new
ArrayList
<>();
List
<
ColumnPermissionItem
>
allColumnPermissionItems
=
new
ArrayList
<>();
for
(
DataSetColumnPermissionsDTO
dataSetColumnPermissionsDTO
:
columnPermissions
(
datasetTableId
,
user
))
{
for
(
DataSetColumnPermissionsDTO
dataSetColumnPermissionsDTO
:
columnPermissions
(
datasetTableId
,
user
))
{
ColumnPermissions
columnPermissions
=
JSONObject
.
parseObject
(
dataSetColumnPermissionsDTO
.
getPermissions
(),
ColumnPermissions
.
class
);
ColumnPermissions
columnPermissions
=
new
Gson
().
fromJson
(
dataSetColumnPermissionsDTO
.
getPermissions
(),
ColumnPermissions
.
class
);
if
(!
columnPermissions
.
getEnable
()){
continue
;}
if
(!
columnPermissions
.
getEnable
()){
continue
;}
allColumnPermissionItems
.
addAll
(
columnPermissions
.
getColumns
().
stream
().
filter
(
columnPermissionItem
->
columnPermissionItem
.
getSelected
()).
collect
(
Collectors
.
toList
()));
allColumnPermissionItems
.
addAll
(
columnPermissions
.
getColumns
().
stream
().
filter
(
columnPermissionItem
->
columnPermissionItem
.
getSelected
()).
collect
(
Collectors
.
toList
()));
}
}
...
...
backend/src/main/java/io/dataease/service/datasource/DatasourceService.java
浏览文件 @
25e5fb40
差异被折叠。
点击展开。
backend/src/main/java/io/dataease/service/engine/EngineService.java
浏览文件 @
25e5fb40
package
io
.
dataease
.
service
.
engine
;
package
io
.
dataease
.
service
.
engine
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
com.google.gson.JsonArray
;
import
com.google.gson.JsonObject
;
import
com.google.gson.JsonParser
;
import
io.dataease.commons.utils.BeanUtils
;
import
io.dataease.commons.utils.BeanUtils
;
import
io.dataease.commons.utils.HttpClientConfig
;
import
io.dataease.commons.utils.HttpClientConfig
;
import
io.dataease.commons.utils.HttpClientUtil
;
import
io.dataease.commons.utils.HttpClientUtil
;
...
@@ -34,15 +35,15 @@ import java.util.regex.Pattern;
...
@@ -34,15 +35,15 @@ import java.util.regex.Pattern;
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
class
EngineService
{
public
class
EngineService
{
@Resource
@Resource
private
Environment
env
;
private
Environment
env
;
@Resource
@Resource
private
DeEngineMapper
deEngineMapper
;
private
DeEngineMapper
deEngineMapper
;
@Resource
@Resource
private
DatasourceService
datasource
;
private
DatasourceService
datasource
;
static
private
List
<
String
>
simple_engine
=
Arrays
.
asList
(
"engine_mysql"
);
static
private
List
<
String
>
simple_engine
=
Arrays
.
asList
(
"engine_mysql"
);
static
private
List
<
String
>
cluster_engine
=
Arrays
.
asList
(
"engine_doris"
);
static
private
List
<
String
>
cluster_engine
=
Arrays
.
asList
(
"engine_doris"
);
public
Boolean
isLocalMode
()
{
public
Boolean
isLocalMode
()
{
return
env
.
getProperty
(
"engine_mode"
,
"local"
).
equalsIgnoreCase
(
"local"
);
return
env
.
getProperty
(
"engine_mode"
,
"local"
).
equalsIgnoreCase
(
"local"
);
...
@@ -96,24 +97,28 @@ public class EngineService {
...
@@ -96,24 +97,28 @@ public class EngineService {
String
response
;
String
response
;
try
{
try
{
response
=
HttpClientUtil
.
get
(
"http://"
+
dorisConfiguration
.
getHost
()
+
":"
+
dorisConfiguration
.
getHttpPort
()
+
"/api/backends"
,
httpClientConfig
);
response
=
HttpClientUtil
.
get
(
"http://"
+
dorisConfiguration
.
getHost
()
+
":"
+
dorisConfiguration
.
getHttpPort
()
+
"/api/backends"
,
httpClientConfig
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
return
ResultHolder
.
error
(
"Engine is invalid: "
+
e
.
getMessage
());
return
ResultHolder
.
error
(
"Engine is invalid: "
+
e
.
getMessage
());
}
}
JSONArray
backends
=
Optional
.
ofNullable
(
JSONObject
.
parseObject
(
response
).
getJSONObject
(
"data"
)).
orElse
(
new
JSONObject
()).
getJSONArray
(
"backends"
);
JsonArray
backends
=
null
;
if
(
CollectionUtils
.
isEmpty
(
backends
)){
JsonObject
data
=
JsonParser
.
parseString
(
response
).
getAsJsonObject
().
getAsJsonObject
(
"data"
);
if
(
data
!=
null
)
{
backends
=
data
.
getAsJsonArray
(
"backends"
);
}
if
(
backends
==
null
||
backends
.
size
()
==
0
)
{
return
ResultHolder
.
error
(
"Engine is invalid: no backends found."
);
return
ResultHolder
.
error
(
"Engine is invalid: no backends found."
);
}
}
Integer
alives
=
0
;
Integer
alives
=
0
;
for
(
int
i
=
0
;
i
<
backends
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
backends
.
size
();
i
++)
{
J
SONObject
kv
=
backends
.
getJSONObject
(
i
);
J
sonObject
kv
=
backends
.
get
(
i
).
getAsJsonObject
(
);
if
(
kv
.
get
Boolean
(
"is_alive"
))
{
if
(
kv
.
get
(
"is_alive"
).
getAsBoolean
(
))
{
alives
++;
alives
++;
}
}
}
}
if
(
alives
<
dorisConfiguration
.
getReplicationNum
())
{
if
(
alives
<
dorisConfiguration
.
getReplicationNum
())
{
return
ResultHolder
.
error
(
"Engine params is invalid: 副本数量不能大于节点数量."
);
return
ResultHolder
.
error
(
"Engine params is invalid: 副本数量不能大于节点数量."
);
}
}
}
}
...
@@ -135,17 +140,17 @@ public class EngineService {
...
@@ -135,17 +140,17 @@ public class EngineService {
return
ResultHolder
.
success
(
engine
);
return
ResultHolder
.
success
(
engine
);
}
}
private
void
checkValid
(
DeEngine
engine
)
throws
Exception
{
private
void
checkValid
(
DeEngine
engine
)
throws
Exception
{
if
(
isLocalMode
())
{
if
(
isLocalMode
())
{
throw
new
Exception
(
"Setting engine is not supported."
);
throw
new
Exception
(
"Setting engine is not supported."
);
}
}
if
(
isSimpleMode
())
{
if
(
isSimpleMode
())
{
if
(!
simple_engine
.
contains
(
engine
.
getType
()))
{
if
(!
simple_engine
.
contains
(
engine
.
getType
()))
{
throw
new
Exception
(
"Engine type not supported."
);
throw
new
Exception
(
"Engine type not supported."
);
}
}
}
}
if
(
isClusterMode
())
{
if
(
isClusterMode
())
{
if
(!
cluster_engine
.
contains
(
engine
.
getType
()))
{
if
(!
cluster_engine
.
contains
(
engine
.
getType
()))
{
throw
new
Exception
(
"Engine type not supported."
);
throw
new
Exception
(
"Engine type not supported."
);
}
}
}
}
...
@@ -160,21 +165,21 @@ public class EngineService {
...
@@ -160,21 +165,21 @@ public class EngineService {
Datasource
datasource
=
new
Datasource
();
Datasource
datasource
=
new
Datasource
();
if
(
isLocalMode
())
{
if
(
isLocalMode
())
{
JSONObject
jsonObject
=
new
JSONObject
();
Map
jsonObjectMap
=
new
HashMap
();
jsonObject
.
put
(
"dataSourceType"
,
"jdbc"
);
jsonObject
Map
.
put
(
"dataSourceType"
,
"jdbc"
);
jsonObject
.
put
(
"dataBase"
,
env
.
getProperty
(
"doris.db"
,
"doris"
));
jsonObject
Map
.
put
(
"dataBase"
,
env
.
getProperty
(
"doris.db"
,
"doris"
));
jsonObject
.
put
(
"username"
,
env
.
getProperty
(
"doris.user"
,
"root"
));
jsonObject
Map
.
put
(
"username"
,
env
.
getProperty
(
"doris.user"
,
"root"
));
jsonObject
.
put
(
"password"
,
env
.
getProperty
(
"doris.password"
,
"dataease"
));
jsonObject
Map
.
put
(
"password"
,
env
.
getProperty
(
"doris.password"
,
"dataease"
));
jsonObject
.
put
(
"host"
,
env
.
getProperty
(
"doris.host"
,
"doris"
));
jsonObject
Map
.
put
(
"host"
,
env
.
getProperty
(
"doris.host"
,
"doris"
));
jsonObject
.
put
(
"port"
,
env
.
getProperty
(
"doris.port"
,
"9030"
));
jsonObject
Map
.
put
(
"port"
,
env
.
getProperty
(
"doris.port"
,
"9030"
));
jsonObject
.
put
(
"httpPort"
,
env
.
getProperty
(
"doris.httpPort"
,
"8030"
));
jsonObject
Map
.
put
(
"httpPort"
,
env
.
getProperty
(
"doris.httpPort"
,
"8030"
));
DeEngine
engine
=
new
DeEngine
();
DeEngine
engine
=
new
DeEngine
();
engine
.
setId
(
"doris"
);
engine
.
setId
(
"doris"
);
engine
.
setName
(
"doris"
);
engine
.
setName
(
"doris"
);
engine
.
setDesc
(
"doris"
);
engine
.
setDesc
(
"doris"
);
engine
.
setType
(
"engine_doris"
);
engine
.
setType
(
"engine_doris"
);
engine
.
setConfiguration
(
jsonObject
.
toJSONString
(
));
engine
.
setConfiguration
(
new
Gson
().
toJson
(
jsonObjectMap
));
BeanUtils
.
copyBean
(
datasource
,
engine
);
BeanUtils
.
copyBean
(
datasource
,
engine
);
}
}
if
(
isClusterMode
())
{
if
(
isClusterMode
())
{
...
@@ -198,7 +203,7 @@ public class EngineService {
...
@@ -198,7 +203,7 @@ public class EngineService {
return
datasource
;
return
datasource
;
}
}
public
void
initSimpleEngine
(){
public
void
initSimpleEngine
()
{
if
(!
isSimpleMode
())
{
if
(!
isSimpleMode
())
{
return
;
return
;
}
}
...
@@ -214,9 +219,10 @@ public class EngineService {
...
@@ -214,9 +219,10 @@ public class EngineService {
MysqlConfiguration
mysqlConfiguration
=
new
MysqlConfiguration
();
MysqlConfiguration
mysqlConfiguration
=
new
MysqlConfiguration
();
Pattern
WITH_SQL_FRAGMENT
=
Pattern
.
compile
(
"jdbc:mysql://(.*):(\\d+)/(.*)"
);
Pattern
WITH_SQL_FRAGMENT
=
Pattern
.
compile
(
"jdbc:mysql://(.*):(\\d+)/(.*)"
);
Matcher
matcher
=
WITH_SQL_FRAGMENT
.
matcher
(
env
.
getProperty
(
"spring.datasource.url"
));
Matcher
matcher
=
WITH_SQL_FRAGMENT
.
matcher
(
env
.
getProperty
(
"spring.datasource.url"
));
if
(!
matcher
.
find
()){
if
(!
matcher
.
find
())
{
return
;
return
;
};
}
;
mysqlConfiguration
.
setHost
(
matcher
.
group
(
1
));
mysqlConfiguration
.
setHost
(
matcher
.
group
(
1
));
mysqlConfiguration
.
setPort
(
Integer
.
valueOf
(
matcher
.
group
(
2
)));
mysqlConfiguration
.
setPort
(
Integer
.
valueOf
(
matcher
.
group
(
2
)));
mysqlConfiguration
.
setDataBase
(
matcher
.
group
(
3
).
split
(
"\\?"
)[
0
]);
mysqlConfiguration
.
setDataBase
(
matcher
.
group
(
3
).
split
(
"\\?"
)[
0
]);
...
...
backend/src/main/java/io/dataease/service/panel/PanelGroupExtendDataService.java
浏览文件 @
25e5fb40
package
io
.
dataease
.
service
.
panel
;
package
io
.
dataease
.
service
.
panel
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.gson.Gson
;
import
io.dataease.dto.chart.ChartViewDTO
;
import
io.dataease.dto.chart.ChartViewDTO
;
import
io.dataease.exception.DataEaseException
;
import
io.dataease.exception.DataEaseException
;
import
io.dataease.plugins.common.base.domain.PanelGroupExtendData
;
import
io.dataease.plugins.common.base.domain.PanelGroupExtendData
;
...
@@ -25,11 +24,12 @@ public class PanelGroupExtendDataService {
...
@@ -25,11 +24,12 @@ public class PanelGroupExtendDataService {
private
PanelGroupExtendDataMapper
panelGroupExtendDataMapper
;
private
PanelGroupExtendDataMapper
panelGroupExtendDataMapper
;
public
ChartViewDTO
getChartDataInfo
(
String
viewId
,
ChartViewDTO
view
){
public
ChartViewDTO
getChartDataInfo
(
String
viewId
,
ChartViewDTO
view
){
Gson
gson
=
new
Gson
();
PanelGroupExtendDataExample
extendDataExample
=
new
PanelGroupExtendDataExample
();
PanelGroupExtendDataExample
extendDataExample
=
new
PanelGroupExtendDataExample
();
extendDataExample
.
createCriteria
().
andViewIdEqualTo
(
viewId
);
extendDataExample
.
createCriteria
().
andViewIdEqualTo
(
viewId
);
List
<
PanelGroupExtendData
>
extendDataList
=
panelGroupExtendDataMapper
.
selectByExampleWithBLOBs
(
extendDataExample
);
List
<
PanelGroupExtendData
>
extendDataList
=
panelGroupExtendDataMapper
.
selectByExampleWithBLOBs
(
extendDataExample
);
if
(
CollectionUtils
.
isNotEmpty
(
extendDataList
)){
if
(
CollectionUtils
.
isNotEmpty
(
extendDataList
)){
ChartViewDTO
chartViewTemplate
=
JSONObject
.
parseObject
(
extendDataList
.
get
(
0
).
getViewDetails
(),
ChartViewDTO
.
class
);
ChartViewDTO
chartViewTemplate
=
gson
.
fromJson
(
extendDataList
.
get
(
0
).
getViewDetails
(),
ChartViewDTO
.
class
);
view
.
setData
(
chartViewTemplate
.
getData
());
view
.
setData
(
chartViewTemplate
.
getData
());
}
else
{
}
else
{
DataEaseException
.
throwException
(
"模板缓存数据中未获取指定视图数据:"
+
viewId
);
DataEaseException
.
throwException
(
"模板缓存数据中未获取指定视图数据:"
+
viewId
);
...
...
backend/src/main/java/io/dataease/service/panel/PanelGroupService.java
浏览文件 @
25e5fb40
package
io
.
dataease
.
service
.
panel
;
package
io
.
dataease
.
service
.
panel
;
import
com.
alibaba.fastjson.JSON
;
import
com.
google.gson.Gson
;
import
io.dataease.auth.annotation.DeCleaner
;
import
io.dataease.auth.annotation.DeCleaner
;
import
io.dataease.commons.constants.*
;
import
io.dataease.commons.constants.*
;
import
io.dataease.commons.utils.AuthUtils
;
import
io.dataease.commons.utils.AuthUtils
;
...
@@ -384,6 +384,7 @@ public class PanelGroupService {
...
@@ -384,6 +384,7 @@ public class PanelGroupService {
}
}
public
String
newPanel
(
PanelGroupRequest
request
)
{
public
String
newPanel
(
PanelGroupRequest
request
)
{
Gson
gson
=
new
Gson
();
String
newPanelId
=
UUIDUtil
.
getUUIDAsString
();
String
newPanelId
=
UUIDUtil
.
getUUIDAsString
();
String
newFrom
=
request
.
getNewFrom
();
String
newFrom
=
request
.
getNewFrom
();
String
templateStyle
=
null
;
String
templateStyle
=
null
;
...
@@ -405,13 +406,13 @@ public class PanelGroupService {
...
@@ -405,13 +406,13 @@ public class PanelGroupService {
dynamicData
=
request
.
getDynamicData
();
dynamicData
=
request
.
getDynamicData
();
staticResource
=
request
.
getStaticResource
();
staticResource
=
request
.
getStaticResource
();
}
}
Map
<
String
,
String
>
dynamicDataMap
=
JSON
.
parseObject
(
dynamicData
,
Map
.
class
);
Map
<
String
,
String
>
dynamicDataMap
=
gson
.
fromJson
(
dynamicData
,
Map
.
class
);
List
<
PanelViewInsertDTO
>
panelViews
=
new
ArrayList
<>();
List
<
PanelViewInsertDTO
>
panelViews
=
new
ArrayList
<>();
List
<
PanelGroupExtendDataDTO
>
viewsData
=
new
ArrayList
<>();
List
<
PanelGroupExtendDataDTO
>
viewsData
=
new
ArrayList
<>();
for
(
Map
.
Entry
<
String
,
String
>
entry
:
dynamicDataMap
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
String
>
entry
:
dynamicDataMap
.
entrySet
())
{
String
originViewId
=
entry
.
getKey
();
String
originViewId
=
entry
.
getKey
();
String
originViewData
=
entry
.
getValue
();
String
originViewData
=
entry
.
getValue
();
ChartViewDTO
chartView
=
JSON
.
parseObject
(
originViewData
,
ChartViewDTO
.
class
);
ChartViewDTO
chartView
=
gson
.
fromJson
(
originViewData
,
ChartViewDTO
.
class
);
String
position
=
chartView
.
getPosition
();
String
position
=
chartView
.
getPosition
();
String
newViewId
=
UUIDUtil
.
getUUIDAsString
();
String
newViewId
=
UUIDUtil
.
getUUIDAsString
();
chartView
.
setId
(
newViewId
);
chartView
.
setId
(
newViewId
);
...
@@ -472,7 +473,6 @@ public class PanelGroupService {
...
@@ -472,7 +473,6 @@ public class PanelGroupService {
extPanelViewLinkageMapper
.
copyViewLinkageField
(
copyId
);
extPanelViewLinkageMapper
.
copyViewLinkageField
(
copyId
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
System
.
out
.
println
(
"错误===》panel:"
+
panelGroupDTO
.
getId
()
+
";panelView:"
+
JSON
.
toJSONString
(
panelViewtemp
));
}
}
}
}
}
}
...
...
backend/src/main/java/io/dataease/service/panel/PanelViewService.java
浏览文件 @
25e5fb40
package
io
.
dataease
.
service
.
panel
;
package
io
.
dataease
.
service
.
panel
;
import
com.google.gson.JsonArray
;
import
com.alibaba.fastjson.JSON
;
import
com.google.gson.JsonObject
;
import
com.alibaba.fastjson.JSONArray
;
import
com.google.gson.JsonParser
;
import
com.alibaba.fastjson.JSONObject
;
import
io.dataease.ext.ExtChartViewMapper
;
import
io.dataease.ext.ExtChartViewMapper
;
import
io.dataease.ext.ExtPanelGroupMapper
;
import
io.dataease.ext.ExtPanelGroupMapper
;
import
io.dataease.ext.ExtPanelViewMapper
;
import
io.dataease.ext.ExtPanelViewMapper
;
...
@@ -95,28 +94,29 @@ public class PanelViewService {
...
@@ -95,28 +94,29 @@ public class PanelViewService {
String
panelData
=
panelGroup
.
getPanelData
();
String
panelData
=
panelGroup
.
getPanelData
();
if
(
StringUtils
.
isNotEmpty
(
panelData
))
{
if
(
StringUtils
.
isNotEmpty
(
panelData
))
{
mobileLayout
=
false
;
mobileLayout
=
false
;
JSONArray
dataArray
=
JSON
.
parseArray
(
panelData
);
JsonArray
dataArray
=
JsonParser
.
parseString
(
panelData
).
getAsJsonArray
();
List
<
PanelViewInsertDTO
>
panelViewInsertDTOList
=
new
ArrayList
<>();
List
<
PanelViewInsertDTO
>
panelViewInsertDTOList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
dataArray
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
dataArray
.
size
();
i
++)
{
J
SONObject
jsonObject
=
dataArray
.
getJSONObject
(
i
);
J
sonObject
jsonObject
=
dataArray
.
get
(
i
).
getAsJsonObject
(
);
if
(
"view"
.
equals
(
jsonObject
.
getString
(
"type"
)))
{
if
(
jsonObject
.
get
(
"type"
)!=
null
&&
"view"
.
equals
(
jsonObject
.
get
(
"type"
).
getAsString
(
)))
{
panelViewInsertDTOList
.
add
(
new
PanelViewInsertDTO
(
jsonObject
.
get
JSONObject
(
"propValue"
).
getString
(
"viewId"
),
panelId
));
panelViewInsertDTOList
.
add
(
new
PanelViewInsertDTO
(
jsonObject
.
get
(
"propValue"
).
getAsJsonObject
().
get
(
"viewId"
).
getAsString
(
),
panelId
));
}
}
// 选项卡内部视图
// 选项卡内部视图
if
(
"de-tabs"
.
equals
(
jsonObject
.
getString
(
"type"
)))
{
if
(
jsonObject
.
get
(
"type"
)!=
null
&&
"de-tabs"
.
equals
(
jsonObject
.
get
(
"type"
).
getAsString
(
)))
{
J
SONObject
options
=
jsonObject
.
getJSON
Object
(
"options"
);
J
sonObject
options
=
jsonObject
.
getAsJson
Object
(
"options"
);
if
(
options
!=
null
)
{
if
(
options
!=
null
)
{
J
SONArray
tabList
=
options
.
getJSON
Array
(
"tabList"
);
J
sonArray
tabList
=
options
.
getAsJson
Array
(
"tabList"
);
if
(
CollectionUtils
.
isNotEmpty
(
tabList
)
)
{
if
(
tabList
!=
null
&&
tabList
.
size
()
>
0
)
{
for
(
int
y
=
0
;
y
<
tabList
.
size
();
y
++)
{
for
(
int
y
=
0
;
y
<
tabList
.
size
();
y
++)
{
if
(
tabList
.
getJSONObject
(
y
).
getString
(
"content"
).
indexOf
(
"viewId"
)>-
1
)
{
if
(
tabList
.
get
(
y
).
getAsJsonObject
().
get
(
"content"
).
toString
().
indexOf
(
"viewId"
)
>
-
1
)
{
panelViewInsertDTOList
.
add
(
new
PanelViewInsertDTO
(
tabList
.
get
JSONObject
(
y
).
getJSONObject
(
"content"
).
getJSONObject
(
"propValue"
).
getString
(
"viewId"
),
panelId
,
"tab"
));
panelViewInsertDTOList
.
add
(
new
PanelViewInsertDTO
(
tabList
.
get
(
y
).
getAsJsonObject
().
getAsJsonObject
(
"content"
).
getAsJsonObject
(
"propValue"
).
get
(
"viewId"
).
getAsString
(),
panelId
,
"tab"
));
}
}
}
}
}
}
}
}
}
}
if
(
jsonObject
.
get
Boolean
(
"mobileSelected"
)
!=
null
&&
jsonObject
.
getBoolean
(
"mobileSelected"
))
{
if
(
jsonObject
.
get
(
"mobileSelected"
)
!=
null
&&
jsonObject
.
get
(
"mobileSelected"
).
getAsBoolean
(
))
{
mobileLayout
=
true
;
mobileLayout
=
true
;
}
}
}
}
...
@@ -124,11 +124,11 @@ public class PanelViewService {
...
@@ -124,11 +124,11 @@ public class PanelViewService {
if
(
CollectionUtils
.
isNotEmpty
(
panelViewInsertDTOList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
panelViewInsertDTOList
))
{
extPanelViewMapper
.
savePanelView
(
panelViewInsertDTOList
);
extPanelViewMapper
.
savePanelView
(
panelViewInsertDTOList
);
//将视图从cache表中更新到正式表中
//将视图从cache表中更新到正式表中
viewIds
=
panelViewInsertDTOList
.
stream
().
map
(
panelView
->
panelView
.
getChartViewId
()).
collect
(
Collectors
.
toList
());
viewIds
=
panelViewInsertDTOList
.
stream
().
map
(
panelView
->
panelView
.
getChartViewId
()).
collect
(
Collectors
.
toList
());
// extChartViewMapper.copyCacheToView(viewIds);
// extChartViewMapper.copyCacheToView(viewIds);
}
}
extChartViewMapper
.
deleteCacheWithPanel
(
viewIds
,
panelId
);
extChartViewMapper
.
deleteCacheWithPanel
(
viewIds
,
panelId
);
extChartViewMapper
.
deleteNoUseView
(
viewIds
,
panelId
);
extChartViewMapper
.
deleteNoUseView
(
viewIds
,
panelId
);
}
}
panelGroup
.
setMobileLayout
(
mobileLayout
);
panelGroup
.
setMobileLayout
(
mobileLayout
);
return
viewIds
;
return
viewIds
;
...
@@ -138,19 +138,19 @@ public class PanelViewService {
...
@@ -138,19 +138,19 @@ public class PanelViewService {
return
extPanelViewMapper
.
getPanelViewDetails
(
panelId
);
return
extPanelViewMapper
.
getPanelViewDetails
(
panelId
);
}
}
public
List
<
PanelView
>
findPanelViews
(
String
copyId
){
public
List
<
PanelView
>
findPanelViews
(
String
copyId
)
{
PanelViewExample
panelViewExample
=
new
PanelViewExample
();
PanelViewExample
panelViewExample
=
new
PanelViewExample
();
panelViewExample
.
createCriteria
().
andCopyIdEqualTo
(
copyId
);
panelViewExample
.
createCriteria
().
andCopyIdEqualTo
(
copyId
);
return
panelViewMapper
.
selectByExample
(
panelViewExample
);
return
panelViewMapper
.
selectByExample
(
panelViewExample
);
}
}
public
PanelView
findByViewId
(
String
viewId
){
public
PanelView
findByViewId
(
String
viewId
)
{
PanelViewExample
panelViewExample
=
new
PanelViewExample
();
PanelViewExample
panelViewExample
=
new
PanelViewExample
();
panelViewExample
.
createCriteria
().
andChartViewIdEqualTo
(
viewId
);
panelViewExample
.
createCriteria
().
andChartViewIdEqualTo
(
viewId
);
List
<
PanelView
>
result
=
panelViewMapper
.
selectByExample
(
panelViewExample
);
List
<
PanelView
>
result
=
panelViewMapper
.
selectByExample
(
panelViewExample
);
if
(
CollectionUtils
.
isNotEmpty
(
result
))
{
if
(
CollectionUtils
.
isNotEmpty
(
result
))
{
return
result
.
get
(
0
);
return
result
.
get
(
0
);
}
else
{
}
else
{
return
null
;
return
null
;
}
}
}
}
...
...
backend/src/main/java/io/dataease/service/staticResource/StaticResourceService.java
浏览文件 @
25e5fb40
...
@@ -2,7 +2,7 @@ package io.dataease.service.staticResource;
...
@@ -2,7 +2,7 @@ package io.dataease.service.staticResource;
import
cn.hutool.core.codec.Base64Decoder
;
import
cn.hutool.core.codec.Base64Decoder
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.
alibaba.fastjson.JSON
;
import
com.
google.gson.Gson
;
import
io.dataease.commons.utils.FileUtils
;
import
io.dataease.commons.utils.FileUtils
;
import
io.dataease.commons.utils.LogUtil
;
import
io.dataease.commons.utils.LogUtil
;
import
io.dataease.commons.utils.StaticResourceUtils
;
import
io.dataease.commons.utils.StaticResourceUtils
;
...
@@ -51,8 +51,9 @@ public class StaticResourceService {
...
@@ -51,8 +51,9 @@ public class StaticResourceService {
}
}
public
void
saveFilesToServe
(
String
staticResource
){
public
void
saveFilesToServe
(
String
staticResource
){
Gson
gson
=
new
Gson
();
if
(
StringUtils
.
isNotEmpty
(
staticResource
)){
if
(
StringUtils
.
isNotEmpty
(
staticResource
)){
Map
<
String
,
String
>
resource
=
JSON
.
parseObject
(
staticResource
,
Map
.
class
);
Map
<
String
,
String
>
resource
=
gson
.
fromJson
(
staticResource
,
Map
.
class
);
for
(
Map
.
Entry
<
String
,
String
>
entry:
resource
.
entrySet
()){
for
(
Map
.
Entry
<
String
,
String
>
entry:
resource
.
entrySet
()){
String
path
=
entry
.
getKey
();
String
path
=
entry
.
getKey
();
Path
uploadPath
=
Paths
.
get
(
staticDir
.
toString
(),
path
.
substring
(
path
.
lastIndexOf
(
"/"
)+
1
,
path
.
length
()));
Path
uploadPath
=
Paths
.
get
(
staticDir
.
toString
(),
path
.
substring
(
path
.
lastIndexOf
(
"/"
)+
1
,
path
.
length
()));
...
...
frontend/src/api/panel/shareProxy.js
浏览文件 @
25e5fb40
...
@@ -13,7 +13,7 @@ export function proxyInitPanelData(panelId, proxy, callback) {
...
@@ -13,7 +13,7 @@ export function proxyInitPanelData(panelId, proxy, callback) {
name
:
response
.
data
.
name
,
name
:
response
.
data
.
name
,
privileges
:
response
.
data
.
privileges
,
privileges
:
response
.
data
.
privileges
,
proxy
:
proxy
.
userId
,
proxy
:
proxy
.
userId
,
status
:
response
.
data
status
:
response
.
data
.
status
})
})
// 刷新联动信息
// 刷新联动信息
getPanelAllLinkageInfo
(
panelId
,
proxy
).
then
(
rsp
=>
{
getPanelAllLinkageInfo
(
panelId
,
proxy
).
then
(
rsp
=>
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论