use of com.microsoft.azure.toolkit.intellij.appservice.AppServiceMonitorPanel in project azure-tools-for-java by Microsoft.
the class FunctionAppConfigFormPanelAdvance method createUIComponents.
private void createUIComponents() {
// TODO: place custom component creation code here
appServiceConfigPanelAdvanced = new AppServiceInfoAdvancedPanel<>(project, () -> FunctionAppConfig.builder().build());
appServiceConfigPanelAdvanced.setValidRuntime(Runtime.FUNCTION_APP_RUNTIME);
appServiceConfigPanelAdvanced.setValidPricingTier(new ArrayList<>(PricingTier.FUNCTION_PRICING), PricingTier.CONSUMPTION);
// Function does not support file deployment
appServiceConfigPanelAdvanced.setDeploymentVisible(false);
insightsConfig = ApplicationInsightsConfig.builder().newCreate(true).name(appServiceConfigPanelAdvanced.getTextName().getValue()).build();
appServiceMonitorPanel = new AppServiceMonitorPanel(project);
appServiceMonitorPanel.setWebServerLogVisible(false);
appServiceMonitorPanel.setData(MonitorConfig.builder().applicationInsightsConfig(insightsConfig).build());
appServiceConfigPanelAdvanced.getSelectorSubscription().addActionListener(event -> appServiceMonitorPanel.getApplicationInsightsComboBox().setSubscription(appServiceConfigPanelAdvanced.getSelectorSubscription().getValue()));
appServiceConfigPanelAdvanced.getSelectorRuntime().addActionListener(event -> {
final OperatingSystem operatingSystem = Optional.ofNullable(appServiceConfigPanelAdvanced.getSelectorRuntime().getValue()).map(Runtime::getOperatingSystem).orElse(null);
appServiceMonitorPanel.setApplicationLogVisible(operatingSystem == OperatingSystem.WINDOWS);
});
}
use of com.microsoft.azure.toolkit.intellij.appservice.AppServiceMonitorPanel in project azure-tools-for-java by Microsoft.
the class WebAppConfigFormPanelAdvance method createUIComponents.
private void createUIComponents() {
// TODO: place custom component creation code here
appServiceConfigPanelAdvanced = new AppServiceInfoAdvancedPanel(project, WebAppConfig::getWebAppDefaultConfig);
final List<PricingTier> validPricing = AzureMvpModel.getInstance().listPricingTier();
appServiceConfigPanelAdvanced.setValidPricingTier(validPricing, WebAppConfig.DEFAULT_PRICING_TIER);
appServiceMonitorPanel = new AppServiceMonitorPanel(project);
// Application Insights is not supported in Web App
appServiceMonitorPanel.setApplicationInsightsVisible(false);
appServiceMonitorPanel.setData(MonitorConfig.builder().build());
appServiceConfigPanelAdvanced.getSelectorRuntime().addActionListener(event -> {
final Runtime runtime = appServiceConfigPanelAdvanced.getSelectorRuntime().getValue();
appServiceMonitorPanel.setApplicationLogVisible(runtime != null && runtime.getOperatingSystem() == OperatingSystem.WINDOWS);
});
}
Aggregations