ludc
2023-11-26 ec2ed600ba8088a291838b0d448dbfd9e2150e2a
本地日志下载调试linux中运行,修改读取失败问题
已修改2个文件
13 ■■■■ 文件已修改
Source/UBCS-WEB/src/views/monitor/log/localLog.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-ops/ubcs-log/src/main/java/com/vci/ubcs/log/service/impl/LogLocalServiceImpl.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/monitor/log/localLog.vue
@@ -122,10 +122,17 @@
      }
    },
    methods: {
      // 判断客户端所在的操作系统平台
      isWindows() {
        return navigator.platform.indexOf('Win') !== -1
      },
      // 根据操作系统平台返回相应的路径分隔符
      getPathSeparator() {
        return this.isWindows() ? '\\' : '/'
      },
      downLoadLogFile(row){
          this.downloadLoading = true;
          let logPath = row.hasChildren ?  row.logPath:row.logPath+"\\"+row.logName;
          let logPath = row.hasChildren ?  row.logPath:row.logPath+this.getPathSeparator()+row.logName;
          downLoadLog(Object.assign({},row,{logFullPaths:logPath})).then(res=>{
              func.downloadFileByBlobHandler(res);
              this.downloadLoading = false;
Source/UBCS/ubcs-ops/ubcs-log/src/main/java/com/vci/ubcs/log/service/impl/LogLocalServiceImpl.java
@@ -105,6 +105,7 @@
                if(dir.getName().contains("ubcs_")){
                    String fullPath = dir.getPath() + LOGPATH;
                    File file = new File(fullPath);
                    if(file.exists()){
                    LocalLog localLog = new LocalLog();
                    localLog.setLastModifier(getLastModifiedOrCreatTime(true,fullPath));
                    localLog.setCreateTime(getLastModifiedOrCreatTime(false,fullPath));
@@ -118,6 +119,7 @@
                    localLog.setHasChildren(true);
                    localLogs.add(localLog);
                }
                }
            });
        }
        return localLogs;