已合并
Web支持固件升级暂存 #564
wuyuhang创建于 19 天前
Web支持固件升级暂存 #564
已合并
共 11 个文件变更+246-47
| @@ -1,7 +1,7 @@ | |||
| 1 | { | 1 | { |
| 2 | "name": "webui", | 2 | "name": "webui", |
| 3 | "type": "configuration", | 3 | "type": "configuration", |
| 4 | - "version": "1.91.146", | 4 | + "version": "1.91.147", |
| 5 | "author": "Huawei", | 5 | "author": "Huawei", |
| 6 | "license": "Mulan PSL v2", | 6 | "license": "Mulan PSL v2", |
| 7 | "dependencies": { | 7 | "dependencies": { |
| @@ -70,6 +70,8 @@ const ibmc = { | |||
| 70 | DeleteSPUpdateFile: '/UI/Rest/BMCSettings/UpdateService/DeleteSPUpdateFile', | 70 | DeleteSPUpdateFile: '/UI/Rest/BMCSettings/UpdateService/DeleteSPUpdateFile', |
| 71 | pendingFirmwareList: '/UI/Rest/BMCSettings/UpdateService/PendingFirmwareList', | 71 | pendingFirmwareList: '/UI/Rest/BMCSettings/UpdateService/PendingFirmwareList', |
| 72 | startActive: '/UI/Rest/BMCSettings/UpdateService/StartActive', | 72 | startActive: '/UI/Rest/BMCSettings/UpdateService/StartActive', |
| 73 | + upgradeStagedFirmware: '/UI/Rest/BMCSettings/UpdateService/ActiveStagedFirmwares', | ||
| 74 | + deleteStagedFirmware: '/UI/Rest/BMCSettings/UpdateService/DiscardStagedFirmwares', | ||
| 73 | }; | 75 | }; |
| 74 | const exportConfig = { | 76 | const exportConfig = { |
| 75 | genericInfo: '/UI/Rest/GenericInfo', | 77 | genericInfo: '/UI/Rest/GenericInfo', |
| @@ -501,6 +501,9 @@ | |||
| 501 | "IBMC_FIMWARE_TIP_INFO": "After the {softwareName} or SD card controller firmware is upgraded, the {softwareName} automatically restarts for the upgrade to take effect. If the BIOS or CPLD or VRD is upgraded while the system is powered on, power cycle or restart the system for the BIOS upgrade to take effect, or power off the system for the CPLD,VRD upgrade to take effect.", | 501 | "IBMC_FIMWARE_TIP_INFO": "After the {softwareName} or SD card controller firmware is upgraded, the {softwareName} automatically restarts for the upgrade to take effect. If the BIOS or CPLD or VRD is upgraded while the system is powered on, power cycle or restart the system for the BIOS upgrade to take effect, or power off the system for the CPLD,VRD upgrade to take effect.", |
| 502 | "IBMC_FIMWARE_UPDATE_TIP": "Do not power off or restart the system during the upgrade.", | 502 | "IBMC_FIMWARE_UPDATE_TIP": "Do not power off or restart the system during the upgrade.", |
| 503 | "IBMC_UPGRADE_CONGIF_BTN": "Upgrade", | 503 | "IBMC_UPGRADE_CONGIF_BTN": "Upgrade", |
| 504 | + "IBMC_UPGRADE_TEMP_STORAGE_BTN": "Stage", | ||
| 505 | + "IBMC_UPGRADE_STAGED_FIRMWARE_BTN": "Upgrade staged firmware", | ||
| 506 | + "IBMC_DELETE_STAGED_FIRMWARE_BTN": "Delete staged firmware", | ||
| 504 | "IBMC_FIMWARE_UPDATE_FIND": "Firmware upgrade successfully.", | 507 | "IBMC_FIMWARE_UPDATE_FIND": "Firmware upgrade successfully.", |
| 505 | "IBMC_FIMWARE_FAILED": "Firmware upgrade failed.", | 508 | "IBMC_FIMWARE_FAILED": "Firmware upgrade failed.", |
| 506 | "IBMC_AFTER_REBOOT": "File upload successfully. The upgrade takes effect automatically after the next power-off or restart.", | 509 | "IBMC_AFTER_REBOOT": "File upload successfully. The upgrade takes effect automatically after the next power-off or restart.", |
| @@ -519,6 +522,10 @@ | |||
| 519 | "IBMC_UP_FIRMWARE_ERR_RETRY": "Powering on... Failed to upgrade the firmware.", | 522 | "IBMC_UP_FIRMWARE_ERR_RETRY": "Powering on... Failed to upgrade the firmware.", |
| 520 | "IBMC_UP_COMPROCESSOR_FIRMWARE_UPGRADE_FAILED": "BMC coprocessor firmware upgrade failed.", | 523 | "IBMC_UP_COMPROCESSOR_FIRMWARE_UPGRADE_FAILED": "BMC coprocessor firmware upgrade failed.", |
| 521 | "IBMC_UP_COMM_FILE_TOO_EARLY": "The upgrade package version is too early.", | 524 | "IBMC_UP_COMM_FILE_TOO_EARLY": "The upgrade package version is too early.", |
| 525 | + "IBMC_UP_STAGE_FAILED": "Staging failed.", | ||
| 526 | + "IBMC_UP_STAGE_SUCCEED": "Staging succeeded.", | ||
| 527 | + "IBMC_UP_DELETE_STAGE_FAILED": "Failed to delete the staged firmware.", | ||
| 528 | + "IBMC_UP_DELETE_STAGE_SUCCEED": "Staged firmware deleted.", | ||
| 522 | "IBMC_UP_POWER_SUPPLY_INSUFFICIENT": "Insufficient power supply.", | 529 | "IBMC_UP_POWER_SUPPLY_INSUFFICIENT": "Insufficient power supply.", |
| 523 | "IBMC_UP_VRD_UPGRADE_IS_IN_PROGRESS": "The MCU or VRD cannot be upgraded because the VRD is being validated.", | 530 | "IBMC_UP_VRD_UPGRADE_IS_IN_PROGRESS": "The MCU or VRD cannot be upgraded because the VRD is being validated.", |
| 524 | "IBMC_FIMWARE_ERROR_MSG": "Firmware upgrade failed.", | 531 | "IBMC_FIMWARE_ERROR_MSG": "Firmware upgrade failed.", |
| @@ -2429,6 +2436,7 @@ | |||
| 2429 | "IBMC_AUTOMATIC_SUCCESS": "Completed", | 2436 | "IBMC_AUTOMATIC_SUCCESS": "Completed", |
| 2430 | "IBMC_AUTOMATIC_FAILED": "Failed", | 2437 | "IBMC_AUTOMATIC_FAILED": "Failed", |
| 2431 | "IBMC_AUTOMATIC_PROCEED": "Upgrading", | 2438 | "IBMC_AUTOMATIC_PROCEED": "Upgrading", |
| 2439 | + "IBMC_AUTOMATIC_STAGED": "Staged", | ||
| 2432 | "IBMC_AUTOMATIC_WAITING": "Waiting", | 2440 | "IBMC_AUTOMATIC_WAITING": "Waiting", |
| 2433 | "IBMC_AUTOMATIC_RETRY": "Retry", | 2441 | "IBMC_AUTOMATIC_RETRY": "Retry", |
| 2434 | "IBMC_AUTOMATIC_DAY": " Days", | 2442 | "IBMC_AUTOMATIC_DAY": " Days", |
| @@ -2934,6 +2942,7 @@ | |||
| 2934 | "UPDATE_STATUS": "Status", | 2942 | "UPDATE_STATUS": "Status", |
| 2935 | "UPDATE_PROGRESS": "Progress", | 2943 | "UPDATE_PROGRESS": "Progress", |
| 2936 | "UPDATE_PACKAGE_NAME": "Firmware Package Name", | 2944 | "UPDATE_PACKAGE_NAME": "Firmware Package Name", |
| 2945 | + "UPDATE_VERSION": "Version", | ||
| 2937 | "UPDATE_RESULT_DETAIL": "Result Details", | 2946 | "UPDATE_RESULT_DETAIL": "Result Details", |
| 2938 | "UPDATE_BE_UPGRADED": "To be upgraded", | 2947 | "UPDATE_BE_UPGRADED": "To be upgraded", |
| 2939 | "UPDATE_NEXT": "Next", | 2948 | "UPDATE_NEXT": "Next", |
| @@ -444,6 +444,9 @@ | |||
| 444 | "IBMC_FIMWARE_TIP_INFO": "Après la mise à niveau de l'{softwareName} ou du contrôleur de carte SD, l'{softwareName} redémarrera automatiquement pour que la mise à niveau prenne effet. Si le BIOS ou le CPLD ou le VRD est mis à niveau pendant que le système est mis sous tension, il faut mettre le système hors tension puis sous tension ou le redémarrer pour que la mise à niveau du BIOS prenne effet, ou mettre le système hors tension pour que la mise à niveau du CPLD,VRD prenne effet.", | 444 | "IBMC_FIMWARE_TIP_INFO": "Après la mise à niveau de l'{softwareName} ou du contrôleur de carte SD, l'{softwareName} redémarrera automatiquement pour que la mise à niveau prenne effet. Si le BIOS ou le CPLD ou le VRD est mis à niveau pendant que le système est mis sous tension, il faut mettre le système hors tension puis sous tension ou le redémarrer pour que la mise à niveau du BIOS prenne effet, ou mettre le système hors tension pour que la mise à niveau du CPLD,VRD prenne effet.", |
| 445 | "IBMC_FIMWARE_UPDATE_TIP": "Ne mettez pas le système hors tension et ne le redémarrez pas pendant la mise à niveau.", | 445 | "IBMC_FIMWARE_UPDATE_TIP": "Ne mettez pas le système hors tension et ne le redémarrez pas pendant la mise à niveau.", |
| 446 | "IBMC_UPGRADE_CONGIF_BTN": "Mettre à niveau", | 446 | "IBMC_UPGRADE_CONGIF_BTN": "Mettre à niveau", |
| 447 | + "IBMC_UPGRADE_TEMP_STORAGE_BTN": "Étape", | ||
| 448 | + "IBMC_UPGRADE_STAGED_FIRMWARE_BTN": "Mettre à niveau le firmware en attente", | ||
| 449 | + "IBMC_DELETE_STAGED_FIRMWARE_BTN": "Supprimer le firmware en attente", | ||
| 447 | "IBMC_FIMWARE_UPDATE_FIND": "La mise à niveau est réussie.", | 450 | "IBMC_FIMWARE_UPDATE_FIND": "La mise à niveau est réussie.", |
| 448 | "IBMC_FIMWARE_FAILED": "La mise à niveau du micrologiciel a échoué.", | 451 | "IBMC_FIMWARE_FAILED": "La mise à niveau du micrologiciel a échoué.", |
| 449 | "IBMC_AFTER_REBOOT": "Fichier chargé avec succès. La mise à niveau prendra effet automatiquement à l'arrêt ou au redémarrage suivant.", | 452 | "IBMC_AFTER_REBOOT": "Fichier chargé avec succès. La mise à niveau prendra effet automatiquement à l'arrêt ou au redémarrage suivant.", |
| @@ -2424,6 +2427,7 @@ | |||
| 2424 | "IBMC_AUTOMATIC_SUCCESS": "Terminée", | 2427 | "IBMC_AUTOMATIC_SUCCESS": "Terminée", |
| 2425 | "IBMC_AUTOMATIC_FAILED": "Échouée", | 2428 | "IBMC_AUTOMATIC_FAILED": "Échouée", |
| 2426 | "IBMC_AUTOMATIC_PROCEED": "Mise à niveau…", | 2429 | "IBMC_AUTOMATIC_PROCEED": "Mise à niveau…", |
| 2430 | + "IBMC_AUTOMATIC_STAGED": "En attente", | ||
| 2427 | "IBMC_AUTOMATIC_WAITING": "En attente", | 2431 | "IBMC_AUTOMATIC_WAITING": "En attente", |
| 2428 | "IBMC_AUTOMATIC_RETRY": "Réessayer", | 2432 | "IBMC_AUTOMATIC_RETRY": "Réessayer", |
| 2429 | "IBMC_AUTOMATIC_DAY": " Jours", | 2433 | "IBMC_AUTOMATIC_DAY": " Jours", |
| @@ -2469,6 +2473,10 @@ | |||
| 2469 | "IBMC_LCN_PATCH_VERSION": "Correctif logiciel LinkBoard{boardIndex}", | 2473 | "IBMC_LCN_PATCH_VERSION": "Correctif logiciel LinkBoard{boardIndex}", |
| 2470 | "IBMC_UP_COMPROCESSOR_FIRMWARE_UPGRADE_FAILED": "La mise à niveau du firmware du coprocesseur du BMC a échoué.", | 2474 | "IBMC_UP_COMPROCESSOR_FIRMWARE_UPGRADE_FAILED": "La mise à niveau du firmware du coprocesseur du BMC a échoué.", |
| 2471 | "IBMC_UP_COMM_FILE_TOO_EARLY": "La version du paquet de mise à jour est trop ancienne.", | 2475 | "IBMC_UP_COMM_FILE_TOO_EARLY": "La version du paquet de mise à jour est trop ancienne.", |
| 2476 | + "IBMC_UP_STAGE_FAILED": "La mise en attente a échoué.", | ||
| 2477 | + "IBMC_UP_STAGE_SUCCEED": "La mise en attente a réussi.", | ||
| 2478 | + "IBMC_UP_DELETE_STAGE_FAILED": "La suppression du firmware en attente a échoué.", | ||
| 2479 | + "IBMC_UP_DELETE_STAGE_SUCCEED": "Firmware mis en attente supprimé.", | ||
| 2472 | "IBMC_UP_POWER_SUPPLY_INSUFFICIENT": "Alimentation électrique insuffisante.", | 2480 | "IBMC_UP_POWER_SUPPLY_INSUFFICIENT": "Alimentation électrique insuffisante.", |
| 2473 | "IBMC_UP_VRD_UPGRADE_IS_IN_PROGRESS": "Le MCU ou le VRD ne peuvent pas être mis à niveau parce que le VRD est en cours de validation.", | 2481 | "IBMC_UP_VRD_UPGRADE_IS_IN_PROGRESS": "Le MCU ou le VRD ne peuvent pas être mis à niveau parce que le VRD est en cours de validation.", |
| 2474 | "IBMC_UPGRADE_TASK_TTITLE": "File d'attente des tâches", | 2482 | "IBMC_UPGRADE_TASK_TTITLE": "File d'attente des tâches", |
| @@ -2933,6 +2941,7 @@ | |||
| 2933 | "UPDATE_STATUS": "Statut", | 2941 | "UPDATE_STATUS": "Statut", |
| 2934 | "UPDATE_PROGRESS": "Progression", | 2942 | "UPDATE_PROGRESS": "Progression", |
| 2935 | "UPDATE_PACKAGE_NAME": "Nom du paquet micrologiciel", | 2943 | "UPDATE_PACKAGE_NAME": "Nom du paquet micrologiciel", |
| 2944 | + "UPDATE_VERSION": "Version", | ||
| 2936 | "UPDATE_RESULT_DETAIL": "Détails du résultat", | 2945 | "UPDATE_RESULT_DETAIL": "Détails du résultat", |
| 2937 | "UPDATE_BE_UPGRADED": "À mettre à niveau", | 2946 | "UPDATE_BE_UPGRADED": "À mettre à niveau", |
| 2938 | "UPDATE_NEXT": "Suivant", | 2947 | "UPDATE_NEXT": "Suivant", |
| @@ -444,6 +444,9 @@ | |||
| 444 | "IBMC_FIMWARE_TIP_INFO": "{softwareName}またはSDカードコントローラのファームウェアがアップグレードされた後、アップグレードを有効にするには、{softwareName}が自動的に再起動します。システムの稼働中にBIOSまたはCPLDまたはVRDをアップグレードする場合、BIOSのアップグレードを有効にするには、システムの電源サイクルまたは再起動を実行する必要があります。CPLD,VRDのアップグレードを有効にするには、システムのパワーオフを実行する必要があります。", | 444 | "IBMC_FIMWARE_TIP_INFO": "{softwareName}またはSDカードコントローラのファームウェアがアップグレードされた後、アップグレードを有効にするには、{softwareName}が自動的に再起動します。システムの稼働中にBIOSまたはCPLDまたはVRDをアップグレードする場合、BIOSのアップグレードを有効にするには、システムの電源サイクルまたは再起動を実行する必要があります。CPLD,VRDのアップグレードを有効にするには、システムのパワーオフを実行する必要があります。", |
| 445 | "IBMC_FIMWARE_UPDATE_TIP": "更新中にシステムのパワーオフや再起動をしないでください。", | 445 | "IBMC_FIMWARE_UPDATE_TIP": "更新中にシステムのパワーオフや再起動をしないでください。", |
| 446 | "IBMC_UPGRADE_CONGIF_BTN": "更新", | 446 | "IBMC_UPGRADE_CONGIF_BTN": "更新", |
| 447 | + "IBMC_UPGRADE_TEMP_STORAGE_BTN": "ステージ", | ||
| 448 | + "IBMC_UPGRADE_STAGED_FIRMWARE_BTN": "ステージングされたファームウェアをアップグレードする", | ||
| 449 | + "IBMC_DELETE_STAGED_FIRMWARE_BTN": "ステージングされたファームウェアを削除する", | ||
| 447 | "IBMC_FIMWARE_UPDATE_FIND": "操作に成功", | 450 | "IBMC_FIMWARE_UPDATE_FIND": "操作に成功", |
| 448 | "IBMC_FIMWARE_FAILED": "ファームウェアの更新に失敗しました", | 451 | "IBMC_FIMWARE_FAILED": "ファームウェアの更新に失敗しました", |
| 449 | "IBMC_AFTER_REBOOT": "ファイルのアップロードに成功しました。次の電源OFF時または再起動時に更新が自動的に適用されます。", | 452 | "IBMC_AFTER_REBOOT": "ファイルのアップロードに成功しました。次の電源OFF時または再起動時に更新が自動的に適用されます。", |
| @@ -2424,6 +2427,7 @@ | |||
| 2424 | "IBMC_AUTOMATIC_SUCCESS": "完了", | 2427 | "IBMC_AUTOMATIC_SUCCESS": "完了", |
| 2425 | "IBMC_AUTOMATIC_FAILED": "失敗", | 2428 | "IBMC_AUTOMATIC_FAILED": "失敗", |
| 2426 | "IBMC_AUTOMATIC_PROCEED": "更新中", | 2429 | "IBMC_AUTOMATIC_PROCEED": "更新中", |
| 2430 | + "IBMC_AUTOMATIC_STAGED": "ステージング", | ||
| 2427 | "IBMC_AUTOMATIC_WAITING": "待機中", | 2431 | "IBMC_AUTOMATIC_WAITING": "待機中", |
| 2428 | "IBMC_AUTOMATIC_RETRY": "再試行", | 2432 | "IBMC_AUTOMATIC_RETRY": "再試行", |
| 2429 | "IBMC_AUTOMATIC_DAY": " 日", | 2433 | "IBMC_AUTOMATIC_DAY": " 日", |
| @@ -2469,6 +2473,10 @@ | |||
| 2469 | "IBMC_LCN_PATCH_VERSION": "LinkBoard{boardIndex}ソフトウェアパッチ", | 2473 | "IBMC_LCN_PATCH_VERSION": "LinkBoard{boardIndex}ソフトウェアパッチ", |
| 2470 | "IBMC_UP_COMPROCESSOR_FIRMWARE_UPGRADE_FAILED": "BMCコプロセッサファームウェアのアップグレードに失敗しました。", | 2474 | "IBMC_UP_COMPROCESSOR_FIRMWARE_UPGRADE_FAILED": "BMCコプロセッサファームウェアのアップグレードに失敗しました。", |
| 2471 | "IBMC_UP_COMM_FILE_TOO_EARLY": "アップグレードパッケージのバージョンが古すぎます。", | 2475 | "IBMC_UP_COMM_FILE_TOO_EARLY": "アップグレードパッケージのバージョンが古すぎます。", |
| 2476 | + "IBMC_UP_STAGE_FAILED": "ステージングに失敗しました。", | ||
| 2477 | + "IBMC_UP_STAGE_SUCCEED": "ステージングに成功しました。", | ||
| 2478 | + "IBMC_UP_DELETE_STAGE_FAILED": "ステージングされたファームウェアの削除に失敗しました。", | ||
| 2479 | + "IBMC_UP_DELETE_STAGE_SUCCEED": "ステージングされたファームウェアが削除されました。", | ||
| 2472 | "IBMC_UP_POWER_SUPPLY_INSUFFICIENT": "電力供給が不足しています。", | 2480 | "IBMC_UP_POWER_SUPPLY_INSUFFICIENT": "電力供給が不足しています。", |
| 2473 | "IBMC_UP_VRD_UPGRADE_IS_IN_PROGRESS": "VRDが検証中のため、MCUまたはVRDをアップグレードできません。", | 2481 | "IBMC_UP_VRD_UPGRADE_IS_IN_PROGRESS": "VRDが検証中のため、MCUまたはVRDをアップグレードできません。", |
| 2474 | "IBMC_UPGRADE_TASK_TTITLE": "タスクキュー", | 2482 | "IBMC_UPGRADE_TASK_TTITLE": "タスクキュー", |
| @@ -2933,6 +2941,7 @@ | |||
| 2933 | "UPDATE_STATUS": "状態", | 2941 | "UPDATE_STATUS": "状態", |
| 2934 | "UPDATE_PROGRESS": "進行状況", | 2942 | "UPDATE_PROGRESS": "進行状況", |
| 2935 | "UPDATE_PACKAGE_NAME": "ファームウェアパッケージの名前", | 2943 | "UPDATE_PACKAGE_NAME": "ファームウェアパッケージの名前", |
| 2944 | + "UPDATE_VERSION": "バージョン", | ||
| 2936 | "UPDATE_RESULT_DETAIL": "結果の詳細", | 2945 | "UPDATE_RESULT_DETAIL": "結果の詳細", |
| 2937 | "UPDATE_BE_UPGRADED": "アップグレード待ち", | 2946 | "UPDATE_BE_UPGRADED": "アップグレード待ち", |
| 2938 | "UPDATE_NEXT": "次ヘ", | 2947 | "UPDATE_NEXT": "次ヘ", |
| @@ -859,6 +859,9 @@ | |||
| 859 | "IBMC_FIMWARE_TIP_INFO": "Для применения встроенного ПО после завершения обновления {softwareName} или контроллера SD карт будет выполнен перезапуск {softwareName}. Если обновление BIOS или CPLD или VRD производится во время работы операционной системы, обновление BIOS вступит в силу после отключения и повторного включения питания либо перезагрузки ОС; обновление CPLD или VRD вступит в силу после отключения и повторного включения питания ОС.", | 859 | "IBMC_FIMWARE_TIP_INFO": "Для применения встроенного ПО после завершения обновления {softwareName} или контроллера SD карт будет выполнен перезапуск {softwareName}. Если обновление BIOS или CPLD или VRD производится во время работы операционной системы, обновление BIOS вступит в силу после отключения и повторного включения питания либо перезагрузки ОС; обновление CPLD или VRD вступит в силу после отключения и повторного включения питания ОС.", |
| 860 | "IBMC_FIMWARE_UPDATE_TIP": "Не отключайте и не перезапускайте систему во время обновления.", | 860 | "IBMC_FIMWARE_UPDATE_TIP": "Не отключайте и не перезапускайте систему во время обновления.", |
| 861 | "IBMC_UPGRADE_CONGIF_BTN": "Обновить", | 861 | "IBMC_UPGRADE_CONGIF_BTN": "Обновить", |
| 862 | + "IBMC_UPGRADE_TEMP_STORAGE_BTN": "Этап", | ||
| 863 | + "IBMC_UPGRADE_STAGED_FIRMWARE_BTN": "Обновить промежуточную прошивку", | ||
| 864 | + "IBMC_DELETE_STAGED_FIRMWARE_BTN": "Удалить промежуточную прошивку", | ||
| 862 | "IBMC_FIMWARE_UPDATE_FIND": "Встроенное ПО обновлено.", | 865 | "IBMC_FIMWARE_UPDATE_FIND": "Встроенное ПО обновлено.", |
| 863 | "IBMC_FIMWARE_FAILED": "Не удалось завершить обновления", | 866 | "IBMC_FIMWARE_FAILED": "Не удалось завершить обновления", |
| 864 | "IBMC_AFTER_REBOOT": "Файл обновления успешно загружен. Обновление вступает в силу после выключения или перезапуска системы.", | 867 | "IBMC_AFTER_REBOOT": "Файл обновления успешно загружен. Обновление вступает в силу после выключения или перезапуска системы.", |
| @@ -2429,6 +2432,7 @@ | |||
| 2429 | "IBMC_AUTOMATIC_SUCCESS": "Выполнено", | 2432 | "IBMC_AUTOMATIC_SUCCESS": "Выполнено", |
| 2430 | "IBMC_AUTOMATIC_FAILED": "Сбой", | 2433 | "IBMC_AUTOMATIC_FAILED": "Сбой", |
| 2431 | "IBMC_AUTOMATIC_PROCEED": "Обновление", | 2434 | "IBMC_AUTOMATIC_PROCEED": "Обновление", |
| 2435 | + "IBMC_AUTOMATIC_STAGED": "Промежуточная", | ||
| 2432 | "IBMC_AUTOMATIC_WAITING": "Ожидание", | 2436 | "IBMC_AUTOMATIC_WAITING": "Ожидание", |
| 2433 | "IBMC_AUTOMATIC_RETRY": "Повторить", | 2437 | "IBMC_AUTOMATIC_RETRY": "Повторить", |
| 2434 | "IBMC_AUTOMATIC_DAY": " Дн.", | 2438 | "IBMC_AUTOMATIC_DAY": " Дн.", |
| @@ -2474,6 +2478,10 @@ | |||
| 2474 | "IBMC_LCN_PATCH_VERSION": "Патч для ПО LinkBoard{boardIndex}", | 2478 | "IBMC_LCN_PATCH_VERSION": "Патч для ПО LinkBoard{boardIndex}", |
| 2475 | "IBMC_UP_COMPROCESSOR_FIRMWARE_UPGRADE_FAILED": "Сбой обновления бстроенного ПО сопроцессора BMC.", | 2479 | "IBMC_UP_COMPROCESSOR_FIRMWARE_UPGRADE_FAILED": "Сбой обновления бстроенного ПО сопроцессора BMC.", |
| 2476 | "IBMC_UP_COMM_FILE_TOO_EARLY": "Версия пакета обновления слишком старая.", | 2480 | "IBMC_UP_COMM_FILE_TOO_EARLY": "Версия пакета обновления слишком старая.", |
| 2481 | + "IBMC_UP_STAGE_FAILED": "Сбой подготовки.", | ||
| 2482 | + "IBMC_UP_STAGE_SUCCEED": "Подготовка выполнена.", | ||
| 2483 | + "IBMC_UP_DELETE_STAGE_FAILED": "Сбой удаления подготовленного встроенного ПО.", | ||
| 2484 | + "IBMC_UP_DELETE_STAGE_SUCCEED": "Подготовленное встроенное ПО удалено.", | ||
| 2477 | "IBMC_UP_POWER_SUPPLY_INSUFFICIENT": "Недостаточный источник питания.", | 2485 | "IBMC_UP_POWER_SUPPLY_INSUFFICIENT": "Недостаточный источник питания.", |
| 2478 | "IBMC_UP_VRD_UPGRADE_IS_IN_PROGRESS": "Невозможно обновить MCU или VRD, так как выполняется проверка VRD.", | 2486 | "IBMC_UP_VRD_UPGRADE_IS_IN_PROGRESS": "Невозможно обновить MCU или VRD, так как выполняется проверка VRD.", |
| 2479 | "IBMC_UPGRADE_TASK_TTITLE": "Очередь заданий", | 2487 | "IBMC_UPGRADE_TASK_TTITLE": "Очередь заданий", |
| @@ -2938,6 +2946,7 @@ | |||
| 2938 | "UPDATE_STATUS": "Статус", | 2946 | "UPDATE_STATUS": "Статус", |
| 2939 | "UPDATE_PROGRESS": "Прогресс", | 2947 | "UPDATE_PROGRESS": "Прогресс", |
| 2940 | "UPDATE_PACKAGE_NAME": "Имя пакета встроенного ПО", | 2948 | "UPDATE_PACKAGE_NAME": "Имя пакета встроенного ПО", |
| 2949 | + "UPDATE_VERSION": "версия", | ||
| 2941 | "UPDATE_RESULT_DETAIL": "Сведения о результате", | 2950 | "UPDATE_RESULT_DETAIL": "Сведения о результате", |
| 2942 | "UPDATE_BE_UPGRADED": "Ожидает обновления", | 2951 | "UPDATE_BE_UPGRADED": "Ожидает обновления", |
| 2943 | "UPDATE_NEXT": "Далее", | 2952 | "UPDATE_NEXT": "Далее", |
| @@ -863,6 +863,9 @@ | |||
| 863 | "IBMC_FIMWARE_TIP_INFO": "在{softwareName}或SD卡控制器固件升级完成之后,{softwareName}会自动重启使升级的固件生效。如果在系统上电状态时升级BIOS或CPLD或VRD,则BIOS在系统下电再上电或重启后生效,CPLD、VRD在系统下电后生效。", | 863 | "IBMC_FIMWARE_TIP_INFO": "在{softwareName}或SD卡控制器固件升级完成之后,{softwareName}会自动重启使升级的固件生效。如果在系统上电状态时升级BIOS或CPLD或VRD,则BIOS在系统下电再上电或重启后生效,CPLD、VRD在系统下电后生效。", |
| 864 | "IBMC_FIMWARE_UPDATE_TIP": "升级过程中请勿断电,请勿重启。", | 864 | "IBMC_FIMWARE_UPDATE_TIP": "升级过程中请勿断电,请勿重启。", |
| 865 | "IBMC_UPGRADE_CONGIF_BTN": "开始升级", | 865 | "IBMC_UPGRADE_CONGIF_BTN": "开始升级", |
| 866 | + "IBMC_UPGRADE_TEMP_STORAGE_BTN": "开始暂存", | ||
| 867 | + "IBMC_UPGRADE_STAGED_FIRMWARE_BTN": "升级暂存固件", | ||
| 868 | + "IBMC_DELETE_STAGED_FIRMWARE_BTN": "删除暂存固件", | ||
| 866 | "IBMC_FIMWARE_UPDATE_FIND": "升级成功", | 869 | "IBMC_FIMWARE_UPDATE_FIND": "升级成功", |
| 867 | "IBMC_FIMWARE_FAILED": "升级失败", | 870 | "IBMC_FIMWARE_FAILED": "升级失败", |
| 868 | "IBMC_AFTER_REBOOT": "上传升级文件成功,下次系统下电或重启生效", | 871 | "IBMC_AFTER_REBOOT": "上传升级文件成功,下次系统下电或重启生效", |
| @@ -881,6 +884,10 @@ | |||
| 881 | "IBMC_UP_FIRMWARE_ERR_RETRY": "设备上电中,暂时不能执行固件升级。", | 884 | "IBMC_UP_FIRMWARE_ERR_RETRY": "设备上电中,暂时不能执行固件升级。", |
| 882 | "IBMC_UP_COMPROCESSOR_FIRMWARE_UPGRADE_FAILED": "BMC协处理器升级失败。", | 885 | "IBMC_UP_COMPROCESSOR_FIRMWARE_UPGRADE_FAILED": "BMC协处理器升级失败。", |
| 883 | "IBMC_UP_COMM_FILE_TOO_EARLY": "过旧的升级包。", | 886 | "IBMC_UP_COMM_FILE_TOO_EARLY": "过旧的升级包。", |
| 887 | + "IBMC_UP_STAGE_FAILED": "暂存失败", | ||
| 888 | + "IBMC_UP_STAGE_SUCCEED": "暂存成功", | ||
| 889 | + "IBMC_UP_DELETE_STAGE_FAILED": "删除暂存固件失败", | ||
| 890 | + "IBMC_UP_DELETE_STAGE_SUCCEED": "删除暂存固件成功", | ||
| 884 | "IBMC_UP_POWER_SUPPLY_INSUFFICIENT": "电源供电不足", | 891 | "IBMC_UP_POWER_SUPPLY_INSUFFICIENT": "电源供电不足", |
| 885 | "IBMC_UP_VRD_UPGRADE_IS_IN_PROGRESS": "VRD正在生效,无法升级MCU或VRD", | 892 | "IBMC_UP_VRD_UPGRADE_IS_IN_PROGRESS": "VRD正在生效,无法升级MCU或VRD", |
| 886 | "IBMC_FIMWARE_ERROR_MSG": "升级失败。", | 893 | "IBMC_FIMWARE_ERROR_MSG": "升级失败。", |
| @@ -2434,6 +2441,7 @@ | |||
| 2434 | "IBMC_AUTOMATIC_SUCCESS": "已完成", | 2441 | "IBMC_AUTOMATIC_SUCCESS": "已完成", |
| 2435 | "IBMC_AUTOMATIC_FAILED": "失败", | 2442 | "IBMC_AUTOMATIC_FAILED": "失败", |
| 2436 | "IBMC_AUTOMATIC_PROCEED": "升级中", | 2443 | "IBMC_AUTOMATIC_PROCEED": "升级中", |
| 2444 | + "IBMC_AUTOMATIC_STAGED": "暂存", | ||
| 2437 | "IBMC_AUTOMATIC_WAITING": "等待", | 2445 | "IBMC_AUTOMATIC_WAITING": "等待", |
| 2438 | "IBMC_AUTOMATIC_RETRY": "重试", | 2446 | "IBMC_AUTOMATIC_RETRY": "重试", |
| 2439 | "IBMC_AUTOMATIC_DAY": " 天", | 2447 | "IBMC_AUTOMATIC_DAY": " 天", |
| @@ -2942,6 +2950,7 @@ | |||
| 2942 | "UPDATE_STATUS": "升级状态", | 2950 | "UPDATE_STATUS": "升级状态", |
| 2943 | "UPDATE_PROGRESS": "升级进度", | 2951 | "UPDATE_PROGRESS": "升级进度", |
| 2944 | "UPDATE_PACKAGE_NAME": "固件包名称", | 2952 | "UPDATE_PACKAGE_NAME": "固件包名称", |
| 2953 | + "UPDATE_VERSION": "版本号", | ||
| 2945 | "UPDATE_RESULT_DETAIL": "结果详情", | 2954 | "UPDATE_RESULT_DETAIL": "结果详情", |
| 2946 | "UPDATE_BE_UPGRADED": "待升级", | 2955 | "UPDATE_BE_UPGRADED": "待升级", |
| 2947 | "UPDATE_NEXT": "下一步", | 2956 | "UPDATE_NEXT": "下一步", |
| @@ -42,6 +42,8 @@ export interface ITableStep2 { | |||
| 42 | firmwareName: string; | 42 | firmwareName: string; |
| 43 | description: string; | 43 | description: string; |
| 44 | eta?: number; | 44 | eta?: number; |
| 45 | + firmwareId?: string; | ||
| 46 | + version?: string; | ||
| 45 | } | 47 | } |
| 46 | 48 | ||
| 47 | export interface ITableStep3 { | 49 | export interface ITableStep3 { |
| @@ -49,4 +51,5 @@ export interface ITableStep3 { | |||
| 49 | firmwareType: string; | 51 | firmwareType: string; |
| 50 | activeStatus: string; | 52 | activeStatus: string; |
| 51 | activeAction: string; | 53 | activeAction: string; |
| 54 | + version?: string; | ||
| 52 | } | 55 | } |
| @@ -46,12 +46,17 @@ const columns: ITableColumns[] = [ | |||
| 46 | { | 46 | { |
| 47 | title: 'UPDATE_FIRMWARE_TYPE', | 47 | title: 'UPDATE_FIRMWARE_TYPE', |
| 48 | width: '35%', | 48 | width: '35%', |
| 49 | - content: 'firmwareType' | 49 | + content: 'firmwareType', |
| 50 | + }, | ||
| 51 | + { | ||
| 52 | + title: 'UPDATE_VERSION', | ||
| 53 | + width: '20%', | ||
| 54 | + content: 'version', | ||
| 50 | }, | 55 | }, |
| 51 | { | 56 | { |
| 52 | title: 'UPDATE_ACTIVE_STATUS', | 57 | title: 'UPDATE_ACTIVE_STATUS', |
| 53 | width: '35%', | 58 | width: '35%', |
| 54 | - content: 'activeStatus' | 59 | + content: 'activeStatus', |
| 55 | }, | 60 | }, |
| 56 | { | 61 | { |
| 57 | title: 'UPDATE_ACTIVE_OPERATION', | 62 | title: 'UPDATE_ACTIVE_OPERATION', |
| @@ -178,7 +183,8 @@ function getTableInfo(res: any) { | |||
| 178 | id: index + 1, | 183 | id: index + 1, |
| 179 | firmwareType: tempData[index].FirmwareType, | 184 | firmwareType: tempData[index].FirmwareType, |
| 180 | activeStatus: tempData[index].ActiveStatus, | 185 | activeStatus: tempData[index].ActiveStatus, |
| 181 | - activeAction: tempData[index].ActiveAction | 186 | + activeAction: tempData[index].ActiveAction, |
| 187 | + version: tempData[index].Version ?? '--', | ||
| 182 | }); | 188 | }); |
| 183 | } | 189 | } |
| 184 | let arr = tempData.filter((item: any) => item.ActiveStatus === 'Activating'); | 190 | let arr = tempData.filter((item: any) => item.ActiveStatus === 'Activating'); |
| @@ -15,6 +15,8 @@ import { | |||
| 15 | queryParallelUpdateProgress, | 15 | queryParallelUpdateProgress, |
| 16 | reauth, | 16 | reauth, |
| 17 | importParallelUpdate, | 17 | importParallelUpdate, |
| 18 | + upgradeStaged, | ||
| 19 | + deleteStaged, | ||
| 18 | } from '../../upgrade.services'; | 20 | } from '../../upgrade.services'; |
| 19 | import Date from '@/utils/date'; | 21 | import Date from '@/utils/date'; |
| 20 | import { checkPrivil } from '@/apps/app-bmc/router/routes'; | 22 | import { checkPrivil } from '@/apps/app-bmc/router/routes'; |
| @@ -35,8 +37,12 @@ const multihost = computed(() => getStoreData('loct', 'multihost')); | |||
| 35 | const productLabel = store.state.loct.sn; | 37 | const productLabel = store.state.loct.sn; |
| 36 | const loct: any = localStorage.getItem('loct'); | 38 | const loct: any = localStorage.getItem('loct'); |
| 37 | const dialogRef = ref(); | 39 | const dialogRef = ref(); |
| 40 | +const stagedDialogRef = ref(); | ||
| 38 | const tipRef = ref(); | 41 | const tipRef = ref(); |
| 39 | const uploadRef = ref(); | 42 | const uploadRef = ref(); |
| 43 | +const isStage = ref(false); | ||
| 44 | +const isUpgrade = ref(false); | ||
| 45 | +const selectedStageFirmware = ref<ITableStep2[]>([]); | ||
| 40 | const currentPage = ref(1); | 46 | const currentPage = ref(1); |
| 41 | const pageSize = ref(10); | 47 | const pageSize = ref(10); |
| 42 | let hpmUpload: any = null; | 48 | let hpmUpload: any = null; |
| @@ -48,6 +54,7 @@ const uploadDisabled = ref(false); | |||
| 48 | const taskUrl = ref(''); | 54 | const taskUrl = ref(''); |
| 49 | const progress = ref(0); | 55 | const progress = ref(0); |
| 50 | // 升级进度查询 | 56 | // 升级进度查询 |
| 57 | +let checkClearTimeout: ReturnType<typeof setTimeout> | null = null; | ||
| 51 | let taskInterval: any = null; | 58 | let taskInterval: any = null; |
| 52 | let taskStateErrorAmount = 0; | 59 | let taskStateErrorAmount = 0; |
| 53 | // 记录网络失败次数 | 60 | // 记录网络失败次数 |
| @@ -112,6 +119,11 @@ const columns: ITableColumns[] = [ | |||
| 112 | width: '10%', | 119 | width: '10%', |
| 113 | content: 'firmwareName', | 120 | content: 'firmwareName', |
| 114 | }, | 121 | }, |
| 122 | + { | ||
| 123 | + title: 'UPDATE_VERSION', | ||
| 124 | + width: '10%', | ||
| 125 | + content: 'version', | ||
| 126 | + }, | ||
| 115 | { | 127 | { |
| 116 | title: 'UPDATE_RESULT_DETAIL', | 128 | title: 'UPDATE_RESULT_DETAIL', |
| 117 | width: '10%', | 129 | width: '10%', |
| @@ -239,7 +251,7 @@ async function beginImportUpgradeFile(name: any) { | |||
| 239 | progress.value = 0; | 251 | progress.value = 0; |
| 240 | const importAction = mode.value ? importParallelUpdate : importUpgradeFile; | 252 | const importAction = mode.value ? importParallelUpdate : importUpgradeFile; |
| 241 | try { | 253 | try { |
| 242 | - taskUrl.value = (await importAction(name, configSelected.value))?.data?.url; | 254 | + taskUrl.value = (await importAction(name, configSelected.value, isStage.value))?.data?.url; |
| 243 | onUpgrade.value = false; | 255 | onUpgrade.value = false; |
| 244 | elNotification.closeAll(); | 256 | elNotification.closeAll(); |
| 245 | elNotification({ | 257 | elNotification({ |
| @@ -264,7 +276,7 @@ async function beginImportUpgradeFile(name: any) { | |||
| 264 | bmcUpdating = true; | 276 | bmcUpdating = true; |
| 265 | }); | 277 | }); |
| 266 | } | 278 | } |
| 267 | - } catch (err) { | 279 | + } catch (err: any) { |
| 268 | onUpgrade.value = false; | 280 | onUpgrade.value = false; |
| 269 | elNotification.closeAll(); | 281 | elNotification.closeAll(); |
| 270 | uploadRef.value.clear(); | 282 | uploadRef.value.clear(); |
| @@ -281,26 +293,26 @@ async function beginImportUpgradeFile(name: any) { | |||
| 281 | } | 293 | } |
| 282 | } | 294 | } |
| 283 | } | 295 | } |
| 284 | - | 296 | + |
| 285 | // 升级前确认弹窗 | 297 | // 升级前确认弹窗 |
| 286 | const dialogConfig = reactive({ | 298 | const dialogConfig = reactive({ |
| 287 | id: '', | 299 | id: '', |
| 288 | content: traduction('COMMON_ASK_OK'), | 300 | content: traduction('COMMON_ASK_OK'), |
| 289 | title: traduction('ALARM_OK'), | 301 | title: traduction('ALARM_OK'), |
| 290 | }); | 302 | }); |
| 291 | - | 303 | + |
| 292 | const tipConfig = { | 304 | const tipConfig = { |
| 293 | id: 'tipConfig', | 305 | id: 'tipConfig', |
| 294 | content: traduction('COMMON_ASK_OK'), | 306 | content: traduction('COMMON_ASK_OK'), |
| 295 | title: traduction('ALARM_OK'), | 307 | title: traduction('ALARM_OK'), |
| 296 | }; | 308 | }; |
| 297 | - | 309 | + |
| 298 | const user = { | 310 | const user = { |
| 299 | loginWithoutPassword: getStoreData('loct', 'nopwd') || false, | 311 | loginWithoutPassword: getStoreData('loct', 'nopwd') || false, |
| 300 | }; | 312 | }; |
| 301 | let minPwdLength: number = 8; | 313 | let minPwdLength: number = 8; |
| 302 | const loginWithoutPassword = ref(user.loginWithoutPassword); | 314 | const loginWithoutPassword = ref(user.loginWithoutPassword); |
| 303 | - | 315 | + |
| 304 | const secondRef = ref(); | 316 | const secondRef = ref(); |
| 305 | function resetDialog() { | 317 | function resetDialog() { |
| 306 | if (configSelected.value === 'no' && !mode.value) { | 318 | if (configSelected.value === 'no' && !mode.value) { |
| @@ -320,7 +332,63 @@ function confirmReset(param: { reason: boolean; password: string }) { | |||
| 320 | startToUpload(param.password); | 332 | startToUpload(param.password); |
| 321 | } | 333 | } |
| 322 | } | 334 | } |
| 323 | - | 335 | + |
| 336 | +function upgrade(): void { | ||
| 337 | + isStage.value = false; | ||
| 338 | + resetDialog(); | ||
| 339 | +} | ||
| 340 | + | ||
| 341 | +function tempStorage(): void { | ||
| 342 | + isStage.value = true; | ||
| 343 | + resetDialog(); | ||
| 344 | +} | ||
| 345 | + | ||
| 346 | +function upgradeStagedFirmware(): void { | ||
| 347 | + isUpgrade.value = true; | ||
| 348 | + stagedDialogRef.value.show(); | ||
| 349 | +} | ||
| 350 | + | ||
| 351 | +function deleteStagedFirmware(): void { | ||
| 352 | + isUpgrade.value = false; | ||
| 353 | + stagedDialogRef.value.show(); | ||
| 354 | +} | ||
| 355 | + | ||
| 356 | +async function stagedFirmwareOperation(reason: boolean): Promise<void> { | ||
| 357 | + if (!reason) { | ||
| 358 | + stagedDialogRef.value.hide(); | ||
| 359 | + return; | ||
| 360 | + } | ||
| 361 | + try { | ||
| 362 | + if (isUpgrade.value) { | ||
| 363 | + await upgradeStaged(selectedStageFirmware.value.map(item => item.firmwareId ?? '')); | ||
| 364 | + } else { | ||
| 365 | + await deleteStaged(selectedStageFirmware.value.map(item => item.firmwareId ?? '')); | ||
| 366 | + } | ||
| 367 | + elNotification.closeAll(); | ||
| 368 | + if (!taskInterval) { | ||
| 369 | + await queryParallelTask(); | ||
| 370 | + } else { | ||
| 371 | + nextTick(() => { | ||
| 372 | + elNotification({ | ||
| 373 | + title: traduction('IBMC_AUTOMATIC_PROCEED'), | ||
| 374 | + message: traduction('IBMC_FIMWARE_UPDATE_TIP'), | ||
| 375 | + icon: UploadingIcon as any, | ||
| 376 | + position: 'bottom-right', | ||
| 377 | + duration: 0, | ||
| 378 | + offset: 10, | ||
| 379 | + }); | ||
| 380 | + bmcUpdating = true; | ||
| 381 | + }); | ||
| 382 | + } | ||
| 383 | + } catch (err: any) { | ||
| 384 | + const errorId = getMessageId(err.data); | ||
| 385 | + const errorMsg = getErrorTranslate(errorId[0]?.code as string) || traduction('COMMON_FAILED'); | ||
| 386 | + showElMessage('error', errorMsg); | ||
| 387 | + } finally { | ||
| 388 | + stagedDialogRef.value.hide(); | ||
| 389 | + } | ||
| 390 | +} | ||
| 391 | + | ||
| 324 | function startToUpload(key?: string) { | 392 | function startToUpload(key?: string) { |
| 325 | // 点击确定后,开始升级,并将进度清0, 升级状态复位, 升级失败次数重置 | 393 | // 点击确定后,开始升级,并将进度清0, 升级状态复位, 升级失败次数重置 |
| 326 | progress.value = 10; | 394 | progress.value = 10; |
| @@ -483,14 +551,16 @@ async function queryParallelTask() { | |||
| 483 | firmwareName: item.FileName ?? '--', | 551 | firmwareName: item.FileName ?? '--', |
| 484 | description: errCode ? getErrMsg(errCode) : '--', | 552 | description: errCode ? getErrMsg(errCode) : '--', |
| 485 | eta: item.EstimatedRemainingTime, | 553 | eta: item.EstimatedRemainingTime, |
| 554 | + firmwareId: item.FirmwareId ?? '', | ||
| 555 | + version: item.Version ?? '--', | ||
| 486 | }; | 556 | }; |
| 487 | if (task.state === 'Completed') { | 557 | if (task.state === 'Completed') { |
| 488 | - task.description = traduction(getSuccessMessage(task.name)); | 558 | + task.description = errCode === 0 ? traduction(getSuccessMessage(task.name)) : getErrMsg(errCode); |
| 489 | } | 559 | } |
| 490 | tableData.push(task); | 560 | tableData.push(task); |
| 491 | }); | 561 | }); |
| 492 | filterTable(); | 562 | filterTable(); |
| 493 | - setStoreData('glob', 'isUpgrading', !tableData.every(item => ['Exception', 'Completed'].includes(item.state))); | 563 | + setStoreData('glob', 'isUpgrading', !tableData.every(item => ['Exception', 'Completed', 'Staged'].includes(item.state))); |
| 494 | uploadDisabled.value = !mode.value || isSystemLock.value; | 564 | uploadDisabled.value = !mode.value || isSystemLock.value; |
| 495 | uploadConfig.disabled = !mode.value || isSystemLock.value; | 565 | uploadConfig.disabled = !mode.value || isSystemLock.value; |
| 496 | retainedDisabled.value = true; | 566 | retainedDisabled.value = true; |
| @@ -509,8 +579,8 @@ async function queryParallelTask() { | |||
| 509 | } | 579 | } |
| 510 | bmcUpdating = true; | 580 | bmcUpdating = true; |
| 511 | taskInterval = setTimeout(queryParallelTask, 2000); | 581 | taskInterval = setTimeout(queryParallelTask, 2000); |
| 512 | - } else if (tableData.every(item => item.state === 'Completed')) { | 582 | + } else if (tableData.length > 0 && tableData.every(item => item.state === 'Completed')) { |
| 513 | - taskParallelCompleted(); | 583 | + taskParallelCompleted(); |
| 514 | } else { | 584 | } else { |
| 515 | clearQueryProgress(); | 585 | clearQueryProgress(); |
| 516 | elNotification.closeAll(); | 586 | elNotification.closeAll(); |
| @@ -521,8 +591,16 @@ async function queryParallelTask() { | |||
| 521 | uploadConfig.disabled = isSystemLock.value; | 591 | uploadConfig.disabled = isSystemLock.value; |
| 522 | uploadRef.value.clear(); | 592 | uploadRef.value.clear(); |
| 523 | } | 593 | } |
| 594 | + | ||
| 595 | + if (tableData.some(item => ['Completed', 'Exception'].includes(item.state))) { | ||
| 596 | + checkClearTimeout = setTimeout(async () => { | ||
| 597 | + await queryParallelTask(); | ||
| 598 | + clearTimeout(checkClearTimeout!); | ||
| 599 | + checkClearTimeout = null; | ||
| 600 | + }, 15000); | ||
| 601 | + } | ||
| 524 | } | 602 | } |
| 525 | - | 603 | + |
| 526 | // 记录升级失败日志 | 604 | // 记录升级失败日志 |
| 527 | function recordUpgradeErrorLogs(errorMsg: string) { | 605 | function recordUpgradeErrorLogs(errorMsg: string) { |
| 528 | const upgradeError = JSON.parse(localStorage.getItem('upgradeError') as string) || {}; | 606 | const upgradeError = JSON.parse(localStorage.getItem('upgradeError') as string) || {}; |
| @@ -530,7 +608,7 @@ function recordUpgradeErrorLogs(errorMsg: string) { | |||
| 530 | upgradeError[curTime] = errorMsg; | 608 | upgradeError[curTime] = errorMsg; |
| 531 | localStorage.setItem('upgradeError', JSON.stringify(upgradeError)); | 609 | localStorage.setItem('upgradeError', JSON.stringify(upgradeError)); |
| 532 | } | 610 | } |
| 533 | - | 611 | + |
| 534 | // 清除定时查询任务 | 612 | // 清除定时查询任务 |
| 535 | function clearQueryProgress() { | 613 | function clearQueryProgress() { |
| 536 | if (taskInterval) { | 614 | if (taskInterval) { |
| @@ -538,7 +616,7 @@ function clearQueryProgress() { | |||
| 538 | taskInterval = null; | 616 | taskInterval = null; |
| 539 | } | 617 | } |
| 540 | } | 618 | } |
| 541 | - | 619 | + |
| 542 | function getErrMsg(errorCode: number): string { | 620 | function getErrMsg(errorCode: number): string { |
| 543 | let msg = traduction('IBMC_FIMWARE_FAILED'); | 621 | let msg = traduction('IBMC_FIMWARE_FAILED'); |
| 544 | switch (errorCode) { | 622 | switch (errorCode) { |
| @@ -584,6 +662,18 @@ function getErrMsg(errorCode: number): string { | |||
| 584 | case 70: | 662 | case 70: |
| 585 | msg = traduction('IBMC_UP_COMM_FILE_TOO_EARLY'); | 663 | msg = traduction('IBMC_UP_COMM_FILE_TOO_EARLY'); |
| 586 | break; | 664 | break; |
| 665 | + case 73: | ||
| 666 | + msg = traduction('IBMC_UP_STAGE_FAILED'); | ||
| 667 | + break; | ||
| 668 | + case 74: | ||
| 669 | + msg = traduction('IBMC_UP_STAGE_SUCCEED'); | ||
| 670 | + break; | ||
| 671 | + case 75: | ||
| 672 | + msg = traduction('IBMC_UP_DELETE_STAGE_FAILED'); | ||
| 673 | + break; | ||
| 674 | + case 76: | ||
| 675 | + msg = traduction('IBMC_UP_DELETE_STAGE_SUCCEED'); | ||
| 676 | + break; | ||
| 587 | case 205: | 677 | case 205: |
| 588 | msg = traduction('IBMC_UP_POWER_SUPPLY_INSUFFICIENT'); | 678 | msg = traduction('IBMC_UP_POWER_SUPPLY_INSUFFICIENT'); |
| 589 | break; | 679 | break; |
| @@ -597,7 +687,7 @@ function getErrMsg(errorCode: number): string { | |||
| 597 | recordUpgradeErrorLogs(msg); | 687 | recordUpgradeErrorLogs(msg); |
| 598 | return msg; | 688 | return msg; |
| 599 | } | 689 | } |
| 600 | - | 690 | + |
| 601 | // 固件升级状态提示 | 691 | // 固件升级状态提示 |
| 602 | function displayUpgradeState(state: 'success' | 'failed' | 'clear', msg: string) { | 692 | function displayUpgradeState(state: 'success' | 'failed' | 'clear', msg: string) { |
| 603 | elNotification.closeAll(); | 693 | elNotification.closeAll(); |
| @@ -608,7 +698,7 @@ function displayUpgradeState(state: 'success' | 'failed' | 'clear', msg: string) | |||
| 608 | showElMessage('success', traduction('IBMC_FIMWARE_UPDATE_FIND')); | 698 | showElMessage('success', traduction('IBMC_FIMWARE_UPDATE_FIND')); |
| 609 | } | 699 | } |
| 610 | } | 700 | } |
| 611 | - | 701 | + |
| 612 | function init() { | 702 | function init() { |
| 613 | if (upgradeActiveModeSupported.value && activeMode.value) { | 703 | if (upgradeActiveModeSupported.value && activeMode.value) { |
| 614 | configRadioDisabled.value = true; | 704 | configRadioDisabled.value = true; |
| @@ -616,20 +706,20 @@ function init() { | |||
| 616 | configSelected.value = 'yes'; | 706 | configSelected.value = 'yes'; |
| 617 | configRadioDisabled.value = isSystemLock.value; | 707 | configRadioDisabled.value = isSystemLock.value; |
| 618 | } | 708 | } |
| 619 | - | 709 | + |
| 620 | modeDisabled.value = true; | 710 | modeDisabled.value = true; |
| 621 | queryParallelTask(); | 711 | queryParallelTask(); |
| 622 | } | 712 | } |
| 623 | - | 713 | + |
| 624 | function next() { | 714 | function next() { |
| 625 | emits('nextStep'); | 715 | emits('nextStep'); |
| 626 | } | 716 | } |
| 627 | - | 717 | + |
| 628 | function handlePageChange(page: number) { | 718 | function handlePageChange(page: number) { |
| 629 | currentPage.value = page; | 719 | currentPage.value = page; |
| 630 | filterTable(); | 720 | filterTable(); |
| 631 | } | 721 | } |
| 632 | - | 722 | + |
| 633 | onMounted(() => { | 723 | onMounted(() => { |
| 634 | init(); | 724 | init(); |
| 635 | }); | 725 | }); |
| @@ -641,9 +731,14 @@ onBeforeUnmount(() => { | |||
| 641 | onUnmounted(() => { | 731 | onUnmounted(() => { |
| 642 | clearQueryProgress(); | 732 | clearQueryProgress(); |
| 643 | elNotification.closeAll(); | 733 | elNotification.closeAll(); |
| 734 | + | ||
| 735 | + if (checkClearTimeout) { | ||
| 736 | + clearTimeout(checkClearTimeout); | ||
| 737 | + checkClearTimeout = null; | ||
| 738 | + } | ||
| 644 | }); | 739 | }); |
| 645 | </script> | 740 | </script> |
| 646 | - | 741 | + |
| 647 | <template> | 742 | <template> |
| 648 | <div class="step1-choose-mode"> | 743 | <div class="step1-choose-mode"> |
| 649 | <el-form label-width="auto" label-position="left"> | 744 | <el-form label-width="auto" label-position="left"> |
| @@ -714,19 +809,28 @@ onUnmounted(() => { | |||
| 714 | id="upgradeButton" | 809 | id="upgradeButton" |
| 715 | :disabled="submitDisabled || (onUpgrade && progress !== 100)" | 810 | :disabled="submitDisabled || (onUpgrade && progress !== 100)" |
| 716 | type="primary" | 811 | type="primary" |
| 717 | - @click="resetDialog" | 812 | + @click="upgrade" |
| 718 | > | 813 | > |
| 719 | {{ $t('IBMC_UPGRADE_CONGIF_BTN') }} | 814 | {{ $t('IBMC_UPGRADE_CONGIF_BTN') }} |
| 720 | </el-button> | 815 | </el-button> |
| 816 | + <el-button | ||
| 817 | + id="tempStorageButton" | ||
| 818 | + :disabled="submitDisabled || (onUpgrade && progress !== 100)" | ||
| 819 | + @click="tempStorage" | ||
| 820 | + > | ||
| 821 | + {{ $t('IBMC_UPGRADE_TEMP_STORAGE_BTN') }} | ||
| 822 | + </el-button> | ||
| 823 | + <span id="delimiter"></span> | ||
| 721 | <el-button | 824 | <el-button |
| 722 | id="next" | 825 | id="next" |
| 723 | :disabled="tableData.length !== 0 && | 826 | :disabled="tableData.length !== 0 && |
| 724 | - tableData.some(item => !['Completed', 'Exception'].includes(item.state))" | 827 | + tableData.some(item => !['Completed', 'Exception', 'Staged'].includes(item.state))" |
| 725 | @click="next" | 828 | @click="next" |
| 726 | > | 829 | > |
| 727 | {{ $t('UPDATE_NEXT') }} | 830 | {{ $t('UPDATE_NEXT') }} |
| 728 | </el-button> | 831 | </el-button> |
| 729 | <Dialog ref="dialogRef" :config="dialogConfig" @close="submitUpload"></Dialog> | 832 | <Dialog ref="dialogRef" :config="dialogConfig" @close="submitUpload"></Dialog> |
| 833 | + <Dialog ref="stagedDialogRef" :config="dialogConfig" @close="stagedFirmwareOperation"></Dialog> | ||
| 730 | <!-- 不保留配置项提示弹窗 --> | 834 | <!-- 不保留配置项提示弹窗 --> |
| 731 | <Dialog ref="tipRef" :config="tipConfig" class="config-dialog" @close="tipClose"> | 835 | <Dialog ref="tipRef" :config="tipConfig" class="config-dialog" @close="tipClose"> |
| 732 | <div slot="other"> | 836 | <div slot="other"> |
| @@ -748,14 +852,23 @@ onUnmounted(() => { | |||
| 748 | </el-form> | 852 | </el-form> |
| 749 | <div class="step1-check-status"> | 853 | <div class="step1-check-status"> |
| 750 | <div class="step2-title">{{ $t('UPDATE_FIRMWARE_STATUS') }}</div> | 854 | <div class="step2-title">{{ $t('UPDATE_FIRMWARE_STATUS') }}</div> |
| 751 | - | 855 | + <div class="stageBtnGroup"> |
| 856 | + <el-button :disabled="modeDisabled || isSystemLock || selectedStageFirmware.length === 0" @click="upgradeStagedFirmware"> | ||
| 857 | + {{ $t('IBMC_UPGRADE_STAGED_FIRMWARE_BTN') }} | ||
| 858 | + </el-button> | ||
| 859 | + <el-button :disabled="modeDisabled || isSystemLock || selectedStageFirmware.length === 0" @click="deleteStagedFirmware"> | ||
| 860 | + {{ $t('IBMC_DELETE_STAGED_FIRMWARE_BTN') }} | ||
| 861 | + </el-button> | ||
| 862 | + </div> | ||
| 752 | <div id="upgradeTableBox"> | 863 | <div id="upgradeTableBox"> |
| 753 | <el-table | 864 | <el-table |
| 754 | v-addId.table="'upgradeTable'" | 865 | v-addId.table="'upgradeTable'" |
| 755 | :data="filteredTable" | 866 | :data="filteredTable" |
| 756 | border | 867 | border |
| 757 | resizable | 868 | resizable |
| 869 | + @selection-change="(rows: ITableStep2[]) => selectedStageFirmware = rows" | ||
| 758 | > | 870 | > |
| 871 | + <el-table-column type="selection" width="55" :selectable="(row: ITableStep2) => !isSystemLock && row.state === 'Staged'"></el-table-column> | ||
| 759 | <el-table-column | 872 | <el-table-column |
| 760 | v-for="item in columns" | 873 | v-for="item in columns" |
| 761 | :key="item.title" | 874 | :key="item.title" |
| @@ -764,8 +877,9 @@ onUnmounted(() => { | |||
| 764 | :sortable="item.sortable" | 877 | :sortable="item.sortable" |
| 765 | > | 878 | > |
| 766 | <template #default="scope"> | 879 | <template #default="scope"> |
| 880 | + <span v-if="item.content === 'progress' && scope.row.state === 'Staged'">--</span> | ||
| 767 | <span | 881 | <span |
| 768 | - v-if="item.content === 'progress'" | 882 | + v-else-if="item.content === 'progress' && scope.row.state !== 'Staged'" |
| 769 | :id="item.content + scope.row.index" | 883 | :id="item.content + scope.row.index" |
| 770 | :class="['progress-bar-cell', item.content]" | 884 | :class="['progress-bar-cell', item.content]" |
| 771 | > | 885 | > |
| @@ -790,6 +904,9 @@ onUnmounted(() => { | |||
| 790 | <el-tag v-if="scope.row[item.content] === 'Completed'" type="success"> | 904 | <el-tag v-if="scope.row[item.content] === 'Completed'" type="success"> |
| 791 | {{ $t('IBMC_AUTOMATIC_SUCCESS') }} | 905 | {{ $t('IBMC_AUTOMATIC_SUCCESS') }} |
| 792 | </el-tag> | 906 | </el-tag> |
| 907 | + <el-tag v-else-if="scope.row[item.content] === 'Staged'" type="other"> | ||
| 908 | + {{ $t('IBMC_AUTOMATIC_STAGED') }} | ||
| 909 | + </el-tag> | ||
| 793 | <el-tag v-else-if="scope.row[item.content] === 'Exception'" type="danger"> | 910 | <el-tag v-else-if="scope.row[item.content] === 'Exception'" type="danger"> |
| 794 | {{ $t('IBMC_AUTOMATIC_FAILED') }} | 911 | {{ $t('IBMC_AUTOMATIC_FAILED') }} |
| 795 | </el-tag> | 912 | </el-tag> |
| @@ -834,6 +951,7 @@ $language-widths: ( | |||
| 834 | .step1-check-status { | 951 | .step1-check-status { |
| 835 | height: calc(100% - 221px); | 952 | height: calc(100% - 221px); |
| 836 | #upgradeTableBox { | 953 | #upgradeTableBox { |
| 954 | + margin-top: 14px; | ||
| 837 | height: calc(100% - 112px); | 955 | height: calc(100% - 112px); |
| 838 | } | 956 | } |
| 839 | } | 957 | } |
| @@ -890,39 +1008,39 @@ $language-widths: ( | |||
| 890 | } | 1008 | } |
| 891 | } | 1009 | } |
| 892 | } | 1010 | } |
| 893 | - | 1011 | + |
| 894 | .step2-title { | 1012 | .step2-title { |
| 895 | font-size: 16px; | 1013 | font-size: 16px; |
| 896 | color: #000000; | 1014 | color: #000000; |
| 897 | font-weight: bolder; | 1015 | font-weight: bolder; |
| 898 | line-height: 24px; | 1016 | line-height: 24px; |
| 899 | - margin: 16px 0; | 1017 | + margin: 16px 0 10px 0; |
| 900 | } | 1018 | } |
| 901 | .step2-button { | 1019 | .step2-button { |
| 902 | margin-bottom: 16px; | 1020 | margin-bottom: 16px; |
| 903 | } | 1021 | } |
| 904 | - | 1022 | + |
| 905 | .el-form { | 1023 | .el-form { |
| 906 | margin-top: 16px; | 1024 | margin-top: 16px; |
| 907 | - | 1025 | + |
| 908 | :deep(.el-input) { | 1026 | :deep(.el-input) { |
| 909 | max-width: 320px; | 1027 | max-width: 320px; |
| 910 | } | 1028 | } |
| 911 | } | 1029 | } |
| 912 | - | 1030 | + |
| 913 | .upload-item { | 1031 | .upload-item { |
| 914 | :deep(.el-form-item__content) { | 1032 | :deep(.el-form-item__content) { |
| 915 | display: block; | 1033 | display: block; |
| 916 | - | 1034 | + |
| 917 | .upload-and-res { | 1035 | .upload-and-res { |
| 918 | display: flex; | 1036 | display: flex; |
| 919 | align-items: center; | 1037 | align-items: center; |
| 920 | - | 1038 | + |
| 921 | .upload-res { | 1039 | .upload-res { |
| 922 | margin-left: 8px; | 1040 | margin-left: 8px; |
| 923 | display: flex; | 1041 | display: flex; |
| 924 | align-items: center; | 1042 | align-items: center; |
| 925 | - | 1043 | + |
| 926 | .res-msg { | 1044 | .res-msg { |
| 927 | margin-left: 4px; | 1045 | margin-left: 4px; |
| 928 | } | 1046 | } |
| @@ -930,27 +1048,27 @@ $language-widths: ( | |||
| 930 | } | 1048 | } |
| 931 | } | 1049 | } |
| 932 | } | 1050 | } |
| 933 | - | 1051 | + |
| 934 | :deep(.active-mode-item) { | 1052 | :deep(.active-mode-item) { |
| 935 | .el-form-item__label { | 1053 | .el-form-item__label { |
| 936 | padding-top: 0; | 1054 | padding-top: 0; |
| 937 | padding-bottom: 0; | 1055 | padding-bottom: 0; |
| 938 | } | 1056 | } |
| 939 | - | 1057 | + |
| 940 | .el-checkbox { | 1058 | .el-checkbox { |
| 941 | height: auto; | 1059 | height: auto; |
| 942 | } | 1060 | } |
| 943 | } | 1061 | } |
| 944 | - | 1062 | + |
| 945 | .submit-item { | 1063 | .submit-item { |
| 946 | margin-bottom: 0; | 1064 | margin-bottom: 0; |
| 947 | } | 1065 | } |
| 948 | - | 1066 | + |
| 949 | .el-progress { | 1067 | .el-progress { |
| 950 | margin-top: 8px; | 1068 | margin-top: 8px; |
| 951 | width: 320px; | 1069 | width: 320px; |
| 952 | } | 1070 | } |
| 953 | - | 1071 | + |
| 954 | .manualTip { | 1072 | .manualTip { |
| 955 | margin-left: 8px; | 1073 | margin-left: 8px; |
| 956 | color: var(--o-text-color-tertiary); | 1074 | color: var(--o-text-color-tertiary); |
| @@ -971,6 +1089,14 @@ $language-widths: ( | |||
| 971 | } | 1089 | } |
| 972 | } | 1090 | } |
| 973 | 1091 | ||
| 1092 | +#delimiter::after { | ||
| 1093 | + content: ' '; | ||
| 1094 | + margin: 0 16px; | ||
| 1095 | + display: block; | ||
| 1096 | + height: 32px; | ||
| 1097 | + border-right: 1px solid var(--o-border-color-base); | ||
| 1098 | +} | ||
| 1099 | + | ||
| 974 | @each $lang, $width in $language-widths { | 1100 | @each $lang, $width in $language-widths { |
| 975 | .#{$lang} { | 1101 | .#{$lang} { |
| 976 | .eta-info { | 1102 | .eta-info { |
| @@ -982,6 +1108,11 @@ $language-widths: ( | |||
| 982 | } | 1108 | } |
| 983 | } | 1109 | } |
| 984 | 1110 | ||
| 1111 | +:deep(.el-tag--other) { | ||
| 1112 | + background-color: #2a739d; | ||
| 1113 | + color: #ffffff; | ||
| 1114 | +} | ||
| 1115 | + | ||
| 985 | </style> | 1116 | </style> |
| 986 | <style lang="scss"> | 1117 | <style lang="scss"> |
| 987 | .step1-title { | 1118 | .step1-title { |
| @@ -52,8 +52,8 @@ export function reauth(key: string): Promise<any> { | |||
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | // 导入固件升级文件 | 54 | // 导入固件升级文件 |
| 55 | -export function importUpgradeFile(fileName: string, configSelected: string): Promise<any> { | 55 | +export function importUpgradeFile(fileName: string, configSelected: string, isStage: boolean): Promise<any> { |
| 56 | - const data = { FilePath: `/tmp/web/${fileName}` }; | 56 | + const data = { FilePath: `/tmp/web/${fileName}`, Stage: isStage }; |
| 57 | if (configSelected !== 'yes') { | 57 | if (configSelected !== 'yes') { |
| 58 | Object.assign(data, { | 58 | Object.assign(data, { |
| 59 | RestoreFactorySettings: true, | 59 | RestoreFactorySettings: true, |
| @@ -62,8 +62,8 @@ export function importUpgradeFile(fileName: string, configSelected: string): Pro | |||
| 62 | return $http.post(reqPath.ibmc.firmwareUpdate, data); | 62 | return $http.post(reqPath.ibmc.firmwareUpdate, data); |
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | -export function importParallelUpdate(fileName: string, _: any): Promise<any> { | 65 | +export function importParallelUpdate(fileName: string, _: any, isStage: boolean): Promise<any> { |
| 66 | - const data = { FilePath: `/tmp/web/${fileName}` }; | 66 | + const data = { FilePath: `/tmp/web/${fileName}`, Stage: isStage }; |
| 67 | return $http.post(reqPath.ibmc.parallelUpdate, data); | 67 | return $http.post(reqPath.ibmc.parallelUpdate, data); |
| 68 | } | 68 | } |
| 69 | 69 | ||
| @@ -108,4 +108,16 @@ export function getActiveInfo(type: string[]): any { | |||
| 108 | 108 | ||
| 109 | export function getFirmwareList(): any { | 109 | export function getFirmwareList(): any { |
| 110 | return $http.get(reqPath.ibmc.pendingFirmwareList); | 110 | return $http.get(reqPath.ibmc.pendingFirmwareList); |
| 111 | -} | 111 | +} |
| 112 | + | ||
| 113 | +export function upgradeStaged(firmwareIds: string[]): Promise<any> { | ||
| 114 | + return $http.post(reqPath.ibmc.upgradeStagedFirmware, { | ||
| 115 | + Packages: firmwareIds.map((id) => ({ FirmwareId: id })), | ||
| 116 | + }); | ||
| 117 | +} | ||
| 118 | + | ||
| 119 | +export function deleteStaged(firmwareIds: string[]): Promise<any> { | ||
| 120 | + return $http.post(reqPath.ibmc.deleteStagedFirmware, { | ||
| 121 | + Packages: firmwareIds.map((id) => ({ FirmwareId: id })), | ||
| 122 | + }); | ||
| 123 | +} | ||