summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJannik Schönartz2022-02-17 19:15:42 +0100
committerJannik Schönartz2022-02-17 19:15:42 +0100
commitc299e9a2af047fd0cfd9704f6cde636bc0715abf (patch)
treec22f7e32a4405f32463f1aa4dd91f5f9ff4fbe7b
parent[server/registration] Make bay optional instead of 0 as fallback (diff)
downloadbas-c299e9a2af047fd0cfd9704f6cde636bc0715abf.tar.gz
bas-c299e9a2af047fd0cfd9704f6cde636bc0715abf.tar.xz
bas-c299e9a2af047fd0cfd9704f6cde636bc0715abf.zip
[server/backends/idoit] Change Blade Chassis name to match the double slot
-rw-r--r--server/lib/external-backends/backends/idoit-backend.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/external-backends/backends/idoit-backend.js b/server/lib/external-backends/backends/idoit-backend.js
index 32d216d..6654dd8 100644
--- a/server/lib/external-backends/backends/idoit-backend.js
+++ b/server/lib/external-backends/backends/idoit-backend.js
@@ -946,7 +946,7 @@ class IdoitBackend extends ExternalBackends {
for (let object of rackObjects.result) {
if (object.assigned_object.type !== 'C__OBJTYPE__BLADE_CHASSIS') continue // Old segmentation was: C__OBJTYPE__RACK_SEGMENT
- if (object.assigned_object.title === `${rackName} Slot ${client.location.slot}`) {
+ if (object.assigned_object.title === `${rackName} Slot ${client.location.slot - 1}/${client.location.slot}`) {
// This is the slot where it should get added
rackSegmentId = object.assigned_object.id
break
@@ -960,7 +960,7 @@ class IdoitBackend extends ExternalBackends {
const createSegmentParamObject = {
'apikey': credentials.apikey,
'type': 74, // 92 = Rack Segment, 74 = Blade Chassis
- 'title': rackName + ' Slot ' + client.location.slot,
+ 'title': `${rackName} Slot ${client.location.slot - 1}/${client.location.slot}`,
'categories': {
'C__CATS__CHASSIS': {
'data': {