-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed outdated leaflet-lite.js dependency.
Added a zero intercept line for the path plot and made the inital progress bar for calibration indeterminate. Generate Evids in YYJJJHHmm (from YYJJJHH) format to maintain compatability with SWFT. Force UTC everywhere, including on insert into the DB. Added a little mouse click handler to the load failure progress bar as a shortcut to the error report. Report the full file path on a failed conversion. Initial implementation of better error reporting during loads. Updated the data example in the README to be less ambiguous w.r.t. literals vs. regex captures. Some spring abstract classes are now deprecated due to default methods; updated. Bumping up to the GA release of Spring Boot 2.0.2 for bugfixes and improvements.
- Loading branch information
1 parent
11633d6
commit 47aede4
Showing
54 changed files
with
2,055 additions
and
1,447 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
109 changes: 109 additions & 0 deletions
109
...ain/java/gov/llnl/gnem/apps/coda/calibration/gui/controllers/FailureReportController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
/* | ||
* Copyright (c) 2018, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory | ||
* CODE-743439. | ||
* All rights reserved. | ||
* This file is part of CCT. For details, see https://github.com/LLNL/coda-calibration-tool. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the “Licensee”); you may not use this file except in compliance with the License. You may obtain a copy of the License at: | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and limitations under the license. | ||
* | ||
* This work was performed under the auspices of the U.S. Department of Energy | ||
* by Lawrence Livermore National Laboratory under Contract DE-AC52-07NA27344. | ||
*/ | ||
package gov.llnl.gnem.apps.coda.calibration.gui.controllers; | ||
|
||
import java.io.IOException; | ||
import java.util.function.Function; | ||
import java.util.stream.Collectors; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.stereotype.Component; | ||
|
||
import com.google.common.eventbus.EventBus; | ||
import com.google.common.eventbus.Subscribe; | ||
|
||
import gov.llnl.gnem.apps.coda.calibration.gui.events.LoadStartingEvent; | ||
import gov.llnl.gnem.apps.coda.calibration.gui.events.ShowFailureReportEvent; | ||
import gov.llnl.gnem.apps.coda.calibration.gui.util.CellBindingUtils; | ||
import gov.llnl.gnem.apps.coda.calibration.model.domain.messaging.PassFailEvent; | ||
import javafx.application.Platform; | ||
import javafx.collections.FXCollections; | ||
import javafx.collections.ObservableList; | ||
import javafx.fxml.FXML; | ||
import javafx.fxml.FXMLLoader; | ||
import javafx.scene.Parent; | ||
import javafx.scene.Scene; | ||
import javafx.scene.control.TableColumn; | ||
import javafx.scene.control.TableView; | ||
import javafx.scene.text.Font; | ||
import javafx.stage.Stage; | ||
import javafx.stage.StageStyle; | ||
|
||
@Component | ||
public class FailureReportController { | ||
|
||
private final Logger log = LoggerFactory.getLogger(this.getClass()); | ||
|
||
private Parent root; | ||
private Scene scene; | ||
private Stage stage; | ||
|
||
@FXML | ||
TableView<String> tableView; | ||
|
||
@FXML | ||
TableColumn<String, String> errorCol; | ||
|
||
private ObservableList<String> errors = FXCollections.observableArrayList(); | ||
|
||
private EventBus bus; | ||
|
||
@Autowired | ||
public FailureReportController(EventBus bus) { | ||
this.bus = bus; | ||
bus.register(this); | ||
Platform.runLater(() -> { | ||
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/fxml/FailureReport.fxml")); | ||
fxmlLoader.setController(this); | ||
stage = new Stage(StageStyle.DECORATED); | ||
Font.loadFont(getClass().getResource("/fxml/MaterialIcons-Regular.ttf").toExternalForm(), 18); | ||
try { | ||
root = fxmlLoader.load(); | ||
scene = new Scene(root); | ||
stage.setScene(scene); | ||
} catch (IOException e) { | ||
throw new IllegalStateException(e); | ||
} | ||
}); | ||
} | ||
|
||
@Subscribe | ||
private void listener(LoadStartingEvent event) { | ||
errors.clear(); | ||
} | ||
|
||
@Subscribe | ||
private void listener(ShowFailureReportEvent event) { | ||
Platform.runLater(() -> { | ||
stage.show(); | ||
stage.toFront(); | ||
}); | ||
} | ||
|
||
@Subscribe | ||
private void listener(PassFailEvent event) { | ||
if (event.getResult() != null && !event.getResult().isSuccess()) { | ||
errors.addAll(event.getResult().getErrors().stream().map(e -> e.getMessage()).collect(Collectors.toList())); | ||
} | ||
} | ||
|
||
@FXML | ||
public void initialize() { | ||
CellBindingUtils.attachTextCellFactoriesString(errorCol, Function.identity()); | ||
tableView.setItems(errors); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.