From 5ce75f534897a9ddeb35a221ff4268c249894bd7 Mon Sep 17 00:00:00 2001 From: Nils Christian Ehmke <nie@informatik.uni-kiel.de> Date: Wed, 6 Jun 2012 16:52:29 +0200 Subject: [PATCH] Removed some pmd-errors; Changed the project overview; Changed from primefaces 3.0RC to 3.3. --- Kieker.WebGUI/pom.xml | 2 +- .../CurrentAnalysisCockpitProjectBean.java | 2 +- .../CurrentAnalysisControllerProjectBean.java | 2 +- ...rrentAnalysisViewWorkSpaceProjectBean.java | 2 +- .../session/CurrentWorkSpaceProjectBean.java | 16 +++---- .../java/kieker/webgui/common/ACManager.java | 4 +- .../common/ConnectionFilterToFilter.java | 4 +- .../common/ConnectionFilterToRepository.java | 2 +- .../src/main/webapp/AnalysisCockpit.xhtml | 2 +- .../src/main/webapp/AnalysisController.xhtml | 2 +- .../main/webapp/AnalysisViewWorkSpace.xhtml | 4 +- .../src/main/webapp/ProjectOverview.xhtml | 48 ++++++++----------- .../src/main/webapp/ProjectWorkSpace.xhtml | 4 +- Kieker.WebGUI/src/main/webapp/css/Common.css | 8 ++++ .../webapp/dialogs/connectionDialog.xhtml | 12 ++--- 15 files changed, 57 insertions(+), 57 deletions(-) diff --git a/Kieker.WebGUI/pom.xml b/Kieker.WebGUI/pom.xml index 67a39b48..4db2b1b1 100644 --- a/Kieker.WebGUI/pom.xml +++ b/Kieker.WebGUI/pom.xml @@ -55,7 +55,7 @@ <dependency> <groupId>org.primefaces</groupId> <artifactId>primefaces</artifactId> - <version>3.0.RC1</version> + <version>3.3</version> </dependency> <dependency> <groupId>org.primefaces.themes</groupId> diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentAnalysisCockpitProjectBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentAnalysisCockpitProjectBean.java index 6cdbd5f2..3c9e3c5e 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentAnalysisCockpitProjectBean.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentAnalysisCockpitProjectBean.java @@ -122,7 +122,7 @@ public class CurrentAnalysisCockpitProjectBean { * @return The name of the page of the project overview. */ public String clearProject() { - this.projectName = null; + this.projectName = null; // NOPMD return CurrentAnalysisCockpitProjectBean.PAGE_PROJECT_OVERVIEW; } diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentAnalysisControllerProjectBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentAnalysisControllerProjectBean.java index 6dffa03f..48ea2be7 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentAnalysisControllerProjectBean.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentAnalysisControllerProjectBean.java @@ -94,7 +94,7 @@ public class CurrentAnalysisControllerProjectBean { * @return The name of the page of the project overview. */ public String clearProject() { - this.projectName = null; + this.projectName = null; // NOPMD return CurrentAnalysisControllerProjectBean.PAGE_PROJECT_OVERVIEW; } diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentAnalysisViewWorkSpaceProjectBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentAnalysisViewWorkSpaceProjectBean.java index b739d7b9..7a845fee 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentAnalysisViewWorkSpaceProjectBean.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentAnalysisViewWorkSpaceProjectBean.java @@ -81,7 +81,7 @@ public class CurrentAnalysisViewWorkSpaceProjectBean { * @return The name of the page of the project overview. */ public String clearProject() { - this.projectName = null; + this.projectName = null; // NOPMD return CurrentAnalysisViewWorkSpaceProjectBean.PAGE_PROJECT_OVERVIEW; } diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentWorkSpaceProjectBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentWorkSpaceProjectBean.java index e457bfd1..327b487d 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentWorkSpaceProjectBean.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentWorkSpaceProjectBean.java @@ -353,10 +353,10 @@ public final class CurrentWorkSpaceProjectBean { */ public String clearProject() { synchronized (this) { - this.project = null; - this.projectName = null; - this.classLoader = null; - this.selectedPlugin = null; + this.project = null; // NOPMD + this.projectName = null; // NOPMD + this.classLoader = null; // NOPMD + this.selectedPlugin = null; // NOPMD this.timeStamp = 0; this.pluginMap.clear(); this.filter2filterConnections.clear(); @@ -678,7 +678,7 @@ public final class CurrentWorkSpaceProjectBean { this.repositoryMap.remove(repository.toString()); if (this.selectedRepository == repository) { - this.selectedRepository = null; + this.selectedRepository = null; // NOPMD } } } @@ -704,7 +704,7 @@ public final class CurrentWorkSpaceProjectBean { } if (this.selectedPlugin == plugin) { - this.selectedPlugin = null; + this.selectedPlugin = null; // NOPMD } } } @@ -733,7 +733,7 @@ public final class CurrentWorkSpaceProjectBean { public void setSelectedPlugin(final MIPlugin selectedPlugin) { synchronized (this) { this.selectedPlugin = selectedPlugin; - this.selectedRepository = null; + this.selectedRepository = null; // NOPMD } } @@ -746,7 +746,7 @@ public final class CurrentWorkSpaceProjectBean { public void setSelectedRepository(final MIRepository selectedRepository) { synchronized (this) { this.selectedRepository = selectedRepository; - this.selectedPlugin = null; + this.selectedPlugin = null; // NOPMD } } diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/ACManager.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/ACManager.java index 5758caf9..c6201800 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/ACManager.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/ACManager.java @@ -184,14 +184,14 @@ public final class ACManager { * * @param project * The project whose state should be delivered. - * @return The current state of the corresponding {@link AnalysisController} if it exists, 'N/A' otherwise. + * @return The current state of the corresponding {@link AnalysisController} if it exists, '' otherwise. */ public String getAnalysisControllerStateString(final String project) { final STATE controllerState = this.getAnalysisControllerState(project); final String controllerStateString; if (controllerState == null) { - controllerStateString = "N/A"; + controllerStateString = ""; } else { controllerStateString = controllerState.toString(); } diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/ConnectionFilterToFilter.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/ConnectionFilterToFilter.java index 62c47144..2efd526f 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/ConnectionFilterToFilter.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/ConnectionFilterToFilter.java @@ -87,7 +87,7 @@ public class ConnectionFilterToFilter { this.destination = destination; // Make sure that the output port is always valid - if necessary even null. if (this.destination == null) { - this.outputPort = null; + this.outputPort = null; // NOPMD } } @@ -148,7 +148,7 @@ public class ConnectionFilterToFilter { this.source = source; // Make sure that the input port is always valid - if necessary even null. if (this.source == null) { - this.inputPort = null; + this.inputPort = null; // NOPMD } } diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/ConnectionFilterToRepository.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/ConnectionFilterToRepository.java index 1b499a84..ac7185b2 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/ConnectionFilterToRepository.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/ConnectionFilterToRepository.java @@ -118,7 +118,7 @@ public class ConnectionFilterToRepository { this.source = source; // Make sure that the input port is always valid - if necessary even null. if (this.source == null) { - this.outputPort = null; + this.outputPort = null; // NOPMD } } diff --git a/Kieker.WebGUI/src/main/webapp/AnalysisCockpit.xhtml b/Kieker.WebGUI/src/main/webapp/AnalysisCockpit.xhtml index b3e7fabd..48ea6efc 100644 --- a/Kieker.WebGUI/src/main/webapp/AnalysisCockpit.xhtml +++ b/Kieker.WebGUI/src/main/webapp/AnalysisCockpit.xhtml @@ -18,7 +18,7 @@ <!-- This is the layout for the whole page. --> <p:layout id="layout" fullPage="true"> - <p:layoutUnit position="north" collapsible="false" header="Kieker.WebGUI"> + <p:layoutUnit position="north" collapsible="false" header="Kieker.WebGUI - Cockpit"> <h:form> <p:menubar> <p:submenu label="File"> diff --git a/Kieker.WebGUI/src/main/webapp/AnalysisController.xhtml b/Kieker.WebGUI/src/main/webapp/AnalysisController.xhtml index 3442563a..2104c21f 100644 --- a/Kieker.WebGUI/src/main/webapp/AnalysisController.xhtml +++ b/Kieker.WebGUI/src/main/webapp/AnalysisController.xhtml @@ -18,7 +18,7 @@ <!-- This is the layout for the whole page. --> <p:layout id="layout" fullPage="true"> - <p:layoutUnit position="north" collapsible="false" header="Kieker.WebGUI"> + <p:layoutUnit position="north" collapsible="false" header="Kieker.WebGUI - Analysis Controller"> <h:form> <p:menubar> <p:submenu label="File"> diff --git a/Kieker.WebGUI/src/main/webapp/AnalysisViewWorkSpace.xhtml b/Kieker.WebGUI/src/main/webapp/AnalysisViewWorkSpace.xhtml index 1e06f51c..306b5b4e 100644 --- a/Kieker.WebGUI/src/main/webapp/AnalysisViewWorkSpace.xhtml +++ b/Kieker.WebGUI/src/main/webapp/AnalysisViewWorkSpace.xhtml @@ -16,7 +16,7 @@ <h:body> <p:layout id="layout" fullPage="true"> - <p:layoutUnit position="north" collapsible="false" header="Kieker.WebGUI"> + <p:layoutUnit position="north" collapsible="false" header="Kieker.WebGUI - View Work Space"> <h:form> <p:menubar> <p:submenu label="File"> @@ -24,7 +24,7 @@ <p:menuitem value="Save Project As" update=":messages" ajax="true" disabled="#{empty currentWorkSpaceProjectBean.project}"/> <p:menuitem styleClass="Force-Save-Project-Button" value="Force Save Project" update=":messages" ajax="true" action="#{currentWorkSpaceProjectBean.saveProject(true)}" disabled="#{empty currentWorkSpaceProjectBean.project}"/> <p:separator/> - <p:menuitem value="Reset Project" ajax="true" disabled="#{empty currentWorkSpaceProjectBean.project}"/> + <p:menuitem value="Reload Project" ajax="true" disabled="#{empty currentWorkSpaceProjectBean.project}"/> <p:separator/> <p:menuitem value="New View" ajax="true"/> <p:separator/> diff --git a/Kieker.WebGUI/src/main/webapp/ProjectOverview.xhtml b/Kieker.WebGUI/src/main/webapp/ProjectOverview.xhtml index 418b2f23..df9c2a9f 100644 --- a/Kieker.WebGUI/src/main/webapp/ProjectOverview.xhtml +++ b/Kieker.WebGUI/src/main/webapp/ProjectOverview.xhtml @@ -15,7 +15,7 @@ <h:body> <p:layout fullPage="true"> - <p:layoutUnit position="north" header="Kieker.WebGUI"> + <p:layoutUnit position="north" header="Kieker.WebGUI - Overview"> <h:form id="menubarForm"> <p:menubar> <p:submenu label="File"> @@ -40,41 +40,33 @@ <p:layoutUnit position="center"> <h:form id="projectsListForm"> - <p:dataTable rows="15" paginator="true" var="project" value="#{projectsBean.projects}" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"> + <p:dataTable rows="15" paginator="true" var="project" rowsPerPageTemplate="5,10,15,25,50" value="#{projectsBean.projects}" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"> <p:column headerText="Project Name" id="modelHeader" sortBy="#{project}"> - <h:outputText value="#{project}" /> - </p:column> + <p:commandLink id="dynaButton" value="#{project}"/> - <p:column headerText="Owner" style="text-align: center"> - <h:outputText value="N/A" /> + <p:menu overlay="true" trigger="dynaButton" my="left top" at="left bottom" style="width:180px"> + <p:menuitem id="openButton" value="Open Project" ajax="false" action="#{currentWorkSpaceProjectBean.setProject(projectsBean.openProject(project), project)}"/> + <p:menuitem id="copyButton" value="Copy Project" action="#{currentProjectOverviewBean.setProjectName(project)}" onclick="copyProjectDialog.show()"/> + <p:menuitem id="renameButton" value="Rename Project" action="#{currentProjectOverviewBean.setProjectName(project)}" onclick="renameProjectDialog.show()"/> + <p:menuitem id="deleteButton" value="Delete Project" action="#{currentProjectOverviewBean.setProjectName(project)}" onclick="deleteProjectDialog.show()"/> + <p:separator/> + <p:menuitem id="controlAnalysis" value="Open Analysis Control" ajax="false" action="#{currentAnalysisControllerProjectBean.setProject(project)}" /> + <p:menuitem id="editAnalysisViews" value="Edit Analysis Views" ajax="false" action="#{currentAnalysisViewWorkSpaceProjectBean.setProject(project)}" /> + <p:menuitem id="showAnalysis" value="View Running Analysis" ajax="false" action="#{currentAnalysisCockpitProjectBean.setProject(project)}" /> + </p:menu> </p:column> + <p:column headerText="State" style="text-align: center" sortBy="#{projectsBean.getAnalysisControllerState(project)}"> + <h:outputText value="#{projectsBean.getAnalysisControllerState(project)}"/> + </p:column> <p:column headerText="Last Modification" sortBy="#{projectsBean.getCurrTimeStamp(project)}" style="text-align: center"> <h:outputText value="#{projectsBean.getCurrTimeStamp(project)}" /> </p:column> - <p:column headerText="Analysis" style="text-align: center" sortBy="#{projectsBean.getAnalysisControllerState(project)}"> - <h:outputText value="#{projectsBean.getAnalysisControllerState(project)}"/> - </p:column> - - <p:column headerText="Options" style="text-align: center; width: 310px"> - <p:commandButton id="openButton" ajax="false" action="#{currentWorkSpaceProjectBean.setProject(projectsBean.openProject(project), project)}" icon="ui-icon-folder-open"/> - <p:commandButton id="copyButton" icon="ui-icon-copy" action="#{currentProjectOverviewBean.setProjectName(project)}" onclick="copyProjectDialog.show()"/> - <p:commandButton id="renameButton" icon="ui-icon-pencil" action="#{currentProjectOverviewBean.setProjectName(project)}" onclick="renameProjectDialog.show()"/> - <p:commandButton id="deleteButton" icon="ui-icon-trash" action="#{currentProjectOverviewBean.setProjectName(project)}" onclick="deleteProjectDialog.show()"/> - <p:spacer height="0" width="10"/> - <p:commandButton id="controlAnalysis" ajax="false" action="#{currentAnalysisControllerProjectBean.setProject(project)}" icon="ui-icon-wrench"/> - <p:commandButton id="editAnalysisViews" ajax="false" action="#{currentAnalysisViewWorkSpaceProjectBean.setProject(project)}" icon="ui-icon-pencil" /> - <p:commandButton id="showAnalysis" ajax="false" action="#{currentAnalysisCockpitProjectBean.setProject(project)}" icon="ui-icon-search"/> + <p:column headerText="Owner" style="text-align: center"> + <h:outputText value="N/A" /> + </p:column> - <p:tooltip for="deleteButton" value="Delete Project"/> - <p:tooltip for="openButton" value="Open Project"/> - <p:tooltip for="renameButton" value="Rename Project"/> - <p:tooltip for="copyButton" value="Copy Project"/> - <p:tooltip for="controlAnalysis" value="Open Analysis Control"/> - <p:tooltip for="editAnalysisViews" value="Edit Analysis Views"/> - <p:tooltip for="showAnalysis" value="View Running Analysis"/> - </p:column> </p:dataTable> </h:form> </p:layoutUnit> @@ -89,6 +81,6 @@ <ui:include src="dialogs/projectDialogs.xhtml" /> <!-- Include the dialog for the configuration. --> <ui:include src="dialogs/settingsDialog.xhtml" /> - + </h:body> </html> \ No newline at end of file diff --git a/Kieker.WebGUI/src/main/webapp/ProjectWorkSpace.xhtml b/Kieker.WebGUI/src/main/webapp/ProjectWorkSpace.xhtml index e50096cd..b09d4b80 100644 --- a/Kieker.WebGUI/src/main/webapp/ProjectWorkSpace.xhtml +++ b/Kieker.WebGUI/src/main/webapp/ProjectWorkSpace.xhtml @@ -26,7 +26,7 @@ <h:body onload="initPageObjects();"> <p:layout id="layout" fullPage="true"> - <p:layoutUnit position="north" collapsible="false" header="Kieker.WebGUI"> + <p:layoutUnit position="north" collapsible="false" header="Kieker.WebGUI - Project Work Space (#{currentWorkSpaceProjectBean.projectName})"> <h:form> <p:menubar> <p:submenu label="File"> @@ -34,7 +34,7 @@ <p:menuitem value="Save Project As" update=":messages" ajax="true" disabled="#{empty currentWorkSpaceProjectBean.project}"/> <p:menuitem styleClass="Force-Save-Project-Button" value="Force Save Project" update=":messages" ajax="true" action="#{currentWorkSpaceProjectBean.saveProject(true)}" disabled="#{empty currentWorkSpaceProjectBean.project}"/> <p:separator/> - <p:menuitem value="Reset Project" ajax="true" disabled="#{empty currentWorkSpaceProjectBean.project}"/> + <p:menuitem value="Reload Project" ajax="true" disabled="#{empty currentWorkSpaceProjectBean.project}"/> <p:separator/> <p:menuitem value="Manage Libraries" onclick="manageLibrariesDialog.show()" ajax="true" disabled="#{empty currentWorkSpaceProjectBean.project}"/> <p:menuitem ajax="true" value="Edit Connections" update=":connectionDialogForm" onclick="connectionDialog.show();"/> diff --git a/Kieker.WebGUI/src/main/webapp/css/Common.css b/Kieker.WebGUI/src/main/webapp/css/Common.css index a703913e..912a9f5e 100644 --- a/Kieker.WebGUI/src/main/webapp/css/Common.css +++ b/Kieker.WebGUI/src/main/webapp/css/Common.css @@ -32,6 +32,14 @@ font-size: 15px; } +.ui-menu { + font-size: 15px; +} + +.ui-toolbar { + font-size: 15px; +} + .ui-dialog { font-size: 15px; width: auto; diff --git a/Kieker.WebGUI/src/main/webapp/dialogs/connectionDialog.xhtml b/Kieker.WebGUI/src/main/webapp/dialogs/connectionDialog.xhtml index 905daa45..c8b59297 100644 --- a/Kieker.WebGUI/src/main/webapp/dialogs/connectionDialog.xhtml +++ b/Kieker.WebGUI/src/main/webapp/dialogs/connectionDialog.xhtml @@ -5,7 +5,7 @@ xmlns:p="http://primefaces.org/ui" xmlns:c="http://java.sun.com/jsp/jstl/core"> - <p:dialog id="connectionDialog" header="Manage Connections" + <p:dialog id="connectionDlg" header="Manage Connections" resizable="false" modal="true" widgetVar="connectionDialog"> <h:form id="connectionDialogForm" rendered="#{not empty currentWorkSpaceProjectBean.project}"> @@ -34,7 +34,7 @@ <f:selectItems value="#{currentWorkSpaceProjectBean.project.plugins}" var="plugin" itemLabel="#{plugin.name}" itemValue="#{plugin}" /> - <p:ajax event="change" update="validColumn outputPortsList" /> + <p:ajax event="change" update="outputPortsList" /> </p:selectOneMenu> </f:facet> </p:cellEditor> @@ -54,7 +54,7 @@ itemValue="#{null}" /> <f:selectItems value="#{connection.source.outputPorts}" var="port" itemLabel="#{port.name}" itemValue="#{port}" /> - <p:ajax event="change" update="validColumn" /> + <p:ajax event="change" /> </p:selectOneMenu> </h:form> </f:facet> @@ -74,7 +74,7 @@ itemValue="#{null}" /> <f:selectItems value="#{currentWorkSpaceProjectBean.filters}" var="plugin" itemLabel="#{plugin.name}" itemValue="#{plugin}" /> - <p:ajax event="change" update="validColumn inputPortsList" /> + <p:ajax event="change" update="inputPortsList" /> </p:selectOneMenu> </f:facet> </p:cellEditor> @@ -94,7 +94,7 @@ itemValue="#{null}" /> <f:selectItems value="#{connection.destination.inputPorts}" var="port" itemLabel="#{port.name}" itemValue="#{port}" /> - <p:ajax event="change" update="validColumn" /> + <p:ajax event="change" /> </p:selectOneMenu> </h:form> </f:facet> @@ -136,7 +136,7 @@ itemValue="#{null}" /> <f:selectItems value="#{currentWorkSpaceProjectBean.repositories}" var="repo" itemLabel="#{repo.name}" itemValue="#{repo}" /> - <p:ajax event="change" update="validColumn" /> + <p:ajax event="change" /> </p:selectOneMenu> </f:facet> </p:cellEditor> -- GitLab