myio-js-library 0.1.189 → 0.1.192

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -24307,6 +24307,9 @@ var ANNOTATIONS_STYLES = `
24307
24307
  transition: all 0.2s ease;
24308
24308
  font-weight: 600;
24309
24309
  font-size: 13px;
24310
+ position: relative;
24311
+ z-index: 10;
24312
+ pointer-events: auto;
24310
24313
  }
24311
24314
 
24312
24315
  .annotations-create-btn:hover {
@@ -24314,15 +24317,22 @@ var ANNOTATIONS_STYLES = `
24314
24317
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
24315
24318
  }
24316
24319
 
24320
+ .annotations-create-btn:active {
24321
+ transform: translateY(0);
24322
+ box-shadow: 0 2px 8px rgba(108, 92, 231, 0.3);
24323
+ }
24324
+
24317
24325
  .annotations-create-btn__icon {
24318
24326
  font-size: 28px;
24319
24327
  line-height: 1;
24328
+ pointer-events: none;
24320
24329
  }
24321
24330
 
24322
24331
  .annotations-create-btn__text {
24323
24332
  font-size: 11px;
24324
24333
  text-transform: uppercase;
24325
24334
  letter-spacing: 0.5px;
24335
+ pointer-events: none;
24326
24336
  }
24327
24337
 
24328
24338
  /* New Annotation Modal Overlay */
@@ -25651,18 +25661,29 @@ var AnnotationsTab = class {
25651
25661
  }
25652
25662
  isOverdue(annotation) {
25653
25663
  if (!annotation.dueDate || annotation.status === "archived") return false;
25654
- return new Date(annotation.dueDate) < /* @__PURE__ */ new Date();
25664
+ try {
25665
+ const dueDate = new Date(annotation.dueDate);
25666
+ if (isNaN(dueDate.getTime())) return false;
25667
+ return dueDate < /* @__PURE__ */ new Date();
25668
+ } catch (e) {
25669
+ return false;
25670
+ }
25655
25671
  }
25656
25672
  formatDate(isoString) {
25657
25673
  if (!isoString) return "-";
25658
- const date = new Date(isoString);
25659
- return date.toLocaleDateString("pt-BR", {
25660
- day: "2-digit",
25661
- month: "2-digit",
25662
- year: "numeric",
25663
- hour: "2-digit",
25664
- minute: "2-digit"
25665
- });
25674
+ try {
25675
+ const date = new Date(isoString);
25676
+ if (isNaN(date.getTime())) return "-";
25677
+ return date.toLocaleDateString("pt-BR", {
25678
+ day: "2-digit",
25679
+ month: "2-digit",
25680
+ year: "numeric",
25681
+ hour: "2-digit",
25682
+ minute: "2-digit"
25683
+ });
25684
+ } catch (e) {
25685
+ return "-";
25686
+ }
25666
25687
  }
25667
25688
  renderCard(annotation) {
25668
25689
  const canModify = canModifyAnnotation(annotation, this.permissions);
@@ -25723,7 +25744,7 @@ var AnnotationsTab = class {
25723
25744
  const typeColor = ANNOTATION_TYPE_COLORS[annotation.type];
25724
25745
  const importanceColor = IMPORTANCE_COLORS[annotation.importance];
25725
25746
  const statusColor = STATUS_COLORS[annotation.status];
25726
- const date = new Date(annotation.createdAt).toLocaleString("pt-BR");
25747
+ const date = this.formatDate(annotation.createdAt);
25727
25748
  const truncatedText = annotation.text.length > 50 ? annotation.text.substring(0, 50) + "..." : annotation.text;
25728
25749
  return `
25729
25750
  <div class="annotation-row ${annotation.status === "archived" ? "annotation-row--archived" : ""}" data-id="${annotation.id}">
@@ -25785,9 +25806,13 @@ var AnnotationsTab = class {
25785
25806
  // ============================================
25786
25807
  attachEventListeners() {
25787
25808
  const openModalBtn = this.container.querySelector("#open-new-annotation-modal");
25788
- openModalBtn?.addEventListener("click", () => {
25789
- this.showNewAnnotationModal();
25790
- });
25809
+ if (openModalBtn) {
25810
+ openModalBtn.onclick = () => {
25811
+ this.showNewAnnotationModal();
25812
+ };
25813
+ } else {
25814
+ console.warn("[AnnotationsTab] Create button not found");
25815
+ }
25791
25816
  this.setupMultiselectDropdown("filter-status", (values) => {
25792
25817
  if (values.includes("all") || values.length === 0) {
25793
25818
  this.filters.statusList = void 0;
@@ -26025,16 +26050,14 @@ var AnnotationsTab = class {
26025
26050
  </div>
26026
26051
  </div>
26027
26052
 
26028
- <!-- Due Date Range -->
26053
+ <!-- Due Date -->
26029
26054
  <div class="annotations-form__field" style="margin-bottom: 16px;">
26030
26055
  <label class="annotations-form__label">Data Limite (opcional)</label>
26031
26056
  <input
26032
- type="text"
26057
+ type="datetime-local"
26033
26058
  class="annotations-form__input"
26034
26059
  id="new-annotation-due-date"
26035
- placeholder="Selecione a data limite..."
26036
- readonly
26037
- style="cursor: pointer;"
26060
+ style="cursor: text;"
26038
26061
  >
26039
26062
  </div>
26040
26063
  </div>
@@ -26083,24 +26106,6 @@ var AnnotationsTab = class {
26083
26106
  });
26084
26107
  }
26085
26108
  const dueDateInput = overlay.querySelector("#new-annotation-due-date");
26086
- if (dueDateInput) {
26087
- try {
26088
- this.modalDateRangePicker = await createDateRangePicker2(dueDateInput, {
26089
- includeTime: true,
26090
- timePrecision: "minute",
26091
- locale: "pt-BR",
26092
- parentEl: overlay.querySelector(".annotations-modal"),
26093
- onApply: (result) => {
26094
- dueDateInput.setAttribute("data-due-date", result.startISO);
26095
- }
26096
- });
26097
- } catch (error) {
26098
- console.warn("[AnnotationsTab] Modal DateRangePicker initialization failed:", error);
26099
- dueDateInput.type = "datetime-local";
26100
- dueDateInput.removeAttribute("readonly");
26101
- dueDateInput.style.cursor = "text";
26102
- }
26103
- }
26104
26109
  const closeModal = () => {
26105
26110
  this.modalDateRangePicker?.destroy?.();
26106
26111
  this.modalDateRangePicker = null;
@@ -26118,11 +26123,15 @@ var AnnotationsTab = class {
26118
26123
  const selectedImportance = overlay.querySelector(".importance-option.selected");
26119
26124
  const importance = parseInt(selectedImportance?.dataset.importance || "3");
26120
26125
  let dueDate;
26121
- const storedDueDate = dueDateInput?.getAttribute("data-due-date");
26122
- if (storedDueDate) {
26123
- dueDate = storedDueDate;
26124
- } else if (dueDateInput?.value) {
26125
- dueDate = new Date(dueDateInput.value).toISOString();
26126
+ if (dueDateInput?.value) {
26127
+ try {
26128
+ const dateValue = new Date(dueDateInput.value);
26129
+ if (!isNaN(dateValue.getTime())) {
26130
+ dueDate = dateValue.toISOString();
26131
+ }
26132
+ } catch (e) {
26133
+ console.warn("[AnnotationsTab] Invalid due date value:", dueDateInput.value);
26134
+ }
26126
26135
  }
26127
26136
  const text = textArea.value.trim();
26128
26137
  if (text) {
@@ -26369,12 +26378,12 @@ var AnnotationsTab = class {
26369
26378
  </div>
26370
26379
  <div class="annotation-detail__field">
26371
26380
  <div class="annotation-detail__label">Data de Cria\xE7\xE3o</div>
26372
- <div class="annotation-detail__value">${new Date(annotation.createdAt).toLocaleString("pt-BR")}</div>
26381
+ <div class="annotation-detail__value">${this.formatDate(annotation.createdAt)}</div>
26373
26382
  </div>
26374
26383
  ${annotation.dueDate ? `
26375
26384
  <div class="annotation-detail__field">
26376
26385
  <div class="annotation-detail__label">Data Limite</div>
26377
- <div class="annotation-detail__value">${new Date(annotation.dueDate).toLocaleDateString("pt-BR")}</div>
26386
+ <div class="annotation-detail__value">${this.formatDate(annotation.dueDate)}</div>
26378
26387
  </div>
26379
26388
  ` : ""}
26380
26389
  <div class="annotation-detail__field">
@@ -26385,7 +26394,7 @@ var AnnotationsTab = class {
26385
26394
  <div class="annotation-detail__field">
26386
26395
  <div class="annotation-detail__label">Reconhecido por</div>
26387
26396
  <div class="annotation-detail__value">
26388
- ${annotation.acknowledgedBy?.name} em ${new Date(annotation.acknowledgedAt || "").toLocaleString("pt-BR")}
26397
+ ${annotation.acknowledgedBy?.name} em ${this.formatDate(annotation.acknowledgedAt || "")}
26389
26398
  </div>
26390
26399
  </div>
26391
26400
  ` : ""}
@@ -26393,7 +26402,7 @@ var AnnotationsTab = class {
26393
26402
  <div class="annotation-detail__history-title">Hist\xF3rico (${annotation.history.length} eventos)</div>
26394
26403
  ${annotation.history.map((h) => `
26395
26404
  <div class="annotation-detail__history-item">
26396
- <strong>${h.action}</strong> por ${h.userName} em ${new Date(h.timestamp).toLocaleString("pt-BR")}
26405
+ <strong>${h.action}</strong> por ${h.userName} em ${this.formatDate(h.timestamp)}
26397
26406
  </div>
26398
26407
  `).join("")}
26399
26408
  </div>
@@ -34420,10 +34429,18 @@ var EnergySummaryTooltip = {
34420
34429
  offlineDevices: widgetAggregation.offlineDevices || [],
34421
34430
  noConsumptionDevices: widgetAggregation.noConsumptionDevices || []
34422
34431
  };
34432
+ const orchestratorTotal = (widgetAggregation.normal || 0) + (widgetAggregation.alert || 0) + (widgetAggregation.failure || 0) + (widgetAggregation.standby || 0) + (widgetAggregation.offline || 0) + (widgetAggregation.noConsumption || 0);
34433
+ if (orchestratorTotal > 0) {
34434
+ summary.totalDevices = orchestratorTotal;
34435
+ }
34423
34436
  } else {
34424
34437
  const statusAggregation = this._aggregateDeviceStatusFromOrchestrator(domain);
34425
34438
  if (statusAggregation.hasData) {
34426
34439
  summary.byStatus = statusAggregation.byStatus;
34440
+ const orchestratorTotal = statusAggregation.byStatus.normal + statusAggregation.byStatus.alert + statusAggregation.byStatus.failure + statusAggregation.byStatus.standby + statusAggregation.byStatus.offline + statusAggregation.byStatus.noConsumption;
34441
+ if (orchestratorTotal > 0) {
34442
+ summary.totalDevices = orchestratorTotal;
34443
+ }
34427
34444
  } else {
34428
34445
  const totalDevices = summary.totalDevices;
34429
34446
  const statusData = receivedData?.statusCounts || receivedData?.deviceStatus || null;
@@ -35774,10 +35791,18 @@ var WaterSummaryTooltip = {
35774
35791
  offlineDevices: widgetAggregation.offlineDevices || [],
35775
35792
  noConsumptionDevices: widgetAggregation.noConsumptionDevices || []
35776
35793
  };
35794
+ const orchestratorTotal = (widgetAggregation.normal || 0) + (widgetAggregation.alert || 0) + (widgetAggregation.failure || 0) + (widgetAggregation.standby || 0) + (widgetAggregation.offline || 0) + (widgetAggregation.noConsumption || 0);
35795
+ if (orchestratorTotal > 0) {
35796
+ summary.totalDevices = orchestratorTotal;
35797
+ }
35777
35798
  } else {
35778
35799
  const statusAggregation = this._aggregateDeviceStatusFromOrchestrator(domain);
35779
35800
  if (statusAggregation.hasData) {
35780
35801
  summary.byStatus = statusAggregation.byStatus;
35802
+ const orchestratorTotal = statusAggregation.byStatus.normal + statusAggregation.byStatus.alert + statusAggregation.byStatus.failure + statusAggregation.byStatus.standby + statusAggregation.byStatus.offline + statusAggregation.byStatus.noConsumption;
35803
+ if (orchestratorTotal > 0) {
35804
+ summary.totalDevices = orchestratorTotal;
35805
+ }
35781
35806
  } else {
35782
35807
  const totalDevices = summary.totalDevices;
35783
35808
  const statusData = receivedData?.statusCounts || receivedData?.deviceStatus || null;
package/dist/index.js CHANGED
@@ -24138,6 +24138,9 @@ var ANNOTATIONS_STYLES = `
24138
24138
  transition: all 0.2s ease;
24139
24139
  font-weight: 600;
24140
24140
  font-size: 13px;
24141
+ position: relative;
24142
+ z-index: 10;
24143
+ pointer-events: auto;
24141
24144
  }
24142
24145
 
24143
24146
  .annotations-create-btn:hover {
@@ -24145,15 +24148,22 @@ var ANNOTATIONS_STYLES = `
24145
24148
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
24146
24149
  }
24147
24150
 
24151
+ .annotations-create-btn:active {
24152
+ transform: translateY(0);
24153
+ box-shadow: 0 2px 8px rgba(108, 92, 231, 0.3);
24154
+ }
24155
+
24148
24156
  .annotations-create-btn__icon {
24149
24157
  font-size: 28px;
24150
24158
  line-height: 1;
24159
+ pointer-events: none;
24151
24160
  }
24152
24161
 
24153
24162
  .annotations-create-btn__text {
24154
24163
  font-size: 11px;
24155
24164
  text-transform: uppercase;
24156
24165
  letter-spacing: 0.5px;
24166
+ pointer-events: none;
24157
24167
  }
24158
24168
 
24159
24169
  /* New Annotation Modal Overlay */
@@ -25482,18 +25492,29 @@ var AnnotationsTab = class {
25482
25492
  }
25483
25493
  isOverdue(annotation) {
25484
25494
  if (!annotation.dueDate || annotation.status === "archived") return false;
25485
- return new Date(annotation.dueDate) < /* @__PURE__ */ new Date();
25495
+ try {
25496
+ const dueDate = new Date(annotation.dueDate);
25497
+ if (isNaN(dueDate.getTime())) return false;
25498
+ return dueDate < /* @__PURE__ */ new Date();
25499
+ } catch (e) {
25500
+ return false;
25501
+ }
25486
25502
  }
25487
25503
  formatDate(isoString) {
25488
25504
  if (!isoString) return "-";
25489
- const date = new Date(isoString);
25490
- return date.toLocaleDateString("pt-BR", {
25491
- day: "2-digit",
25492
- month: "2-digit",
25493
- year: "numeric",
25494
- hour: "2-digit",
25495
- minute: "2-digit"
25496
- });
25505
+ try {
25506
+ const date = new Date(isoString);
25507
+ if (isNaN(date.getTime())) return "-";
25508
+ return date.toLocaleDateString("pt-BR", {
25509
+ day: "2-digit",
25510
+ month: "2-digit",
25511
+ year: "numeric",
25512
+ hour: "2-digit",
25513
+ minute: "2-digit"
25514
+ });
25515
+ } catch (e) {
25516
+ return "-";
25517
+ }
25497
25518
  }
25498
25519
  renderCard(annotation) {
25499
25520
  const canModify = canModifyAnnotation(annotation, this.permissions);
@@ -25554,7 +25575,7 @@ var AnnotationsTab = class {
25554
25575
  const typeColor = ANNOTATION_TYPE_COLORS[annotation.type];
25555
25576
  const importanceColor = IMPORTANCE_COLORS[annotation.importance];
25556
25577
  const statusColor = STATUS_COLORS[annotation.status];
25557
- const date = new Date(annotation.createdAt).toLocaleString("pt-BR");
25578
+ const date = this.formatDate(annotation.createdAt);
25558
25579
  const truncatedText = annotation.text.length > 50 ? annotation.text.substring(0, 50) + "..." : annotation.text;
25559
25580
  return `
25560
25581
  <div class="annotation-row ${annotation.status === "archived" ? "annotation-row--archived" : ""}" data-id="${annotation.id}">
@@ -25616,9 +25637,13 @@ var AnnotationsTab = class {
25616
25637
  // ============================================
25617
25638
  attachEventListeners() {
25618
25639
  const openModalBtn = this.container.querySelector("#open-new-annotation-modal");
25619
- openModalBtn?.addEventListener("click", () => {
25620
- this.showNewAnnotationModal();
25621
- });
25640
+ if (openModalBtn) {
25641
+ openModalBtn.onclick = () => {
25642
+ this.showNewAnnotationModal();
25643
+ };
25644
+ } else {
25645
+ console.warn("[AnnotationsTab] Create button not found");
25646
+ }
25622
25647
  this.setupMultiselectDropdown("filter-status", (values) => {
25623
25648
  if (values.includes("all") || values.length === 0) {
25624
25649
  this.filters.statusList = void 0;
@@ -25856,16 +25881,14 @@ var AnnotationsTab = class {
25856
25881
  </div>
25857
25882
  </div>
25858
25883
 
25859
- <!-- Due Date Range -->
25884
+ <!-- Due Date -->
25860
25885
  <div class="annotations-form__field" style="margin-bottom: 16px;">
25861
25886
  <label class="annotations-form__label">Data Limite (opcional)</label>
25862
25887
  <input
25863
- type="text"
25888
+ type="datetime-local"
25864
25889
  class="annotations-form__input"
25865
25890
  id="new-annotation-due-date"
25866
- placeholder="Selecione a data limite..."
25867
- readonly
25868
- style="cursor: pointer;"
25891
+ style="cursor: text;"
25869
25892
  >
25870
25893
  </div>
25871
25894
  </div>
@@ -25914,24 +25937,6 @@ var AnnotationsTab = class {
25914
25937
  });
25915
25938
  }
25916
25939
  const dueDateInput = overlay.querySelector("#new-annotation-due-date");
25917
- if (dueDateInput) {
25918
- try {
25919
- this.modalDateRangePicker = await createDateRangePicker2(dueDateInput, {
25920
- includeTime: true,
25921
- timePrecision: "minute",
25922
- locale: "pt-BR",
25923
- parentEl: overlay.querySelector(".annotations-modal"),
25924
- onApply: (result) => {
25925
- dueDateInput.setAttribute("data-due-date", result.startISO);
25926
- }
25927
- });
25928
- } catch (error) {
25929
- console.warn("[AnnotationsTab] Modal DateRangePicker initialization failed:", error);
25930
- dueDateInput.type = "datetime-local";
25931
- dueDateInput.removeAttribute("readonly");
25932
- dueDateInput.style.cursor = "text";
25933
- }
25934
- }
25935
25940
  const closeModal = () => {
25936
25941
  this.modalDateRangePicker?.destroy?.();
25937
25942
  this.modalDateRangePicker = null;
@@ -25949,11 +25954,15 @@ var AnnotationsTab = class {
25949
25954
  const selectedImportance = overlay.querySelector(".importance-option.selected");
25950
25955
  const importance = parseInt(selectedImportance?.dataset.importance || "3");
25951
25956
  let dueDate;
25952
- const storedDueDate = dueDateInput?.getAttribute("data-due-date");
25953
- if (storedDueDate) {
25954
- dueDate = storedDueDate;
25955
- } else if (dueDateInput?.value) {
25956
- dueDate = new Date(dueDateInput.value).toISOString();
25957
+ if (dueDateInput?.value) {
25958
+ try {
25959
+ const dateValue = new Date(dueDateInput.value);
25960
+ if (!isNaN(dateValue.getTime())) {
25961
+ dueDate = dateValue.toISOString();
25962
+ }
25963
+ } catch (e) {
25964
+ console.warn("[AnnotationsTab] Invalid due date value:", dueDateInput.value);
25965
+ }
25957
25966
  }
25958
25967
  const text = textArea.value.trim();
25959
25968
  if (text) {
@@ -26200,12 +26209,12 @@ var AnnotationsTab = class {
26200
26209
  </div>
26201
26210
  <div class="annotation-detail__field">
26202
26211
  <div class="annotation-detail__label">Data de Cria\xE7\xE3o</div>
26203
- <div class="annotation-detail__value">${new Date(annotation.createdAt).toLocaleString("pt-BR")}</div>
26212
+ <div class="annotation-detail__value">${this.formatDate(annotation.createdAt)}</div>
26204
26213
  </div>
26205
26214
  ${annotation.dueDate ? `
26206
26215
  <div class="annotation-detail__field">
26207
26216
  <div class="annotation-detail__label">Data Limite</div>
26208
- <div class="annotation-detail__value">${new Date(annotation.dueDate).toLocaleDateString("pt-BR")}</div>
26217
+ <div class="annotation-detail__value">${this.formatDate(annotation.dueDate)}</div>
26209
26218
  </div>
26210
26219
  ` : ""}
26211
26220
  <div class="annotation-detail__field">
@@ -26216,7 +26225,7 @@ var AnnotationsTab = class {
26216
26225
  <div class="annotation-detail__field">
26217
26226
  <div class="annotation-detail__label">Reconhecido por</div>
26218
26227
  <div class="annotation-detail__value">
26219
- ${annotation.acknowledgedBy?.name} em ${new Date(annotation.acknowledgedAt || "").toLocaleString("pt-BR")}
26228
+ ${annotation.acknowledgedBy?.name} em ${this.formatDate(annotation.acknowledgedAt || "")}
26220
26229
  </div>
26221
26230
  </div>
26222
26231
  ` : ""}
@@ -26224,7 +26233,7 @@ var AnnotationsTab = class {
26224
26233
  <div class="annotation-detail__history-title">Hist\xF3rico (${annotation.history.length} eventos)</div>
26225
26234
  ${annotation.history.map((h) => `
26226
26235
  <div class="annotation-detail__history-item">
26227
- <strong>${h.action}</strong> por ${h.userName} em ${new Date(h.timestamp).toLocaleString("pt-BR")}
26236
+ <strong>${h.action}</strong> por ${h.userName} em ${this.formatDate(h.timestamp)}
26228
26237
  </div>
26229
26238
  `).join("")}
26230
26239
  </div>
@@ -34251,10 +34260,18 @@ var EnergySummaryTooltip = {
34251
34260
  offlineDevices: widgetAggregation.offlineDevices || [],
34252
34261
  noConsumptionDevices: widgetAggregation.noConsumptionDevices || []
34253
34262
  };
34263
+ const orchestratorTotal = (widgetAggregation.normal || 0) + (widgetAggregation.alert || 0) + (widgetAggregation.failure || 0) + (widgetAggregation.standby || 0) + (widgetAggregation.offline || 0) + (widgetAggregation.noConsumption || 0);
34264
+ if (orchestratorTotal > 0) {
34265
+ summary.totalDevices = orchestratorTotal;
34266
+ }
34254
34267
  } else {
34255
34268
  const statusAggregation = this._aggregateDeviceStatusFromOrchestrator(domain);
34256
34269
  if (statusAggregation.hasData) {
34257
34270
  summary.byStatus = statusAggregation.byStatus;
34271
+ const orchestratorTotal = statusAggregation.byStatus.normal + statusAggregation.byStatus.alert + statusAggregation.byStatus.failure + statusAggregation.byStatus.standby + statusAggregation.byStatus.offline + statusAggregation.byStatus.noConsumption;
34272
+ if (orchestratorTotal > 0) {
34273
+ summary.totalDevices = orchestratorTotal;
34274
+ }
34258
34275
  } else {
34259
34276
  const totalDevices = summary.totalDevices;
34260
34277
  const statusData = receivedData?.statusCounts || receivedData?.deviceStatus || null;
@@ -35605,10 +35622,18 @@ var WaterSummaryTooltip = {
35605
35622
  offlineDevices: widgetAggregation.offlineDevices || [],
35606
35623
  noConsumptionDevices: widgetAggregation.noConsumptionDevices || []
35607
35624
  };
35625
+ const orchestratorTotal = (widgetAggregation.normal || 0) + (widgetAggregation.alert || 0) + (widgetAggregation.failure || 0) + (widgetAggregation.standby || 0) + (widgetAggregation.offline || 0) + (widgetAggregation.noConsumption || 0);
35626
+ if (orchestratorTotal > 0) {
35627
+ summary.totalDevices = orchestratorTotal;
35628
+ }
35608
35629
  } else {
35609
35630
  const statusAggregation = this._aggregateDeviceStatusFromOrchestrator(domain);
35610
35631
  if (statusAggregation.hasData) {
35611
35632
  summary.byStatus = statusAggregation.byStatus;
35633
+ const orchestratorTotal = statusAggregation.byStatus.normal + statusAggregation.byStatus.alert + statusAggregation.byStatus.failure + statusAggregation.byStatus.standby + statusAggregation.byStatus.offline + statusAggregation.byStatus.noConsumption;
35634
+ if (orchestratorTotal > 0) {
35635
+ summary.totalDevices = orchestratorTotal;
35636
+ }
35612
35637
  } else {
35613
35638
  const totalDevices = summary.totalDevices;
35614
35639
  const statusData = receivedData?.statusCounts || receivedData?.deviceStatus || null;