use of com.microsoft.azuretools.telemetry.TelemetryConstants.CREATE_STORAGE_ACCOUNT in project azure-tools-for-java by Microsoft.
the class CreateArmStorageAccountAction method actionPerformed.
@Override
public void actionPerformed(NodeActionEvent e) {
SignInCommandHandler.requireSignedIn(PluginUtil.getParentShell(), () -> {
CreateArmStorageAccountForm createStorageAccountForm = new CreateArmStorageAccountForm(PluginUtil.getParentShell(), null, null);
createStorageAccountForm.setOnCreate(() -> {
AzureTaskManager.getInstance().runInBackground("Creating storage account " + createStorageAccountForm.getStorageAccount().getName() + "...", new Runnable() {
@Override
public void run() {
EventUtil.executeWithLog(STORAGE, CREATE_STORAGE_ACCOUNT, (operation) -> {
createStorageAccount(createStorageAccountForm.getStorageAccount());
storageModule.load(false);
}, (e) -> AzureTaskManager.getInstance().runLater(() -> PluginUtil.displayErrorDialog(PluginUtil.getParentShell(), Messages.err, "An error occurred while creating the storage account: " + e.getMessage())));
}
});
});
createStorageAccountForm.open();
});
}
Aggregations