-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2905 from ControlSystemStudio/CSSTUDIO-1966
Save & restore: support search on PV name(s)
- Loading branch information
Showing
15 changed files
with
550 additions
and
404 deletions.
There are no files selected for viewing
Binary file modified
BIN
-111 KB
(43%)
app/save-and-restore/app/doc/images/search-and-filter-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,18 +26,9 @@ | |
import javafx.beans.property.SimpleStringProperty; | ||
import javafx.fxml.FXML; | ||
import javafx.fxml.Initializable; | ||
import javafx.scene.control.Alert; | ||
import javafx.scene.control.*; | ||
import javafx.scene.control.Alert.AlertType; | ||
import javafx.scene.control.Button; | ||
import javafx.scene.control.ButtonBar.ButtonData; | ||
import javafx.scene.control.ButtonType; | ||
import javafx.scene.control.Label; | ||
import javafx.scene.control.Pagination; | ||
import javafx.scene.control.TableColumn; | ||
import javafx.scene.control.TableRow; | ||
import javafx.scene.control.TableView; | ||
import javafx.scene.control.TextField; | ||
import javafx.scene.control.Tooltip; | ||
import javafx.scene.image.ImageView; | ||
import org.phoebus.applications.saveandrestore.DirectoryUtilities; | ||
import org.phoebus.applications.saveandrestore.Messages; | ||
|
@@ -52,23 +43,14 @@ | |
import org.phoebus.applications.saveandrestore.ui.ImageRepository; | ||
import org.phoebus.applications.saveandrestore.ui.SaveAndRestoreService; | ||
import org.phoebus.framework.jobs.JobManager; | ||
import org.phoebus.ui.dialog.DialogHelper; | ||
import org.phoebus.ui.dialog.ExceptionDetailsErrorDialog; | ||
import org.phoebus.util.time.TimestampFormats; | ||
|
||
import javax.ws.rs.core.MultivaluedHashMap; | ||
import javax.ws.rs.core.MultivaluedMap; | ||
import java.net.URL; | ||
import java.text.MessageFormat; | ||
import java.util.ArrayList; | ||
import java.util.Collections; | ||
import java.util.Comparator; | ||
import java.util.Date; | ||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.Optional; | ||
import java.util.ResourceBundle; | ||
import java.util.Stack; | ||
import java.util.*; | ||
import java.util.logging.Level; | ||
import java.util.logging.Logger; | ||
import java.util.regex.Pattern; | ||
|
@@ -80,6 +62,7 @@ | |
* @author <a href="mailto:[email protected]">Genie Jhang</a> | ||
*/ | ||
|
||
@SuppressWarnings("unused") | ||
public class SearchWindowController implements Initializable { | ||
|
||
private SearchAndFilterViewController searchAndFilterViewController; | ||
|
@@ -184,7 +167,7 @@ protected void updateItem(Node node, boolean empty) { | |
// This is to accept numerical input only, and at most 3 digits (maximizing search to 999 hits). | ||
pageSizeTextField.textProperty().addListener((observable, oldValue, newValue) -> { | ||
if (DIGIT_PATTERN.matcher(newValue).matches()) { | ||
if ("".equals(newValue)) { | ||
if (newValue.isEmpty()) { | ||
pageSizeProperty.set(Preferences.search_result_page_size); | ||
} else if (newValue.length() > 3) { | ||
pageSizeTextField.setText(oldValue); | ||
|
@@ -282,14 +265,7 @@ public void search() { | |
resultTableView.getItems().setAll(tableEntries); | ||
}); | ||
} else { | ||
Platform.runLater(() -> { | ||
Alert alert = new Alert(AlertType.INFORMATION); | ||
alert.setTitle(Messages.searchNoResultsTitle); | ||
alert.setHeaderText(Messages.searchNoResult); | ||
DialogHelper.positionDialog(alert, resultTableView, -300, -200); | ||
alert.show(); | ||
clearSearchResult(); | ||
}); | ||
Platform.runLater(this::clearSearchResult); | ||
} | ||
} catch (Exception e) { | ||
ExceptionDetailsErrorDialog.openError( | ||
|
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.