Skip to content
Snippets Groups Projects
Commit 8fa98fec authored by Nils Christian Ehmke's avatar Nils Christian Ehmke
Browse files

Updated the kieker-jar; Made sure that beans are cleared when changing the...

Updated the kieker-jar; Made sure that beans are cleared when changing the page; Removed some minor bugs; Activated redirecting; used the new display connectors; Some quality modifications
parent ec4b13bc
No related branches found
No related tags found
No related merge requests found
Showing
with 208 additions and 75 deletions
No preview for this file type
package kieker.webgui.beans;
public interface IProjectBean {
public String clearProject();
public String getProjectName();
public String setProject(final String name);
}
package kieker.webgui.beans.application;
import javax.faces.bean.ApplicationScoped;
import javax.faces.bean.ManagedBean;
import kieker.webgui.beans.IProjectBean;
/**
* This bean is a helper class to change for example from the analysis editor to the cockpit. It clears the source bean (by using the clear-method) and sets the
* project name of the new destination bean, returning its return value.
*
* @author Nils Christian Ehmke
* @version 1.0
*/
@ManagedBean
@ApplicationScoped
public class ForwardBean {
/**
* Default constructor.
*/
public ForwardBean() {
// No code necessary.
}
/**
* Moves from one page to another. This method clears the source bean (by using the clear-method) and sets the
* project name of the new destination bean, returning its return value.
*
* @param sourceBean
* The source bean.
* @param destinationBean
* The destination bean.
* @return The return value of the destination bean.
*/
public String forward(final IProjectBean sourceBean, final IProjectBean destinationBean) {
final String projectName = sourceBean.getProjectName();
sourceBean.clearProject();
return destinationBean.setProject(projectName);
}
}
...@@ -60,6 +60,7 @@ import kieker.common.configuration.Configuration; ...@@ -60,6 +60,7 @@ import kieker.common.configuration.Configuration;
import kieker.common.logging.Log; import kieker.common.logging.Log;
import kieker.common.logging.LogFactory; import kieker.common.logging.LogFactory;
import kieker.monitoring.core.registry.Registry; import kieker.monitoring.core.registry.Registry;
import kieker.webgui.beans.IProjectBean;
import kieker.webgui.beans.application.ProjectsBean; import kieker.webgui.beans.application.ProjectsBean;
import kieker.webgui.common.ConnectionFilterToFilter; import kieker.webgui.common.ConnectionFilterToFilter;
import kieker.webgui.common.ConnectionFilterToRepository; import kieker.webgui.common.ConnectionFilterToRepository;
...@@ -87,7 +88,7 @@ import org.eclipse.emf.ecore.EObject; ...@@ -87,7 +88,7 @@ import org.eclipse.emf.ecore.EObject;
*/ */
@ManagedBean @ManagedBean
@SessionScoped @SessionScoped
public final class CurrentAnalysisEditorBean { public final class CurrentAnalysisEditorBean implements IProjectBean {
/** /**
* This is the log for errors, exceptions etc. * This is the log for errors, exceptions etc.
*/ */
...@@ -181,6 +182,7 @@ public final class CurrentAnalysisEditorBean { ...@@ -181,6 +182,7 @@ public final class CurrentAnalysisEditorBean {
* The name of the project. * The name of the project.
* @return The name of the page for the project work space, if the project has been accepted, '' if it is null. * @return The name of the page for the project work space, if the project has been accepted, '' if it is null.
*/ */
@Override
public String setProject(final String newName) { public String setProject(final String newName) {
synchronized (this) { synchronized (this) {
// Remember the given parameters // Remember the given parameters
...@@ -395,6 +397,7 @@ public final class CurrentAnalysisEditorBean { ...@@ -395,6 +397,7 @@ public final class CurrentAnalysisEditorBean {
* *
* @return The project name for this user. * @return The project name for this user.
*/ */
@Override
public String getProjectName() { public String getProjectName() {
synchronized (this) { synchronized (this) {
return this.projectName; return this.projectName;
...@@ -417,6 +420,7 @@ public final class CurrentAnalysisEditorBean { ...@@ -417,6 +420,7 @@ public final class CurrentAnalysisEditorBean {
* *
* @return The name of the page of the project overview. * @return The name of the page of the project overview.
*/ */
@Override
public String clearProject() { public String clearProject() {
synchronized (this) { synchronized (this) {
this.project = null; // NOPMD this.project = null; // NOPMD
...@@ -548,7 +552,6 @@ public final class CurrentAnalysisEditorBean { ...@@ -548,7 +552,6 @@ public final class CurrentAnalysisEditorBean {
// Update the time stamp! // Update the time stamp!
this.resetTimeStamp(); this.resetTimeStamp();
} catch (final IOException ex) { } catch (final IOException ex) {
ex.printStackTrace();
CurrentAnalysisEditorBean.LOG.error("An error occured while saving the project.", ex); CurrentAnalysisEditorBean.LOG.error("An error occured while saving the project.", ex);
CurrentAnalysisEditorBean.showMessage(FacesMessage.SEVERITY_ERROR, "An error occured while saving the project."); CurrentAnalysisEditorBean.showMessage(FacesMessage.SEVERITY_ERROR, "An error occured while saving the project.");
} catch (final NewerProjectException ex) { } catch (final NewerProjectException ex) {
......
...@@ -29,6 +29,7 @@ import kieker.analysis.display.Image; ...@@ -29,6 +29,7 @@ import kieker.analysis.display.Image;
import kieker.analysis.display.PlainText; import kieker.analysis.display.PlainText;
import kieker.analysis.model.analysisMetaModel.MIProject; import kieker.analysis.model.analysisMetaModel.MIProject;
import kieker.analysis.model.analysisMetaModel.MIView; import kieker.analysis.model.analysisMetaModel.MIView;
import kieker.webgui.beans.IProjectBean;
import kieker.webgui.beans.application.ProjectsBean; import kieker.webgui.beans.application.ProjectsBean;
import kieker.webgui.common.ACManager; import kieker.webgui.common.ACManager;
import kieker.webgui.common.Global; import kieker.webgui.common.Global;
...@@ -41,7 +42,7 @@ import kieker.webgui.common.Global; ...@@ -41,7 +42,7 @@ import kieker.webgui.common.Global;
*/ */
@ManagedBean @ManagedBean
@SessionScoped @SessionScoped
public class CurrentCockpitBean { public class CurrentCockpitBean implements IProjectBean {
/** /**
* This is the name of the stored project. It can be used as an identifier within the FS-Manager * This is the name of the stored project. It can be used as an identifier within the FS-Manager
...@@ -81,6 +82,7 @@ public class CurrentCockpitBean { ...@@ -81,6 +82,7 @@ public class CurrentCockpitBean {
* The name of the project. * The name of the project.
* @return The name of the page for the cockpit. * @return The name of the page for the cockpit.
*/ */
@Override
public String setProject(final String newName) { public String setProject(final String newName) {
synchronized (this) { synchronized (this) {
// Remember the given parameters // Remember the given parameters
...@@ -103,6 +105,7 @@ public class CurrentCockpitBean { ...@@ -103,6 +105,7 @@ public class CurrentCockpitBean {
* *
* @return The project name for this user. * @return The project name for this user.
*/ */
@Override
public String getProjectName() { public String getProjectName() {
synchronized (this) { synchronized (this) {
return this.projectName; return this.projectName;
...@@ -220,6 +223,7 @@ public class CurrentCockpitBean { ...@@ -220,6 +223,7 @@ public class CurrentCockpitBean {
* *
* @return The name of the page of the project overview. * @return The name of the page of the project overview.
*/ */
@Override
public String clearProject() { public String clearProject() {
synchronized (this) { synchronized (this) {
this.projectName = null; // NOPMD this.projectName = null; // NOPMD
......
...@@ -24,27 +24,33 @@ import java.io.IOException; ...@@ -24,27 +24,33 @@ import java.io.IOException;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.UUID;
import javax.faces.application.FacesMessage; import javax.faces.application.FacesMessage;
import javax.faces.application.FacesMessage.Severity; import javax.faces.application.FacesMessage.Severity;
import javax.faces.bean.ManagedBean; import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped; import javax.faces.bean.SessionScoped;
import javax.faces.component.UIComponent;
import javax.faces.component.UIInput;
import javax.faces.context.FacesContext; import javax.faces.context.FacesContext;
import kieker.analysis.display.annotation.Display; import kieker.analysis.display.annotation.Display;
import kieker.analysis.model.analysisMetaModel.MIAnalysisMetaModelFactory; import kieker.analysis.model.analysisMetaModel.MIAnalysisMetaModelFactory;
import kieker.analysis.model.analysisMetaModel.MIDisplay; import kieker.analysis.model.analysisMetaModel.MIDisplay;
import kieker.analysis.model.analysisMetaModel.MIDisplayConnector;
import kieker.analysis.model.analysisMetaModel.MIProject; import kieker.analysis.model.analysisMetaModel.MIProject;
import kieker.analysis.model.analysisMetaModel.MIView; import kieker.analysis.model.analysisMetaModel.MIView;
import kieker.analysis.model.analysisMetaModel.impl.MAnalysisMetaModelFactory; import kieker.analysis.model.analysisMetaModel.impl.MAnalysisMetaModelFactory;
import kieker.analysis.plugin.AbstractPlugin; import kieker.analysis.plugin.AbstractPlugin;
import kieker.common.logging.Log; import kieker.common.logging.Log;
import kieker.common.logging.LogFactory; import kieker.common.logging.LogFactory;
import kieker.webgui.beans.IProjectBean;
import kieker.webgui.beans.application.ProjectsBean; import kieker.webgui.beans.application.ProjectsBean;
import kieker.webgui.common.FSManager; import kieker.webgui.common.FSManager;
import kieker.webgui.common.Global; import kieker.webgui.common.Global;
import kieker.webgui.common.exception.NewerProjectException; import kieker.webgui.common.exception.NewerProjectException;
import org.primefaces.context.RequestContext;
import org.primefaces.event.TabChangeEvent; import org.primefaces.event.TabChangeEvent;
/** /**
...@@ -55,7 +61,7 @@ import org.primefaces.event.TabChangeEvent; ...@@ -55,7 +61,7 @@ import org.primefaces.event.TabChangeEvent;
*/ */
@ManagedBean @ManagedBean
@SessionScoped @SessionScoped
public class CurrentCockpitEditorBean { public class CurrentCockpitEditorBean implements IProjectBean {
/** /**
* This is the log for errors, exceptions etc. * This is the log for errors, exceptions etc.
*/ */
...@@ -106,6 +112,7 @@ public class CurrentCockpitEditorBean { ...@@ -106,6 +112,7 @@ public class CurrentCockpitEditorBean {
* The name of the project. * The name of the project.
* @return The name of the page for the analysis view work space. * @return The name of the page for the analysis view work space.
*/ */
@Override
public String setProject(final String newName) { public String setProject(final String newName) {
synchronized (this) { synchronized (this) {
// Remember the given parameters // Remember the given parameters
...@@ -132,6 +139,7 @@ public class CurrentCockpitEditorBean { ...@@ -132,6 +139,7 @@ public class CurrentCockpitEditorBean {
* *
* @return The project name for this user. * @return The project name for this user.
*/ */
@Override
public String getProjectName() { public String getProjectName() {
synchronized (this) { synchronized (this) {
return this.projectName; return this.projectName;
...@@ -143,6 +151,7 @@ public class CurrentCockpitEditorBean { ...@@ -143,6 +151,7 @@ public class CurrentCockpitEditorBean {
* *
* @return The name of the page of the project overview. * @return The name of the page of the project overview.
*/ */
@Override
public String clearProject() { public String clearProject() {
synchronized (this) { synchronized (this) {
this.projectName = null; // NOPMD this.projectName = null; // NOPMD
...@@ -173,6 +182,8 @@ public class CurrentCockpitEditorBean { ...@@ -173,6 +182,8 @@ public class CurrentCockpitEditorBean {
} catch (final NewerProjectException ex) { } catch (final NewerProjectException ex) {
CurrentCockpitEditorBean.LOG.info("The project has been modified externally in the meanwhile.", ex); CurrentCockpitEditorBean.LOG.info("The project has been modified externally in the meanwhile.", ex);
CurrentCockpitEditorBean.showMessage(FacesMessage.SEVERITY_WARN, "The project has been modified externally in the meanwhile."); CurrentCockpitEditorBean.showMessage(FacesMessage.SEVERITY_WARN, "The project has been modified externally in the meanwhile.");
// Give the user the possibility to force-save the project
RequestContext.getCurrentInstance().execute("forceSaveDlg.show()");
} }
} }
} }
...@@ -275,7 +286,10 @@ public class CurrentCockpitEditorBean { ...@@ -275,7 +286,10 @@ public class CurrentCockpitEditorBean {
public void addDisplayToView(final MIDisplay display) { public void addDisplayToView(final MIDisplay display) {
synchronized (this) { synchronized (this) {
if (this.activeView != null) { if (this.activeView != null) {
this.activeView.getDisplays().add(display); final MIDisplayConnector connector = this.factory.createDisplayConnector();
connector.setDisplay(display);
connector.setName(UUID.randomUUID().toString());
this.activeView.getDisplayConnectors().add(connector);
} }
} }
} }
...@@ -291,4 +305,48 @@ public class CurrentCockpitEditorBean { ...@@ -291,4 +305,48 @@ public class CurrentCockpitEditorBean {
this.setActiveView((MIView) event.getData()); this.setActiveView((MIView) event.getData());
} }
} }
/**
* This method checks whether a display connector with the given name exists already.
*
* @param name
* The name to be checked.
* @return true iff the name exists already.
*/
private boolean existsDisplayConnectorName(final String name) {
synchronized (this) {
// Make sure a view is selected
if (this.activeView == null) {
return false;
}
// Run through all display connectors and check the name against the given one
for (final MIDisplayConnector connector : this.activeView.getDisplayConnectors()) {
if (connector.getName().equals(name)) {
return true;
}
}
// The name has not been found
return false;
}
}
/**
* This method is used as a validator for new display connector names.
*
* @param context
* The context of the validation.
* @param toValidate
* The components which has be validated.
* @param value
* The new value.
*/
public void validateDisplayConnectorName(final FacesContext context, final UIComponent toValidate, final Object value) {
synchronized (this) {
final boolean nameExists = this.existsDisplayConnectorName((String) value);
((UIInput) toValidate).setValid(!nameExists);
}
}
} }
...@@ -33,6 +33,7 @@ import kieker.analysis.exception.AnalysisConfigurationException; ...@@ -33,6 +33,7 @@ import kieker.analysis.exception.AnalysisConfigurationException;
import kieker.analysis.model.analysisMetaModel.MIProject; import kieker.analysis.model.analysisMetaModel.MIProject;
import kieker.common.logging.Log; import kieker.common.logging.Log;
import kieker.common.logging.LogFactory; import kieker.common.logging.LogFactory;
import kieker.webgui.beans.IProjectBean;
import kieker.webgui.beans.application.ProjectsBean; import kieker.webgui.beans.application.ProjectsBean;
import kieker.webgui.common.ACManager; import kieker.webgui.common.ACManager;
import kieker.webgui.common.Global; import kieker.webgui.common.Global;
...@@ -49,7 +50,7 @@ import kieker.webgui.common.exception.ProjectStillRunningException; ...@@ -49,7 +50,7 @@ import kieker.webgui.common.exception.ProjectStillRunningException;
*/ */
@ManagedBean @ManagedBean
@SessionScoped @SessionScoped
public class CurrentControllerBean { public class CurrentControllerBean implements IProjectBean {
/** /**
* This is the log for errors, exceptions etc. * This is the log for errors, exceptions etc.
*/ */
...@@ -77,6 +78,7 @@ public class CurrentControllerBean { ...@@ -77,6 +78,7 @@ public class CurrentControllerBean {
* The name of the project. * The name of the project.
* @return The name of the page for the cockpit. * @return The name of the page for the cockpit.
*/ */
@Override
public String setProject(final String newName) { public String setProject(final String newName) {
synchronized (this) { synchronized (this) {
// Remember the given parameters // Remember the given parameters
...@@ -110,6 +112,7 @@ public class CurrentControllerBean { ...@@ -110,6 +112,7 @@ public class CurrentControllerBean {
* *
* @return The project name for this user. * @return The project name for this user.
*/ */
@Override
public String getProjectName() { public String getProjectName() {
synchronized (this) { synchronized (this) {
return this.projectName; return this.projectName;
...@@ -121,6 +124,7 @@ public class CurrentControllerBean { ...@@ -121,6 +124,7 @@ public class CurrentControllerBean {
* *
* @return The name of the page of the project overview. * @return The name of the page of the project overview.
*/ */
@Override
public String clearProject() { public String clearProject() {
synchronized (this) { synchronized (this) {
this.projectName = null; // NOPMD this.projectName = null; // NOPMD
......
...@@ -38,7 +38,7 @@ import kieker.analysis.display.Image; ...@@ -38,7 +38,7 @@ import kieker.analysis.display.Image;
import kieker.analysis.display.PlainText; import kieker.analysis.display.PlainText;
import kieker.analysis.display.annotation.Display; import kieker.analysis.display.annotation.Display;
import kieker.analysis.exception.AnalysisConfigurationException; import kieker.analysis.exception.AnalysisConfigurationException;
import kieker.analysis.model.analysisMetaModel.MIDisplay; import kieker.analysis.model.analysisMetaModel.MIDisplayConnector;
import kieker.analysis.model.analysisMetaModel.MIPlugin; import kieker.analysis.model.analysisMetaModel.MIPlugin;
import kieker.analysis.model.analysisMetaModel.MIProject; import kieker.analysis.model.analysisMetaModel.MIProject;
import kieker.analysis.model.analysisMetaModel.MIView; import kieker.analysis.model.analysisMetaModel.MIView;
...@@ -381,8 +381,9 @@ public final class ACManager { // NOCS (Class Data Abstraction Coupling) ...@@ -381,8 +381,9 @@ public final class ACManager { // NOCS (Class Data Abstraction Coupling)
for (final MIView view : this.myProject.getViews()) { for (final MIView view : this.myProject.getViews()) {
final Map<String, AbstractDisplay> viewMap = new ConcurrentHashMap<String, AbstractDisplay>(); // NOPMD (Use of concurrent hash map) final Map<String, AbstractDisplay> viewMap = new ConcurrentHashMap<String, AbstractDisplay>(); // NOPMD (Use of concurrent hash map)
this.displayObjects.put(view.getName(), viewMap); this.displayObjects.put(view.getName(), viewMap);
for (final MIDisplay display : view.getDisplays()) { for (final MIDisplayConnector displayConnector : view.getDisplayConnectors()) {
final Method displayMethod = UpdateDisplaysThread.getDisplayMethod(this.myPluginMap.get(display.getParent()).getClass(), display.getName()); final Method displayMethod = UpdateDisplaysThread.getDisplayMethod(this.myPluginMap.get(displayConnector.getDisplay().getParent()).getClass(),
displayConnector.getName());
// Make sure that the method really exists and that is has the correct parameters // Make sure that the method really exists and that is has the correct parameters
if ((displayMethod != null) && (displayMethod.getParameterTypes().length == 1)) { if ((displayMethod != null) && (displayMethod.getParameterTypes().length == 1)) {
...@@ -403,7 +404,7 @@ public final class ACManager { // NOCS (Class Data Abstraction Coupling) ...@@ -403,7 +404,7 @@ public final class ACManager { // NOCS (Class Data Abstraction Coupling)
} }
} }
if (displayObject != null) { if (displayObject != null) {
viewMap.put(display.getName(), displayObject); viewMap.put(displayConnector.getName(), displayObject);
this.methodMap.put(displayObject, displayMethod); this.methodMap.put(displayObject, displayMethod);
} }
} }
...@@ -458,9 +459,9 @@ public final class ACManager { // NOCS (Class Data Abstraction Coupling) ...@@ -458,9 +459,9 @@ public final class ACManager { // NOCS (Class Data Abstraction Coupling)
while (!this.terminated) { while (!this.terminated) {
for (final MIView view : this.myProject.getViews()) { for (final MIView view : this.myProject.getViews()) {
final Map<String, AbstractDisplay> viewMap = this.displayObjects.get(view.getName()); // NOPMD (Use of concurrent hash map) final Map<String, AbstractDisplay> viewMap = this.displayObjects.get(view.getName()); // NOPMD (Use of concurrent hash map)
for (final MIDisplay display : view.getDisplays()) { for (final MIDisplayConnector displayConnector : view.getDisplayConnectors()) {
final AbstractDisplay displayObject = viewMap.get(display.getName()); final AbstractDisplay displayObject = viewMap.get(displayConnector.getName());
final AbstractPlugin pluginObject = this.myPluginMap.get(display.getParent()); final AbstractPlugin pluginObject = this.myPluginMap.get(displayConnector.getDisplay().getParent());
// Update the display object // Update the display object
try { try {
this.methodMap.get(displayObject).invoke(pluginObject, displayObject); this.methodMap.get(displayObject).invoke(pluginObject, displayObject);
......
...@@ -188,6 +188,9 @@ public final class FSManager { // NOCS (Class Data Abstraction Coupling, Class F ...@@ -188,6 +188,9 @@ public final class FSManager { // NOCS (Class Data Abstraction Coupling, Class F
* If something went wrong during opening the file. * If something went wrong during opening the file.
*/ */
public MIProject openProject(final String project) throws IOException { public MIProject openProject(final String project) throws IOException {
if (project == null) {
throw new IOException("Project is null");
}
// Get the lock for the given project // Get the lock for the given project
final Object lock = this.getLock(project); final Object lock = this.getLock(project);
...@@ -618,7 +621,7 @@ public final class FSManager { // NOCS (Class Data Abstraction Coupling, Class F ...@@ -618,7 +621,7 @@ public final class FSManager { // NOCS (Class Data Abstraction Coupling, Class F
/** /**
* The list of libraries used to create the class loader. * The list of libraries used to create the class loader.
*/ */
final List<URL> libs; private final List<URL> libs;
/** /**
* Creates a new instance of this class using the given parameters. * Creates a new instance of this class using the given parameters.
......
...@@ -30,23 +30,23 @@ public final class Global { ...@@ -30,23 +30,23 @@ public final class Global {
/** /**
* This is the page used for the redirection to the controller page. * This is the page used for the redirection to the controller page.
*/ */
public static final String PAGE_ANALYSIS_CONTROLLER = "Controller.xhtml"; public static final String PAGE_ANALYSIS_CONTROLLER = "Controller.xhtml?faces-redirect=true";
/** /**
* This is the page used for the redirection to the overview. * This is the page used for the redirection to the overview.
*/ */
public static final String PAGE_PROJECT_OVERVIEW = "ProjectOverview.xhtml"; public static final String PAGE_PROJECT_OVERVIEW = "ProjectOverview.xhtml?faces-redirect=true";
/** /**
* This is the page used for the redirection to the cockpit. * This is the page used for the redirection to the cockpit.
*/ */
public static final String PAGE_ANALYSIS_COCKPIT = "Cockpit.xhtml"; public static final String PAGE_ANALYSIS_COCKPIT = "Cockpit.xhtml?faces-redirect=true";
/** /**
* This is the page used for the redirection to the cockpit editor. * This is the page used for the redirection to the cockpit editor.
*/ */
public static final String PAGE_ANALYSIS_VIEW_WORK_SPACE = "CockpitEditor.xhtml"; public static final String PAGE_ANALYSIS_VIEW_WORK_SPACE = "CockpitEditor.xhtml?faces-redirect=true";
/** /**
* This is the page used for the redirection to the analysis editor. * This is the page used for the redirection to the analysis editor.
*/ */
public static final String PAGE_PROJECT_WORK_SPACE = "AnalysisEditor.xhtml"; public static final String PAGE_PROJECT_WORK_SPACE = "AnalysisEditor.xhtml?faces-redirect=true";
/** /**
* Default constructor. * Default constructor.
......
...@@ -33,13 +33,13 @@ ...@@ -33,13 +33,13 @@
<h:outputText styleClass="kieker-title" value="Kieker &raquo; #{stringBean.shortenLongName(currentAnalysisEditorBean.projectName, 30)}"/> <h:outputText styleClass="kieker-title" value="Kieker &raquo; #{stringBean.shortenLongName(currentAnalysisEditorBean.projectName, 30)}"/>
</p:toolbarGroup> </p:toolbarGroup>
<p:toolbarGroup align="right"> <p:toolbarGroup align="right">
<p:commandButton styleClass="perspective-button" icon="ui-icon-home" action="ProjectOverview.xhtml" /> <p:commandButton styleClass="perspective-button" icon="ui-icon-home" action="#{currentAnalysisEditorBean.clearProject()}" />
<p:separator/> <p:separator/>
<p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Analysis Editor" style="white-space: none" disabled="true" ajax="false"/> <p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Analysis Editor" style="white-space: none" disabled="true" ajax="false"/>
<p:commandButton styleClass="perspective-button" icon="ui-icon-circle-triangle-e" value="Analysis" ajax="false" action="#{currentControllerBean.setProject(currentAnalysisEditorBean.projectName)}" /> <p:commandButton styleClass="perspective-button" icon="ui-icon-circle-triangle-e" value="Analysis" ajax="false" action="#{forwardBean.forward(currentAnalysisEditorBean, currentControllerBean)}" />
<p:separator/> <p:separator/>
<p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Cockpit Editor" ajax="false" action="#{currentCockpitEditorBean.setProject(currentAnalysisEditorBean.projectName)}" /> <p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Cockpit Editor" ajax="false" action="#{forwardBean.forward(currentAnalysisEditorBean, currentCockpitEditorBean)}" />
<p:commandButton styleClass="perspective-button" icon="ui-icon-image" value="Cockpit" ajax="false" action="#{currentCockpitBean.setProject(currentAnalysisEditorBean.projectName)}" /> <p:commandButton styleClass="perspective-button" icon="ui-icon-image" value="Cockpit" ajax="false" action="#{forwardBean.forward(currentAnalysisEditorBean, currentCockpitBean)}" />
</p:toolbarGroup> </p:toolbarGroup>
</p:toolbar> </p:toolbar>
...@@ -197,6 +197,20 @@ ...@@ -197,6 +197,20 @@
<!-- ******************************************************************************** --> <!-- ******************************************************************************** -->
</p:layout> </p:layout>
<p:dialog header="Save Project" resizable="false" modal="true" widgetVar="forceSaveDlg">
<h:form>
<div style="text-align: center">
<h:outputText value="The project has been modified externally in the meanwhile. Do you want to overwrite the changes?" />
</div>
<hr/>
<div style="text-align: right">
<p:commandButton value="Yes" action="#{currentAnalysisEditorBean.saveProject(true)}" oncomplete="forceSaveDlg.hide()" update=":messages" />
<p:spacer width="10px" height="10" />
<p:commandButton value="Cancel" onclick="forceSaveDlg.hide()" />
</div>
</h:form>
</p:dialog>
<p:growl id="messages" life="1500" showDetail="true" autoUpdate="false" sticky="true"/> <p:growl id="messages" life="1500" showDetail="true" autoUpdate="false" sticky="true"/>
<!-- Include the dialog for the configuration. --> <!-- Include the dialog for the configuration. -->
...@@ -210,6 +224,5 @@ ...@@ -210,6 +224,5 @@
<ui:include src="dialogs/manageLibrariesDialog.xhtml" /> <ui:include src="dialogs/manageLibrariesDialog.xhtml" />
<ui:include src="dialogs/forceSaveDialog.xhtml" />
</h:body> </h:body>
</html> </html>
\ No newline at end of file
...@@ -25,13 +25,13 @@ ...@@ -25,13 +25,13 @@
<h:outputText styleClass="kieker-title" value="Kieker &raquo; #{stringBean.shortenLongName(currentAnalysisEditorBean.projectName, 30)}"/> <h:outputText styleClass="kieker-title" value="Kieker &raquo; #{stringBean.shortenLongName(currentAnalysisEditorBean.projectName, 30)}"/>
</p:toolbarGroup> </p:toolbarGroup>
<p:toolbarGroup align="right"> <p:toolbarGroup align="right">
<p:commandButton styleClass="perspective-button" icon="ui-icon-home" action="ProjectOverview.xhtml" /> <p:commandButton styleClass="perspective-button" icon="ui-icon-home" action="#{currentCockpitBean.clearProject()}" />
<p:separator/> <p:separator/>
<p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Analysis Editor" style="white-space: none" ajax="false" action="#{currentAnalysisEditorBean.setProject(currentCockpitBean.projectName)}"/> <p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Analysis Editor" style="white-space: none" ajax="false" action="#{forwardBean.forward(currentCockpitBean,currentAnalysisEditorBean)}"/>
<p:commandButton styleClass="perspective-button" icon="ui-icon-circle-triangle-e" value="Analysis" ajax="false" action="#{currentControllerBean.setProject(currentCockpitBean.projectName)}" /> <p:commandButton styleClass="perspective-button" icon="ui-icon-circle-triangle-e" value="Analysis" ajax="false" action="#{forwardBean.forward(currentCockpitBean,currentControllerBean)}" />
<p:separator/> <p:separator/>
<p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Cockpit Editor" ajax="false" action="#{currentCockpitEditorBean.setProject(currentCockpitBean.projectName)}" /> <p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Cockpit Editor" ajax="false" action="#{forwardBean.forward(currentCockpitBean,currentCockpitEditorBean)}" />
<p:commandButton styleClass="perspective-button" icon="ui-icon-image" value="Cockpit" ajax="false" disabled="true" action="#{currentCockpitBean.setProject(currentCockpitBean.projectName)}" /> <p:commandButton styleClass="perspective-button" icon="ui-icon-image" value="Cockpit" ajax="false" disabled="true" />
</p:toolbarGroup> </p:toolbarGroup>
</p:toolbar> </p:toolbar>
<p:menubar> <p:menubar>
...@@ -56,9 +56,9 @@ ...@@ -56,9 +56,9 @@
<p:layoutUnit position="center" id="centerLayout"> <p:layoutUnit position="center" id="centerLayout">
<h:form id="centerForm"> <h:form id="centerForm">
<ui:repeat value="#{currentCockpitBean.activeView.displays}" var="display"> <ui:repeat value="#{currentCockpitBean.activeView.displayConnectors}" var="dispConnector">
<p:panel header="#{display.name}"> <p:panel header="#{dispConnector.name}">
<h:outputText value="#{currentCockpitBean.updatePlainTextDisplay(display.name)}"/> <h:outputText value="#{currentCockpitBean.updatePlainTextDisplay(dispConnector.name)}"/>
</p:panel> </p:panel>
</ui:repeat> </ui:repeat>
</h:form> </h:form>
......
...@@ -23,13 +23,13 @@ ...@@ -23,13 +23,13 @@
<h:outputText styleClass="kieker-title" value="Kieker &raquo; #{stringBean.shortenLongName(currentAnalysisEditorBean.projectName, 30)}"/> <h:outputText styleClass="kieker-title" value="Kieker &raquo; #{stringBean.shortenLongName(currentAnalysisEditorBean.projectName, 30)}"/>
</p:toolbarGroup> </p:toolbarGroup>
<p:toolbarGroup align="right"> <p:toolbarGroup align="right">
<p:commandButton styleClass="perspective-button" icon="ui-icon-home" action="ProjectOverview.xhtml" /> <p:commandButton styleClass="perspective-button" icon="ui-icon-home" action="#{currentCockpitEditorBean.clearProject()}" />
<p:separator/> <p:separator/>
<p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Analysis Editor" style="white-space: none" ajax="false" action="#{currentAnalysisEditorBean.setProject(currentCockpitEditorBean.projectName)}"/> <p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Analysis Editor" style="white-space: none" ajax="false" action="#{forwardBean.forward(currentCockpitEditorBean, currentAnalysisEditorBean)}"/>
<p:commandButton styleClass="perspective-button" icon="ui-icon-circle-triangle-e" value="Analysis" ajax="false" action="#{currentControllerBean.setProject(currentCockpitEditorBean.projectName)}" /> <p:commandButton styleClass="perspective-button" icon="ui-icon-circle-triangle-e" value="Analysis" ajax="false" action="#{forwardBean.forward(currentCockpitEditorBean, currentControllerBean)}" />
<p:separator/> <p:separator/>
<p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Cockpit Editor" ajax="false" disabled="true" action="#{currentCockpitEditorBean.setProject(currentCockpitEditorBean.projectName)}" /> <p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Cockpit Editor" ajax="false" disabled="true" />
<p:commandButton styleClass="perspective-button" icon="ui-icon-image" value="Cockpit" ajax="false" action="#{currentCockpitBean.setProject(currentCockpitEditorBean.projectName)}" /> <p:commandButton styleClass="perspective-button" icon="ui-icon-image" value="Cockpit" ajax="false" action="#{forwardBean.forward(currentCockpitEditorBean, currentCockpitBean)}" />
</p:toolbarGroup> </p:toolbarGroup>
</p:toolbar> </p:toolbar>
<p:menubar> <p:menubar>
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
<p:separator/> <p:separator/>
<p:menuitem styleClass="element-with-whitespace" icon="ui-icon-disk" value=" Save Project" update=":messages" ajax="true" action="#{currentCockpitEditorBean.saveProject(false)}" disabled="#{empty currentCockpitEditorBean.project}"/> <p:menuitem styleClass="element-with-whitespace" icon="ui-icon-disk" value=" Save Project" update=":messages" ajax="true" action="#{currentCockpitEditorBean.saveProject(false)}" disabled="#{empty currentCockpitEditorBean.project}"/>
<p:menuitem styleClass="element-with-whitespace" icon="ui-icon-disk" value=" Save Project As" update=":messages" ajax="true" disabled="#{empty currentAnalysisEditorBean.project}"/> <p:menuitem styleClass="element-with-whitespace" icon="ui-icon-disk" value=" Save Project As" update=":messages" ajax="true" disabled="#{empty currentAnalysisEditorBean.project}"/>
<p:menuitem styleClass="element-with-whitespace Force-Save-Project-Button" icon="ui-icon-alert" value=" Force Save Project" update=":messages" ajax="true" action="#{currentCockpitEditorBean.saveProject(true)}" disabled="#{empty currentCockpitEditorBean.project}"/>
<p:separator/> <p:separator/>
<p:menuitem styleClass="element-with-whitespace" icon="ui-icon-refresh" value=" Reload Project" ajax="true" disabled="#{empty currentCockpitEditorBean.project or true}"/> <p:menuitem styleClass="element-with-whitespace" icon="ui-icon-refresh" value=" Reload Project" ajax="true" disabled="#{empty currentCockpitEditorBean.project or true}"/>
<p:separator/> <p:separator/>
...@@ -80,18 +79,20 @@ ...@@ -80,18 +79,20 @@
<p:inputText value="#{viewComp.description}" /> <p:inputText value="#{viewComp.description}" />
</p:inplace> </p:inplace>
<hr/> <hr/>
<p:dataTable value="#{viewComp.displays}" var="disp"> <p:dataTable value="#{viewComp.displayConnectors}" var="dispConn">
<p:column headerText="Plugin" style="text-align: center"> <p:column headerText="Plugin" style="text-align: center">
#{disp.parent.name} #{dispConn.display.parent.name}
</p:column> </p:column>
<p:column headerText="Display Name" style="text-align: center"> <p:column headerText="Display Name" style="text-align: center">
#{disp.name} #{dispConn.display.name}
</p:column> </p:column>
<p:column headerText="Name" style="text-align: center"> <p:column headerText="Name" style="text-align: center">
TODO <p:inplace id="basic" editor="true">
<p:inputText value="#{dispConn.name}" validator="#{currentCockpitEditorBean.validateDisplayConnectorName}" />
</p:inplace>
</p:column> </p:column>
<p:column style="text-align: center; width: 50px" > <p:column style="text-align: center; width: 50px" >
<p:commandButton icon="ui-icon-trash"/> <p:commandButton icon="ui-icon-trash" disabled="true"/>
</p:column> </p:column>
</p:dataTable> </p:dataTable>
</p:tab> </p:tab>
...@@ -101,6 +102,20 @@ ...@@ -101,6 +102,20 @@
</p:layoutUnit> </p:layoutUnit>
</p:layout> </p:layout>
<p:dialog header="Save Project" resizable="false" modal="true" widgetVar="forceSaveDlg">
<h:form>
<div style="text-align: center">
<h:outputText value="The project has been modified externally in the meanwhile. Do you want to overwrite the changes?" />
</div>
<hr/>
<div style="text-align: right">
<p:commandButton value="Yes" action="#{currentCockpitEditorBean.saveProject(true)}" oncomplete="forceSaveDlg.hide()" update=":messages" />
<p:spacer width="10px" height="10" />
<p:commandButton value="Cancel" onclick="forceSaveDlg.hide()" />
</div>
</h:form>
</p:dialog>
<p:growl id="messages" life="1500" showDetail="true" autoUpdate="false" sticky="true"/> <p:growl id="messages" life="1500" showDetail="true" autoUpdate="false" sticky="true"/>
<!-- Include the dialog for the configuration. --> <!-- Include the dialog for the configuration. -->
......
...@@ -25,13 +25,13 @@ ...@@ -25,13 +25,13 @@
<h:outputText styleClass="kieker-title" value="Kieker &raquo; #{stringBean.shortenLongName(currentAnalysisEditorBean.projectName, 30)}"/> <h:outputText styleClass="kieker-title" value="Kieker &raquo; #{stringBean.shortenLongName(currentAnalysisEditorBean.projectName, 30)}"/>
</p:toolbarGroup> </p:toolbarGroup>
<p:toolbarGroup align="right"> <p:toolbarGroup align="right">
<p:commandButton styleClass="perspective-button" icon="ui-icon-home" action="ProjectOverview.xhtml"/> <p:commandButton styleClass="perspective-button" icon="ui-icon-home" action="#{currentControllerBean.clearProject()}"/>
<p:separator/> <p:separator/>
<p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Analysis Editor" style="white-space: none" ajax="false" action="#{currentAnalysisEditorBean.setProject(currentControllerBean.projectName)}"/> <p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Analysis Editor" style="white-space: none" ajax="false" action="#{forwardBean.forward(currentControllerBean, currentAnalysisEditorBean)}"/>
<p:commandButton styleClass="perspective-button" icon="ui-icon-circle-triangle-e" value="Analysis" ajax="false" disabled="true" /> <p:commandButton styleClass="perspective-button" icon="ui-icon-circle-triangle-e" value="Analysis" ajax="false" disabled="true" />
<p:separator/> <p:separator/>
<p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Cockpit Editor" ajax="false" action="#{currentCockpitEditorBean.setProject(currentControllerBean.projectName)}" /> <p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Cockpit Editor" ajax="false" action="#{forwardBean.forward(currentControllerBean, currentCockpitEditorBean)}" />
<p:commandButton styleClass="perspective-button" icon="ui-icon-image" value="Cockpit" ajax="false" action="#{currentCockpitBean.setProject(currentControllerBean.projectName)}" /> <p:commandButton styleClass="perspective-button" icon="ui-icon-image" value="Cockpit" ajax="false" action="#{forwardBean.forward(currentControllerBean, currentCockpitBean)}" />
</p:toolbarGroup> </p:toolbarGroup>
</p:toolbar> </p:toolbar>
......
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition <ui:composition
xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html" xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui"> xmlns:p="http://primefaces.org/ui">
<p:dialog header="About..." resizable="false" modal="true" <p:dialog header="About..." resizable="false" modal="true" widgetVar="aboutDlg">
widgetVar="aboutDlg" id="aboutDialog">
<h:form> <h:form>
<img src="../img/kieker-logo-transparent.png" /> <img src="../img/kieker-logo-transparent.png" alt="Kieker-Logo" width="491" height="150" />
<hr/> <hr/>
<h:outputText value="Kieker.WebGUI" /> <h:outputText value="Kieker.WebGUI" />
<br /> <br />
......
<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui">
<p:dialog header="Save Project" resizable="false" modal="true"
widgetVar="forceSaveDlg" id="forceSaveDialog">
<h:form>
<div style="text-align: center">
<h:outputText value="The project has been modified externally in the meanwhile. Do you want to overwrite the changes?" />
</div>
<hr/>
<div style="text-align: right">
<p:commandButton value="Yes" action="#{currentAnalysisEditorBean.saveProject(true)}" oncomplete="forceSaveDlg.hide()" update=":messages" />
<p:spacer width="10px" height="10" />
<p:commandButton value="Cancel" onclick="forceSaveDlg.hide()" />
</div>
</h:form>
</p:dialog>
</ui:composition>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment