fix(functions): print drive
hard code program svgs instead of attempting to construct via cssmain
parent
f7e1879bca
commit
4ac8c18309
|
|
@ -7,26 +7,6 @@ header, #drives, #services, footer {
|
||||||
float: left;
|
float: left;
|
||||||
width: 20%;
|
width: 20%;
|
||||||
}
|
}
|
||||||
.chart {
|
|
||||||
height: 80%;
|
|
||||||
width: 80%;
|
|
||||||
viewBox: 0 0 20 20;
|
|
||||||
}
|
|
||||||
circle {
|
|
||||||
cx: 10;
|
|
||||||
cy: 10;
|
|
||||||
}
|
|
||||||
.pie {
|
|
||||||
fill: #bbb;
|
|
||||||
r: 10;
|
|
||||||
}
|
|
||||||
.piece {
|
|
||||||
stroke: #312c4c;
|
|
||||||
r: 5;
|
|
||||||
fill: transparent;
|
|
||||||
stroke-width: 10;
|
|
||||||
transform: rotate(-90) translate(-20);
|
|
||||||
}
|
|
||||||
h5 {
|
h5 {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
margin: 0.5em 3em;
|
margin: 0.5em 3em;
|
||||||
|
|
|
||||||
|
|
@ -36,15 +36,19 @@
|
||||||
<div class="drive">
|
<div class="drive">
|
||||||
<h3>' . $drive->name . '</h3>
|
<h3>' . $drive->name . '</h3>
|
||||||
<h4>' . $drive->description . '</h4>
|
<h4>' . $drive->description . '</h4>
|
||||||
<svg class="chart">
|
|
||||||
<circle class="pie" />
|
<svg height="80%" width="80%" viewBox="0 0 20 20">
|
||||||
<circle
|
<circle r="10" cx="10" cy="10" fill="#bbb" />
|
||||||
|
<circle r="5" cx="10" cy="10" fill="transparent"
|
||||||
id="' . $drive->id . '"
|
id="' . $drive->id . '"
|
||||||
class="piece"
|
stroke="#fff"
|
||||||
|
stroke-width="10"
|
||||||
stroke-dasharray="' . ($drive->spacePercentageUsed ?
|
stroke-dasharray="' . ($drive->spacePercentageUsed ?
|
||||||
$drive->spacePercentageUsed : 0) * 31.4 / 100 . ' 31.4"
|
$drive->spacePercentageUsed : 0) * 31.4 / 100 . ' 31.4"
|
||||||
|
transform="rotate(-90) translate(-20)"
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
||||||
<h5>Free Space: <em>' . getByteString($drive->spaceFree) . '</em></h5>
|
<h5>Free Space: <em>' . getByteString($drive->spaceFree) . '</em></h5>
|
||||||
<h5>Used Space: <em>' . getByteString($drive->spaceUsed) . '</em></h5>
|
<h5>Used Space: <em>' . getByteString($drive->spaceUsed) . '</em></h5>
|
||||||
</div>';
|
</div>';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue