use of com.microsoft.intellij.docker.dialogs.AzureViewDockerDialog in project azure-tools-for-java by Microsoft.
the class ViewDockerHostAction method actionPerformed.
@Override
public void actionPerformed(NodeActionEvent e) {
dockerHost = dockerManager.getDockerHostForURL(dockerHost.apiUrl);
AzureViewDockerDialog viewDockerDialog = new AzureViewDockerDialog(project, dockerHost, dockerManager);
viewDockerDialog.show();
if (viewDockerDialog.getInternalExitCode() == AzureViewDockerDialog.UPDATE_EXIT_CODE) {
AzureDockerUIResources.updateDockerHost(project, new EditableDockerHost(dockerHost), dockerManager, true);
}
}
use of com.microsoft.intellij.docker.dialogs.AzureViewDockerDialog in project azure-tools-for-java by Microsoft.
the class AzureSelectDockerHostStep method onViewDockerHostAction.
private void onViewDockerHostAction() {
try {
DefaultTableModel tableModel = (DefaultTableModel) dockerHostsTable.getModel();
String apiURL = (String) tableModel.getValueAt(dockerHostsTable.getSelectedRow(), 4);
DockerHost dockerHost = dockerManager.getDockerHostForURL(apiURL);
if (dockerHost == null) {
throw new RuntimeException(String.format("Unexpected error: can't locate the Docker host for %s!", apiURL));
}
// TODO: Check if dockerHost.certVault and dockerHost.hostVM have valid values and if not warn
AzureViewDockerDialog viewDockerDialog = new AzureViewDockerDialog(model.getProject(), dockerHost, dockerManager);
viewDockerDialog.show();
if (viewDockerDialog.getInternalExitCode() == AzureViewDockerDialog.UPDATE_EXIT_CODE) {
onEditDockerHostAction();
}
} catch (Exception e) {
String msg = "An error occurred while attempting to view the selected Docker host.\n" + e.getMessage();
PluginUtil.displayErrorDialogAndLog("Error", msg, e);
if (AzureDockerUtils.DEBUG)
e.printStackTrace();
LOGGER.error("onViewDockerHostAction", e);
PluginUtil.displayErrorDialog("View Docker Hosts Error", msg);
}
}
Aggregations