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 3c9e3c5e91a927714a8d1dfd79e3582a98d8ecc3..73c716650995f16e06979e7a5be4104d9ca12dc3 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 @@ -20,12 +20,10 @@ package kieker.webgui.beans.session; -import java.util.List; - import javax.faces.bean.ManagedBean; import javax.faces.bean.SessionScoped; -import kieker.webgui.common.FSManager; +import kieker.analysis.model.analysisMetaModel.MIProject; import org.primefaces.model.DashboardColumn; import org.primefaces.model.DashboardModel; @@ -58,6 +56,10 @@ public class CurrentAnalysisCockpitProjectBean { * The model containing the information about the dashboard itself. */ private DashboardModel model; + /** + * This is the actual model instance. It is the in-memory-model of the current (session) user. + */ + private MIProject project; /** * Creates a new instance of this class. @@ -68,11 +70,13 @@ public class CurrentAnalysisCockpitProjectBean { // This code is just for test purposes this.model = new DefaultDashboardModel(); final DashboardColumn column1 = new DefaultDashboardColumn(); + final DashboardColumn column2 = new DefaultDashboardColumn(); column1.addWidget("panel1"); column1.addWidget("panel2"); this.model.addColumn(column1); + this.model.addColumn(column2); } /** @@ -94,15 +98,30 @@ public class CurrentAnalysisCockpitProjectBean { this.model = model; } + /** + * This method delivers the project stored in this bean. + * + * @return The project for this user. + */ + public MIProject getProject() { + synchronized (this) { + return this.project; + } + } + /** * This method sets the project stored within this bean and returns the new page for the navigation. * * @param name * The name of the project. - * @return The name of the page for the analysis cockpit. + * @return The name of the page for the analysis view work space. */ - public String setProject(final String name) { - this.projectName = name; + public String setProject(final MIProject newProject, final String newName) { + synchronized (this) { + // Remember the given parameters + this.project = newProject; + this.projectName = newName; + } return CurrentAnalysisCockpitProjectBean.PAGE_ANALYSIS_COCKPIT; } @@ -113,7 +132,9 @@ public class CurrentAnalysisCockpitProjectBean { * @return The project name for this user. */ public String getProjectName() { - return this.projectName; + synchronized (this) { + return this.projectName; + } } /** @@ -122,17 +143,11 @@ public class CurrentAnalysisCockpitProjectBean { * @return The name of the page of the project overview. */ public String clearProject() { - this.projectName = null; // NOPMD + synchronized (this) { + this.projectName = null; // NOPMD + this.project = null; // NOPMD + } return CurrentAnalysisCockpitProjectBean.PAGE_PROJECT_OVERVIEW; } - - /** - * Delivers a list containing all available views by name. - * - * @return All available views. - */ - public List<String> getViews() { - return FSManager.getInstance().getAllViews(this.projectName); - } } 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 7a845feed51fbeb0298204b15085b59733c39c00..0256a806b8f2da33623240c817b87b4c90dab452 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 @@ -20,8 +20,29 @@ package kieker.webgui.beans.session; +import java.io.IOException; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.List; + +import javax.faces.application.FacesMessage; +import javax.faces.application.FacesMessage.Severity; import javax.faces.bean.ManagedBean; import javax.faces.bean.SessionScoped; +import javax.faces.context.FacesContext; + +import kieker.analysis.display.annotation.Display; +import kieker.analysis.model.analysisMetaModel.MIAnalysisMetaModelFactory; +import kieker.analysis.model.analysisMetaModel.MIPlugin; +import kieker.analysis.model.analysisMetaModel.MIProject; +import kieker.analysis.model.analysisMetaModel.MIView; +import kieker.analysis.model.analysisMetaModel.impl.MAnalysisMetaModelFactory; +import kieker.analysis.plugin.AbstractPlugin; +import kieker.webgui.common.FSManager; +import kieker.webgui.common.Pair; +import kieker.webgui.common.exception.NewerProjectException; + +import org.primefaces.event.TabChangeEvent; /** * This bean contains the project of the current (session) user for the analysis view work space. @@ -29,10 +50,15 @@ import javax.faces.bean.SessionScoped; * @author Nils Christian Ehmke * @version 1.0 */ +// TODO Display Semantic @ManagedBean @SessionScoped public class CurrentAnalysisViewWorkSpaceProjectBean { + /** + * This is the factory which will be used to create new components for the project. + */ + private final MIAnalysisMetaModelFactory factory = new MAnalysisMetaModelFactory(); /** * This is the page used for the redirecting during setting the current project of the user. */ @@ -45,6 +71,22 @@ public class CurrentAnalysisViewWorkSpaceProjectBean { * This is the name of the stored project. It can be used as an identifier within the FS-Manager */ private String projectName; + /** + * This is the actual model instance. It is the in-memory-model of the current (session) user. + */ + private MIProject project; + /** + * This is the time stamp of the moment, the project was loaded or last saved. It can be used to check whether the project has been modified in the meanwhile. + */ + private long timeStamp; + /** + * This is the corresponding class loader to the project. It contains always the libraries within the lib-folder of the project. + */ + private ClassLoader classLoader; + /** + * This is the currently selected view. + */ + private MIView activeView; /** * Creates a new instance of this class. @@ -53,6 +95,17 @@ public class CurrentAnalysisViewWorkSpaceProjectBean { // No code necessary } + /** + * This method delivers the project stored in this bean. + * + * @return The project for this user. + */ + public MIProject getProject() { + synchronized (this) { + return this.project; + } + } + /** * This method sets the project stored within this bean and returns the new page for the navigation. * @@ -60,8 +113,18 @@ public class CurrentAnalysisViewWorkSpaceProjectBean { * The name of the project. * @return The name of the page for the analysis view work space. */ - public String setProject(final String name) { - this.projectName = name; + public String setProject(final MIProject newProject, final String newName) { + synchronized (this) { + // Remember the given parameters + this.project = newProject; + this.projectName = newName; + + if (this.project != null) { + // Remember the current time! This is important for the later comparison of the time stamps. + this.resetTimeStamp(); + this.reloadClassLoader(); + } + } return CurrentAnalysisViewWorkSpaceProjectBean.PAGE_ANALYSIS_VIEW_WORK_SPACE; } @@ -72,7 +135,9 @@ public class CurrentAnalysisViewWorkSpaceProjectBean { * @return The project name for this user. */ public String getProjectName() { - return this.projectName; + synchronized (this) { + return this.projectName; + } } /** @@ -81,8 +146,160 @@ public class CurrentAnalysisViewWorkSpaceProjectBean { * @return The name of the page of the project overview. */ public String clearProject() { - this.projectName = null; // NOPMD + synchronized (this) { + this.projectName = null; // NOPMD + this.project = null; // NOPMD + this.classLoader = null; // NOPMD + this.activeView = null; // NOPMD + } return CurrentAnalysisViewWorkSpaceProjectBean.PAGE_PROJECT_OVERVIEW; } + + /** + * This method tries to save the current project and informs the user about success or fail. + * + * @param overwriteNewerProject + * This flag determines whether a newer project should be overwritten. + */ + public void saveProject(final boolean overwriteNewerProject) { + synchronized (this) { + try { + FSManager.getInstance().saveProject(this.projectName, this.project, this.timeStamp, overwriteNewerProject); + CurrentAnalysisViewWorkSpaceProjectBean.showMessage(FacesMessage.SEVERITY_INFO, "Project saved."); + // Update the time stamp! + this.resetTimeStamp(); + } catch (final IOException ex) { + CurrentAnalysisViewWorkSpaceProjectBean.showMessage(FacesMessage.SEVERITY_ERROR, "An error occured while saving the projct."); + } catch (final NewerProjectException ex) { + CurrentAnalysisViewWorkSpaceProjectBean.showMessage(FacesMessage.SEVERITY_WARN, "The project has been modified externally in the meanwhile."); + } + } + } + + /** + * This method shows the current user a message by using the growl-component of PrimeFaces. + * + * @param severity + * The severity of the message. + * @param msg + * The message itself. + */ + private static void showMessage(final Severity severity, final String msg) { + FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(severity, "", msg)); + } + + /** + * This method sets the time stamp to the current system time. + */ + public void resetTimeStamp() { + synchronized (this) { + this.timeStamp = System.currentTimeMillis(); + } + } + + /** + * This method delivers the available displays of the given plugin. + * + * @param clazz + * The plugin whose displays should be delivered. + * @return The available displays. + */ + public List<Display> getDisplays(final Class<AbstractPlugin> clazz) { + final List<Display> result = new ArrayList<Display>(); + + synchronized (this) { + + if (clazz != null) { + // Run through all available methods and find the annotated ones + final Method[] methods = clazz.getMethods(); + for (final Method method : methods) { + final Display displayAnnot = method.getAnnotation(Display.class); + if (displayAnnot != null) { + result.add(displayAnnot); + } + } + } + } + + return result; + } + + /** + * This method delivers a list of pairs containing the available plugins and their classes. + * + * @return A list with the plugins. + */ + public List<Pair<MIPlugin, Class<AbstractPlugin>>> getPlugins() { + final List<Pair<MIPlugin, Class<AbstractPlugin>>> result = new ArrayList<Pair<MIPlugin, Class<AbstractPlugin>>>(); + + synchronized (this) { + for (final MIPlugin plugin : this.project.getPlugins()) { + try { + result.add(new Pair<MIPlugin, Class<AbstractPlugin>>(plugin, (Class<AbstractPlugin>) this.classLoader.loadClass(plugin.getClassname()))); + } catch (final ClassNotFoundException ex) { + // TODO Catch + } + } + } + + return result; + } + + /** + * This method adds a new view to the project. + * + * @param viewName + * The name of the new view. + */ + public void addView(final String viewName) { + synchronized (this) { + final MIView view = this.factory.createView(); + view.setName(viewName); + this.project.getViews().add(view); + } + } + + /** + * Delivers the currently selected view. + * + * @return The currently active view. + */ + public MIView getActiveView() { + synchronized (this) { + return this.activeView; + } + } + + /** + * This method sets the active view to a new value. + * + * @param view + * The new active view. + */ + public void setActiveView(final MIView view) { + synchronized (this) { + this.activeView = view; + } + } + + public void addDisplayToView(final Display display) { + // No code necessary + } + + public void onChange(final TabChangeEvent event) { + if (event.getData() instanceof MIView) { + this.setActiveView((MIView) event.getData()); + } + } + + /** + * This method reloads the class loader. In other words: The class loader will always be able to load classes from the jar-files within the lib-folder of the + * project. + */ + private void reloadClassLoader() { + synchronized (this) { + this.classLoader = FSManager.getInstance().getClassLoader(this.projectName); + } + } } diff --git a/Kieker.WebGUI/src/main/webapp/AnalysisCockpit.xhtml b/Kieker.WebGUI/src/main/webapp/AnalysisCockpit.xhtml index 75ee48e22f40d1abedacc1bfdd172c16c2affeeb..f623eccd6e4543ee5e55f3f86f1af3784f194c20 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 - Cockpit"> + <p:layoutUnit position="north" collapsible="false" header="Kieker.WebGUI - Cockpit (#{currentAnalysisCockpitProjectBean.projectName})"> <h:form> <p:menubar> <p:submenu label="File"> @@ -42,10 +42,10 @@ <p:layoutUnit position="center" id="centerLayout"> <p:dashboard id="board" model="#{currentAnalysisCockpitProjectBean.model}"> - <p:panel id="panel1" header="N/A"> + <p:panel id="panel1" header="N/A" toggleable="true"> <h:outputText value="N/A" /> </p:panel> - <p:panel id="panel2" header="N/A"> + <p:panel id="panel2" header="N/A" toggleable="true"> <h:outputText value="N/A" /> </p:panel> </p:dashboard> @@ -53,9 +53,10 @@ <p:layoutUnit position="west" size="300" header="Views" resizable="true" collapsible="true"> <h:form id="viewsForm"> - <p:accordionPanel multiple="true" activeIndex="" value="#{currentAnalysisCockpitProjectBean.views}" var="currView"> - <p:tab title="#{currView}"> - <h:outputText value="Some description here."/> + <p:accordionPanel multiple="true" activeIndex="" value="#{currentAnalysisCockpitProjectBean.project.views}" var="currView"> + <p:tab title="#{currView.name}"> + <h:outputText value="#{currView.description}" rendered="#{not empty currView.description}"/> + <h:outputText value="No description available. Click here to activate this view." rendered="#{empty currView.description}"/> </p:tab> </p:accordionPanel> </h:form> diff --git a/Kieker.WebGUI/src/main/webapp/AnalysisController.xhtml b/Kieker.WebGUI/src/main/webapp/AnalysisController.xhtml index 3ffe0eb4b726592e40d9eb44452ac1598484f267..bcf86bf6fb73227a583cb33a2da7d3784a643491 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 - Analysis Controller"> + <p:layoutUnit position="north" collapsible="false" header="Kieker.WebGUI - Analysis Controller (#{currentAnalysisControllerProjectBean.projectName})"> <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 bdac71bdbe5723f220c1d39b67b8dd57e88341fd..f97987e7cf15f66cbcf50bce6fd2d092155cf758 100644 --- a/Kieker.WebGUI/src/main/webapp/AnalysisViewWorkSpace.xhtml +++ b/Kieker.WebGUI/src/main/webapp/AnalysisViewWorkSpace.xhtml @@ -16,19 +16,21 @@ <h:body> <p:layout id="layout" fullPage="true"> - <p:layoutUnit position="north" collapsible="false" header="Kieker.WebGUI - View Work Space"> + <p:layoutUnit position="north" collapsible="false" header="Kieker.WebGUI - View Work Space (#{currentAnalysisViewWorkSpaceProjectBean.projectName})"> <h:form> <p:menubar> <p:submenu label="File"> - <p:menuitem value="Save Project" update=":messages" ajax="true" action="#{currentWorkSpaceProjectBean.saveProject(false)}" disabled="#{empty currentWorkSpaceProjectBean.project}"/> + <p:menuitem value="New View" onclick="newViewDialog.show()" ajax="true"/> + <p:separator/> + <p:menuitem value="Save Project" update=":messages" ajax="true" action="#{currentAnalysisViewWorkSpaceProjectBean.saveProject(false)}" disabled="#{empty currentAnalysisViewWorkSpaceProjectBean.project}"/> <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:menuitem styleClass="Force-Save-Project-Button" value="Force Save Project" update=":messages" ajax="true" action="#{currentAnalysisViewWorkSpaceProjectBean.saveProject(true)}" disabled="#{empty currentAnalysisViewWorkSpaceProjectBean.project}"/> <p:separator/> - <p:menuitem value="Reload Project" ajax="true" disabled="#{empty currentWorkSpaceProjectBean.project or true}"/> + <p:menuitem value="Reload Project" ajax="true" disabled="#{empty currentAnalysisViewWorkSpaceProjectBean.project or true}"/> <p:separator/> <p:menuitem value="New View" ajax="true" disabled="true"/> <p:separator/> - <p:menuitem value="Close Project" action="#{currentWorkSpaceProjectBean.clearProject()}" ajax="false"/> + <p:menuitem value="Close Project" action="#{currentAnalysisViewWorkSpaceProjectBean.clearProject()}" ajax="false"/> <p:separator/> <p:menuitem value="Settings" onclick="settingsDlg.show()" ajax="true"/> </p:submenu> @@ -45,53 +47,41 @@ </h:form> </p:layoutUnit> - <p:layoutUnit position="west"> - - <p:accordionPanel> - <p:tab title="Plugin 001"> - <p:panel id="display001" header="Display 001"> - - </p:panel> - <p:draggable helper="clone" revert="true" for="display001"/> - <br/> - <p:panel header="Display 002"> - - </p:panel> - </p:tab> - - <p:tab title="Plugin 002"> - <p:panel header="Display 001"> - - </p:panel> - <br/> - <p:panel header="Display 002"> - - </p:panel> - </p:tab> - </p:accordionPanel> - + <p:layoutUnit size="300" position="west"> + <h:form rendered="#{not empty currentAnalysisViewWorkSpaceProjectBean.project}"> + <p:accordionPanel activeIndex="-1" value="#{currentAnalysisViewWorkSpaceProjectBean.plugins}" var="pair"> + <p:tab title="#{pair.fst.name}"> + <ui:repeat value="#{currentAnalysisViewWorkSpaceProjectBean.getDisplays(pair.snd)}" var="display"> + <p:commandLink id="displayLink" value="#{display.name()}"/> + <p:tooltip style="font-size: 15px" for="displayLink" value="#{display.description()}"/> + </ui:repeat> + </p:tab> + </p:accordionPanel> + </h:form> </p:layoutUnit> <p:layoutUnit position="center"> - <p:accordionPanel> - <p:tab title="View 1"> - <p:dashboard> - - </p:dashboard> - </p:tab> - - <p:tab title="View 2"> - <p:dashboard> - - </p:dashboard> - </p:tab> - </p:accordionPanel> + <h:form id="viewsForm"> + <p:accordionPanel value="#{currentAnalysisViewWorkSpaceProjectBean.project.views}" var="viewComp" activeIndex="-1"> + <p:tab title="#{viewComp.name}" closable="true"> + <p:dashboard> + + </p:dashboard> + </p:tab> + <p:ajax event="tabChange" listener="#{currentAnalysisViewWorkSpaceProjectBean.onChange}" /> + </p:accordionPanel> + </h:form> </p:layoutUnit> </p:layout> + <p:growl id="messages" life="1500" showDetail="true" autoUpdate="false" sticky="false"/> + <!-- Include the dialog for the configuration. --> <ui:include src="dialogs/settingsDialog.xhtml" /> + <!-- Include the dialogs for the views. --> + <ui:include src="dialogs/viewDialogs.xhtml" /> + <!-- Include the about-dialog. --> <ui:include src="dialogs/aboutDialog.xhtml" /> </h:body> diff --git a/Kieker.WebGUI/src/main/webapp/ProjectOverview.xhtml b/Kieker.WebGUI/src/main/webapp/ProjectOverview.xhtml index b8ad8b4f44fbe68b45f9de96dba29150ef7a5280..915e694eb29900f6fc816e0b9e7212d2133a6c77 100644 --- a/Kieker.WebGUI/src/main/webapp/ProjectOverview.xhtml +++ b/Kieker.WebGUI/src/main/webapp/ProjectOverview.xhtml @@ -35,12 +35,18 @@ <p:menuitem styleClass="logOutButton" disabled="true" value="#{userBean.userName} [Log Out]" ajax="true"/> </p:menubar> + </h:form> </p:layoutUnit> <p:layoutUnit position="center"> - <h:form id="projectsListForm"> - <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}"> + <h:form id="projectsListForm"> + <p:toolbar> + <p:toolbarGroup style="font-size: 15px" align="left"> + <p:commandButton icon="ui-icon-plus" value="Project" onclick="newProjectDialog.show()" ajax="true"/> + </p:toolbarGroup> + </p:toolbar> + <p:dataTable rows="15" paginator="true" paginatorPosition="bottom" 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}"> <p:commandLink id="dynaButton" value="#{project}"/> @@ -51,8 +57,8 @@ <p:menuitem id="deleteButton" value="Delete Project" action="#{currentProjectOverviewBean.setProjectName(project)}" onclick="deleteProjectDialog.show()" disabled="true"/> <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:menuitem id="editAnalysisViews" value="Edit Analysis Views" ajax="false" action="#{currentAnalysisViewWorkSpaceProjectBean.setProject(projectsBean.openProject(project), project)}" /> + <p:menuitem id="showAnalysis" value="View Running Analysis" ajax="false" action="#{currentAnalysisCockpitProjectBean.setProject(projectsBean.openProject(project), project)}" /> </p:menu> </p:column> <p:column headerText="State" style="text-align: center" sortBy="#{projectsBean.getAnalysisControllerState(project)}"> diff --git a/Kieker.WebGUI/src/main/webapp/ProjectWorkSpace.xhtml b/Kieker.WebGUI/src/main/webapp/ProjectWorkSpace.xhtml index 3593d93abea536269bfc6681eee711a2623bc508..dc20ff7031115e22ff739c4ba631af6edfbda76d 100644 --- a/Kieker.WebGUI/src/main/webapp/ProjectWorkSpace.xhtml +++ b/Kieker.WebGUI/src/main/webapp/ProjectWorkSpace.xhtml @@ -44,6 +44,16 @@ <p:menuitem value="Settings" onclick="settingsDlg.show()" ajax="true"/> </p:submenu> + <p:submenu label="View"> + <p:menuitem value="Project Overview"/> + <p:separator/> + <p:menuitem value="Project Work Space" disabled="true"/> + <p:separator/> + <p:menuitem value="Analysis Controller"/> + <p:menuitem value="Analysis View Work Space"/> + <p:menuitem value="Analysis Cockpit"/> + </p:submenu> + <p:submenu label="Help"> <p:menuitem value="User Guide" ajax="true" disabled="true"/> <p:separator/> diff --git a/Kieker.WebGUI/src/main/webapp/css/AnalysisCockpit.css b/Kieker.WebGUI/src/main/webapp/css/AnalysisCockpit.css index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..631605defbc01f3fab1b70d3661f45eaf7729423 100644 --- a/Kieker.WebGUI/src/main/webapp/css/AnalysisCockpit.css +++ b/Kieker.WebGUI/src/main/webapp/css/AnalysisCockpit.css @@ -0,0 +1,3 @@ +.ui-dashboard-column { + width: 50% +} \ No newline at end of file diff --git a/Kieker.WebGUI/src/main/webapp/dialogs/viewDialogs.xhtml b/Kieker.WebGUI/src/main/webapp/dialogs/viewDialogs.xhtml new file mode 100644 index 0000000000000000000000000000000000000000..7a3323ee8868ab57a77fb1dd9d6514cbefd5c895 --- /dev/null +++ b/Kieker.WebGUI/src/main/webapp/dialogs/viewDialogs.xhtml @@ -0,0 +1,30 @@ +<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" + xmlns:c="http://java.sun.com/jsp/jstl/core"> + + <!-- ******************************************************************************** --> + <!-- This is the dialog to create a new view. --> + <p:dialog id="newViewDlg" header="New View" resizable="false" modal="true" widgetVar="newViewDialog"> + <!-- Make sure that closing of the dialog also clears the input field. --> + <p:ajax event="close" update="newViewDialogForm:newViewInputText" /> + + <h:form id="newViewDialogForm"> + <div style="text-align: center"> + <h:outputText value="Name: " /> + <p:inputText id="newViewInputText" value="#{stringBean.string}" /> + </div> + + <hr/> + <div style="text-align: right"> + <p:commandButton value="Ok" action="#{currentAnalysisViewWorkSpaceProjectBean.addView(stringBean.string)}" update=":messages :viewsForm" oncomplete="newViewDialog.hide()" /> + <p:spacer width="10px" height="10" /> + <p:commandButton value="Cancel" onclick="newViewDialog.hide()" /> + </div> + </h:form> + </p:dialog> + +</ui:composition> \ No newline at end of file