From e5c775ba5f3882cda23e068e9118756ada6bce36 Mon Sep 17 00:00:00 2001
From: roly <Rolyli.Li@luxshare-ict.com>
Date: Fri, 15 Nov 2024 14:02:18 +0800
Subject: [PATCH] Webui add bmc release date info

---
 src/locales/en-US.json                             | 1 +
 src/store/modules/Operations/FirmwareStore.js      | 1 +
 src/views/Operations/Firmware/FirmwareCardsBmc.vue | 8 ++++++++
 3 files changed, 10 insertions(+)

diff --git a/src/locales/en-US.json b/src/locales/en-US.json
index b695955..aacb848 100644
--- a/src/locales/en-US.json
+++ b/src/locales/en-US.json
@@ -327,6 +327,7 @@
     "pageFirmware": {
         "cardActionSwitchToRunning": "Switch to running",
         "cardBodyVersion": "Version",
+        "cardBodyReleaseDate": "Release Date",
         "cardTitleBackup": "Backup image",
         "cardTitleRunning": "Running image",
         "cardTitleMBCpld": "Mother Board CPLD",
diff --git a/src/store/modules/Operations/FirmwareStore.js b/src/store/modules/Operations/FirmwareStore.js
index f03b425..001eaf6 100644
--- a/src/store/modules/Operations/FirmwareStore.js
+++ b/src/store/modules/Operations/FirmwareStore.js
@@ -107,6 +107,7 @@ const FirmwareStore = {
               id: data?.Id,
               location: data?.['@odata.id'],
               status: data?.Status?.Health,
+              reldate: data?.ReleaseDate,
             };
             if (firmwareType === 'bmc') {
               bmcFirmware.push(item);
diff --git a/src/views/Operations/Firmware/FirmwareCardsBmc.vue b/src/views/Operations/Firmware/FirmwareCardsBmc.vue
index d79a876..8765f77 100644
--- a/src/views/Operations/Firmware/FirmwareCardsBmc.vue
+++ b/src/views/Operations/Firmware/FirmwareCardsBmc.vue
@@ -13,6 +13,11 @@
             <dt>{{ $t('pageFirmware.cardBodyVersion') }}</dt>
             <dd class="mb-0">{{ runningVersion }}</dd>
           </dl>
+          <br />
+          <dl class="mb-0">
+            <dt>{{ $t('pageFirmware.cardBodyReleaseDate') }}</dt>
+            <dd class="mb-0">{{ releaseDate }}</dd>
+          </dl>
         </b-card>
 
         <!-- Backup image -->
@@ -95,6 +100,9 @@ export default {
     runningVersion() {
       return this.running?.version || '--';
     },
+    releaseDate() {
+      return this.running?.reldate || '--';
+    },
     backupVersion() {
       return this.backup?.version || '--';
     },
-- 
2.25.1

