mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-09-20 15:04:23 +00:00
Refactoring
This commit is contained in:
@@ -64,17 +64,17 @@ public class VaultStats {
|
|||||||
|
|
||||||
private void updateStats(Optional<CryptoFileSystemStats> stats) {
|
private void updateStats(Optional<CryptoFileSystemStats> stats) {
|
||||||
assert Platform.isFxApplicationThread();
|
assert Platform.isFxApplicationThread();
|
||||||
bytesPerSecondRead.set(stats.map(CryptoFileSystemStats::pollBytesRead).orElse(0l));
|
bytesPerSecondRead.set(stats.map(CryptoFileSystemStats::pollBytesRead).orElse(0L));
|
||||||
bytesPerSecondWritten.set(stats.map(CryptoFileSystemStats::pollBytesWritten).orElse(0l));
|
bytesPerSecondWritten.set(stats.map(CryptoFileSystemStats::pollBytesWritten).orElse(0L));
|
||||||
cacheHitRate.set(stats.map(this::getCacheHitRate).orElse(0.0));
|
cacheHitRate.set(stats.map(this::getCacheHitRate).orElse(0.0));
|
||||||
bytesPerSecondDecrypted.set(stats.map(CryptoFileSystemStats::pollBytesDecrypted).orElse(0l));
|
bytesPerSecondDecrypted.set(stats.map(CryptoFileSystemStats::pollBytesDecrypted).orElse(0L));
|
||||||
bytesPerSecondEncrypted.set(stats.map(CryptoFileSystemStats::pollBytesEncrypted).orElse(0l));
|
bytesPerSecondEncrypted.set(stats.map(CryptoFileSystemStats::pollBytesEncrypted).orElse(0L));
|
||||||
toalBytesRead.set(stats.map(CryptoFileSystemStats::pollTotalBytesRead).orElse(0l));
|
toalBytesRead.set(stats.map(CryptoFileSystemStats::pollTotalBytesRead).orElse(0L));
|
||||||
toalBytesWritten.set(stats.map(CryptoFileSystemStats::pollTotalBytesWritten).orElse(0l));
|
toalBytesWritten.set(stats.map(CryptoFileSystemStats::pollTotalBytesWritten).orElse(0L));
|
||||||
totalBytesEncrypted.set(stats.map(CryptoFileSystemStats::pollTotalBytesEncrypted).orElse(0l));
|
totalBytesEncrypted.set(stats.map(CryptoFileSystemStats::pollTotalBytesEncrypted).orElse(0L));
|
||||||
totalBytesDecrypted.set(stats.map(CryptoFileSystemStats::pollTotalBytesDecrypted).orElse(0l));
|
totalBytesDecrypted.set(stats.map(CryptoFileSystemStats::pollTotalBytesDecrypted).orElse(0L));
|
||||||
filesRead.set(stats.map(CryptoFileSystemStats::pollAmountOfFilesRead).orElse(0l));
|
filesRead.set(stats.map(CryptoFileSystemStats::pollAmountOfAccessesRead).orElse(0L));
|
||||||
filesWritten.set(stats.map(CryptoFileSystemStats::pollAmountOfFilesWritten).orElse(0l));
|
filesWritten.set(stats.map(CryptoFileSystemStats::pollAmountOfAccessesWritten).orElse(0L));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<HBox xmlns="http://javafx.com/javafx"
|
<HBox xmlns="http://javafx.com/javafx"
|
||||||
xmlns:fx="http://javafx.com/fxml"
|
xmlns:fx="http://javafx.com/fxml"
|
||||||
fx:controller="org.cryptomator.ui.stats.VaultStatisticsController"
|
fx:controller="org.cryptomator.ui.stats.VaultStatisticsController"
|
||||||
prefWidth="1000.0" spacing="12">
|
prefWidth="800.0" spacing="12">
|
||||||
<padding>
|
<padding>
|
||||||
<Insets topRightBottomLeft="12"/>
|
<Insets topRightBottomLeft="12"/>
|
||||||
</padding>
|
</padding>
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
</VBox>
|
</VBox>
|
||||||
|
|
||||||
<!-- Read -->
|
<!-- Read -->
|
||||||
<VBox prefWidth="400" prefHeight="200">
|
<VBox prefWidth="300" prefHeight="300">
|
||||||
<HBox spacing="12" alignment="CENTER">
|
<HBox spacing="12" alignment="CENTER">
|
||||||
<Label styleClass="label-large" text="%stats.readDataLabel"/>
|
<Label styleClass="label-large" text="%stats.readDataLabel"/>
|
||||||
<ThrougputLabel styleClass="label-large" alignment="CENTER_RIGHT" minWidth="60" idleFormat="%main.vaultDetail.throughput.idle" kibsFormat="%main.vaultDetail.throughput.kbps"
|
<ThrougputLabel styleClass="label-large" alignment="CENTER_RIGHT" minWidth="60" idleFormat="%main.vaultDetail.throughput.idle" kibsFormat="%main.vaultDetail.throughput.kbps"
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
</VBox>
|
</VBox>
|
||||||
|
|
||||||
<!-- Write -->
|
<!-- Write -->
|
||||||
<VBox prefWidth="400" prefHeight="200">
|
<VBox prefWidth="300" prefHeight="300">
|
||||||
<HBox alignment="CENTER">
|
<HBox alignment="CENTER">
|
||||||
<Label styleClass="label-large" text="%stats.writtenDataLabel"/>
|
<Label styleClass="label-large" text="%stats.writtenDataLabel"/>
|
||||||
<ThrougputLabel styleClass="label-large" alignment="CENTER_RIGHT" minWidth="60" idleFormat="%main.vaultDetail.throughput.idle" kibsFormat="%main.vaultDetail.throughput.kbps"
|
<ThrougputLabel styleClass="label-large" alignment="CENTER_RIGHT" minWidth="60" idleFormat="%main.vaultDetail.throughput.idle" kibsFormat="%main.vaultDetail.throughput.kbps"
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
<?import javafx.scene.layout.Region?>
|
<?import javafx.scene.layout.Region?>
|
||||||
<?import javafx.scene.layout.VBox?>
|
<?import javafx.scene.layout.VBox?>
|
||||||
<?import org.cryptomator.ui.controls.FontAwesome5IconView?>
|
<?import org.cryptomator.ui.controls.FontAwesome5IconView?>
|
||||||
<?import org.cryptomator.ui.controls.ThrougputLabel?>
|
|
||||||
<VBox xmlns="http://javafx.com/javafx"
|
<VBox xmlns="http://javafx.com/javafx"
|
||||||
xmlns:fx="http://javafx.com/fxml"
|
xmlns:fx="http://javafx.com/fxml"
|
||||||
fx:controller="org.cryptomator.ui.mainwindow.VaultDetailUnlockedController"
|
fx:controller="org.cryptomator.ui.mainwindow.VaultDetailUnlockedController"
|
||||||
|
|||||||
@@ -169,8 +169,8 @@ stats.totalMiBRead=Total Read:
|
|||||||
stats.totalMiBWritten=Total Written:
|
stats.totalMiBWritten=Total Written:
|
||||||
stats.totalMiBEncrypted=Total Encypted:
|
stats.totalMiBEncrypted=Total Encypted:
|
||||||
stats.totalMiBDecrypted=Total Decrypted:
|
stats.totalMiBDecrypted=Total Decrypted:
|
||||||
stats.totalReads=%s Files Read
|
stats.totalReads=%s Number of Reads
|
||||||
stats.totalWrites=%s Files Written
|
stats.totalWrites=%s Number of Writes
|
||||||
stats.data.bytes=%s Bytes
|
stats.data.bytes=%s Bytes
|
||||||
stats.data.kiB=%.1f KiB
|
stats.data.kiB=%.1f KiB
|
||||||
stats.data.miB=%.1f MiB
|
stats.data.miB=%.1f MiB
|
||||||
|
|||||||
Reference in New Issue
Block a user