diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/MeterGaugeDisplaySetting.java b/Kieker.WebGUI/src/main/java/kieker/webgui/MeterGaugeDisplaySetting.java new file mode 100644 index 0000000000000000000000000000000000000000..d108be681424baf44e1fb854a241bbc598ae1f39 --- /dev/null +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/MeterGaugeDisplaySetting.java @@ -0,0 +1,17 @@ +package kieker.webgui; + +import kieker.webgui.common.IDisplaySetting; + +public class MeterGaugeDisplaySetting implements IDisplaySetting { + + private volatile String selectedDiagram; + + public String getSelectedDiagram() { + return this.selectedDiagram; + } + + public void setSelectedDiagram(final String selectedDiagram) { + this.selectedDiagram = selectedDiagram; + } + +} diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/IDisplaySetting.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/IDisplaySetting.java new file mode 100644 index 0000000000000000000000000000000000000000..3e743bffed134413b54de5e21b7895a329964d34 --- /dev/null +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/IDisplaySetting.java @@ -0,0 +1,24 @@ +/*************************************************************************** + * Copyright 2013 Kieker Project (http://kieker-monitoring.net) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ + +package kieker.webgui.common; + +/** + * @author Nils Christian Ehmke + */ +public interface IDisplaySetting { + +} diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/XYPlotDisplaySetting.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/XYPlotDisplaySetting.java new file mode 100644 index 0000000000000000000000000000000000000000..4123920d7bec2d9e941947717b2b85988ee6ed3f --- /dev/null +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/XYPlotDisplaySetting.java @@ -0,0 +1,68 @@ +/*************************************************************************** + * Copyright 2013 Kieker Project (http://kieker-monitoring.net) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ + +package kieker.webgui.common; + +import java.util.Collections; +import java.util.List; + +/** + * @author Nils Christian Ehmke + */ +public class XYPlotDisplaySetting implements IDisplaySetting { + + private volatile List<String> selectedLines = Collections.emptyList(); + private volatile boolean usingShadows; + private volatile boolean filled; + private volatile boolean stacked; + + public XYPlotDisplaySetting() { + // No code necessary + } + + public List<String> getSelectedLines() { + return this.selectedLines; + } + + public void setSelectedLines(final List<String> selectedLines) { + this.selectedLines = selectedLines; + } + + public boolean isUsingShadows() { + return this.usingShadows; + } + + public void setUsingShadows(final boolean usingShadows) { + this.usingShadows = usingShadows; + } + + public boolean isFilled() { + return this.filled; + } + + public void setFilled(final boolean filled) { + this.filled = filled; + } + + public boolean isStacked() { + return this.stacked; + } + + public void setStacked(final boolean stacked) { + this.stacked = stacked; + } + +} diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/service/IProjectService.java b/Kieker.WebGUI/src/main/java/kieker/webgui/service/IProjectService.java index 3472968ea1fd8dc559b3c55e719077a676bd4e9e..3e343a273c3fbe7f6df1592ecab053aeb17a5ed2 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/service/IProjectService.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/service/IProjectService.java @@ -390,6 +390,9 @@ public interface IProjectService { @PreAuthorize("hasAnyRole('User', 'Administrator')") public void stopAnalysis(final String projectName) throws ProjectNotExistingException, InvalidAnalysisStateException, LockProjectException; + @PreAuthorize("hasAnyRole('User', 'Administrator')") + public void emergencyShutdownOfAnalysis(String projectName) throws ProjectNotExistingException, LockProjectException, InvalidAnalysisStateException; + /** * This method delivers the display object of the (currently running) analysis for the given project and the given parameters. Technically it is an instance of * {@code AbstractDisplay}, but in fact the project specific class loader has been used. diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/service/impl/AnalysisManagementService.java b/Kieker.WebGUI/src/main/java/kieker/webgui/service/impl/AnalysisManagementService.java index 25f3913e3a65551b3e757f5f19e8d3e15d438806..e8f5449b2ae5b931ef5153791ab1623cd381b5da 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/service/impl/AnalysisManagementService.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/service/impl/AnalysisManagementService.java @@ -147,6 +147,15 @@ public final class AnalysisManagementService { analysis.stop(); } + public void emergencyShutdown(final String projectName) throws InvalidAnalysisStateException { + // The analysis for the given project must exist! + if (!this.analyses.containsKey(projectName)) { + throw new InvalidAnalysisStateException("The analysis has not been initialized yet."); + } + + this.analyses.get(projectName).emergencyShutdown(); + } + /** * This method delivers the available log entries of the analysis controller of the given project. * diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/service/impl/ProjectServiceImpl.java b/Kieker.WebGUI/src/main/java/kieker/webgui/service/impl/ProjectServiceImpl.java index f3fa19d34fc31eb917e9aa0b45f7f1600862f2e9..cab51e8f07461209a7a377a4387f81f869f1d279 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/service/impl/ProjectServiceImpl.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/service/impl/ProjectServiceImpl.java @@ -304,6 +304,17 @@ public final class ProjectServiceImpl implements IProjectService { } } + @Override + public void emergencyShutdownOfAnalysis(final String projectName) throws ProjectNotExistingException, LockProjectException, InvalidAnalysisStateException { + ProjectServiceImpl.tryLockProject(projectName, this.analysesLocks); + + try { + this.acManager.emergencyShutdown(projectName); + } finally { + ProjectServiceImpl.unlockProject(projectName, this.analysesLocks); + } + } + @Override public Object getDisplay(final String projectName, final String viewName, final String displayName) throws InvalidAnalysisStateException, DisplayNotFoundException, LockProjectException { diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/service/impl/utility/Analysis.java b/Kieker.WebGUI/src/main/java/kieker/webgui/service/impl/utility/Analysis.java index 484a2e472ae119701b858a51a9426dd803bea27e..9aae5cef0d4df52d2054c738422ab1fdad0d2550 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/service/impl/utility/Analysis.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/service/impl/utility/Analysis.java @@ -98,6 +98,10 @@ public final class Analysis { } + public void emergencyShutdown() { + // Not implemented yet + } + @SuppressWarnings("unchecked") private void loadDisplayObjectsAndMethods(final Object modelProject, final Object controllerAndMapping) throws InstantiationException, IllegalAccessException { final Map<Object, Object> pluginMap = (Map<Object, Object>) new Mirror().on(controllerAndMapping).invoke().method("getPluginMap").withoutArgs(); @@ -261,4 +265,5 @@ public final class Analysis { return null; } } + } diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/application/GlobalPropertiesBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/application/GlobalPropertiesBean.java index 556e922abd0c68392bc44c70e05510ab74ed6e10..aad1cf0c963777b88bfe318ba1c399782078405f 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/application/GlobalPropertiesBean.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/application/GlobalPropertiesBean.java @@ -92,6 +92,7 @@ public final class GlobalPropertiesBean implements Serializable { private static final String PROPERTY_LOG_MSG_STOPPING_ANALYSIS = "logMsgStoppingAnalysis"; private static final String PROPERTY_LOG_MSG_INSTANTIATING_ANALYSIS = "logMsgInstantiatingAnalysis"; private static final String PROPERTY_LOG_MSG_CLEANING = "logMsgCleaning"; + private static final String PROPERTY_LOG_MSG_EMERGENCY_SHUTDOWN = "logMsgEmergencyShutdown"; private static final String PROPERTY_MSG_ADD_USER = "msgAddedUserToDatabase"; private static final String PROPERTY_MSG_MODIFIED_USER = "msgModifiedUserInDatabase"; @@ -182,6 +183,10 @@ public final class GlobalPropertiesBean implements Serializable { return GlobalPropertiesBean.getLocalizedString(RESOURCE_BUNDLE_NAME_CONTROLLER_PAGE, PROPERTY_LOG_MSG_STOPPING_ANALYSIS); } + public String getLogMsgEmergencyShutdown() { + return GlobalPropertiesBean.getLocalizedString(RESOURCE_BUNDLE_NAME_CONTROLLER_PAGE, PROPERTY_LOG_MSG_EMERGENCY_SHUTDOWN); + } + public String getLogMsgInstantiatingAnalysis() { return GlobalPropertiesBean.getLocalizedString(RESOURCE_BUNDLE_NAME_CONTROLLER_PAGE, PROPERTY_LOG_MSG_INSTANTIATING_ANALYSIS); } diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/view/CockpitBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/view/CockpitBean.java index 91e643c56783d73941debbc0d0a18b3e1caacb99..a56ae0f8751964f3e029fae2381d4034a9647a7d 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/view/CockpitBean.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/view/CockpitBean.java @@ -18,12 +18,12 @@ package kieker.webgui.web.beans.view; import java.io.IOException; import java.util.Arrays; -import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicLong; import javax.el.ValueExpression; @@ -48,6 +48,9 @@ import kieker.analysis.model.analysisMetaModel.MIView; import kieker.common.logging.Log; import kieker.common.logging.LogFactory; import kieker.monitoring.core.registry.Registry; +import kieker.webgui.MeterGaugeDisplaySetting; +import kieker.webgui.common.IDisplaySetting; +import kieker.webgui.common.XYPlotDisplaySetting; import kieker.webgui.common.exception.DisplayNotFoundException; import kieker.webgui.common.exception.InvalidAnalysisStateException; import kieker.webgui.common.exception.LockProjectException; @@ -115,9 +118,8 @@ public final class CockpitBean { private MIProject project; private MIView activeView; - private final Map<String, List<String>> xyplotSelections = new HashMap<String, List<String>>(); - private final Map<String, String> meterGaugeSelections = new HashMap<String, String>(); - private String selectedDisplayConnector; + private final Map<MIDisplayConnector, IDisplaySetting> displaySettings = new ConcurrentHashMap<MIDisplayConnector, IDisplaySetting>(); + private MIDisplayConnector selectedDisplayConnector; @Autowired private GlobalPropertiesBean globalPropertiesBean; @@ -168,6 +170,14 @@ public final class CockpitBean { this.fillDashboardWithActiveView(); } + public void setSettingForDisplay(final MIDisplayConnector display, final IDisplaySetting setting) { + this.displaySettings.put(display, setting); + } + + public IDisplaySetting getSettingForDisplay(final MIDisplayConnector display) { + return this.displaySettings.get(display); + } + /** * Sets the dashboard of this bean. * @@ -331,37 +341,37 @@ public final class CockpitBean { // Update the element depending on the display type switch (displayType) { case PLAIN_TEXT: - this.updatePlainTextDisplay(component, displayConnector.getName()); + this.updatePlainTextDisplay(component, displayConnector); break; case HTML_TEXT: - this.updateHTMLTextDisplay(component, displayConnector.getName()); + this.updateHTMLTextDisplay(component, displayConnector); break; case IMAGE: - this.updateImageDisplay(component, displayConnector.getName()); + this.updateImageDisplay(component, displayConnector); break; case XY_PLOT: - this.updateXYPlotDisplay(component, displayConnector.getName()); + this.updateXYPlotDisplay(component, displayConnector); break; case METER_GAUGE: - this.updateMeterGaugeDisplay(component, displayConnector.getName()); + this.updateMeterGaugeDisplay(component, displayConnector); break; case TAG_CLOUD: - this.updateTagCloudDisplay(component, displayConnector.getName()); + this.updateTagCloudDisplay(component, displayConnector); break; case PIE_CHART: - this.updatePieChartDisplay(component, displayConnector.getName()); + this.updatePieChartDisplay(component, displayConnector); break; default: // Unknown type - this.updateDisplayWithDefaultContent(component, displayConnector.getName()); + this.updateDisplayWithDefaultContent(component, displayConnector); break; } } else { - this.updateDisplayWithDefaultContent(component, displayConnector.getName()); + this.updateDisplayWithDefaultContent(component, displayConnector); } } else { // If the analysis has not yet been initialized, we add a simple note to each of the panels - this.updateDisplayWithDefaultContent(component, displayConnector.getName()); + this.updateDisplayWithDefaultContent(component, displayConnector); } } } @@ -463,7 +473,7 @@ public final class CockpitBean { return PANEL_ID_PREFIX + this.displayConnectors.get(displayConnector); } - private void updateDisplayWithDefaultContent(final UIComponent component, final String displayConnectorName) { + private void updateDisplayWithDefaultContent(final UIComponent component, final MIDisplayConnector displayConnector) { final boolean isAlreadyCorrectlyInitialized = (component.getChildCount() == 1) && (component.getChildren().get(0) instanceof HtmlOutputText); final HtmlOutputText htmlOutputText; @@ -476,23 +486,23 @@ public final class CockpitBean { component.getChildren().clear(); component.getChildren().add(htmlOutputText); - this.addButtonBoxToComponent(component, displayConnectorName, null); + this.addButtonBoxToComponent(component, displayConnector, null); } htmlOutputText.setValue("N/A"); } - private void updateHTMLTextDisplay(final UIComponent component, final String displayConnectorName) { // NOPMD (Not implemented yet) + private void updateHTMLTextDisplay(final UIComponent component, final MIDisplayConnector displayConnector) { // NOPMD (Not implemented yet) // Not implemented yet - this.updateDisplayWithDefaultContent(component, displayConnectorName); + this.updateDisplayWithDefaultContent(component, displayConnector); } - private void updateImageDisplay(final UIComponent component, final String displayConnectorName) { // NOPMD (Not implemented yet) + private void updateImageDisplay(final UIComponent component, final MIDisplayConnector displayConnector) { // NOPMD (Not implemented yet) // Not implemented yet - this.updateDisplayWithDefaultContent(component, displayConnectorName); + this.updateDisplayWithDefaultContent(component, displayConnector); } - private void updatePlainTextDisplay(final UIComponent component, final String displayConnectorName) { + private void updatePlainTextDisplay(final UIComponent component, final MIDisplayConnector displayConnector) { final boolean isAlreadyCorrectlyInitialized = (component.getChildCount() == 1) && (component.getChildren().get(0) instanceof HtmlOutputText); final HtmlOutputText htmlOutputText; @@ -507,32 +517,32 @@ public final class CockpitBean { component.getChildren().clear(); component.getChildren().add(htmlOutputText); - this.addButtonBoxToComponent(component, displayConnectorName, DisplayType.PLAIN_TEXT); + this.addButtonBoxToComponent(component, displayConnector, DisplayType.PLAIN_TEXT); } try { - final Object displayObject = this.projectService.getDisplay(this.projectName, this.activeView.getName(), displayConnectorName); + final Object displayObject = this.projectService.getDisplay(this.projectName, this.activeView.getName(), displayConnector.getName()); final String text = (String) new Mirror().on(displayObject).invoke().method("getText").withoutArgs(); htmlOutputText.setValue(text); } catch (final DisplayNotFoundException ex) { CockpitBean.LOG.warn("Display not found.", ex); - this.updateDisplayWithDefaultContent(component, displayConnectorName); + this.updateDisplayWithDefaultContent(component, displayConnector); } catch (final MirrorException ex) { CockpitBean.LOG.warn("Reflection exception.", ex); - this.updateDisplayWithDefaultContent(component, displayConnectorName); + this.updateDisplayWithDefaultContent(component, displayConnector); } catch (final InvalidAnalysisStateException ex) { CockpitBean.LOG.info("Project is in invalid state.", ex); - this.updateDisplayWithDefaultContent(component, displayConnectorName); + this.updateDisplayWithDefaultContent(component, displayConnector); } catch (final LockProjectException ex) { CockpitBean.LOG.info("An error occured.", ex); - this.updateDisplayWithDefaultContent(component, displayConnectorName); + this.updateDisplayWithDefaultContent(component, displayConnector); } } @SuppressWarnings("unchecked") - private void updateTagCloudDisplay(final UIComponent component, final String displayConnectorName) { + private void updateTagCloudDisplay(final UIComponent component, final MIDisplayConnector displayConnector) { final boolean isAlreadyCorrectlyInitialized = (component.getChildCount() == 1) && (component.getChildren().get(0) instanceof MeterGaugeChart); final TagCloudModel tagCloudModel; @@ -556,11 +566,11 @@ public final class CockpitBean { component.getChildren().clear(); component.getChildren().add(tagCloud); - this.addButtonBoxToComponent(component, displayConnectorName, DisplayType.TAG_CLOUD); + this.addButtonBoxToComponent(component, displayConnector, DisplayType.TAG_CLOUD); } try { - final Object displayObj = this.projectService.getDisplay(this.projectName, this.activeView.getName(), displayConnectorName); + final Object displayObj = this.projectService.getDisplay(this.projectName, this.activeView.getName(), displayConnector.getName()); final Map<String, AtomicLong> counters = (Map<String, AtomicLong>) new Mirror().on(displayObj).invoke().method("getCounters").withoutArgs(); tagCloudModel.clear(); @@ -570,21 +580,21 @@ public final class CockpitBean { } catch (final DisplayNotFoundException ex) { CockpitBean.LOG.warn("Display not found.", ex); - this.updateDisplayWithDefaultContent(component, displayConnectorName); + this.updateDisplayWithDefaultContent(component, displayConnector); } catch (final MirrorException ex) { CockpitBean.LOG.warn("Reflection exception.", ex); - this.updateDisplayWithDefaultContent(component, displayConnectorName); + this.updateDisplayWithDefaultContent(component, displayConnector); } catch (final InvalidAnalysisStateException ex) { CockpitBean.LOG.info("Project is in invalid state.", ex); - this.updateDisplayWithDefaultContent(component, displayConnectorName); + this.updateDisplayWithDefaultContent(component, displayConnector); } catch (final LockProjectException ex) { CockpitBean.LOG.info("An error occured.", ex); - this.updateDisplayWithDefaultContent(component, displayConnectorName); + this.updateDisplayWithDefaultContent(component, displayConnector); } } @SuppressWarnings("unchecked") - private void updateMeterGaugeDisplay(final UIComponent component, final String displayConnectorName) { + private void updateMeterGaugeDisplay(final UIComponent component, final MIDisplayConnector displayConnector) { final boolean isAlreadyCorrectlyInitialized = (component.getChildCount() == 1) && (component.getChildren().get(0) instanceof MeterGaugeChart); final MeterGaugeChart meterGaugeChart; @@ -601,7 +611,7 @@ public final class CockpitBean { // Create the Primefaces chart component meterGaugeChart = (MeterGaugeChart) application.createComponent(facesContext, "org.primefaces.component.chart.MeterGaugeChart", "org.primefaces.component.chart.MeterGaugeChartRenderer"); - meterGaugeChart.setTitle(displayConnectorName); + meterGaugeChart.setTitle(displayConnector.getName()); // Add the corresponding model meterGaugeChartModel = new MeterGaugeChartModel(); @@ -609,11 +619,11 @@ public final class CockpitBean { component.getChildren().clear(); component.getChildren().add(meterGaugeChart); - this.addButtonBoxToComponent(component, displayConnectorName, DisplayType.METER_GAUGE); + this.addButtonBoxToComponent(component, displayConnector, DisplayType.METER_GAUGE); } try { - final Object displayObj = this.projectService.getDisplay(this.projectName, this.activeView.getName(), displayConnectorName); + final Object displayObj = this.projectService.getDisplay(this.projectName, this.activeView.getName(), displayConnector.getName()); final Set<String> keys = (Set<String>) new Mirror().on(displayObj).invoke().method("getKeys").withoutArgs(); @@ -621,13 +631,19 @@ public final class CockpitBean { meterGaugeChartModel.setIntervals(Arrays.asList((Number) 50)); meterGaugeChartModel.setValue(0); } else { - if (!this.meterGaugeSelections.containsKey(displayConnectorName)) { - this.meterGaugeSelections.put(displayConnectorName, keys.iterator().next()); + if (!this.displaySettings.containsKey(displayConnector)) { + final MeterGaugeDisplaySetting setting = new MeterGaugeDisplaySetting(); + setting.setSelectedDiagram(keys.iterator().next()); + this.displaySettings.put(displayConnector, setting); } + // TODO Use correct key final List<Number> intervals = (List<Number>) new Mirror().on(displayObj).invoke().method("getIntervals").withArgs(keys.iterator().next()); final List<String> colors = (List<String>) new Mirror().on(displayObj).invoke().method("getIntervalColors").withArgs(keys.iterator().next()); - final Number value = (Number) new Mirror().on(displayObj).invoke().method("getValue").withArgs(this.meterGaugeSelections.get(displayConnectorName)); - meterGaugeChart.setTitle(displayConnectorName + "(" + this.meterGaugeSelections.get(displayConnectorName) + ")"); + final Number value = (Number) new Mirror().on(displayObj).invoke().method("getValue") + .withArgs(((MeterGaugeDisplaySetting) this.displaySettings.get(displayConnector)).getSelectedDiagram()); + meterGaugeChart + .setTitle(displayConnector.getName() + " (" + ((MeterGaugeDisplaySetting) this.displaySettings.get(displayConnector)).getSelectedDiagram() + + ")"); if (intervals.isEmpty()) { meterGaugeChartModel.setIntervals(Arrays.asList((Number) 50)); meterGaugeChartModel.setValue(0); @@ -645,21 +661,21 @@ public final class CockpitBean { } } catch (final DisplayNotFoundException ex) { CockpitBean.LOG.warn("Display not found.", ex); - this.updateDisplayWithDefaultContent(component, displayConnectorName); + this.updateDisplayWithDefaultContent(component, displayConnector); } catch (final MirrorException ex) { CockpitBean.LOG.warn("Reflection exception.", ex); - this.updateDisplayWithDefaultContent(component, displayConnectorName); + this.updateDisplayWithDefaultContent(component, displayConnector); } catch (final InvalidAnalysisStateException ex) { CockpitBean.LOG.info("Project is in invalid state.", ex); - this.updateDisplayWithDefaultContent(component, displayConnectorName); + this.updateDisplayWithDefaultContent(component, displayConnector); } catch (final LockProjectException ex) { CockpitBean.LOG.info("An error occured.", ex); - this.updateDisplayWithDefaultContent(component, displayConnectorName); + this.updateDisplayWithDefaultContent(component, displayConnector); } } @SuppressWarnings("unchecked") - private void updatePieChartDisplay(final UIComponent component, final String displayConnectorName) { + private void updatePieChartDisplay(final UIComponent component, final MIDisplayConnector displayConnector) { final boolean isAlreadyCorrectlyInitialized = (component.getChildCount() == 1) && (component.getChildren().get(0) instanceof PieChart); final PieChart pieChart; @@ -676,7 +692,7 @@ public final class CockpitBean { // Create the Primefaces chart component pieChart = (PieChart) application.createComponent(facesContext, "org.primefaces.component.chart.PieChart", "org.primefaces.component.chart.PieChartRenderer"); - pieChart.setTitle(displayConnectorName); + pieChart.setTitle(displayConnector.getName()); pieChart.setLegendPosition("e"); pieChart.setShowDataLabels(true); @@ -686,11 +702,11 @@ public final class CockpitBean { component.getChildren().clear(); component.getChildren().add(pieChart); - this.addButtonBoxToComponent(component, displayConnectorName, DisplayType.PIE_CHART); + this.addButtonBoxToComponent(component, displayConnector, DisplayType.PIE_CHART); } try { - final Object displayObj = this.projectService.getDisplay(this.projectName, this.activeView.getName(), displayConnectorName); + final Object displayObj = this.projectService.getDisplay(this.projectName, this.activeView.getName(), displayConnector.getName()); final Set<String> keys = (Set<String>) new Mirror().on(displayObj).invoke().method("getKeys").withoutArgs(); pieChart.setLegendCols((int) (Math.ceil(keys.size() / 10.0))); @@ -706,16 +722,16 @@ public final class CockpitBean { } } catch (final DisplayNotFoundException ex) { CockpitBean.LOG.warn("Display not found.", ex); - this.updateDisplayWithDefaultContent(component, displayConnectorName); + this.updateDisplayWithDefaultContent(component, displayConnector); } catch (final MirrorException ex) { CockpitBean.LOG.warn("Reflection exception.", ex); - this.updateDisplayWithDefaultContent(component, displayConnectorName); + this.updateDisplayWithDefaultContent(component, displayConnector); } catch (final InvalidAnalysisStateException ex) { CockpitBean.LOG.info("Project is in invalid state.", ex); - this.updateDisplayWithDefaultContent(component, displayConnectorName); + this.updateDisplayWithDefaultContent(component, displayConnector); } catch (final LockProjectException ex) { CockpitBean.LOG.info("An error occured.", ex); - this.updateDisplayWithDefaultContent(component, displayConnectorName); + this.updateDisplayWithDefaultContent(component, displayConnector); } } @@ -744,7 +760,7 @@ public final class CockpitBean { this.displaySettingsDialog.getChildren().add(div); } - private void addButtonBoxToComponent(final UIComponent component, final String displayConnectorName, final DisplayType type) { + private void addButtonBoxToComponent(final UIComponent component, final MIDisplayConnector displayConnector, final DisplayType type) { final FacesContext facesContext = FacesContext.getCurrentInstance(); final Application application = facesContext.getApplication(); @@ -772,7 +788,7 @@ public final class CockpitBean { button.addActionListener(new ActionListener() { @Override public void processAction(final ActionEvent event) throws AbortProcessingException { - CockpitBean.this.updateMeterGaugeDisplaySettings(displayConnectorName); + CockpitBean.this.updateMeterGaugeDisplaySettings(displayConnector); } }); break; @@ -789,7 +805,7 @@ public final class CockpitBean { button.addActionListener(new ActionListener() { @Override public void processAction(final ActionEvent event) throws AbortProcessingException { - CockpitBean.this.updateXYPlotDisplaySettings(displayConnectorName); + CockpitBean.this.updateXYPlotDisplaySettings(displayConnector); } }); break; @@ -812,7 +828,7 @@ public final class CockpitBean { } @SuppressWarnings("unchecked") - private void updateXYPlotDisplay(final UIComponent component, final String displayConnectorName) { + private void updateXYPlotDisplay(final UIComponent component, final MIDisplayConnector displayConnector) { final boolean isAlreadyCorrectlyInitialized = (component.getChildCount() == 2) && (component.getChildren().get(0) instanceof LineChart) && (component.getChildren().get(1) instanceof CommandButton); @@ -830,7 +846,7 @@ public final class CockpitBean { // Create the Primefaces chart component lineChart = (LineChart) application.createComponent(facesContext, "org.primefaces.component.chart.LineChart", "org.primefaces.component.chart.LineChartRenderer"); - lineChart.setTitle(displayConnectorName); + lineChart.setTitle(displayConnector.getName()); lineChart.setLegendPosition("e"); // Add the corresponding model @@ -839,17 +855,19 @@ public final class CockpitBean { component.getChildren().clear(); component.getChildren().add(lineChart); - this.addButtonBoxToComponent(component, displayConnectorName, DisplayType.XY_PLOT); + this.addButtonBoxToComponent(component, displayConnector, DisplayType.XY_PLOT); } try { - final Object displayObj = this.projectService.getDisplay(this.projectName, this.activeView.getName(), displayConnectorName); + final Object displayObj = this.projectService.getDisplay(this.projectName, this.activeView.getName(), displayConnector.getName()); final Set<String> keys = (Set<String>) new Mirror().on(displayObj).invoke().method("getKeys").withoutArgs(); - if (!this.xyplotSelections.containsKey(displayConnectorName)) { + if (!this.displaySettings.containsKey(displayConnector)) { final List<String> selection = new LinkedList<String>(); selection.addAll(keys); - this.xyplotSelections.put(displayConnectorName, selection); + final XYPlotDisplaySetting setting = new XYPlotDisplaySetting(); + setting.setSelectedLines(selection); + this.displaySettings.put(displayConnector, setting); } lineChart.setLegendCols((int) (Math.ceil(keys.size() / 10.0))); @@ -861,7 +879,7 @@ public final class CockpitBean { linearModel.addSeries(series); } else { for (final String key : keys) { - if (!this.xyplotSelections.get(displayConnectorName).contains(key)) { + if (!((XYPlotDisplaySetting) this.displaySettings.get(displayConnector)).getSelectedLines().contains(key)) { continue; } final Map<Object, Number> entries = (Map<Object, Number>) new Mirror().on(displayObj).invoke().method("getEntries").withArgs(key); @@ -878,25 +896,25 @@ public final class CockpitBean { } } catch (final DisplayNotFoundException ex) { CockpitBean.LOG.warn("Display not found.", ex); - this.updateDisplayWithDefaultContent(component, displayConnectorName); + this.updateDisplayWithDefaultContent(component, displayConnector); } catch (final MirrorException ex) { CockpitBean.LOG.warn("Reflection exception.", ex); - this.updateDisplayWithDefaultContent(component, displayConnectorName); + this.updateDisplayWithDefaultContent(component, displayConnector); } catch (final InvalidAnalysisStateException ex) { CockpitBean.LOG.info("Project is in invalid state.", ex); - this.updateDisplayWithDefaultContent(component, displayConnectorName); + this.updateDisplayWithDefaultContent(component, displayConnector); } catch (final LockProjectException ex) { CockpitBean.LOG.info("An error occured.", ex); - this.updateDisplayWithDefaultContent(component, displayConnectorName); + this.updateDisplayWithDefaultContent(component, displayConnector); } } @SuppressWarnings("unchecked") - private void updateMeterGaugeDisplaySettings(final String displayConnectorName) { + private void updateMeterGaugeDisplaySettings(final MIDisplayConnector displayConnector) { try { - this.selectedDisplayConnector = displayConnectorName; - final Object displayObj = this.projectService.getDisplay(this.projectName, this.activeView.getName(), displayConnectorName); + this.selectedDisplayConnector = displayConnector; + final Object displayObj = this.projectService.getDisplay(this.projectName, this.activeView.getName(), displayConnector.getName()); final Set<String> keys = (Set<String>) new Mirror().on(displayObj).invoke().method("getKeys").withoutArgs(); final FacesContext facesContext = FacesContext.getCurrentInstance(); @@ -924,10 +942,10 @@ public final class CockpitBean { } @SuppressWarnings("unchecked") - private void updateXYPlotDisplaySettings(final String displayConnectorName) { + private void updateXYPlotDisplaySettings(final MIDisplayConnector displayConnector) { try { - this.selectedDisplayConnector = displayConnectorName; - final Object displayObj = this.projectService.getDisplay(this.projectName, this.activeView.getName(), displayConnectorName); + this.selectedDisplayConnector = displayConnector; + final Object displayObj = this.projectService.getDisplay(this.projectName, this.activeView.getName(), displayConnector.getName()); final Set<String> keys = (Set<String>) new Mirror().on(displayObj).invoke().method("getKeys").withoutArgs(); final FacesContext facesContext = FacesContext.getCurrentInstance(); @@ -956,7 +974,7 @@ public final class CockpitBean { } public String getMeterGaugeSelection() { - return this.meterGaugeSelections.get(this.selectedDisplayConnector); + return ((MeterGaugeDisplaySetting) this.displaySettings.get(this.selectedDisplayConnector)).getSelectedDiagram(); } /** @@ -966,11 +984,11 @@ public final class CockpitBean { * The new configuration of the meter gauge. */ public void setMeterGaugeSelection(final String meterGaugeSelection) { - this.meterGaugeSelections.put(this.selectedDisplayConnector, meterGaugeSelection); + ((MeterGaugeDisplaySetting) this.displaySettings.get(this.selectedDisplayConnector)).setSelectedDiagram(meterGaugeSelection); } public List<String> getXyplotSelection() { - return this.xyplotSelections.get(this.selectedDisplayConnector); + return ((XYPlotDisplaySetting) this.displaySettings.get(this.selectedDisplayConnector)).getSelectedLines(); } /** @@ -980,7 +998,7 @@ public final class CockpitBean { * The new configuration of the XY plot. */ public void setXyplotSelection(final List<String> xyplotSelection) { - this.xyplotSelections.put(this.selectedDisplayConnector, xyplotSelection); + ((XYPlotDisplaySetting) this.displaySettings.get(this.selectedDisplayConnector)).setSelectedLines(xyplotSelection); } private static ValueExpression createValueExpression(final String valueExpression, final Class<?> valueType) { diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/view/CockpitEditorBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/view/CockpitEditorBean.java index 1696996574659a6eb2145dfbfd51cc56a578e67f..7148f82dba42ff452317d692b0e58440359655cc 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/view/CockpitEditorBean.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/view/CockpitEditorBean.java @@ -386,6 +386,10 @@ public final class CockpitEditorBean { this.availableComponents = this.projectService.getAvailableComponents(this.projectName); } + public void updateName() { + this.fillDashboard(); + } + /** * This method can be used to get the description of a {@link MIDisplay}. Currently it is a little bit expensive to search for the description. * diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/view/ControllerBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/view/ControllerBean.java index 2b213c243bb041d73822f8b2fb8432c796313b43..b5f39d31913d4f258e022c8121edd0b568da7eeb 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/view/ControllerBean.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/view/ControllerBean.java @@ -120,6 +120,24 @@ public final class ControllerBean { } } + public void emergencyShutdown() { + try { + this.addLogEntry(this.globalPropertiesBean.getLogMsgEmergencyShutdown()); + synchronized (this) { + this.projectService.emergencyShutdownOfAnalysis(this.projectName); + } + } catch (final ProjectNotExistingException ex) { + ControllerBean.LOG.info("The project does not exist.", ex); + this.addLogEntry("The project does not exist."); + } catch (final LockProjectException ex) { + ControllerBean.LOG.info("An error occured during the operation.", ex); + this.addLogEntry(this.globalPropertiesBean.getLogMsgErrorOccured()); + } catch (final InvalidAnalysisStateException ex) { + ControllerBean.LOG.info("An error occured during the operation.", ex); + this.addLogEntry(this.globalPropertiesBean.getLogMsgErrorOccured()); + } + } + /** * This method initializes the current analysis and informs the user about a fail. */ diff --git a/Kieker.WebGUI/src/main/resources/lang/ControllerPage_de.properties b/Kieker.WebGUI/src/main/resources/lang/ControllerPage_de.properties index 2953d9cbccdcae1eea7c698557e7cdf0a747748e..ab2978985d98a09e04ed6690a24fd05b73a6cb56 100644 --- a/Kieker.WebGUI/src/main/resources/lang/ControllerPage_de.properties +++ b/Kieker.WebGUI/src/main/resources/lang/ControllerPage_de.properties @@ -9,6 +9,8 @@ lblAnalysisControllerCleaAnalysisController = Analyse Zur\u00fccksetzen lblAnalysisControllerStartAnalysis = Analyse Starten lblAnalysisControllerStopAnalysis = Analyse Stoppen +lblEmergencyShutdown = Notabschaltung + lblControl = Steuerung lblLogs = Logs @@ -30,5 +32,6 @@ logMsgStartingAnalysis = Starte Analyse... logMsgStoppingAnalysis = Stoppe Analyse... logMsgInstantiatingAnalysis = Instanziiere Analyse... logMsgCleaning = Bereinige Analyse... +logMsgEmergencyShutdown = Notabschaltung der Analyse... #-------------------------------------------------------------------------------------------------------------------------------------------------------------------- \ No newline at end of file diff --git a/Kieker.WebGUI/src/main/resources/lang/ControllerPage_en.properties b/Kieker.WebGUI/src/main/resources/lang/ControllerPage_en.properties index 5f1bb094d1f6c995b9b8f3b49bc43a8fb5658298..a3d5eaa92226f98438d7701c769a4895b5967263 100644 --- a/Kieker.WebGUI/src/main/resources/lang/ControllerPage_en.properties +++ b/Kieker.WebGUI/src/main/resources/lang/ControllerPage_en.properties @@ -9,6 +9,8 @@ lblAnalysisControllerCleaAnalysisController = Reset Analysis lblAnalysisControllerStartAnalysis = Start Analysis lblAnalysisControllerStopAnalysis = Stop Analysis +lblEmergencyShutdown = Emergency Shutdown + lblControl = Control lblLogs = Logs @@ -30,5 +32,6 @@ logMsgStartingAnalysis = Starting Analysis... logMsgStoppingAnalysis = Stopping Analysis... logMsgInstantiatingAnalysis = Instantiating Analysis... logMsgCleaning = Cleaning Analysis... +logMsgEmergencyShutdown = Emergency shutdown of Analysis... #-------------------------------------------------------------------------------------------------------------------------------------------------------------------- \ No newline at end of file diff --git a/Kieker.WebGUI/src/main/webapp/dialogs/AnalysisEditorPageDialogs.xhtml b/Kieker.WebGUI/src/main/webapp/dialogs/AnalysisEditorPageDialogs.xhtml index 249d8da34c2d96c96a1d6c36e9a6b1499475c613..ab8c65da431d5b5db36fb3a7a75f9284165c8282 100644 --- a/Kieker.WebGUI/src/main/webapp/dialogs/AnalysisEditorPageDialogs.xhtml +++ b/Kieker.WebGUI/src/main/webapp/dialogs/AnalysisEditorPageDialogs.xhtml @@ -16,7 +16,7 @@ <h:outputText value="N/A [MiByte]"/> </p:column> - <p:column headerText="#{localizedAnalysisEditorPageMessages.lblOptions}" style="text-align: center; width:40px"> + <p:column headerText="#{localizedAnalysisEditorPageMessages.lblLibOptions}" style="text-align: center; width:40px"> <p:commandButton id="deleteButton" icon="ui-icon-delete" rendered="#{rowIndex != 0}" action="#{analysisEditorBean.deleteLibrary(dependency)}" update=":dependenciesForm :messages :toolpalette"/> <p:tooltip for="deleteButton" rendered="#{rowIndex != 0}" value="Delete Library"/> </p:column> diff --git a/Kieker.WebGUI/src/main/webapp/dialogs/CockpitEditorPageDialogs.xhtml b/Kieker.WebGUI/src/main/webapp/dialogs/CockpitEditorPageDialogs.xhtml index 896310670ebd4190476cfcacaf05122a449b65d2..115e7f39c78de0b37ade21f8886d51df65462eb1 100644 --- a/Kieker.WebGUI/src/main/webapp/dialogs/CockpitEditorPageDialogs.xhtml +++ b/Kieker.WebGUI/src/main/webapp/dialogs/CockpitEditorPageDialogs.xhtml @@ -90,9 +90,9 @@ <hr/> <div style="text-align: right"> - <p:commandButton value="#{localizedMessages.lblOk}" update="copyViewDialogForm :messages :availableViewsForm" oncomplete="copyViewDialog.hide()" /> + <p:commandButton value="#{localizedMessages.lblOk}" action="#{cockpitEditorBean.copyView(copyViewBean)}" oncomplete="if (!(args.validationFailed || args.fail)) copyViewDialog.hide()" update="copyViewDialogForm :messages :availableViewsForm" /> <p:spacer width="10px" height="10" /> - <p:commandButton value="#{localizedMessages.lblCancel}" action="#{cockpitEditorBean.copyView(copyViewBean)}" oncomplete="if (!(args.validationFailed || args.fail)) copyViewDialog.hide()" /> + <p:commandButton value="#{localizedMessages.lblCancel}" oncomplete="copyViewDialog.hide()" /> </div> </h:form> </p:dialog> diff --git a/Kieker.WebGUI/src/main/webapp/pages/AnalysisEditorPage.xhtml b/Kieker.WebGUI/src/main/webapp/pages/AnalysisEditorPage.xhtml index 5a3d791b83ee66227972a48da3c94f86860ffc45..80f2fc826d2d847c9e1a491028efb55fecfc7a84 100644 --- a/Kieker.WebGUI/src/main/webapp/pages/AnalysisEditorPage.xhtml +++ b/Kieker.WebGUI/src/main/webapp/pages/AnalysisEditorPage.xhtml @@ -41,38 +41,38 @@ <ui:define name="js"> <script> nodeEnterListener = function() { - graph.setMouseCursor('pointer'); + graph.setMouseCursor('pointer'); } nodeClickListener = function(node, info, e) { - nodeClickCommand([{name: 'ID', value: node.id}]); - markNode(node, '#FF0000'); + nodeClickCommand([{name: 'ID', value: node.id}]); + markNode(node, '#FF0000'); } nodeRemoveListener = function(node) { - nodeRemoveCommand([{name: 'ID', value: node.id}]); + nodeRemoveCommand([{name: 'ID', value: node.id}]); } edgeCreateListener = function(sourceNode, targetNode, sourcePort, targetPort) { - edgeCreateCommand([{name: 'sourcePortID', value: sourcePort.id}, {name: 'targetPortID', value: targetPort.id}]); + edgeCreateCommand([{name: 'sourcePortID', value: sourcePort.id}, {name: 'targetPortID', value: targetPort.id}]); } edgeRemoveListener = function(sourceNode, targetNode, sourcePort, targetPort) { - edgeRemoveCommand([{name: 'sourcePortID', value: sourcePort.id}, {name: 'targetPortID', value: targetPort.id}]); + edgeRemoveCommand([{name: 'sourcePortID', value: sourcePort.id}, {name: 'targetPortID', value: targetPort.id}]); } autoLayoutListener = function(nodes, edges) { - autoLayoutCommand([{name: 'nodes', value: nodes}, {name: 'edges', value: edges}]); + autoLayoutCommand([{name: 'nodes', value: nodes}, {name: 'edges', value: edges}]); } function preSaveProject(overwriteNewerProject) { - var layoutString = graph.savePositions(); - saveProjectCommand([{name: 'layoutString', value: layoutString}, {name: 'overwriteNewerProject', value: overwriteNewerProject}]); + var layoutString = graph.savePositions(); + saveProjectCommand([{name: 'layoutString', value: layoutString}, {name: 'overwriteNewerProject', value: overwriteNewerProject}]); } // "Overwrite" the function in the template function bodyLoaded() { - // postInit(); + // postInit(); } </script> </ui:define> @@ -222,10 +222,12 @@ </div> </b> <br/> - <b><h:outputText value="#{localizedAnalysisEditorPageMessages.lblDescription}:"/></b><br/> - <ul> - <li><h:outputText value="#{reader.description}"/></li> - </ul> + <ui:fragment rendered="#{not empty reader.description}"> + <b><h:outputText value="#{localizedAnalysisEditorPageMessages.lblDescription}:"/></b><br/> + <ul> + <li><h:outputText value="#{reader.description}"/></li> + </ul> + </ui:fragment> <ui:fragment rendered="#{not empty reader.outputPorts}"> <b><h:outputText value="#{localizedAnalysisEditorPageMessages.lblOutputPorts}:"/></b> <p:dataList value="#{reader.outputPorts}" var="port"> @@ -264,10 +266,12 @@ </div> </b> <br/> - <b><h:outputText value="#{localizedAnalysisEditorPageMessages.lblDescription}:"/></b><br/> - <ul> - <li><h:outputText value="#{filter.description}"/></li> - </ul> + <ui:fragment rendered="#{not empty filter.description}"> + <b><h:outputText value="#{localizedAnalysisEditorPageMessages.lblDescription}:"/></b><br/> + <ul> + <li><h:outputText value="#{filter.description}"/></li> + </ul> + </ui:fragment> <ui:fragment rendered="#{not empty filter.inputPorts}"> <b><h:outputText value="#{localizedAnalysisEditorPageMessages.lblInputPorts}:"/></b> <p:dataList value="#{filter.inputPorts}" var="port"> @@ -312,10 +316,12 @@ </div> </b> <br/> - <b><h:outputText value="#{localizedAnalysisEditorPageMessages.lblDescription}:"/></b><br/> - <ul> - <li><h:outputText value="#{repository.description}"/></li> - </ul> + <ui:fragment rendered="#{not empty repository.description}"> + <b><h:outputText value="#{localizedAnalysisEditorPageMessages.lblDescription}:"/></b><br/> + <ul> + <li><h:outputText value="#{repository.description}"/></li> + </ul> + </ui:fragment> <ui:fragment rendered="#{not empty repository.properties}"> <b><h:outputText value="#{localizedAnalysisEditorPageMessages.lblConfiguration}:"/></b> <p:dataList value="#{repository.properties}" var="property"> diff --git a/Kieker.WebGUI/src/main/webapp/pages/CockpitEditorPage.xhtml b/Kieker.WebGUI/src/main/webapp/pages/CockpitEditorPage.xhtml index b32f5735d04811816f664ebf84f482f1c2e002f5..2e48fe05c09deaff5c7acb60601c77ed6da218bf 100644 --- a/Kieker.WebGUI/src/main/webapp/pages/CockpitEditorPage.xhtml +++ b/Kieker.WebGUI/src/main/webapp/pages/CockpitEditorPage.xhtml @@ -84,9 +84,9 @@ <ui:fragment rendered="#{not empty cockpitEditorBean.activeView}"> <!-- The following is a workaround necessary due to a bug in Primefaces. --> <script type="text/javascript"> - $('.ui-panel').click(function(event) { - nodeSelected([{name: 'id', value: event.currentTarget.id}]); - }); + $('.ui-panel').click(function(event) { + nodeSelected([{name: 'id', value: event.currentTarget.id}]); + }); </script> <p:dashboard id="dynamicDashboard" binding="#{cockpitEditorBean.dashboard}"> <p:ajax event="reorder" listener="#{cockpitEditorBean.handleReorder}"/> @@ -117,10 +117,10 @@ <p:menu overlay="true" trigger="viewLink" my="left top" at="left bottom" style="width:210px"> <p:menuitem icon="ui-icon-analysisEditor" value=" #{localizedCockpitEditorPageMessages.lblSelectView}" action="#{cockpitEditorBean.setActiveView(viewElem)}" styleClass="element-with-whitespace" update=":messages :centerForm :availableViewsForm"/> <p:separator/> - <p:menuitem icon="ui-icon-edit" styleClass="element-with-whitespace" action="#{cockpitEditorBean.setSelectedView(viewElem)}" onclick="editViewDialog.show()" value=" #{localizedCockpitEditorPageMessages.lblEditView}"/> - <p:menuitem icon="ui-icon-copy" styleClass="element-with-whitespace" action="#{cockpitEditorBean.setSelectedView(viewElem)}" onclick="copyViewDialog.show()" value=" #{localizedCockpitEditorPageMessages.lblCopyView}" /> + <p:menuitem icon="ui-icon-edit" styleClass="element-with-whitespace" action="#{cockpitEditorBean.setSelectedView(viewElem)}" onclick="editViewDialog.show()" value=" #{localizedCockpitEditorPageMessages.lblEditView}" /> + <p:menuitem icon="ui-icon-copy" styleClass="element-with-whitespace" action="#{cockpitEditorBean.setSelectedView(viewElem)}" onclick="copyViewDialog.show()" value=" #{localizedCockpitEditorPageMessages.lblCopyView}" disabled="true"/> <p:separator/> - <p:menuitem icon="ui-icon-delete" styleClass="element-with-whitespace" action="#{cockpitEditorBean.setSelectedView(viewElem)}" onclick="deleteViewDialog.show()" value=" #{localizedCockpitEditorPageMessages.lblDeleteView}"/> + <p:menuitem icon="ui-icon-delete" styleClass="element-with-whitespace" action="#{cockpitEditorBean.setSelectedView(viewElem)}" onclick="deleteViewDialog.show()" value=" #{localizedCockpitEditorPageMessages.lblDeleteView}" disabled="true"/> </p:menu> </p:dataList> </h:form> @@ -153,7 +153,8 @@ <h:outputText value="#{cockpitEditorBean.selectedNode.display.parent.name}" rendered="#{rowIndex == 0}" /> <h:outputText value="#{cockpitEditorBean.selectedNode.display.name}" rendered="#{rowIndex == 1}" /> <p:inplace editor="true" rendered="#{rowIndex == 2}"> - <p:inputText value="#{cockpitEditorBean.selectedNode.name}"/> + <p:ajax event="save" listener="#{cockpitEditorBean.updateName()}" update=":centerForm" /> + <p:inputText value="#{cockpitEditorBean.selectedNode.name}" /> </p:inplace> </p:column> </p:dataTable> diff --git a/Kieker.WebGUI/src/main/webapp/pages/ControllerPage.xhtml b/Kieker.WebGUI/src/main/webapp/pages/ControllerPage.xhtml index 45906a1af618bed3f6f7952227cb3084891d0f84..e3d792b4f7dd49bb15ffb813aeac563350ba146c 100644 --- a/Kieker.WebGUI/src/main/webapp/pages/ControllerPage.xhtml +++ b/Kieker.WebGUI/src/main/webapp/pages/ControllerPage.xhtml @@ -66,7 +66,7 @@ <h:form id="controllerForm"> <div align="center"> - <h:panelGrid columns="4" cellpadding="15"> + <h:panelGrid columns="5" cellpadding="15"> <p:commandButton value="#{localizedControllerPageMessages.lblAnalysisControllerInstantiateAnalysisController}" action="#{controllerBean.instantiateAnalysis()}" update=":messages" disabled="#{empty controllerBean.projectName or not controllerBean.isAnalysisNotAvailable()}"/> <p:commandButton value="#{localizedControllerPageMessages.lblAnalysisControllerCleaAnalysisController}" action="#{controllerBean.cleanAnalysis()}" update=":messages" disabled="#{empty controllerBean.projectName or controllerBean.isAnalysisRunning() or controllerBean.isAnalysisTerminating() or controllerBean.isAnalysisNotAvailable()}"/> @@ -75,6 +75,7 @@ <p:commandButton value="#{localizedControllerPageMessages.lblAnalysisControllerStopAnalysis}" action="#{controllerBean.stopAnalysis()}" update=":messages" disabled="#{empty controllerBean.projectName or not controllerBean.isAnalysisRunning() or controllerBean.isAnalysisNotAvailable()}"/> + <p:commandButton value="#{localizedControllerPageMessages.lblEmergencyShutdown}" action="#{controllerBean.emergencyShutdown()}" update=":messages" disabled="true" /> </h:panelGrid> </div> </h:form>