use of com.exalttech.trex.ui.dialog.DialogWindow in project trex-stateless-gui by cisco-system-traffic-generator.
the class PacketTableView method hanldeImportPcap.
/**
* Handle import pcap
*/
private void hanldeImportPcap() {
try {
// open import dialog
setStreamEditingWindowOpen(true);
Stage owner = (Stage) streamPacketTableView.getScene().getWindow();
DialogWindow importPcapWindow = new DialogWindow("ImportPcapWizard.fxml", " Import Pcap", 60, 80, false, owner);
ImportPcapWizardController importController = (ImportPcapWizardController) importPcapWindow.getController();
importController.initWizard(tabledata.getProfiles(), tabledata.getYamlFileName());
importPcapWindow.show(true);
} catch (Exception ex) {
LOG.error("Error loading pcap file", ex);
}
}
use of com.exalttech.trex.ui.dialog.DialogWindow in project trex-stateless-gui by cisco-system-traffic-generator.
the class MainViewController method openConnectDialog.
/**
* Open connect dialog
*/
private void openConnectDialog() {
try {
DialogWindow connectWindow = new DialogWindow("ConnectDialog.fxml", "Connect", 300, 100, false, TrexApp.getPrimaryStage());
connectWindow.show(true);
if (ConnectionManager.getInstance().isConnected()) {
StatsLoader.getInstance().start();
StatsStorage.getInstance().startPolling();
serverStatusLabel.setText("Connected");
serverStatusIcon.setImage(new Image("/icons/connectedIcon.gif"));
connectIcon.getStyleClass().add("disconnectIcon");
connectDixconnectTooltip.setText("Disconnect from TRex server");
connectMenuItem.setText(DISCONNECT_MENU_ITEM_TITLE);
statsMenuItem.setDisable(false);
clearCache.setDisable(false);
logsContainer.setDisable(false);
copyToClipboardBtn.setDisable(false);
dashboardIcon.setDisable(false);
serverRPCMethods.serverApiSync();
loadSystemInfo();
portManager.updatePortForce();
}
} catch (IOException ex) {
LOG.error("Error while Connecting", ex);
}
}
use of com.exalttech.trex.ui.dialog.DialogWindow in project trex-stateless-gui by cisco-system-traffic-generator.
the class MainViewController method openTrafficProfile.
/**
* Open manage traffic profile dialog
*
* @param event
* @throws IOException
*/
@FXML
public void openTrafficProfile(ActionEvent event) throws IOException {
DialogWindow trafficWindow = new DialogWindow("TrafficProfileDialog.fxml", "Traffic Profiles", 10, 50, true, TrexApp.getPrimaryStage());
TrafficProfileDialogController controller = (TrafficProfileDialogController) trafficWindow.getController();
controller.init();
trafficWindow.show(true);
}
use of com.exalttech.trex.ui.dialog.DialogWindow in project trex-stateless-gui by cisco-system-traffic-generator.
the class ProfileManager method createNewProfile.
/**
*
* @param currentStage
* @return
* @throws IOException
*/
public String createNewProfile(Stage currentStage) throws IOException {
String profileName = "";
DialogWindow profileNameWindow = new DialogWindow("ProfileStreamNameDialog.fxml", "Create Profile", 150, 100, false, currentStage);
ProfileStreamNameDialogController controller = (ProfileStreamNameDialogController) profileNameWindow.getController();
controller.setProfileWindow(true);
profileNameWindow.show(true);
if (controller.isDataAvailable()) {
profileName = controller.getName() + ".yaml";
File newFile = FileManager.createNewFile(profileName);
updateProfilesList(newFile, true);
}
return profileName;
}
Aggregations