diff --git a/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.css b/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.css index abd568e..96dac70 100644 --- a/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.css +++ b/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.css @@ -191,6 +191,17 @@ table { color: #3f51b5; font-weight: bold; } +.badge-disk-type { + display: inline-block; + padding: 2px 6px; + font-size: 11px; + font-weight: bold; + color: #fff; + background-color: #607d8b; + border-radius: 4px; + margin-left: 8px; + vertical-align: middle; +} .disk-card-metrics-wrapper { display: flex; align-items: center; diff --git a/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.html b/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.html index 9d41f99..1855f37 100644 --- a/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.html +++ b/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.html @@ -46,7 +46,11 @@
-

Disco {{ disk.diskNumber }}

+

Disco {{ disk.diskNumber }} + @if (disk.diskType) { + {{ disk.diskType }} + } +

Total: {{ disk.total.toFixed(2) }} GB  |  Usado: {{ (disk.used).toFixed(2) }} GB ({{ diff --git a/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.ts b/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.ts index d142845..f59e8bd 100644 --- a/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.ts +++ b/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.ts @@ -133,7 +133,7 @@ export class ClientDetailsComponent { } calculateDiskUsage() { - const diskUsageMap = new Map(); + const diskUsageMap = new Map(); this.partitions.forEach((partition: any) => { const diskNumber = partition.diskNumber; @@ -146,13 +146,14 @@ export class ClientDetailsComponent { if (partition.partitionNumber === 0) { diskData!.total = Number((partition.size / 1024).toFixed(2)); + diskData!.diskType = partition.diskType; } else { diskData!.used += Number((partition.size / 1024).toFixed(2)); diskData!.partitions.push(partition); } }); - this.chartDisk = Array.from(diskUsageMap.entries()).map(([diskNumber, { total, used, partitions }]) => { + this.chartDisk = Array.from(diskUsageMap.entries()).map(([diskNumber, { total, used, partitions, diskType }]) => { const partitionData = partitions.map(partition => ({ name: `${this.translate.instant('labelPartition')} ${partition.partitionNumber}`, value: Number((partition.size / 1024).toFixed(2)) @@ -172,7 +173,8 @@ export class ClientDetailsComponent { total, used, percentage: total > 0 ? Math.round((used / total) * 100) : 0, - partitions + partitions, + diskType }; }); diff --git a/ogWebconsole/src/app/components/groups/shared/disk-partition-selector/disk-partition-selector.component.css b/ogWebconsole/src/app/components/groups/shared/disk-partition-selector/disk-partition-selector.component.css index a0d98c9..eeb072e 100644 --- a/ogWebconsole/src/app/components/groups/shared/disk-partition-selector/disk-partition-selector.component.css +++ b/ogWebconsole/src/app/components/groups/shared/disk-partition-selector/disk-partition-selector.component.css @@ -32,6 +32,18 @@ font-weight: bold; } +.badge-disk-type { + display: inline-block; + padding: 2px 6px; + font-size: 11px; + font-weight: bold; + color: #fff; + background-color: #607d8b; + border-radius: 4px; + margin-left: 8px; + vertical-align: middle; +} + .disk-card-layout { display: flex; align-items: stretch; diff --git a/ogWebconsole/src/app/components/groups/shared/disk-partition-selector/disk-partition-selector.component.html b/ogWebconsole/src/app/components/groups/shared/disk-partition-selector/disk-partition-selector.component.html index 5def996..e93d85c 100644 --- a/ogWebconsole/src/app/components/groups/shared/disk-partition-selector/disk-partition-selector.component.html +++ b/ogWebconsole/src/app/components/groups/shared/disk-partition-selector/disk-partition-selector.component.html @@ -3,7 +3,11 @@
-

Disco {{ disk.diskNumber }}

+

Disco {{ disk.diskNumber }} + @if (disk.diskType) { + {{ disk.diskType }} + } +

diff --git a/ogWebconsole/src/app/components/groups/shared/disk-partition-selector/disk-partition-selector.component.ts b/ogWebconsole/src/app/components/groups/shared/disk-partition-selector/disk-partition-selector.component.ts index 849392a..4281f0d 100644 --- a/ogWebconsole/src/app/components/groups/shared/disk-partition-selector/disk-partition-selector.component.ts +++ b/ogWebconsole/src/app/components/groups/shared/disk-partition-selector/disk-partition-selector.component.ts @@ -43,9 +43,12 @@ export class DiskPartitionSelectorComponent implements OnChanges { for (const diskNum in grouped) { if (grouped.hasOwnProperty(diskNum)) { + const diskPartitions = grouped[diskNum]; + const partitionZero = diskPartitions.find((p: any) => p.partitionNumber === 0); this.diskUsageData.push({ diskNumber: diskNum, - partitions: grouped[diskNum] + partitions: diskPartitions, + diskType: partitionZero ? partitionZero.diskType : undefined }); } }