diff --git a/Kieker.WebGUI/lib/kieker-1.5-SNAPSHOT.jar b/Kieker.WebGUI/lib/kieker-1.5-SNAPSHOT.jar index 44888d6beccbe790dc32e75bb3e0416d43dbaad6..bbf0160287027f47194aa0881d03837987e060b9 100644 Binary files a/Kieker.WebGUI/lib/kieker-1.5-SNAPSHOT.jar and b/Kieker.WebGUI/lib/kieker-1.5-SNAPSHOT.jar differ diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/ProjectsBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/ProjectsBean.java index 710b7db0be33d2ad614bda96113804de661e626a..d7e0b3a81705654de7524c0249571b61c6252c74 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/ProjectsBean.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/ProjectsBean.java @@ -31,6 +31,7 @@ import kieker.analysis.model.analysisMetaModel.MIPlugin; import kieker.analysis.model.analysisMetaModel.MIProject; import kieker.analysis.model.analysisMetaModel.impl.MAnalysisMetaModelFactory; import kieker.webgui.common.FileManager; +import org.primefaces.context.RequestContext; import org.primefaces.model.DefaultTreeNode; import org.primefaces.model.TreeNode; @@ -88,6 +89,7 @@ public class ProjectsBean { if (FileManager.getInstance().saveNewProject(project)) { FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "", "New Project: " + projectName)); this.projects.add(project); + RequestContext.getCurrentInstance().addPartialUpdateTarget("projectsForm"); } else { /* Inform the user about the fail. */ FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, "", "A project with this name exists already.")); diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/FileManager.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/FileManager.java index 79661023913f28fb33d6bb1092498d8d6f1b8a34..5d7eac783cf07e28d9e06fbc627ebf4426f70999 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/FileManager.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/FileManager.java @@ -141,7 +141,6 @@ public final class FileManager { */ final File fileProject = new File(dirProject, projectName + FileManager.EXTENSION); try { - // TODO Copy before saving as the controller destroys at least the dependencies. final AnalysisController controller = new AnalysisController(project, PluginClassLoader.getInstance()); if (controller.saveToFile(fileProject)) { FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "", "Project saved: " + project.getName())); diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/converter/MIDependencyToSizeConverter.java b/Kieker.WebGUI/src/main/java/kieker/webgui/converter/MIDependencyToSizeConverter.java index 6e05567fde6477c9e2e0be2d424240989aabcfdd..2d353264ff90125f0c1273c4203e8cc600fa9ead 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/converter/MIDependencyToSizeConverter.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/converter/MIDependencyToSizeConverter.java @@ -28,6 +28,7 @@ import javax.faces.convert.Converter; import javax.faces.convert.FacesConverter; import kieker.analysis.model.analysisMetaModel.MIDependency; +import kieker.webgui.common.FileManager; /** * This converter can be used to convert an instance of <i>MIDependency</i> to @@ -88,7 +89,7 @@ public class MIDependencyToSizeConverter implements Converter { if (!(o instanceof MIDependency)) { return ""; } else { - final long size = new File(((MIDependency) o).getFilePath()).length(); + final long size = new File(FileManager.getInstance().getFullPath((MIDependency) o)).length(); return new DecimalFormat("#.##").format(size * MIDependencyToSizeConverter.FACTOR).concat(" [MiByte]"); } } diff --git a/Kieker.WebGUI/src/main/webapp/main/aboutDialog.xhtml b/Kieker.WebGUI/src/main/webapp/main/aboutDialog.xhtml index a109c34d696d0a95f08845c88e0bc7ebff2ef8dd..58d2827750e10189ff443fa359229fd8a52baec4 100644 --- a/Kieker.WebGUI/src/main/webapp/main/aboutDialog.xhtml +++ b/Kieker.WebGUI/src/main/webapp/main/aboutDialog.xhtml @@ -19,6 +19,10 @@ <br /> <br /> <a href="http://www.kieker-monitoring.net/">http://www.kieker-monitoring.net/</a> + <hr/> + <div style="text-align: right"> + <p:commandButton value="Ok" onclick="aboutDialog.hide()" /> + </div> </h:form> </p:dialog> <!-- ******************************************************************************** --> diff --git a/Kieker.WebGUI/src/main/webapp/main/connectionDialog.xhtml b/Kieker.WebGUI/src/main/webapp/main/connectionDialog.xhtml index 434b6b151780ac186ec4fd31e83164e4936f034c..a4e0fad5d85b20811219eec6f2357d2ca732c6b9 100644 --- a/Kieker.WebGUI/src/main/webapp/main/connectionDialog.xhtml +++ b/Kieker.WebGUI/src/main/webapp/main/connectionDialog.xhtml @@ -13,7 +13,7 @@ <c:if test="#{not empty selectedMainProjectBean.mainProject}"> <p:commandButton value="Add Connection" ajax="true" action="#{selectedMainProjectBean.addConnection()}" update=":connectionDialogForm"/> <br/><br/> - <p:dataTable value="#{selectedMainProjectBean.connections}" var="connection"> + <p:dataTable value="#{selectedMainProjectBean.connections}" var="connection" paginator="true" rows="10" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"> <p:column headerText="Source" style="width:125px"> <p:cellEditor> <f:facet name="output"> @@ -90,9 +90,10 @@ </p:column> </p:dataTable> <br/> - <center> + <hr/> + <div style="text-align: right"> <p:commandButton value="Ok" action="#{selectedMainProjectBean.submitConnections()}" oncomplete="connectionDialog.hide();" /> - </center> + </div> </c:if> </h:form> </p:dialog> diff --git a/Kieker.WebGUI/src/main/webapp/main/projectDialogs.xhtml b/Kieker.WebGUI/src/main/webapp/main/projectDialogs.xhtml index 1190377158e6e280ec42515f0a93389a73e4a7da..1a6dbb7abe2f5f31eed33f40d7cd610dbc6512e2 100644 --- a/Kieker.WebGUI/src/main/webapp/main/projectDialogs.xhtml +++ b/Kieker.WebGUI/src/main/webapp/main/projectDialogs.xhtml @@ -20,7 +20,7 @@ <hr/> <div style="text-align: right"> - <p:commandButton value="Ok" action="#{projectsBean.addProject(stringBean.string)}" update=":projectsForm" oncomplete="newProjectDialog.hide()" /> + <p:commandButton value="Ok" action="#{projectsBean.addProject(stringBean.string)}" oncomplete="newProjectDialog.hide()" /> <p:spacer width="10px" height="10" /> <p:commandButton value="Cancel" onclick="newProjectDialog.hide()" /> </div> diff --git a/Kieker.WebGUI/src/main/webapp/projectDependencies.xhtml b/Kieker.WebGUI/src/main/webapp/projectDependencies.xhtml index a0b85d88bc96b3a6d16f7497840f12a35ea7cb79..1970c6036a4dc3e395340c4c0ff46147930b1ff0 100644 --- a/Kieker.WebGUI/src/main/webapp/projectDependencies.xhtml +++ b/Kieker.WebGUI/src/main/webapp/projectDependencies.xhtml @@ -3,7 +3,8 @@ <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" - xmlns:p="http://primefaces.org/ui"> + xmlns:p="http://primefaces.org/ui" + xmlns:c="http://java.sun.com/jsp/jstl/core"> <f:view contentType="text/html"> <h:head> @@ -12,33 +13,49 @@ href="../projectDependencies.css" /> </h:head> <body> + <p:layout fullPage="true"> <p:layoutUnit header="Navigation" position="north" collapsible="true" resizable="true"> <!-- The control panel to get back. --> - Click - <h:link outcome="/main">here</h:link> - to get back to the main menu. - </p:layoutUnit> - - <p:layoutUnit header="Currently used Dependencies for '#{selectedProjectBean.selectedProject.name}'" position="center" > <h:form> - <h:panelGrid columns="2" columnClasses="column"> - <h:panelGrid columns="1"> - <p:commandButton ajax="true" value="Accept Selection" action="#{selectedDependenciesBean.submit()}" style="width: 100%" update=":messages"/> - <p:commandButton ajax="true" value="Reset Selection" style="width: 100%" /> - </h:panelGrid> - - <p:selectManyMenu value="#{selectedDependenciesBean.dependencies}" style="width: 100%" - converter="kieker.webgui.converter.MIDependencyToStringConverter"> - <f:selectItems value="#{dependenciesBean.dependencies}" - var="dependency" itemLabel="#{dependency.filePath}" - itemValue="#{player}" /> - </p:selectManyMenu> - - </h:panelGrid> + <c:if test="#{empty selectedProjectBean.selectedProject}"> + No project selected. + </c:if> + Click + <h:link outcome="/main">here</h:link> + to get back to the main menu. </h:form> </p:layoutUnit> + <c:choose> + <c:when test="#{empty selectedProjectBean.selectedProject}"> + <p:layoutUnit position="center" > + </p:layoutUnit> + </c:when> + <c:otherwise> + + <p:layoutUnit header="Currently used Dependencies for '#{selectedProjectBean.selectedProject.name}'" position="center" > + <h:form> + <h:panelGrid columns="2" columnClasses="column"> + <h:panelGrid columns="1"> + <p:commandButton ajax="true" value="Accept Selection" action="#{selectedDependenciesBean.submit()}" style="width: 100%" update=":messages"/> + <p:commandButton ajax="true" value="Reset Selection" style="width: 100%" /> + </h:panelGrid> + + <p:selectManyMenu value="#{selectedDependenciesBean.dependencies}" style="width: 100%" + converter="kieker.webgui.converter.MIDependencyToStringConverter"> + <f:selectItems value="#{dependenciesBean.dependencies}" + var="dependency" itemLabel="#{dependency.filePath}" + itemValue="#{player}" /> + </p:selectManyMenu> + + </h:panelGrid> + </h:form> + </p:layoutUnit> + + </c:otherwise> + </c:choose> + </p:layout> <p:growl id="messages" showDetail="true" autoUpdate="true" sticky="false"/>