1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
From f52609d851d02a55f2791d7faf822672bcaf445d Mon Sep 17 00:00:00 2001
From: "Andrey V.Kosteltsev" <AKosteltsev@IBS.RU>
Date: Sat, 11 Jun 2022 11:19:26 +0300
Subject: [PATCH] GlobalStore: Trim assetTag and serialNumber
---
src/store/modules/GlobalStore.js | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/store/modules/GlobalStore.js b/src/store/modules/GlobalStore.js
index 95d7a083..49283b03 100644
--- a/src/store/modules/GlobalStore.js
+++ b/src/store/modules/GlobalStore.js
@@ -95,8 +95,19 @@ const GlobalStore = {
Status: { State } = {},
},
} = {}) => {
- commit('setAssetTag', AssetTag);
- commit('setSerialNumber', SerialNumber);
+ /*
+ Trim AssetTag and SerialNumber
+ */
+ var s, tag, srn;
+
+ s = AssetTag;
+ tag = s.replace(/\./g, ' ').trim();
+
+ s = SerialNumber;
+ srn = s.replace(/\./g, ' ').trim();
+
+ commit('setAssetTag', tag);
+ commit('setSerialNumber', srn);
commit('setModelType', Model);
if (State === 'Quiesced' || State === 'InTest') {
// OpenBMC's host state interface is mapped to 2 Redfish
--
2.35.1
|