myio-js-library 0.1.190 → 0.1.195
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 +109 -0
- package/dist/index.d.cts +10 -0
- package/dist/index.js +109 -0
- package/dist/myio-js-library.umd.js +109 -0
- package/dist/myio-js-library.umd.min.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -33530,6 +33530,65 @@ var ENERGY_SUMMARY_TOOLTIP_CSS = `
|
|
|
33530
33530
|
color: #ffffff;
|
|
33531
33531
|
}
|
|
33532
33532
|
|
|
33533
|
+
/* Excluded Devices Notice */
|
|
33534
|
+
.energy-summary-tooltip__excluded-notice {
|
|
33535
|
+
display: flex;
|
|
33536
|
+
align-items: flex-start;
|
|
33537
|
+
gap: 8px;
|
|
33538
|
+
padding: 10px 12px;
|
|
33539
|
+
background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
|
|
33540
|
+
border-radius: 8px;
|
|
33541
|
+
margin-top: 12px;
|
|
33542
|
+
border: 1px solid #f59e0b;
|
|
33543
|
+
}
|
|
33544
|
+
|
|
33545
|
+
.energy-summary-tooltip__excluded-icon {
|
|
33546
|
+
font-size: 16px;
|
|
33547
|
+
flex-shrink: 0;
|
|
33548
|
+
}
|
|
33549
|
+
|
|
33550
|
+
.energy-summary-tooltip__excluded-content {
|
|
33551
|
+
flex: 1;
|
|
33552
|
+
min-width: 0;
|
|
33553
|
+
}
|
|
33554
|
+
|
|
33555
|
+
.energy-summary-tooltip__excluded-title {
|
|
33556
|
+
font-weight: 600;
|
|
33557
|
+
font-size: 11px;
|
|
33558
|
+
color: #92400e;
|
|
33559
|
+
margin-bottom: 4px;
|
|
33560
|
+
}
|
|
33561
|
+
|
|
33562
|
+
.energy-summary-tooltip__excluded-list {
|
|
33563
|
+
font-size: 10px;
|
|
33564
|
+
color: #78350f;
|
|
33565
|
+
line-height: 1.4;
|
|
33566
|
+
}
|
|
33567
|
+
|
|
33568
|
+
.energy-summary-tooltip__excluded-item {
|
|
33569
|
+
display: flex;
|
|
33570
|
+
justify-content: space-between;
|
|
33571
|
+
padding: 2px 0;
|
|
33572
|
+
border-bottom: 1px dashed rgba(120, 53, 15, 0.2);
|
|
33573
|
+
}
|
|
33574
|
+
|
|
33575
|
+
.energy-summary-tooltip__excluded-item:last-child {
|
|
33576
|
+
border-bottom: none;
|
|
33577
|
+
}
|
|
33578
|
+
|
|
33579
|
+
.energy-summary-tooltip__excluded-label {
|
|
33580
|
+
overflow: hidden;
|
|
33581
|
+
text-overflow: ellipsis;
|
|
33582
|
+
white-space: nowrap;
|
|
33583
|
+
max-width: 200px;
|
|
33584
|
+
}
|
|
33585
|
+
|
|
33586
|
+
.energy-summary-tooltip__excluded-value {
|
|
33587
|
+
font-weight: 600;
|
|
33588
|
+
flex-shrink: 0;
|
|
33589
|
+
margin-left: 8px;
|
|
33590
|
+
}
|
|
33591
|
+
|
|
33533
33592
|
/* Responsive adjustments */
|
|
33534
33593
|
@media (max-width: 600px) {
|
|
33535
33594
|
.energy-summary-tooltip__content {
|
|
@@ -33679,6 +33738,38 @@ var EnergySummaryTooltip = {
|
|
|
33679
33738
|
`;
|
|
33680
33739
|
}).join("");
|
|
33681
33740
|
},
|
|
33741
|
+
/**
|
|
33742
|
+
* Render excluded devices notice (if any devices are excluded from CAG)
|
|
33743
|
+
*/
|
|
33744
|
+
renderExcludedNotice(excludedDevices, unit) {
|
|
33745
|
+
if (!excludedDevices || excludedDevices.length === 0) {
|
|
33746
|
+
return "";
|
|
33747
|
+
}
|
|
33748
|
+
const deviceItems = excludedDevices.map((device) => `
|
|
33749
|
+
<div class="energy-summary-tooltip__excluded-item">
|
|
33750
|
+
<span class="energy-summary-tooltip__excluded-label" title="${device.label}">${device.label}</span>
|
|
33751
|
+
<span class="energy-summary-tooltip__excluded-value">${formatConsumption2(device.value, unit)}</span>
|
|
33752
|
+
</div>
|
|
33753
|
+
`).join("");
|
|
33754
|
+
const totalExcluded = excludedDevices.reduce((sum, d) => sum + (d.value || 0), 0);
|
|
33755
|
+
return `
|
|
33756
|
+
<div class="energy-summary-tooltip__excluded-notice">
|
|
33757
|
+
<span class="energy-summary-tooltip__excluded-icon">\u26A0\uFE0F</span>
|
|
33758
|
+
<div class="energy-summary-tooltip__excluded-content">
|
|
33759
|
+
<div class="energy-summary-tooltip__excluded-title">
|
|
33760
|
+
Dispositivos exclu\xEDdos do subtotal CAG (${excludedDevices.length})
|
|
33761
|
+
</div>
|
|
33762
|
+
<div class="energy-summary-tooltip__excluded-list">
|
|
33763
|
+
${deviceItems}
|
|
33764
|
+
<div class="energy-summary-tooltip__excluded-item" style="font-weight: 700; margin-top: 4px; padding-top: 4px; border-top: 1px solid rgba(120, 53, 15, 0.3);">
|
|
33765
|
+
<span>Total exclu\xEDdo:</span>
|
|
33766
|
+
<span class="energy-summary-tooltip__excluded-value">${formatConsumption2(totalExcluded, unit)}</span>
|
|
33767
|
+
</div>
|
|
33768
|
+
</div>
|
|
33769
|
+
</div>
|
|
33770
|
+
</div>
|
|
33771
|
+
`;
|
|
33772
|
+
},
|
|
33682
33773
|
/**
|
|
33683
33774
|
* Render full tooltip HTML
|
|
33684
33775
|
*/
|
|
@@ -33686,6 +33777,7 @@ var EnergySummaryTooltip = {
|
|
|
33686
33777
|
const categoryRows = this.renderCategoryTree(summary.byCategory, summary.unit);
|
|
33687
33778
|
const statusMatrix = this.renderStatusMatrix(summary.byStatus);
|
|
33688
33779
|
const timestamp = formatTimestamp3(summary.lastUpdated);
|
|
33780
|
+
const excludedNotice = this.renderExcludedNotice(summary.excludedFromCAG, summary.unit);
|
|
33689
33781
|
return `
|
|
33690
33782
|
<div class="energy-summary-tooltip__content">
|
|
33691
33783
|
<div class="energy-summary-tooltip__header" data-drag-handle>
|
|
@@ -33732,6 +33824,7 @@ var EnergySummaryTooltip = {
|
|
|
33732
33824
|
<div class="energy-summary-tooltip__status-matrix">
|
|
33733
33825
|
${statusMatrix}
|
|
33734
33826
|
</div>
|
|
33827
|
+
${excludedNotice}
|
|
33735
33828
|
</div>
|
|
33736
33829
|
<div class="energy-summary-tooltip__total">
|
|
33737
33830
|
<span class="energy-summary-tooltip__total-label">Consumo Total</span>
|
|
@@ -34429,10 +34522,18 @@ var EnergySummaryTooltip = {
|
|
|
34429
34522
|
offlineDevices: widgetAggregation.offlineDevices || [],
|
|
34430
34523
|
noConsumptionDevices: widgetAggregation.noConsumptionDevices || []
|
|
34431
34524
|
};
|
|
34525
|
+
const orchestratorTotal = (widgetAggregation.normal || 0) + (widgetAggregation.alert || 0) + (widgetAggregation.failure || 0) + (widgetAggregation.standby || 0) + (widgetAggregation.offline || 0) + (widgetAggregation.noConsumption || 0);
|
|
34526
|
+
if (orchestratorTotal > 0) {
|
|
34527
|
+
summary.totalDevices = orchestratorTotal;
|
|
34528
|
+
}
|
|
34432
34529
|
} else {
|
|
34433
34530
|
const statusAggregation = this._aggregateDeviceStatusFromOrchestrator(domain);
|
|
34434
34531
|
if (statusAggregation.hasData) {
|
|
34435
34532
|
summary.byStatus = statusAggregation.byStatus;
|
|
34533
|
+
const orchestratorTotal = statusAggregation.byStatus.normal + statusAggregation.byStatus.alert + statusAggregation.byStatus.failure + statusAggregation.byStatus.standby + statusAggregation.byStatus.offline + statusAggregation.byStatus.noConsumption;
|
|
34534
|
+
if (orchestratorTotal > 0) {
|
|
34535
|
+
summary.totalDevices = orchestratorTotal;
|
|
34536
|
+
}
|
|
34436
34537
|
} else {
|
|
34437
34538
|
const totalDevices = summary.totalDevices;
|
|
34438
34539
|
const statusData = receivedData?.statusCounts || receivedData?.deviceStatus || null;
|
|
@@ -35783,10 +35884,18 @@ var WaterSummaryTooltip = {
|
|
|
35783
35884
|
offlineDevices: widgetAggregation.offlineDevices || [],
|
|
35784
35885
|
noConsumptionDevices: widgetAggregation.noConsumptionDevices || []
|
|
35785
35886
|
};
|
|
35887
|
+
const orchestratorTotal = (widgetAggregation.normal || 0) + (widgetAggregation.alert || 0) + (widgetAggregation.failure || 0) + (widgetAggregation.standby || 0) + (widgetAggregation.offline || 0) + (widgetAggregation.noConsumption || 0);
|
|
35888
|
+
if (orchestratorTotal > 0) {
|
|
35889
|
+
summary.totalDevices = orchestratorTotal;
|
|
35890
|
+
}
|
|
35786
35891
|
} else {
|
|
35787
35892
|
const statusAggregation = this._aggregateDeviceStatusFromOrchestrator(domain);
|
|
35788
35893
|
if (statusAggregation.hasData) {
|
|
35789
35894
|
summary.byStatus = statusAggregation.byStatus;
|
|
35895
|
+
const orchestratorTotal = statusAggregation.byStatus.normal + statusAggregation.byStatus.alert + statusAggregation.byStatus.failure + statusAggregation.byStatus.standby + statusAggregation.byStatus.offline + statusAggregation.byStatus.noConsumption;
|
|
35896
|
+
if (orchestratorTotal > 0) {
|
|
35897
|
+
summary.totalDevices = orchestratorTotal;
|
|
35898
|
+
}
|
|
35790
35899
|
} else {
|
|
35791
35900
|
const totalDevices = summary.totalDevices;
|
|
35792
35901
|
const statusData = receivedData?.statusCounts || receivedData?.deviceStatus || null;
|
package/dist/index.d.cts
CHANGED
|
@@ -3115,6 +3115,11 @@ interface StatusSummary$1 {
|
|
|
3115
3115
|
offlineDevices?: DeviceInfo$1[];
|
|
3116
3116
|
noConsumptionDevices?: DeviceInfo$1[];
|
|
3117
3117
|
}
|
|
3118
|
+
interface ExcludedDevice {
|
|
3119
|
+
id: string;
|
|
3120
|
+
label: string;
|
|
3121
|
+
value: number;
|
|
3122
|
+
}
|
|
3118
3123
|
interface DashboardEnergySummary {
|
|
3119
3124
|
totalDevices: number;
|
|
3120
3125
|
totalConsumption: number;
|
|
@@ -3122,6 +3127,7 @@ interface DashboardEnergySummary {
|
|
|
3122
3127
|
byCategory: CategorySummary[];
|
|
3123
3128
|
byStatus: StatusSummary$1;
|
|
3124
3129
|
lastUpdated: string;
|
|
3130
|
+
excludedFromCAG?: ExcludedDevice[];
|
|
3125
3131
|
}
|
|
3126
3132
|
declare const EnergySummaryTooltip: {
|
|
3127
3133
|
containerId: string;
|
|
@@ -3137,6 +3143,10 @@ declare const EnergySummaryTooltip: {
|
|
|
3137
3143
|
* Render status matrix with expand buttons
|
|
3138
3144
|
*/
|
|
3139
3145
|
renderStatusMatrix(status: StatusSummary$1): string;
|
|
3146
|
+
/**
|
|
3147
|
+
* Render excluded devices notice (if any devices are excluded from CAG)
|
|
3148
|
+
*/
|
|
3149
|
+
renderExcludedNotice(excludedDevices: ExcludedDevice[] | undefined, unit: string): string;
|
|
3140
3150
|
/**
|
|
3141
3151
|
* Render full tooltip HTML
|
|
3142
3152
|
*/
|
package/dist/index.js
CHANGED
|
@@ -33361,6 +33361,65 @@ var ENERGY_SUMMARY_TOOLTIP_CSS = `
|
|
|
33361
33361
|
color: #ffffff;
|
|
33362
33362
|
}
|
|
33363
33363
|
|
|
33364
|
+
/* Excluded Devices Notice */
|
|
33365
|
+
.energy-summary-tooltip__excluded-notice {
|
|
33366
|
+
display: flex;
|
|
33367
|
+
align-items: flex-start;
|
|
33368
|
+
gap: 8px;
|
|
33369
|
+
padding: 10px 12px;
|
|
33370
|
+
background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
|
|
33371
|
+
border-radius: 8px;
|
|
33372
|
+
margin-top: 12px;
|
|
33373
|
+
border: 1px solid #f59e0b;
|
|
33374
|
+
}
|
|
33375
|
+
|
|
33376
|
+
.energy-summary-tooltip__excluded-icon {
|
|
33377
|
+
font-size: 16px;
|
|
33378
|
+
flex-shrink: 0;
|
|
33379
|
+
}
|
|
33380
|
+
|
|
33381
|
+
.energy-summary-tooltip__excluded-content {
|
|
33382
|
+
flex: 1;
|
|
33383
|
+
min-width: 0;
|
|
33384
|
+
}
|
|
33385
|
+
|
|
33386
|
+
.energy-summary-tooltip__excluded-title {
|
|
33387
|
+
font-weight: 600;
|
|
33388
|
+
font-size: 11px;
|
|
33389
|
+
color: #92400e;
|
|
33390
|
+
margin-bottom: 4px;
|
|
33391
|
+
}
|
|
33392
|
+
|
|
33393
|
+
.energy-summary-tooltip__excluded-list {
|
|
33394
|
+
font-size: 10px;
|
|
33395
|
+
color: #78350f;
|
|
33396
|
+
line-height: 1.4;
|
|
33397
|
+
}
|
|
33398
|
+
|
|
33399
|
+
.energy-summary-tooltip__excluded-item {
|
|
33400
|
+
display: flex;
|
|
33401
|
+
justify-content: space-between;
|
|
33402
|
+
padding: 2px 0;
|
|
33403
|
+
border-bottom: 1px dashed rgba(120, 53, 15, 0.2);
|
|
33404
|
+
}
|
|
33405
|
+
|
|
33406
|
+
.energy-summary-tooltip__excluded-item:last-child {
|
|
33407
|
+
border-bottom: none;
|
|
33408
|
+
}
|
|
33409
|
+
|
|
33410
|
+
.energy-summary-tooltip__excluded-label {
|
|
33411
|
+
overflow: hidden;
|
|
33412
|
+
text-overflow: ellipsis;
|
|
33413
|
+
white-space: nowrap;
|
|
33414
|
+
max-width: 200px;
|
|
33415
|
+
}
|
|
33416
|
+
|
|
33417
|
+
.energy-summary-tooltip__excluded-value {
|
|
33418
|
+
font-weight: 600;
|
|
33419
|
+
flex-shrink: 0;
|
|
33420
|
+
margin-left: 8px;
|
|
33421
|
+
}
|
|
33422
|
+
|
|
33364
33423
|
/* Responsive adjustments */
|
|
33365
33424
|
@media (max-width: 600px) {
|
|
33366
33425
|
.energy-summary-tooltip__content {
|
|
@@ -33510,6 +33569,38 @@ var EnergySummaryTooltip = {
|
|
|
33510
33569
|
`;
|
|
33511
33570
|
}).join("");
|
|
33512
33571
|
},
|
|
33572
|
+
/**
|
|
33573
|
+
* Render excluded devices notice (if any devices are excluded from CAG)
|
|
33574
|
+
*/
|
|
33575
|
+
renderExcludedNotice(excludedDevices, unit) {
|
|
33576
|
+
if (!excludedDevices || excludedDevices.length === 0) {
|
|
33577
|
+
return "";
|
|
33578
|
+
}
|
|
33579
|
+
const deviceItems = excludedDevices.map((device) => `
|
|
33580
|
+
<div class="energy-summary-tooltip__excluded-item">
|
|
33581
|
+
<span class="energy-summary-tooltip__excluded-label" title="${device.label}">${device.label}</span>
|
|
33582
|
+
<span class="energy-summary-tooltip__excluded-value">${formatConsumption2(device.value, unit)}</span>
|
|
33583
|
+
</div>
|
|
33584
|
+
`).join("");
|
|
33585
|
+
const totalExcluded = excludedDevices.reduce((sum, d) => sum + (d.value || 0), 0);
|
|
33586
|
+
return `
|
|
33587
|
+
<div class="energy-summary-tooltip__excluded-notice">
|
|
33588
|
+
<span class="energy-summary-tooltip__excluded-icon">\u26A0\uFE0F</span>
|
|
33589
|
+
<div class="energy-summary-tooltip__excluded-content">
|
|
33590
|
+
<div class="energy-summary-tooltip__excluded-title">
|
|
33591
|
+
Dispositivos exclu\xEDdos do subtotal CAG (${excludedDevices.length})
|
|
33592
|
+
</div>
|
|
33593
|
+
<div class="energy-summary-tooltip__excluded-list">
|
|
33594
|
+
${deviceItems}
|
|
33595
|
+
<div class="energy-summary-tooltip__excluded-item" style="font-weight: 700; margin-top: 4px; padding-top: 4px; border-top: 1px solid rgba(120, 53, 15, 0.3);">
|
|
33596
|
+
<span>Total exclu\xEDdo:</span>
|
|
33597
|
+
<span class="energy-summary-tooltip__excluded-value">${formatConsumption2(totalExcluded, unit)}</span>
|
|
33598
|
+
</div>
|
|
33599
|
+
</div>
|
|
33600
|
+
</div>
|
|
33601
|
+
</div>
|
|
33602
|
+
`;
|
|
33603
|
+
},
|
|
33513
33604
|
/**
|
|
33514
33605
|
* Render full tooltip HTML
|
|
33515
33606
|
*/
|
|
@@ -33517,6 +33608,7 @@ var EnergySummaryTooltip = {
|
|
|
33517
33608
|
const categoryRows = this.renderCategoryTree(summary.byCategory, summary.unit);
|
|
33518
33609
|
const statusMatrix = this.renderStatusMatrix(summary.byStatus);
|
|
33519
33610
|
const timestamp = formatTimestamp3(summary.lastUpdated);
|
|
33611
|
+
const excludedNotice = this.renderExcludedNotice(summary.excludedFromCAG, summary.unit);
|
|
33520
33612
|
return `
|
|
33521
33613
|
<div class="energy-summary-tooltip__content">
|
|
33522
33614
|
<div class="energy-summary-tooltip__header" data-drag-handle>
|
|
@@ -33563,6 +33655,7 @@ var EnergySummaryTooltip = {
|
|
|
33563
33655
|
<div class="energy-summary-tooltip__status-matrix">
|
|
33564
33656
|
${statusMatrix}
|
|
33565
33657
|
</div>
|
|
33658
|
+
${excludedNotice}
|
|
33566
33659
|
</div>
|
|
33567
33660
|
<div class="energy-summary-tooltip__total">
|
|
33568
33661
|
<span class="energy-summary-tooltip__total-label">Consumo Total</span>
|
|
@@ -34260,10 +34353,18 @@ var EnergySummaryTooltip = {
|
|
|
34260
34353
|
offlineDevices: widgetAggregation.offlineDevices || [],
|
|
34261
34354
|
noConsumptionDevices: widgetAggregation.noConsumptionDevices || []
|
|
34262
34355
|
};
|
|
34356
|
+
const orchestratorTotal = (widgetAggregation.normal || 0) + (widgetAggregation.alert || 0) + (widgetAggregation.failure || 0) + (widgetAggregation.standby || 0) + (widgetAggregation.offline || 0) + (widgetAggregation.noConsumption || 0);
|
|
34357
|
+
if (orchestratorTotal > 0) {
|
|
34358
|
+
summary.totalDevices = orchestratorTotal;
|
|
34359
|
+
}
|
|
34263
34360
|
} else {
|
|
34264
34361
|
const statusAggregation = this._aggregateDeviceStatusFromOrchestrator(domain);
|
|
34265
34362
|
if (statusAggregation.hasData) {
|
|
34266
34363
|
summary.byStatus = statusAggregation.byStatus;
|
|
34364
|
+
const orchestratorTotal = statusAggregation.byStatus.normal + statusAggregation.byStatus.alert + statusAggregation.byStatus.failure + statusAggregation.byStatus.standby + statusAggregation.byStatus.offline + statusAggregation.byStatus.noConsumption;
|
|
34365
|
+
if (orchestratorTotal > 0) {
|
|
34366
|
+
summary.totalDevices = orchestratorTotal;
|
|
34367
|
+
}
|
|
34267
34368
|
} else {
|
|
34268
34369
|
const totalDevices = summary.totalDevices;
|
|
34269
34370
|
const statusData = receivedData?.statusCounts || receivedData?.deviceStatus || null;
|
|
@@ -35614,10 +35715,18 @@ var WaterSummaryTooltip = {
|
|
|
35614
35715
|
offlineDevices: widgetAggregation.offlineDevices || [],
|
|
35615
35716
|
noConsumptionDevices: widgetAggregation.noConsumptionDevices || []
|
|
35616
35717
|
};
|
|
35718
|
+
const orchestratorTotal = (widgetAggregation.normal || 0) + (widgetAggregation.alert || 0) + (widgetAggregation.failure || 0) + (widgetAggregation.standby || 0) + (widgetAggregation.offline || 0) + (widgetAggregation.noConsumption || 0);
|
|
35719
|
+
if (orchestratorTotal > 0) {
|
|
35720
|
+
summary.totalDevices = orchestratorTotal;
|
|
35721
|
+
}
|
|
35617
35722
|
} else {
|
|
35618
35723
|
const statusAggregation = this._aggregateDeviceStatusFromOrchestrator(domain);
|
|
35619
35724
|
if (statusAggregation.hasData) {
|
|
35620
35725
|
summary.byStatus = statusAggregation.byStatus;
|
|
35726
|
+
const orchestratorTotal = statusAggregation.byStatus.normal + statusAggregation.byStatus.alert + statusAggregation.byStatus.failure + statusAggregation.byStatus.standby + statusAggregation.byStatus.offline + statusAggregation.byStatus.noConsumption;
|
|
35727
|
+
if (orchestratorTotal > 0) {
|
|
35728
|
+
summary.totalDevices = orchestratorTotal;
|
|
35729
|
+
}
|
|
35621
35730
|
} else {
|
|
35622
35731
|
const totalDevices = summary.totalDevices;
|
|
35623
35732
|
const statusData = receivedData?.statusCounts || receivedData?.deviceStatus || null;
|
|
@@ -33175,6 +33175,65 @@
|
|
|
33175
33175
|
color: #ffffff;
|
|
33176
33176
|
}
|
|
33177
33177
|
|
|
33178
|
+
/* Excluded Devices Notice */
|
|
33179
|
+
.energy-summary-tooltip__excluded-notice {
|
|
33180
|
+
display: flex;
|
|
33181
|
+
align-items: flex-start;
|
|
33182
|
+
gap: 8px;
|
|
33183
|
+
padding: 10px 12px;
|
|
33184
|
+
background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
|
|
33185
|
+
border-radius: 8px;
|
|
33186
|
+
margin-top: 12px;
|
|
33187
|
+
border: 1px solid #f59e0b;
|
|
33188
|
+
}
|
|
33189
|
+
|
|
33190
|
+
.energy-summary-tooltip__excluded-icon {
|
|
33191
|
+
font-size: 16px;
|
|
33192
|
+
flex-shrink: 0;
|
|
33193
|
+
}
|
|
33194
|
+
|
|
33195
|
+
.energy-summary-tooltip__excluded-content {
|
|
33196
|
+
flex: 1;
|
|
33197
|
+
min-width: 0;
|
|
33198
|
+
}
|
|
33199
|
+
|
|
33200
|
+
.energy-summary-tooltip__excluded-title {
|
|
33201
|
+
font-weight: 600;
|
|
33202
|
+
font-size: 11px;
|
|
33203
|
+
color: #92400e;
|
|
33204
|
+
margin-bottom: 4px;
|
|
33205
|
+
}
|
|
33206
|
+
|
|
33207
|
+
.energy-summary-tooltip__excluded-list {
|
|
33208
|
+
font-size: 10px;
|
|
33209
|
+
color: #78350f;
|
|
33210
|
+
line-height: 1.4;
|
|
33211
|
+
}
|
|
33212
|
+
|
|
33213
|
+
.energy-summary-tooltip__excluded-item {
|
|
33214
|
+
display: flex;
|
|
33215
|
+
justify-content: space-between;
|
|
33216
|
+
padding: 2px 0;
|
|
33217
|
+
border-bottom: 1px dashed rgba(120, 53, 15, 0.2);
|
|
33218
|
+
}
|
|
33219
|
+
|
|
33220
|
+
.energy-summary-tooltip__excluded-item:last-child {
|
|
33221
|
+
border-bottom: none;
|
|
33222
|
+
}
|
|
33223
|
+
|
|
33224
|
+
.energy-summary-tooltip__excluded-label {
|
|
33225
|
+
overflow: hidden;
|
|
33226
|
+
text-overflow: ellipsis;
|
|
33227
|
+
white-space: nowrap;
|
|
33228
|
+
max-width: 200px;
|
|
33229
|
+
}
|
|
33230
|
+
|
|
33231
|
+
.energy-summary-tooltip__excluded-value {
|
|
33232
|
+
font-weight: 600;
|
|
33233
|
+
flex-shrink: 0;
|
|
33234
|
+
margin-left: 8px;
|
|
33235
|
+
}
|
|
33236
|
+
|
|
33178
33237
|
/* Responsive adjustments */
|
|
33179
33238
|
@media (max-width: 600px) {
|
|
33180
33239
|
.energy-summary-tooltip__content {
|
|
@@ -33324,6 +33383,38 @@
|
|
|
33324
33383
|
`;
|
|
33325
33384
|
}).join("");
|
|
33326
33385
|
},
|
|
33386
|
+
/**
|
|
33387
|
+
* Render excluded devices notice (if any devices are excluded from CAG)
|
|
33388
|
+
*/
|
|
33389
|
+
renderExcludedNotice(excludedDevices, unit) {
|
|
33390
|
+
if (!excludedDevices || excludedDevices.length === 0) {
|
|
33391
|
+
return "";
|
|
33392
|
+
}
|
|
33393
|
+
const deviceItems = excludedDevices.map((device) => `
|
|
33394
|
+
<div class="energy-summary-tooltip__excluded-item">
|
|
33395
|
+
<span class="energy-summary-tooltip__excluded-label" title="${device.label}">${device.label}</span>
|
|
33396
|
+
<span class="energy-summary-tooltip__excluded-value">${formatConsumption2(device.value, unit)}</span>
|
|
33397
|
+
</div>
|
|
33398
|
+
`).join("");
|
|
33399
|
+
const totalExcluded = excludedDevices.reduce((sum, d) => sum + (d.value || 0), 0);
|
|
33400
|
+
return `
|
|
33401
|
+
<div class="energy-summary-tooltip__excluded-notice">
|
|
33402
|
+
<span class="energy-summary-tooltip__excluded-icon">\u26A0\uFE0F</span>
|
|
33403
|
+
<div class="energy-summary-tooltip__excluded-content">
|
|
33404
|
+
<div class="energy-summary-tooltip__excluded-title">
|
|
33405
|
+
Dispositivos exclu\xEDdos do subtotal CAG (${excludedDevices.length})
|
|
33406
|
+
</div>
|
|
33407
|
+
<div class="energy-summary-tooltip__excluded-list">
|
|
33408
|
+
${deviceItems}
|
|
33409
|
+
<div class="energy-summary-tooltip__excluded-item" style="font-weight: 700; margin-top: 4px; padding-top: 4px; border-top: 1px solid rgba(120, 53, 15, 0.3);">
|
|
33410
|
+
<span>Total exclu\xEDdo:</span>
|
|
33411
|
+
<span class="energy-summary-tooltip__excluded-value">${formatConsumption2(totalExcluded, unit)}</span>
|
|
33412
|
+
</div>
|
|
33413
|
+
</div>
|
|
33414
|
+
</div>
|
|
33415
|
+
</div>
|
|
33416
|
+
`;
|
|
33417
|
+
},
|
|
33327
33418
|
/**
|
|
33328
33419
|
* Render full tooltip HTML
|
|
33329
33420
|
*/
|
|
@@ -33331,6 +33422,7 @@
|
|
|
33331
33422
|
const categoryRows = this.renderCategoryTree(summary.byCategory, summary.unit);
|
|
33332
33423
|
const statusMatrix = this.renderStatusMatrix(summary.byStatus);
|
|
33333
33424
|
const timestamp = formatTimestamp3(summary.lastUpdated);
|
|
33425
|
+
const excludedNotice = this.renderExcludedNotice(summary.excludedFromCAG, summary.unit);
|
|
33334
33426
|
return `
|
|
33335
33427
|
<div class="energy-summary-tooltip__content">
|
|
33336
33428
|
<div class="energy-summary-tooltip__header" data-drag-handle>
|
|
@@ -33377,6 +33469,7 @@
|
|
|
33377
33469
|
<div class="energy-summary-tooltip__status-matrix">
|
|
33378
33470
|
${statusMatrix}
|
|
33379
33471
|
</div>
|
|
33472
|
+
${excludedNotice}
|
|
33380
33473
|
</div>
|
|
33381
33474
|
<div class="energy-summary-tooltip__total">
|
|
33382
33475
|
<span class="energy-summary-tooltip__total-label">Consumo Total</span>
|
|
@@ -34074,10 +34167,18 @@
|
|
|
34074
34167
|
offlineDevices: widgetAggregation.offlineDevices || [],
|
|
34075
34168
|
noConsumptionDevices: widgetAggregation.noConsumptionDevices || []
|
|
34076
34169
|
};
|
|
34170
|
+
const orchestratorTotal = (widgetAggregation.normal || 0) + (widgetAggregation.alert || 0) + (widgetAggregation.failure || 0) + (widgetAggregation.standby || 0) + (widgetAggregation.offline || 0) + (widgetAggregation.noConsumption || 0);
|
|
34171
|
+
if (orchestratorTotal > 0) {
|
|
34172
|
+
summary.totalDevices = orchestratorTotal;
|
|
34173
|
+
}
|
|
34077
34174
|
} else {
|
|
34078
34175
|
const statusAggregation = this._aggregateDeviceStatusFromOrchestrator(domain);
|
|
34079
34176
|
if (statusAggregation.hasData) {
|
|
34080
34177
|
summary.byStatus = statusAggregation.byStatus;
|
|
34178
|
+
const orchestratorTotal = statusAggregation.byStatus.normal + statusAggregation.byStatus.alert + statusAggregation.byStatus.failure + statusAggregation.byStatus.standby + statusAggregation.byStatus.offline + statusAggregation.byStatus.noConsumption;
|
|
34179
|
+
if (orchestratorTotal > 0) {
|
|
34180
|
+
summary.totalDevices = orchestratorTotal;
|
|
34181
|
+
}
|
|
34081
34182
|
} else {
|
|
34082
34183
|
const totalDevices = summary.totalDevices;
|
|
34083
34184
|
const statusData = receivedData?.statusCounts || receivedData?.deviceStatus || null;
|
|
@@ -35428,10 +35529,18 @@
|
|
|
35428
35529
|
offlineDevices: widgetAggregation.offlineDevices || [],
|
|
35429
35530
|
noConsumptionDevices: widgetAggregation.noConsumptionDevices || []
|
|
35430
35531
|
};
|
|
35532
|
+
const orchestratorTotal = (widgetAggregation.normal || 0) + (widgetAggregation.alert || 0) + (widgetAggregation.failure || 0) + (widgetAggregation.standby || 0) + (widgetAggregation.offline || 0) + (widgetAggregation.noConsumption || 0);
|
|
35533
|
+
if (orchestratorTotal > 0) {
|
|
35534
|
+
summary.totalDevices = orchestratorTotal;
|
|
35535
|
+
}
|
|
35431
35536
|
} else {
|
|
35432
35537
|
const statusAggregation = this._aggregateDeviceStatusFromOrchestrator(domain);
|
|
35433
35538
|
if (statusAggregation.hasData) {
|
|
35434
35539
|
summary.byStatus = statusAggregation.byStatus;
|
|
35540
|
+
const orchestratorTotal = statusAggregation.byStatus.normal + statusAggregation.byStatus.alert + statusAggregation.byStatus.failure + statusAggregation.byStatus.standby + statusAggregation.byStatus.offline + statusAggregation.byStatus.noConsumption;
|
|
35541
|
+
if (orchestratorTotal > 0) {
|
|
35542
|
+
summary.totalDevices = orchestratorTotal;
|
|
35543
|
+
}
|
|
35435
35544
|
} else {
|
|
35436
35545
|
const totalDevices = summary.totalDevices;
|
|
35437
35546
|
const statusData = receivedData?.statusCounts || receivedData?.deviceStatus || null;
|