/
rgd045
/
crypt-file
Обзор
Документация
Войти
/
rgd045
/
crypt-file
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
src/main/resources/fxml/stats.fxml
93 строки
5 KB
Armin Schrenk
adjust translations and translation keys
01 дек 2022, 15:32
Не верифицирован
01 дек 2022, 15:32
d5523f0
Код
Авторство
О чём код?
<?xml version="1.0" encoding="UTF-8"?> <?import org.cryptomator.ui.controls.DataLabel?> <?import org.cryptomator.ui.controls.FormattedLabel?> <?import org.cryptomator.ui.controls.ThroughputLabel?> <?import javafx.geometry.Insets?> <?import javafx.scene.chart.AreaChart?> <?import javafx.scene.chart.NumberAxis?> <?import javafx.scene.control.Label?> <?import javafx.scene.Cursor?> <?import javafx.scene.Group?> <?import javafx.scene.layout.HBox?> <?import javafx.scene.layout.StackPane?> <?import javafx.scene.layout.VBox?> <?import javafx.scene.shape.Arc?> <?import javafx.scene.shape.Circle?> <HBox xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml" fx:controller="org.cryptomator.ui.stats.VaultStatisticsController" prefWidth="800.0" spacing="12"> <padding> <Insets topRightBottomLeft="12"/> </padding> <!-- Caching --> <StackPane prefWidth="200" prefHeight="200"> <Group> <Circle centerX="100" centerY="100" radius="100" opacity="0"/> <!-- for alignment. visible=false does not yield the desired result --> <Arc styleClass="cache-arc-background" centerX="100" centerY="100" radiusX="100" radiusY="100" startAngle="225" length="-270"/> <Arc styleClass="cache-arc-foreground" centerX="100" centerY="100" radiusX="100" radiusY="100" startAngle="225" length="${controller.cacheHitDegrees}"/> </Group> <VBox StackPane.alignment="CENTER" alignment="CENTER"> <FormattedLabel styleClass="label-extra-large" format="\%1.0f %%" arg1="${controller.cacheHitPercentage}"/> <Label text="%stats.cacheHitRate"/> </VBox> </StackPane> <!-- Read --> <VBox prefWidth="300" prefHeight="300" spacing="6" alignment="CENTER"> <ThroughputLabel styleClass="label-large" idleFormat="%stats.read.throughput.idle" kibsFormat="%stats.read.throughput.kibs" mibsFormat="%stats.read.throughput.mibs" bytesPerSecond="${controller.bpsRead}"/> <AreaChart fx:id="readChart" styleClass="io-stats" createSymbols="false" animated="false"> <xAxis> <NumberAxis fx:id="readChartXAxis" styleClass="io-stats" autoRanging="false" forceZeroInRange="false" side="BOTTOM"/> </xAxis> <yAxis> <NumberAxis fx:id="readChartYAxis" styleClass="io-stats" autoRanging="false" forceZeroInRange="true" side="LEFT" tickUnit="Infinity"/> </yAxis> <cursor> <Cursor fx:constant="DEFAULT"/> </cursor> </AreaChart> <DataLabel byteFormat="%stats.read.total.data.none" kibFormat="%stats.read.total.data.kib" mibFormat="%stats.read.total.data.mib" gibFormat="%stats.read.total.data.gib" dataInBytes="${controller.totalBytesRead}"/> <DataLabel byteFormat="%stats.decr.total.data.none" kibFormat="%stats.decr.total.data.kib" mibFormat="%stats.decr.total.data.mib" gibFormat="%stats.decr.total.data.gib" dataInBytes="${controller.totalBytesDecrypted}"/> <FormattedLabel format="%stats.read.accessCount" arg1="${controller.filesRead}"/> </VBox> <!-- Write --> <VBox prefWidth="300" prefHeight="300" spacing="6" alignment="CENTER"> <ThroughputLabel styleClass="label-large" idleFormat="%stats.write.throughput.idle" kibsFormat="%stats.write.throughput.kibs" mibsFormat="%stats.write.throughput.mibs" bytesPerSecond="${controller.bpsWritten}"/> <AreaChart fx:id="writeChart" styleClass="io-stats" createSymbols="false" animated="false"> <xAxis> <NumberAxis fx:id="writeChartXAxis" styleClass="io-stats" autoRanging="false" forceZeroInRange="false" side="BOTTOM"/> </xAxis> <yAxis> <NumberAxis fx:id="writeChartYAxis" styleClass="io-stats" autoRanging="false" forceZeroInRange="true" side="LEFT" tickUnit="Infinity"/> </yAxis> <cursor> <Cursor fx:constant="DEFAULT"/> </cursor> </AreaChart> <DataLabel byteFormat="%stats.write.total.data.none" kibFormat="%stats.write.total.data.kib" mibFormat="%stats.write.total.data.mib" gibFormat="%stats.write.total.data.gib" dataInBytes="${controller.totalBytesWritten}"/> <DataLabel byteFormat="%stats.encr.total.data.none" kibFormat="%stats.encr.total.data.kib" mibFormat="%stats.encr.total.data.mib" gibFormat="%stats.encr.total.data.gib" dataInBytes="${controller.totalBytesEncrypted}"/> <FormattedLabel format="%stats.write.accessCount" arg1="${controller.filesWritten}"/> </VBox> <!-- Access --> <VBox prefWidth="300" prefHeight="300" spacing="6" alignment="CENTER"> <FormattedLabel styleClass="label-large" format="%stats.access.current" arg1="${controller.filesAccessed}"/> <AreaChart fx:id="accessChart" styleClass="io-stats" createSymbols="false" animated="false"> <xAxis> <NumberAxis fx:id="accessChartXAxis" styleClass="io-stats" autoRanging="false" forceZeroInRange="false" side="BOTTOM"/> </xAxis> <yAxis> <NumberAxis fx:id="accessChartYAxis" styleClass="io-stats" autoRanging="true" forceZeroInRange="true" side="LEFT" tickUnit="Infinity"/> </yAxis> <cursor> <Cursor fx:constant="DEFAULT"/> </cursor> </AreaChart> <FormattedLabel format="%stats.access.total" arg1="${controller.totalFilesAccessed}"/> <Label/> <!-- to align with other graphs --> <Label/> <!-- to align with other graphs --> </VBox> </HBox>