use of com.microsoft.azuretools.telemetry.TelemetryConstants.REFRESH_METADATA in project azure-tools-for-java by Microsoft.
the class WebAppDeployDialog method createButton.
private void createButton(Composite container) {
Composite composite = new Composite(container, SWT.NONE);
composite.setLayout(new RowLayout(SWT.VERTICAL));
composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));
Button btnCreate = new Button(composite, SWT.NONE);
btnCreate.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
sendTelemetry("CREATE");
EventUtil.logEvent(EventType.info, WEBAPP, OPEN_CREATEWEBAPP_DIALOG, buildProperties());
createAppService(project);
}
});
btnCreate.setText("Create...");
btnDelete = new Button(composite, SWT.NONE);
btnDelete.setEnabled(false);
btnDelete.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
sendTelemetry("DELETE");
deleteAppService();
}
});
btnDelete.setText("Delete...");
Button btnRefresh = new Button(composite, SWT.NONE);
btnRefresh.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
sendTelemetry("REFRESH");
EventUtil.executeWithLog(WEBAPP, REFRESH_METADATA, (operation) -> {
table.removeAll();
fillAppServiceDetails();
doFillTable(true);
});
}
});
btnRefresh.setText("Refresh");
btnDeployToRoot = new Button(composite, SWT.CHECK);
btnDeployToRoot.setSelection(true);
btnDeployToRoot.setText("Deploy to root");
int size = btnDeployToRoot.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
btnCreate.setLayoutData(new RowData(size, SWT.DEFAULT));
btnDelete.setLayoutData(new RowData(size, SWT.DEFAULT));
btnRefresh.setLayoutData(new RowData(size, SWT.DEFAULT));
btnDeployToRoot.setLayoutData(new RowData(size, SWT.DEFAULT));
}
Aggregations