fix(系统设置): 修复上传插件的在列表没有展示的缺陷
--bug=1024721 --user=王孝刚 【系统设置】github#23006,上传jmeter的jar提示上传成功,在日志中查询到上传成功,但是在列表中没有展示出来 https://www.tapd.cn/55049933/s/1354181
This commit is contained in:
parent
e1cc70d070
commit
931782a9e2
|
@ -11,6 +11,7 @@ import io.metersphere.commons.utils.BeanUtils;
|
||||||
import io.metersphere.commons.utils.FileUtils;
|
import io.metersphere.commons.utils.FileUtils;
|
||||||
import io.metersphere.commons.utils.JSON;
|
import io.metersphere.commons.utils.JSON;
|
||||||
import io.metersphere.commons.utils.LogUtil;
|
import io.metersphere.commons.utils.LogUtil;
|
||||||
|
import io.metersphere.i18n.Translator;
|
||||||
import io.metersphere.log.utils.ReflexObjectUtil;
|
import io.metersphere.log.utils.ReflexObjectUtil;
|
||||||
import io.metersphere.log.vo.DetailColumn;
|
import io.metersphere.log.vo.DetailColumn;
|
||||||
import io.metersphere.log.vo.OperatingLogDetails;
|
import io.metersphere.log.vo.OperatingLogDetails;
|
||||||
|
@ -126,6 +127,7 @@ public class PluginService {
|
||||||
|
|
||||||
public void addPlugin(MultipartFile file, String scenario) {
|
public void addPlugin(MultipartFile file, String scenario) {
|
||||||
checkPluginExist(file);
|
checkPluginExist(file);
|
||||||
|
try {
|
||||||
if (StringUtils.equalsIgnoreCase(scenario, PluginScenario.platform.name())) {
|
if (StringUtils.equalsIgnoreCase(scenario, PluginScenario.platform.name())) {
|
||||||
PluginWithBLOBs plugin = platformPluginService.addPlatformPlugin(file);
|
PluginWithBLOBs plugin = platformPluginService.addPlatformPlugin(file);
|
||||||
platformPluginService.notifiedPlatformPluginAdd(plugin.getId());
|
platformPluginService.notifiedPlatformPluginAdd(plugin.getId());
|
||||||
|
@ -137,8 +139,14 @@ public class PluginService {
|
||||||
String pluginId = plugins.get(0).getPluginId();
|
String pluginId = plugins.get(0).getPluginId();
|
||||||
FileRequest request = getRequest(pluginId);
|
FileRequest request = getRequest(pluginId);
|
||||||
fileManagerService.upload(file, request);
|
fileManagerService.upload(file, request);
|
||||||
|
} else {
|
||||||
|
MSException.throwException(Translator.get("plugin_parse_error"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
MSException.throwException(Translator.get("plugin_parse_error"));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private FileRequest getRequest(String pluginId) {
|
private FileRequest getRequest(String pluginId) {
|
||||||
|
|
|
@ -3,3 +3,4 @@ read_permission_file_fail=Failed to read permission file!
|
||||||
platform_plugin_not_exit=Platform docking function has been plug-in, please download the corresponding version of the plug-in:
|
platform_plugin_not_exit=Platform docking function has been plug-in, please download the corresponding version of the plug-in:
|
||||||
workspace_name_exceeds_length_limit=Workspace name exceeds length limit
|
workspace_name_exceeds_length_limit=Workspace name exceeds length limit
|
||||||
platform_plugin_exit=plugin is already exist!
|
platform_plugin_exit=plugin is already exist!
|
||||||
|
plugin_parse_error=Plugin parse error
|
|
@ -3,3 +3,4 @@ read_permission_file_fail=读取权限文件失败!
|
||||||
platform_plugin_not_exit=平台对接功能已插件化,请下载对应版本的插件:
|
platform_plugin_not_exit=平台对接功能已插件化,请下载对应版本的插件:
|
||||||
workspace_name_exceeds_length_limit=工作空间名称超出长度限制
|
workspace_name_exceeds_length_limit=工作空间名称超出长度限制
|
||||||
platform_plugin_exit=插件已存在!
|
platform_plugin_exit=插件已存在!
|
||||||
|
plugin_parse_error=插件解析失败
|
|
@ -3,3 +3,4 @@ read_permission_file_fail=讀取權限文件失敗!
|
||||||
platform_plugin_not_exit=平臺對接功能已插件化,請下載對應版本的插件:
|
platform_plugin_not_exit=平臺對接功能已插件化,請下載對應版本的插件:
|
||||||
workspace_name_exceeds_length_limit=工作空間名稱超出長度限制
|
workspace_name_exceeds_length_limit=工作空間名稱超出長度限制
|
||||||
platform_plugin_exit=插件已存在!
|
platform_plugin_exit=插件已存在!
|
||||||
|
plugin_parse_error=插件解析失敗!
|
Loading…
Reference in New Issue