File tree Expand file tree Collapse file tree 3 files changed +228
-211
lines changed
new/apps/web/src/lib/components Expand file tree Collapse file tree 3 files changed +228
-211
lines changed Original file line number Diff line number Diff line change 3434</div >
3535
3636<div class =" widgets" >
37- <Drives />
37+ <Drives drives ={ report . Hardware . Storage } />
3838</div >
3939
4040<div class =" widgets" >
Original file line number Diff line number Diff line change 1+ <script lang =" ts" >
2+
3+ interface PartitionInfo {
4+ PartitionCapacity: number ;
5+ PartitionFree: number ;
6+ PartitionLabel: string ;
7+ PartitionLetter: null ;
8+ Filesystem: string ;
9+ CfgMgrErrorCode: number ;
10+ LastErrorCode: number ;
11+ DirtyBitSet: boolean ;
12+ BitlockerEncryptionStatus: boolean ;
13+ }
14+
15+ interface Props {
16+ partitions: Array <PartitionInfo >;
17+ }
18+
19+ let {
20+ partitions
21+ }: Props = $props ();
22+
23+ const partitionTotal: number = partitions .reduce ((total , part ) => total + part .PartitionCapacity , 0 )
24+
25+ </script >
26+
27+ <div class =" partition-bar" >
28+ {#each partitions as partition }
29+ <div class ="partition" style ="width: {(partition .PartitionCapacity / partitionTotal ) * 100 }%;" >
30+ <span >{partition .PartitionLabel } ({partition .PartitionLetter }:)</span >
31+ <span >{partition .Filesystem }</span >
32+ <span >{Math .floor ((partition .PartitionCapacity - partition .PartitionFree ) / 1048576 )} MB / {Math .floor (partition .PartitionCapacity / 1048576 )} MB used</span >
33+ </div >
34+ {/each }
35+ </div >
36+
37+ <style >
38+
39+ .partition-bar {
40+ min-height : 3rem ;
41+ max-height : 4rem ;
42+ display : flex ;
43+ flex-flow : row ;
44+ }
45+
46+ .partition-bar > div {
47+ min-height : inherit ;
48+ border : 1px solid #FFFFFF22 ;
49+ }
50+
51+ .partition-bar > div :nth-child (even ){
52+ background-color : #00000022 ;
53+ }
54+
55+ .partition {
56+ overflow : hidden ;
57+ display : flex ;
58+ align-items : center ;
59+ justify-content : middle ;
60+ flex-flow : column ;
61+ max-height : inherit ;
62+ }
63+
64+ .partition > span {
65+ max-height : inherit ;
66+ font-size : 0.75rem ;
67+ }
68+ </style >
You can’t perform that action at this time.
0 commit comments