mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-04-22 18:46:53 -04:00
Remove count of warnings/criticals from GUI
This commit is contained in:
@@ -34,6 +34,7 @@ public class CheckDetailController implements FxController {
|
||||
private final Binding<Boolean> checkCancelled;
|
||||
private final Binding<Number> countOfWarnSeverity;
|
||||
private final Binding<Number> countOfCritSeverity;
|
||||
private final Binding<Boolean> warnOrCritsExist;
|
||||
private final ResultListCellFactory resultListCellFactory;
|
||||
|
||||
public CheckStateIconView checkStateIconView;
|
||||
@@ -56,6 +57,7 @@ public class CheckDetailController implements FxController {
|
||||
this.checkFinished = EasyBind.combine(checkSucceeded, checkFailed, checkCancelled, (a, b, c) -> a || b || c);
|
||||
this.countOfWarnSeverity = results.reduce(countSeverity(DiagnosticResult.Severity.WARN));
|
||||
this.countOfCritSeverity = results.reduce(countSeverity(DiagnosticResult.Severity.CRITICAL));
|
||||
this.warnOrCritsExist = EasyBind.combine(checkSucceeded, countOfWarnSeverity, countOfCritSeverity, (suceeded, warns, crits) -> suceeded && (warns.longValue() > 0 || crits.longValue() > 0) );
|
||||
selectedTask.addListener(this::selectedTaskChanged);
|
||||
}
|
||||
|
||||
@@ -156,6 +158,14 @@ public class CheckDetailController implements FxController {
|
||||
return checkCancelled.getValue();
|
||||
}
|
||||
|
||||
public Binding<Boolean> warnOrCritsExistProperty() {
|
||||
return warnOrCritsExist;
|
||||
}
|
||||
|
||||
public boolean isWarnOrCritsExist() {
|
||||
return warnOrCritsExist.getValue();
|
||||
}
|
||||
|
||||
public Binding<Boolean> checkCancelledProperty() {
|
||||
return checkCancelled;
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ import javafx.event.ActionEvent;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.control.CheckBox;
|
||||
import javafx.scene.control.ListView;
|
||||
import javafx.scene.control.SelectionMode;
|
||||
import javafx.stage.Stage;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
@@ -60,6 +61,7 @@ public class CheckListController implements FxController {
|
||||
|
||||
@FXML
|
||||
public void initialize() {
|
||||
checksListView.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);
|
||||
checksListView.setItems(checks);
|
||||
checksListView.setCellFactory(view -> new CheckListCell());
|
||||
selectedCheck.bind(checksListView.getSelectionModel().selectedItemProperty());
|
||||
|
||||
Reference in New Issue
Block a user