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

Updated the kieker-jar; Minor modifications.

parent 101c036e
No related branches found
No related tags found
No related merge requests found
No preview for this file type
...@@ -31,6 +31,7 @@ import kieker.analysis.model.analysisMetaModel.MIPlugin; ...@@ -31,6 +31,7 @@ import kieker.analysis.model.analysisMetaModel.MIPlugin;
import kieker.analysis.model.analysisMetaModel.MIProject; import kieker.analysis.model.analysisMetaModel.MIProject;
import kieker.analysis.model.analysisMetaModel.impl.MAnalysisMetaModelFactory; import kieker.analysis.model.analysisMetaModel.impl.MAnalysisMetaModelFactory;
import kieker.webgui.common.FileManager; import kieker.webgui.common.FileManager;
import org.primefaces.context.RequestContext;
import org.primefaces.model.DefaultTreeNode; import org.primefaces.model.DefaultTreeNode;
import org.primefaces.model.TreeNode; import org.primefaces.model.TreeNode;
...@@ -88,6 +89,7 @@ public class ProjectsBean { ...@@ -88,6 +89,7 @@ public class ProjectsBean {
if (FileManager.getInstance().saveNewProject(project)) { if (FileManager.getInstance().saveNewProject(project)) {
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "", "New Project: " + projectName)); FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "", "New Project: " + projectName));
this.projects.add(project); this.projects.add(project);
RequestContext.getCurrentInstance().addPartialUpdateTarget("projectsForm");
} else { } else {
/* Inform the user about the fail. */ /* Inform the user about the fail. */
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, "", "A project with this name exists already.")); FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, "", "A project with this name exists already."));
......
...@@ -141,7 +141,6 @@ public final class FileManager { ...@@ -141,7 +141,6 @@ public final class FileManager {
*/ */
final File fileProject = new File(dirProject, projectName + FileManager.EXTENSION); final File fileProject = new File(dirProject, projectName + FileManager.EXTENSION);
try { try {
// TODO Copy before saving as the controller destroys at least the dependencies.
final AnalysisController controller = new AnalysisController(project, PluginClassLoader.getInstance()); final AnalysisController controller = new AnalysisController(project, PluginClassLoader.getInstance());
if (controller.saveToFile(fileProject)) { if (controller.saveToFile(fileProject)) {
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "", "Project saved: " + project.getName())); FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "", "Project saved: " + project.getName()));
......
...@@ -28,6 +28,7 @@ import javax.faces.convert.Converter; ...@@ -28,6 +28,7 @@ import javax.faces.convert.Converter;
import javax.faces.convert.FacesConverter; import javax.faces.convert.FacesConverter;
import kieker.analysis.model.analysisMetaModel.MIDependency; 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 * This converter can be used to convert an instance of <i>MIDependency</i> to
...@@ -88,7 +89,7 @@ public class MIDependencyToSizeConverter implements Converter { ...@@ -88,7 +89,7 @@ public class MIDependencyToSizeConverter implements Converter {
if (!(o instanceof MIDependency)) { if (!(o instanceof MIDependency)) {
return ""; return "";
} else { } 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]"); return new DecimalFormat("#.##").format(size * MIDependencyToSizeConverter.FACTOR).concat(" [MiByte]");
} }
} }
......
...@@ -19,6 +19,10 @@ ...@@ -19,6 +19,10 @@
<br /> <br />
<br /> <br />
<a href="http://www.kieker-monitoring.net/">http://www.kieker-monitoring.net/</a> <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> </h:form>
</p:dialog> </p:dialog>
<!-- ******************************************************************************** --> <!-- ******************************************************************************** -->
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<c:if test="#{not empty selectedMainProjectBean.mainProject}"> <c:if test="#{not empty selectedMainProjectBean.mainProject}">
<p:commandButton value="Add Connection" ajax="true" action="#{selectedMainProjectBean.addConnection()}" update=":connectionDialogForm"/> <p:commandButton value="Add Connection" ajax="true" action="#{selectedMainProjectBean.addConnection()}" update=":connectionDialogForm"/>
<br/><br/> <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:column headerText="Source" style="width:125px">
<p:cellEditor> <p:cellEditor>
<f:facet name="output"> <f:facet name="output">
...@@ -90,9 +90,10 @@ ...@@ -90,9 +90,10 @@
</p:column> </p:column>
</p:dataTable> </p:dataTable>
<br/> <br/>
<center> <hr/>
<div style="text-align: right">
<p:commandButton value="Ok" action="#{selectedMainProjectBean.submitConnections()}" oncomplete="connectionDialog.hide();" /> <p:commandButton value="Ok" action="#{selectedMainProjectBean.submitConnections()}" oncomplete="connectionDialog.hide();" />
</center> </div>
</c:if> </c:if>
</h:form> </h:form>
</p:dialog> </p:dialog>
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<hr/> <hr/>
<div style="text-align: right"> <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:spacer width="10px" height="10" />
<p:commandButton value="Cancel" onclick="newProjectDialog.hide()" /> <p:commandButton value="Cancel" onclick="newProjectDialog.hide()" />
</div> </div>
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
<html xmlns="http://www.w3.org/1999/xhtml" <html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html" xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core" 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"> <f:view contentType="text/html">
<h:head> <h:head>
...@@ -12,33 +13,49 @@ ...@@ -12,33 +13,49 @@
href="../projectDependencies.css" /> href="../projectDependencies.css" />
</h:head> </h:head>
<body> <body>
<p:layout fullPage="true"> <p:layout fullPage="true">
<p:layoutUnit header="Navigation" position="north" collapsible="true" resizable="true"> <p:layoutUnit header="Navigation" position="north" collapsible="true" resizable="true">
<!-- The control panel to get back. --> <!-- 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:form>
<h:panelGrid columns="2" columnClasses="column"> <c:if test="#{empty selectedProjectBean.selectedProject}">
<h:panelGrid columns="1"> No project selected.
<p:commandButton ajax="true" value="Accept Selection" action="#{selectedDependenciesBean.submit()}" style="width: 100%" update=":messages"/> </c:if>
<p:commandButton ajax="true" value="Reset Selection" style="width: 100%" /> Click
</h:panelGrid> <h:link outcome="/main">here</h:link>
to get back to the main menu.
<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> </h:form>
</p:layoutUnit> </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:layout>
<p:growl id="messages" showDetail="true" autoUpdate="true" sticky="false"/> <p:growl id="messages" showDetail="true" autoUpdate="true" sticky="false"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment