已关闭
优化npm build静态资源过多占用git记录问题 #605
AtomGit-Bot创建于 2024年2月22日关闭于 2024年2月23日
优化npm build静态资源过多占用git记录问题 #605
已关闭
从refs/pull/605/head合入到master
共 12 个文件变更+179-19
| @@ -344,6 +344,7 @@ docs/_book | |||
| 344 | dist/ | 344 | dist/ |
| 345 | npm-debug.log | 345 | npm-debug.log |
| 346 | yarn-error.log | 346 | yarn-error.log |
| 347 | +**/resources/resources | ||
| 347 | 348 | ||
| 348 | ### WebStorm+all ### | 349 | ### WebStorm+all ### |
| 349 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider | 350 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider |
MopenGauss-datakit/visualtool-api/src/main/java/org/opengauss/admin/web/controller/ops/HostController.java+6-0
| @@ -32,6 +32,7 @@ import org.opengauss.admin.common.core.domain.model.ops.HostBody; | |||
| 32 | import org.opengauss.admin.common.core.domain.model.ops.host.OpsHostVO; | 32 | import org.opengauss.admin.common.core.domain.model.ops.host.OpsHostVO; |
| 33 | import org.opengauss.admin.common.core.domain.model.ops.host.SSHBody; | 33 | import org.opengauss.admin.common.core.domain.model.ops.host.SSHBody; |
| 34 | import org.opengauss.admin.common.core.page.TableDataInfo; | 34 | import org.opengauss.admin.common.core.page.TableDataInfo; |
| 35 | +import org.opengauss.admin.common.enums.OsSupportMap; | ||
| 35 | import org.opengauss.admin.system.service.ops.IHostService; | 36 | import org.opengauss.admin.system.service.ops.IHostService; |
| 36 | import org.springframework.beans.factory.annotation.Autowired; | 37 | import org.springframework.beans.factory.annotation.Autowired; |
| 37 | import org.springframework.validation.annotation.Validated; | 38 | import org.springframework.validation.annotation.Validated; |
| @@ -112,4 +113,9 @@ public class HostController extends BaseController { | |||
| 112 | public AjaxResult monitor( String hostId, String businessId, String rootPassword){ | 113 | public AjaxResult monitor( String hostId, String businessId, String rootPassword){ |
| 113 | return AjaxResult.success(hostService.monitor(hostId,businessId,rootPassword)); | 114 | return AjaxResult.success(hostService.monitor(hostId,businessId,rootPassword)); |
| 114 | } | 115 | } |
| 116 | + | ||
| 117 | + | ||
| 118 | + public AjaxResult listSupportOsName(){ | ||
| 119 | + return AjaxResult.success(OsSupportMap.getSupportOsNameList()); | ||
| 120 | + } | ||
| 115 | } | 121 | } |
| @@ -0,0 +1,16 @@ | |||
| 1 | +package org.opengauss.admin.common.enums; | ||
| 2 | + | ||
| 3 | +import java.util.HashSet; | ||
| 4 | + | ||
| 5 | +public class OsSet { | ||
| 6 | + public HashSet<String> centosBasedSet; | ||
| 7 | + public HashSet<String> openEulerBasedSet; | ||
| 8 | + | ||
| 9 | + public boolean isCentos(String os){ | ||
| 10 | + return centosBasedSet.contains(os); | ||
| 11 | + } | ||
| 12 | + | ||
| 13 | + public boolean isOpenEuler(String os){ | ||
| 14 | + return openEulerBasedSet.contains(os); | ||
| 15 | + } | ||
| 16 | +} | ||
AopenGauss-datakit/visualtool-common/src/main/java/org/opengauss/admin/common/enums/OsSupportMap.java+94-0
| @@ -0,0 +1,94 @@ | |||
| 1 | +/* | ||
| 2 | + * Copyright (c) 2022 Huawei Technologies Co.,Ltd. | ||
| 3 | + * | ||
| 4 | + * openGauss is licensed under Mulan PSL v2. | ||
| 5 | + * You can use this software according to the terms and conditions of the Mulan PSL v2. | ||
| 6 | + * You may obtain a copy of Mulan PSL v2 at: | ||
| 7 | + * | ||
| 8 | + * http://license.coscl.org.cn/MulanPSL2 | ||
| 9 | + * | ||
| 10 | + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, | ||
| 11 | + * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, | ||
| 12 | + * MERCHANTABILITY OR FITFOR A PARTICULAR PURPOSE. | ||
| 13 | + * See the Mulan PSL v2 for more details. | ||
| 14 | + * ------------------------------------------------------------------------- | ||
| 15 | + * | ||
| 16 | + * OsSupportMap.java | ||
| 17 | + * | ||
| 18 | + * IDENTIFICATION | ||
| 19 | + * openGauss-visualtool/visualtool-common/src/main/java/org/opengauss/admin/common/enums/OsSupportMap.java | ||
| 20 | + * | ||
| 21 | + * ------------------------------------------------------------------------- | ||
| 22 | + */ | ||
| 23 | + | ||
| 24 | + | ||
| 25 | +package org.opengauss.admin.common.enums; | ||
| 26 | + | ||
| 27 | +import lombok.AllArgsConstructor; | ||
| 28 | +import lombok.Getter; | ||
| 29 | + | ||
| 30 | +import java.util.HashSet; | ||
| 31 | + | ||
| 32 | +/** | ||
| 33 | + * chenyuchen2024 | ||
| 34 | + * 24/02/22 21:12 | ||
| 35 | + **/ | ||
| 36 | + | ||
| 37 | + | ||
| 38 | +public enum OsSupportMap { | ||
| 39 | + CENTOS_7_x86_64("centos","x86_64","7.6"), | ||
| 40 | + OPENEULER_20_x86_64("openEuler","x86_64","20.03"), | ||
| 41 | + OPENEULER_20_AARCH64("openEuler","aarch64","20.03"), | ||
| 42 | + OPENEULER_22_x86_64("openEuler","x86_64","22.03"), | ||
| 43 | + OPENEULER_22_AARCH64("openEuler","aarch64","22.03"); | ||
| 44 | + | ||
| 45 | + private final String osType; | ||
| 46 | + private final String arch; | ||
| 47 | + private final String version; | ||
| 48 | + | ||
| 49 | + static private OsSet osBasedSet; | ||
| 50 | + | ||
| 51 | + static { | ||
| 52 | + osBasedSet=new OsSet(); | ||
| 53 | + osBasedSet.centosBasedSet=new HashSet<>(); | ||
| 54 | + osBasedSet.centosBasedSet.add("centos"); | ||
| 55 | + osBasedSet.centosBasedSet.add("红旗"); | ||
| 56 | +// centosBasedSet.add("bclinux(基于centos)"); | ||
| 57 | + osBasedSet.openEulerBasedSet=new HashSet<>(); | ||
| 58 | + osBasedSet.openEulerBasedSet.add("openeuler"); | ||
| 59 | + osBasedSet.openEulerBasedSet.add("kylin"); | ||
| 60 | +// openEulerBasedSet.add("uniontech"); | ||
| 61 | +// openEulerBasedSet.add("统信"); | ||
| 62 | +// openEulerBasedSet.add("euleros"); | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + public static OsSupportMap of(String osInfo, String osVersionInfo, String cpuArchInfo) { | ||
| 66 | + if (osBasedSet.isCentos(osInfo) && "x86_64".equalsIgnoreCase(cpuArchInfo)){ | ||
| 67 | + return CENTOS_7_x86_64; | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + if (osBasedSet.isOpenEuler(osInfo)){ | ||
| 71 | + if(osVersionInfo.contains("22")){ | ||
| 72 | + if ("x86_64".equalsIgnoreCase(cpuArchInfo)){ | ||
| 73 | + return OPENEULER_22_x86_64; | ||
| 74 | + } | ||
| 75 | + if ("aarch64".equalsIgnoreCase(cpuArchInfo)){ | ||
| 76 | + return OPENEULER_22_AARCH64; | ||
| 77 | + } | ||
| 78 | + } | ||
| 79 | + // 除了openEuler22,其余openEuler系os默认映射成openEuler20 | ||
| 80 | + if ("x86_64".equalsIgnoreCase(cpuArchInfo)){ | ||
| 81 | + return OPENEULER_20_x86_64; | ||
| 82 | + } | ||
| 83 | + if ("aarch64".equalsIgnoreCase(cpuArchInfo)){ | ||
| 84 | + return OPENEULER_20_AARCH64; | ||
| 85 | + } | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + return CENTOS_7_x86_64; | ||
| 89 | + } | ||
| 90 | + | ||
| 91 | + public static OsSet getSupportOsNameList(){ | ||
| 92 | + return osBasedSet; | ||
| 93 | + } | ||
| 94 | +} | ||
MopenGauss-datakit/visualtool-service/src/main/java/org/opengauss/admin/system/service/ops/IHostService.java+3-0
| @@ -31,6 +31,7 @@ import org.opengauss.admin.common.core.domain.entity.ops.OpsHostEntity; | |||
| 31 | import org.opengauss.admin.common.core.domain.model.ops.HostBody; | 31 | import org.opengauss.admin.common.core.domain.model.ops.HostBody; |
| 32 | import org.opengauss.admin.common.core.domain.model.ops.host.OpsHostVO; | 32 | import org.opengauss.admin.common.core.domain.model.ops.host.OpsHostVO; |
| 33 | import org.opengauss.admin.common.core.domain.model.ops.host.SSHBody; | 33 | import org.opengauss.admin.common.core.domain.model.ops.host.SSHBody; |
| 34 | +import org.opengauss.admin.common.enums.OsSet; | ||
| 34 | 35 | ||
| 35 | import java.util.List; | 36 | import java.util.List; |
| 36 | import java.util.Map; | 37 | import java.util.Map; |
| @@ -95,4 +96,6 @@ public interface IHostService extends IService<OpsHostEntity> { | |||
| 95 | Map<String,Object> monitor(String hostId, String businessId, String rootPassword); | 96 | Map<String,Object> monitor(String hostId, String businessId, String rootPassword); |
| 96 | 97 | ||
| 97 | void updateHostOsVersion(OpsHostEntity opsHostEntity); | 98 | void updateHostOsVersion(OpsHostEntity opsHostEntity); |
| 99 | + | ||
| 100 | + OpsHostEntity getByIdWrapper(String hostId); | ||
| 98 | } | 101 | } |
MopenGauss-datakit/visualtool-service/src/main/java/org/opengauss/admin/system/service/ops/impl/HostServiceImpl.java+11-0
| @@ -49,6 +49,8 @@ import org.opengauss.admin.common.core.handler.ops.cache.SSHChannelManager; | |||
| 49 | import org.opengauss.admin.common.core.handler.ops.cache.TaskManager; | 49 | import org.opengauss.admin.common.core.handler.ops.cache.TaskManager; |
| 50 | import org.opengauss.admin.common.core.handler.ops.cache.WsConnectorManager; | 50 | import org.opengauss.admin.common.core.handler.ops.cache.WsConnectorManager; |
| 51 | import org.opengauss.admin.common.core.vo.HostInfoVo; | 51 | import org.opengauss.admin.common.core.vo.HostInfoVo; |
| 52 | +import org.opengauss.admin.common.enums.OsSupportMap; | ||
| 53 | +import org.opengauss.admin.common.enums.OsSet; | ||
| 52 | import org.opengauss.admin.common.exception.ops.OpsException; | 54 | import org.opengauss.admin.common.exception.ops.OpsException; |
| 53 | import org.opengauss.admin.common.utils.ops.JschUtil; | 55 | import org.opengauss.admin.common.utils.ops.JschUtil; |
| 54 | import org.opengauss.admin.common.utils.ops.WsUtil; | 56 | import org.opengauss.admin.common.utils.ops.WsUtil; |
| @@ -644,4 +646,13 @@ public class HostServiceImpl extends ServiceImpl<OpsHostMapper, OpsHostEntity> i | |||
| 644 | return getOne(queryWrapper, false); | 646 | return getOne(queryWrapper, false); |
| 645 | } | 647 | } |
| 646 | 648 | ||
| 649 | + public OpsHostEntity getByIdWrapper(String hostId){ | ||
| 650 | + OpsHostEntity opsHostEntity=getById(hostId); | ||
| 651 | + OsSupportMap osMapEnum=OsSupportMap.of(opsHostEntity.getOs(),opsHostEntity.getOsVersion(),opsHostEntity.getCpuArch()); | ||
| 652 | + | ||
| 653 | + opsHostEntity.setOs(osMapEnum.getOsType()); | ||
| 654 | + opsHostEntity.setOsVersion(osMapEnum.getVersion()); | ||
| 655 | + | ||
| 656 | + return opsHostEntity; | ||
| 657 | + } | ||
| 647 | } | 658 | } |
Mplugins/base-ops/src/main/java/org/opengauss/admin/plugin/controller/ops/OpsClusterController.java+9-1
| @@ -28,6 +28,7 @@ import org.opengauss.admin.common.core.domain.AjaxResult; | |||
| 28 | import org.opengauss.admin.common.core.domain.entity.ops.OpsHostEntity; | 28 | import org.opengauss.admin.common.core.domain.entity.ops.OpsHostEntity; |
| 29 | import org.opengauss.admin.common.core.domain.model.ops.OpsClusterVO; | 29 | import org.opengauss.admin.common.core.domain.model.ops.OpsClusterVO; |
| 30 | import org.opengauss.admin.common.core.domain.model.ops.check.CheckSummaryVO; | 30 | import org.opengauss.admin.common.core.domain.model.ops.check.CheckSummaryVO; |
| 31 | +import org.opengauss.admin.common.enums.OsSupportMap; | ||
| 31 | import org.opengauss.admin.plugin.base.BaseController; | 32 | import org.opengauss.admin.plugin.base.BaseController; |
| 32 | import org.opengauss.admin.plugin.domain.model.ops.*; | 33 | import org.opengauss.admin.plugin.domain.model.ops.*; |
| 33 | import org.opengauss.admin.plugin.domain.model.ops.env.HostEnv; | 34 | import org.opengauss.admin.plugin.domain.model.ops.env.HostEnv; |
| @@ -245,8 +246,10 @@ public class OpsClusterController extends BaseController { | |||
| 245 | 246 | ||
| 246 | 247 | ||
| 247 | public AjaxResult env( String hostId, | 248 | public AjaxResult env( String hostId, |
| 248 | - @RequestParam(value = "expectedOs", defaultValue = "CENTOS_X86_64") OpenGaussSupportOSEnum expectedOs, | 249 | + @RequestParam(value = "expectedOs", defaultValue = "centos_X86_64") String expectedOsStr, |
| 249 | String rootPassword) { | 250 | String rootPassword) { |
| 251 | + int tmpIndex = expectedOsStr.indexOf("_"); | ||
| 252 | + OpenGaussSupportOSEnum expectedOs = OpenGaussSupportOSEnum.of(expectedOsStr.substring(0,tmpIndex).toLowerCase(),"",expectedOsStr.substring(tmpIndex+1).toLowerCase()); | ||
| 250 | HostEnv hostEnv = opsClusterService.env(hostId, expectedOs, rootPassword); | 253 | HostEnv hostEnv = opsClusterService.env(hostId, expectedOs, rootPassword); |
| 251 | return AjaxResult.success(hostEnv); | 254 | return AjaxResult.success(hostEnv); |
| 252 | } | 255 | } |
| @@ -274,4 +277,9 @@ public class OpsClusterController extends BaseController { | |||
| 274 | Map<String, Integer> res = opsClusterService.threadPoolMonitor(); | 277 | Map<String, Integer> res = opsClusterService.threadPoolMonitor(); |
| 275 | return AjaxResult.success(res); | 278 | return AjaxResult.success(res); |
| 276 | } | 279 | } |
| 280 | + | ||
| 281 | + | ||
| 282 | + public AjaxResult listSupportOsName(){ | ||
| 283 | + return AjaxResult.success(OsSupportMap.getSupportOsNameList()); | ||
| 284 | + } | ||
| 277 | } | 285 | } |
Mplugins/base-ops/src/main/java/org/opengauss/admin/plugin/enums/ops/OpenGaussSupportOSEnum.java+9-7
| @@ -25,8 +25,13 @@ package org.opengauss.admin.plugin.enums.ops; | |||
| 25 | 25 | ||
| 26 | import lombok.AllArgsConstructor; | 26 | import lombok.AllArgsConstructor; |
| 27 | import lombok.Getter; | 27 | import lombok.Getter; |
| 28 | +import org.opengauss.admin.common.enums.OsSupportMap; | ||
| 28 | import org.opengauss.admin.plugin.domain.model.ops.SshCommandConstants; | 29 | import org.opengauss.admin.plugin.domain.model.ops.SshCommandConstants; |
| 29 | 30 | ||
| 31 | +import java.util.ArrayList; | ||
| 32 | +import java.util.HashSet; | ||
| 33 | +import java.util.List; | ||
| 34 | + | ||
| 30 | /** | 35 | /** |
| 31 | * lhf | 36 | * lhf |
| 32 | * 2022/12/11 13:38 | 37 | * 2022/12/11 13:38 |
| @@ -47,18 +52,15 @@ public enum OpenGaussSupportOSEnum { | |||
| 47 | private String omPackagePostfix; | 52 | private String omPackagePostfix; |
| 48 | 53 | ||
| 49 | public static OpenGaussSupportOSEnum of(String osInfo, String osVersionInfo, String cpuArchInfo) { | 54 | public static OpenGaussSupportOSEnum of(String osInfo, String osVersionInfo, String cpuArchInfo) { |
| 50 | - if ("centos".equalsIgnoreCase(osInfo) && "x86_64".equalsIgnoreCase(cpuArchInfo)){ | 55 | + OsSupportMap osMapEnum= OsSupportMap.of(osInfo,osVersionInfo,cpuArchInfo); |
| 56 | + if (osMapEnum==OsSupportMap.CENTOS_7_x86_64){ | ||
| 51 | return CENTOS_X86_64; | 57 | return CENTOS_X86_64; |
| 52 | } | 58 | } |
| 53 | 59 | ||
| 54 | - if ("openEuler".equalsIgnoreCase(osInfo) && "aarch64".equalsIgnoreCase(cpuArchInfo)){ | 60 | + if ("x86_64".equalsIgnoreCase(osMapEnum.getArch())){ |
| 55 | - return OPENEULER_AARCH64; | ||
| 56 | - } | ||
| 57 | - | ||
| 58 | - if ("openEuler".equalsIgnoreCase(osInfo) && "x86_64".equalsIgnoreCase(cpuArchInfo)){ | ||
| 59 | return OPENEULER_X86_64; | 61 | return OPENEULER_X86_64; |
| 60 | } | 62 | } |
| 61 | - return CENTOS_X86_64; | 63 | + return OPENEULER_AARCH64; |
| 62 | } | 64 | } |
| 63 | 65 | ||
| 64 | public boolean match(String os,String cpuArch) { | 66 | public boolean match(String os,String cpuArch) { |
| @@ -429,4 +429,8 @@ export const batchSetGucSetting = (data: KeyValue) => { | |||
| 429 | 429 | ||
| 430 | export const listEnterpriseCluster = () => { | 430 | export const listEnterpriseCluster = () => { |
| 431 | return axios.get('/opsCluster/listEnterpriseCluster') | 431 | return axios.get('/opsCluster/listEnterpriseCluster') |
| 432 | -} | 432 | +} |
| 433 | + | ||
| 434 | +export const listSupportOsName = () => { | ||
| 435 | + return axios.get('http://192.168.197.131:9494/host/listSupportOsName') | ||
| 436 | +} | ||
| @@ -175,7 +175,7 @@ import { | |||
| 175 | delPkgTar, | 175 | delPkgTar, |
| 176 | editPackage, | 176 | editPackage, |
| 177 | getSysUploadPath, | 177 | getSysUploadPath, |
| 178 | - hasPkgName | 178 | + hasPkgName, listSupportOsName |
| 179 | } from '@/api/ops' | 179 | } from '@/api/ops' |
| 180 | import { FileItem, Message } from '@arco-design/web-vue' | 180 | import { FileItem, Message } from '@arco-design/web-vue' |
| 181 | import { useI18n } from 'vue-i18n' | 181 | import { useI18n } from 'vue-i18n' |
| @@ -206,6 +206,8 @@ const data = reactive<KeyValue>({ | |||
| 206 | }, | 206 | }, |
| 207 | rules: {}, | 207 | rules: {}, |
| 208 | osList: [], | 208 | osList: [], |
| 209 | + centosList: [], | ||
| 210 | + openEulerList: [], | ||
| 209 | cpuArchList: [], | 211 | cpuArchList: [], |
| 210 | packageVersionList: [], | 212 | packageVersionList: [], |
| 211 | typeList: [], | 213 | typeList: [], |
| @@ -304,10 +306,10 @@ const osChange = () => { | |||
| 304 | if (data.formData.os === OS.All) { | 306 | if (data.formData.os === OS.All) { |
| 305 | data.cpuArchList = [{ label: CpuArch.NOARCH, value: CpuArch.NOARCH }] | 307 | data.cpuArchList = [{ label: CpuArch.NOARCH, value: CpuArch.NOARCH }] |
| 306 | data.formData.cpuArch = CpuArch.NOARCH | 308 | data.formData.cpuArch = CpuArch.NOARCH |
| 307 | - } else if (data.formData.os === OS.CENTOS) { | 309 | + } else if (data.centosList.includes(data.formData.os)) { |
| 308 | data.cpuArchList = [{ label: CpuArch.X86_64, value: CpuArch.X86_64 }] | 310 | data.cpuArchList = [{ label: CpuArch.X86_64, value: CpuArch.X86_64 }] |
| 309 | data.formData.cpuArch = CpuArch.X86_64 | 311 | data.formData.cpuArch = CpuArch.X86_64 |
| 310 | - } else if (data.formData.os === OS.OPEN_EULER) { | 312 | + } else if (data.openEulerList.includes(data.formData.os)) { |
| 311 | data.cpuArchList = [ | 313 | data.cpuArchList = [ |
| 312 | { label: CpuArch.X86_64, value: CpuArch.X86_64 }, | 314 | { label: CpuArch.X86_64, value: CpuArch.X86_64 }, |
| 313 | { label: CpuArch.AARCH64, value: CpuArch.AARCH64 } | 315 | { label: CpuArch.AARCH64, value: CpuArch.AARCH64 } |
| @@ -459,10 +461,21 @@ const getSystemSetting = () => { | |||
| 459 | } | 461 | } |
| 460 | 462 | ||
| 461 | const initData = () => { | 463 | const initData = () => { |
| 462 | - data.osList = [ | 464 | + // data.osList = [ |
| 463 | - { label: OS.CENTOS, value: OS.CENTOS }, | 465 | + // { label: OS.CENTOS, value: OS.CENTOS }, |
| 464 | - { label: OS.OPEN_EULER, value: OS.OPEN_EULER } | 466 | + // { label: OS.OPEN_EULER, value: OS.OPEN_EULER } |
| 465 | - ] | 467 | + // ] |
| 468 | + data.osList=[] | ||
| 469 | + listSupportOsName().then((res)=>{ | ||
| 470 | + data.centosList=res.data.centosBasedSet; | ||
| 471 | + data.openEulerList=res.data.openEulerBasedSet; | ||
| 472 | + for(let os of data.centosList){ | ||
| 473 | + data.osList.push({ label: os, value: os }); | ||
| 474 | + } | ||
| 475 | + for(let os of data.openEulerList){ | ||
| 476 | + data.osList.push({ label: os, value: os }); | ||
| 477 | + } | ||
| 478 | + }) | ||
| 466 | data.typeList = [ | 479 | data.typeList = [ |
| 467 | { label: 'OpenGauss', value: PackageType.OPENGAUSS }, | 480 | { label: 'OpenGauss', value: PackageType.OPENGAUSS }, |
| 468 | { label: 'Zookeeper', value: PackageType.ZOOKEEPER }, | 481 | { label: 'Zookeeper', value: PackageType.ZOOKEEPER }, |
| @@ -612,7 +625,8 @@ const generateName = () => { | |||
| 612 | if ( | 625 | if ( |
| 613 | data.type === 'create' && | 626 | data.type === 'create' && |
| 614 | !data.isNameDirty && | 627 | !data.isNameDirty && |
| 615 | - data.formData.packageVersionNum | 628 | + data.formData.packageVersionNum && |
| 629 | + (data.formData.os === 'centos' || data.formData.os === 'openEuler') | ||
| 616 | ) { | 630 | ) { |
| 617 | let name = `${data.formData.type}-${data.formData.os}-${data.formData.cpuArch}` | 631 | let name = `${data.formData.type}-${data.formData.os}-${data.formData.cpuArch}` |
| 618 | if (data.formData.type === PackageType.OPENGAUSS) { | 632 | if (data.formData.type === PackageType.OPENGAUSS) { |
| @@ -205,7 +205,8 @@ const setPathToStore = () => { | |||
| 205 | cpuArchStr = cpuArchStr.replace('-', '_') | 205 | cpuArchStr = cpuArchStr.replace('-', '_') |
| 206 | } | 206 | } |
| 207 | const temp = | 207 | const temp = |
| 208 | - getInstallOs(fileInfo.os) + '_' + cpuArchStr.toLocaleUpperCase() | 208 | + fileInfo.os.toLocaleUpperCase() + '_' + cpuArchStr.toLocaleUpperCase() |
| 209 | + console.log(temp) | ||
| 209 | installStore.setInstallContext({ | 210 | installStore.setInstallContext({ |
| 210 | packagePath: data.path, | 211 | packagePath: data.path, |
| 211 | packageName: data.fileName, | 212 | packageName: data.fileName, |
Mplugins/data-migration/src/main/java/org/opengauss/admin/plugin/service/impl/MigrationToolPortalDownloadInfoServiceImpl.java+1-1
| @@ -32,7 +32,7 @@ public class MigrationToolPortalDownloadInfoServiceImpl extends ServiceImpl<Migr | |||
| 32 | 32 | ||
| 33 | 33 | ||
| 34 | public List<MigrationToolPortalDownloadInfo> getPortalDownloadInfoList(String hostId) { | 34 | public List<MigrationToolPortalDownloadInfo> getPortalDownloadInfoList(String hostId) { |
| 35 | - OpsHostEntity opsHostEntity = hostService.getById(hostId); | 35 | + OpsHostEntity opsHostEntity = hostService.getByIdWrapper(hostId); |
| 36 | if (StringUtils.isEmpty(opsHostEntity.getOsVersion())) { | 36 | if (StringUtils.isEmpty(opsHostEntity.getOsVersion())) { |
| 37 | hostService.updateHostOsVersion(opsHostEntity); | 37 | hostService.updateHostOsVersion(opsHostEntity); |
| 38 | } | 38 | } |