use of com.microsoft.azure.toolkit.lib.appservice.model.PublishingProfile in project azure-tools-for-java by microsoft.
the class FtpCredentialsWindow method createDialogArea.
/**
* Create contents of the dialog.
*
* @param parent
*/
@Override
protected Control createDialogArea(Composite parent) {
setTitle("FTP Credentials");
setMessage("Web App '" + webApp.name() + "' FTP deployment server credentials.");
Composite area = (Composite) super.createDialogArea(parent);
Composite container = new Composite(area, SWT.NONE);
container.setLayout(new GridLayout(2, false));
container.setLayoutData(new GridData(GridData.FILL_BOTH));
PublishingProfile pp = webApp.getPublishingProfile();
Label lblNewLabel = new Label(container, SWT.NONE);
lblNewLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
lblNewLabel.setText("Host:");
textHost = new Text(container, SWT.BORDER);
textHost.setEditable(false);
textHost.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
textHost.setText(pp.getFtpUrl());
Label lblUserName = new Label(container, SWT.NONE);
lblUserName.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
lblUserName.setText("Username:");
textUsername = new Text(container, SWT.BORDER);
textUsername.setEditable(false);
textUsername.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
textUsername.setText(pp.getFtpUsername());
Label lblNewLabel_1 = new Label(container, SWT.NONE);
lblNewLabel_1.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
lblNewLabel_1.setText("Password:");
textPassword = new Text(container, SWT.BORDER);
textPassword.setEditable(false);
textPassword.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
textPassword.setText(pp.getFtpPassword());
return area;
}
use of com.microsoft.azure.toolkit.lib.appservice.model.PublishingProfile in project azure-tools-for-java by Microsoft.
the class FtpCredentialsWindow method createDialogArea.
/**
* Create contents of the dialog.
*
* @param parent
*/
@Override
protected Control createDialogArea(Composite parent) {
setTitle("FTP Credentials");
setMessage("Web App '" + webApp.name() + "' FTP deployment server credentials.");
Composite area = (Composite) super.createDialogArea(parent);
Composite container = new Composite(area, SWT.NONE);
container.setLayout(new GridLayout(2, false));
container.setLayoutData(new GridData(GridData.FILL_BOTH));
PublishingProfile pp = webApp.getPublishingProfile();
Label lblNewLabel = new Label(container, SWT.NONE);
lblNewLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
lblNewLabel.setText("Host:");
textHost = new Text(container, SWT.BORDER);
textHost.setEditable(false);
textHost.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
textHost.setText(pp.getFtpUrl());
Label lblUserName = new Label(container, SWT.NONE);
lblUserName.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
lblUserName.setText("Username:");
textUsername = new Text(container, SWT.BORDER);
textUsername.setEditable(false);
textUsername.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
textUsername.setText(pp.getFtpUsername());
Label lblNewLabel_1 = new Label(container, SWT.NONE);
lblNewLabel_1.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
lblNewLabel_1.setText("Password:");
textPassword = new Text(container, SWT.BORDER);
textPassword.setEditable(false);
textPassword.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
textPassword.setText(pp.getFtpPassword());
return area;
}
use of com.microsoft.azure.toolkit.lib.appservice.model.PublishingProfile in project azure-tools-for-java by Microsoft.
the class TunnelProxy method reset.
public void reset() {
String host = appService.hostName().toLowerCase().replace("http://", "").replace("https://", "");
String[] parts = host.split("\\.", 2);
host = Joiner.on('.').join(parts[0], "scm", parts[1]);
PublishingProfile publishingProfile = appService.getPublishingProfile();
wssProxy = new WebSocketSSLProxy(String.format("wss://%s/AppServiceTunnel/Tunnel.ashx", host), publishingProfile.getGitUsername(), publishingProfile.getGitPassword());
}
use of com.microsoft.azure.toolkit.lib.appservice.model.PublishingProfile in project azure-maven-plugins by microsoft.
the class DeployExternalResourcesTask method deployExternalResources.
private void deployExternalResources(final IAppService<?> target, final List<DeploymentResource> resources) {
if (resources.isEmpty()) {
return;
}
AzureMessager.getMessager().info(AzureString.format("Uploading resources to %s", target.name()));
final PublishingProfile publishingProfile = target.getPublishingProfile();
final String serverUrl = publishingProfile.getFtpUrl().split("/", 2)[0];
try {
final FTPClient ftpClient = FTPUtils.getFTPClient(serverUrl, publishingProfile.getFtpUsername(), publishingProfile.getFtpPassword());
for (final DeploymentResource externalResource : resources) {
uploadResource(externalResource, ftpClient);
}
} catch (IOException e) {
throw new AzureToolkitRuntimeException(e.getMessage(), e);
}
}
use of com.microsoft.azure.toolkit.lib.appservice.model.PublishingProfile in project azure-tools-for-java by microsoft.
the class TunnelProxy method reset.
public void reset() {
String host = appService.hostName().toLowerCase().replace("http://", "").replace("https://", "");
String[] parts = host.split("\\.", 2);
host = Joiner.on('.').join(parts[0], "scm", parts[1]);
PublishingProfile publishingProfile = appService.getPublishingProfile();
wssProxy = new WebSocketSSLProxy(String.format("wss://%s/AppServiceTunnel/Tunnel.ashx", host), publishingProfile.getGitUsername(), publishingProfile.getGitPassword());
}
Aggregations