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

Continued with the FlowEditor integration; Updated the kieker-jar; The project...

Continued with the FlowEditor integration; Updated the kieker-jar; The project uses now Primefaces 3.4RC1
parent c8d3f610
No related branches found
No related tags found
No related merge requests found
No preview for this file type
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
<dependency> <dependency>
<groupId>org.primefaces</groupId> <groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId> <artifactId>primefaces</artifactId>
<version>3.4-SNAPSHOT</version> <version>3.4.RC1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.primefaces.themes</groupId> <groupId>org.primefaces.themes</groupId>
......
...@@ -49,6 +49,7 @@ import kieker.analysis.model.analysisMetaModel.MIPlugin; ...@@ -49,6 +49,7 @@ import kieker.analysis.model.analysisMetaModel.MIPlugin;
import kieker.analysis.model.analysisMetaModel.MIPort; import kieker.analysis.model.analysisMetaModel.MIPort;
import kieker.analysis.model.analysisMetaModel.MIProject; import kieker.analysis.model.analysisMetaModel.MIProject;
import kieker.analysis.model.analysisMetaModel.MIProperty; import kieker.analysis.model.analysisMetaModel.MIProperty;
import kieker.analysis.model.analysisMetaModel.MIReader;
import kieker.analysis.model.analysisMetaModel.MIRepository; import kieker.analysis.model.analysisMetaModel.MIRepository;
import kieker.analysis.model.analysisMetaModel.MIRepositoryConnector; import kieker.analysis.model.analysisMetaModel.MIRepositoryConnector;
import kieker.analysis.model.analysisMetaModel.impl.MAnalysisMetaModelFactory; import kieker.analysis.model.analysisMetaModel.impl.MAnalysisMetaModelFactory;
...@@ -96,6 +97,42 @@ import org.eclipse.emf.ecore.EObject; ...@@ -96,6 +97,42 @@ import org.eclipse.emf.ecore.EObject;
@ManagedBean @ManagedBean
@ViewScoped @ViewScoped
public final class CurrentAnalysisEditorBean { public final class CurrentAnalysisEditorBean {
/**
* This is the javascript command to initialize the visual graph.
*/
private static final String JS_CMD_INIT_GRAPH = "var graph = GraphFlow(); graph.initGraph(null);";
/**
* This is the javascript command for a node object.
*/
private static final String JS_CMD_NODE = "{\"id\":\"%s\", \"name\":\"%s\", \"nodeClass\":\"%s\", \"tooltip\":\"%s\"}";
/**
* This is the javascript command for a port object.
*/
private static final String JS_CMD_PORT = "{\"name\":\"%s\",\"id\":\"%s\", \"tooltip\":\"%s\"}";
/**
* This is the javascript type name for an input port.
*/
private static final String JS_CMD_PORT_TYPE_INPUT = "inputPort";
/**
* This is the javascript command to add a filter to the graph.
*/
private static final String JS_CMD_ADD_FILTER = "graph.addFilter(%d, %d, %s,[%s],[%s],[%s]);";
/**
* This is the javascript command to add a reader to the graph.
*/
private static final String JS_CMD_ADD_READER = "graph.addReader(%d, %d, %s,[%s],[%s]);";
/**
* This is the javascript command to add a repository to the graph.
*/
private static final String JS_CMD_ADD_REPOSITORY = "graph.addRepository(%d, %d, %s,%s);";
/**
* This is the javascript command to add an edge to the graph.
*/
private static final String JS_CMD_ADD_EDGE = "graph.addEdge(\"%s\", \"%s\");";
/**
* This is the javascript command to redraw the command.
*/
private static final String JS_CMD_REFRESH_GRAPH = "graph.refresh();";
/** /**
* This is the log for errors, exceptions etc. * This is the log for errors, exceptions etc.
*/ */
...@@ -908,6 +945,15 @@ public final class CurrentAnalysisEditorBean { ...@@ -908,6 +945,15 @@ public final class CurrentAnalysisEditorBean {
// Add it to the project // Add it to the project
this.project.getRepositories().add(repository); this.project.getRepositories().add(repository);
this.repositoryMap.get(repository); this.repositoryMap.get(repository);
// Add the element to the graph
final RequestContext context = RequestContext.getCurrentInstance();
final int pos = ((this.project.getRepositories().size() - 1) * 100) - 250;
final String repoPort = String.format(CurrentAnalysisEditorBean.JS_CMD_PORT, CurrentAnalysisEditorBean.JS_CMD_PORT_TYPE_INPUT, "ip1", "N/A");
context.execute(String.format(CurrentAnalysisEditorBean.JS_CMD_ADD_REPOSITORY, 0, pos, this.assembleGraphString(repository), repoPort));
context.execute(CurrentAnalysisEditorBean.JS_CMD_REFRESH_GRAPH);
} }
} }
} }
...@@ -954,6 +1000,21 @@ public final class CurrentAnalysisEditorBean { ...@@ -954,6 +1000,21 @@ public final class CurrentAnalysisEditorBean {
for (final MIRepositoryConnector mConnector : mConnectors) { for (final MIRepositoryConnector mConnector : mConnectors) {
this.filter2repositoryConnections.add(new ConnectionFilterToRepository(plugin, mConnector.getRepository(), mConnector)); this.filter2repositoryConnections.add(new ConnectionFilterToRepository(plugin, mConnector.getRepository(), mConnector));
} }
// Add the element to the graph
final RequestContext context = RequestContext.getCurrentInstance();
final int pos = (this.project.getPlugins().size() - 1) * 100;
if (plugin instanceof MIReader) {
context.execute(String.format(CurrentAnalysisEditorBean.JS_CMD_ADD_READER, pos, pos, this.assembleGraphString(plugin),
this.assembleGraphRepositoryPortString(plugin), this.assembleGraphOuputPortString(plugin)));
} else {
context.execute(String.format(CurrentAnalysisEditorBean.JS_CMD_ADD_FILTER, pos, pos, this.assembleGraphString(plugin),
this.assembleGraphRepositoryPortString(plugin), this.assembleGraphInputPortString((MIFilter) plugin),
this.assembleGraphOuputPortString(plugin)));
}
context.execute(CurrentAnalysisEditorBean.JS_CMD_REFRESH_GRAPH);
} }
} }
} }
...@@ -1366,4 +1427,200 @@ public final class CurrentAnalysisEditorBean { ...@@ -1366,4 +1427,200 @@ public final class CurrentAnalysisEditorBean {
public MIRepository getRepositoryByID(final String string) { public MIRepository getRepositoryByID(final String string) {
return this.repositoryMap.get(Integer.parseInt(string)); return this.repositoryMap.get(Integer.parseInt(string));
} }
/**
* This method initializes the modified jit-graph by delivering the necessary javascript commands to the client. It prints all current existing plugins,
* repositories and their connections. All further components will be added mostly by other methods.
*/
public void initializeGraph() {
final RequestContext context = RequestContext.getCurrentInstance();
// Make sure that the graph exists in the first place
context.execute(CurrentAnalysisEditorBean.JS_CMD_INIT_GRAPH);
// Initialize the listener for the clicks on the components
context.execute("graph.addListener(\"onClick\", nodeClickListener);");
// Paint all necessary components
this.initializeGraphPlugins();
this.initializeGraphRepositories();
this.initializeGraphConnections();
// Repaint the whole graph to make sure that everything will be shown.
context.execute(CurrentAnalysisEditorBean.JS_CMD_REFRESH_GRAPH);
}
/**
* This method initializes the modified jit-grpah by delivering the necessary javascript commands to paint the connections between the components.
*/
private void initializeGraphConnections() {
final RequestContext context = RequestContext.getCurrentInstance();
// First the connections between the filters
for (final ConnectionFilterToFilter connection : this.filter2filterConnections) {
context.execute(String.format(CurrentAnalysisEditorBean.JS_CMD_ADD_EDGE, this.assembleGraphPortID(connection.getSource(), connection.getOutputPort()),
this.assembleGraphPortID(connection.getDestination(), connection.getInputPort())));
}
// TODO Now the connections between filters and repositories
}
public void nodeClicked() {
final Map<String, String> paramMap = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
final String clickedNodeType = paramMap.get("type");
final String clickedNodeID = paramMap.get("ID");
// Select the correct plugin/repository, based on type and ID
if ("Filter".equalsIgnoreCase(clickedNodeType) || "Reader".equalsIgnoreCase(clickedNodeType)) {
// Try to find the ID as a filter/reader
this.setSelectedPlugin(this.pluginMap.get(Integer.parseInt(clickedNodeID)));
} else {
// Try to find the ID as a repository
this.setSelectedRepository(this.repositoryMap.get(Integer.parseInt(clickedNodeID)));
}
}
/**
* This method initializes the modified jit-graph by delivering the necessary javascript commands to paint the repository components.
*/
private void initializeGraphRepositories() {
final RequestContext context = RequestContext.getCurrentInstance();
int posCounter = 0;
for (final MIRepository repository : this.project.getRepositories()) {
final int pos = (posCounter * 100) - 250;
final String repoPort = String.format(CurrentAnalysisEditorBean.JS_CMD_PORT, CurrentAnalysisEditorBean.JS_CMD_PORT_TYPE_INPUT, "ip1", "N/A");
context.execute(String.format(CurrentAnalysisEditorBean.JS_CMD_ADD_REPOSITORY, 0, pos, this.assembleGraphString(repository), repoPort));
posCounter++;
}
}
/**
* This method initializes the modified jit-graph by delivering the necessary javascript commands to paint the plugin components.
*/
private void initializeGraphPlugins() {
final RequestContext context = RequestContext.getCurrentInstance();
int posCounter = 0;
for (final MIPlugin plugin : this.project.getPlugins()) {
final int pos = posCounter * 100;
if (plugin instanceof MIReader) {
context.execute(String.format(CurrentAnalysisEditorBean.JS_CMD_ADD_READER, pos, pos, this.assembleGraphString(plugin),
this.assembleGraphRepositoryPortString(plugin), this.assembleGraphOuputPortString(plugin)));
} else {
context.execute(String.format(CurrentAnalysisEditorBean.JS_CMD_ADD_FILTER, pos, pos, this.assembleGraphString(plugin),
this.assembleGraphRepositoryPortString(plugin), this.assembleGraphInputPortString((MIFilter) plugin),
this.assembleGraphOuputPortString(plugin)));
}
posCounter++;
}
}
/**
* This method assembles the string containing the given ports.
*
* @param ports
* The ports to be used within the string command.
* @return A string containing the JS commands to create the ports.
*/
private String assembleGraphPortString(final EList<? extends MIPort> ports) {
final StringBuilder builder = new StringBuilder();
final int len = ports.size();
for (int i = 0; i < len; i++) {
final MIPort port = ports.get(i);
if (i != 0) {
builder.append(',');
}
builder.append(String.format(CurrentAnalysisEditorBean.JS_CMD_PORT, port.getName(), this.portMap.get(port), port.getName()));
}
return builder.toString();
}
/**
* This method assembles the string containing the available repository ports of the given plugin.
*
* @param plugin
* The plugin whose repository ports will be used.
* @return A string containing the JS commands to create the repository ports.
*/
private String assembleGraphRepositoryPortString(final MIPlugin plugin) {
final StringBuilder builder = new StringBuilder();
final int len = plugin.getRepositories().size();
for (int i = 0; i < len; i++) {
final MIRepositoryConnector port = plugin.getRepositories().get(i);
if (i != 0) {
builder.append(',');
}
builder.append(String.format(CurrentAnalysisEditorBean.JS_CMD_PORT, port.getName(), port.getName(), port.getName()));
}
return builder.toString();
}
/**
* This method assembles the string containing the available input ports of the given filter.
*
* @param filter
* The filter whose input ports will be used.
* @return A string containing the JS commands to create the input ports.
*/
private String assembleGraphInputPortString(final MIFilter filter) {
return this.assembleGraphPortString(filter.getInputPorts());
}
/**
* This method assembles the string containing the available output ports of the given plugin.
*
* @param plugin
* The plugin whose output ports will be used.
* @return A string containing the JS commands to create the output ports.
*/
private String assembleGraphOuputPortString(final MIPlugin plugin) {
return this.assembleGraphPortString(plugin.getOutputPorts());
}
/**
* This method assembles the ID of the port for the graph based on the given parameters.
*
* @param plugin
* The parent plugin of the port.
* @param port
* The port itself.
* @return The ID for the port within the graph
*/
private String assembleGraphPortID(final MIPlugin plugin, final MIPort port) {
return this.pluginMap.get(plugin) + "_" + this.portMap.get(port);
}
/**
* Assembles a human-readable string of the given repository, which can also be used as a graph ID.
*
* @param repository
* The repository whose ID should be delivered.
* @return A human readable ID.
*/
private String assembleGraphString(final MIRepository repository) {
final String className = repository.getClassname();
final String shortName = className.substring(className.lastIndexOf('.') + 1);
return String.format(CurrentAnalysisEditorBean.JS_CMD_NODE, this.repositoryMap.get(repository), repository.getName(), shortName, className);
}
/**
* Assembles a human-readable string of the given plugin, which can also be used as a graph ID.
*
* @param plugin
* The plugin whose ID should be delivered.
* @return A human readable ID.
*/
private String assembleGraphString(final MIPlugin plugin) {
final String className = plugin.getClassname();
final String shortName = className.substring(className.lastIndexOf('.') + 1);
return String.format(CurrentAnalysisEditorBean.JS_CMD_NODE, this.pluginMap.get(plugin), plugin.getName(), shortName, className);
}
} }
...@@ -15,17 +15,42 @@ ...@@ -15,17 +15,42 @@
<h:head> <h:head>
<title>Kieker.WebGUI</title> <title>Kieker.WebGUI</title>
<!-- Load the necessary CSS files. --> <!-- Load the necessary CSS files. -->
<link rel="stylesheet" type="text/css" href="../css/base.css" />
<link rel="stylesheet" type="text/css" href="../css/FlowEditor.css" />
<link rel="stylesheet" type="text/css" href="../css/Common.css" /> <link rel="stylesheet" type="text/css" href="../css/Common.css" />
<link rel="stylesheet" type="text/css" href="../css/js-graph-it.css"/>
<link rel="stylesheet" type="text/css" href="../css/AnalysisEditor.css" /> <link rel="stylesheet" type="text/css" href="../css/AnalysisEditor.css" />
<!-- Load the necessary JS filed. -->
<script type="text/javascript" src="../js/js-graph-it.js"/> <!-- Load the necessary JS files. -->
<script language="javascript" type="text/javascript" src="../js/jit.js"></script>
<script language="javascript" type="text/javascript" src="../js/flowEditor.js"></script>
<script>
window.onload = function() {
document.getElementById('hidden:link').onclick();
}
nodeClickListener = function(node, info, e) {
nodeClickCommand([{name : 'ID', value : node.id}, {name : 'type', value : node.data.$nodeType}]);
}
nodeRemoveListener = function(node, info, e) {
nodeRemoveCommand([{name : 'ID', value : node.id}, {name : 'type', value : node.data.$nodeType}]);
}
</script>
</h:head> </h:head>
<!-- The initPageObjects()-method initializes the graph. --> <h:body>
<h:body onload="initPageObjects();"> <h:form id="hidden" style="display:none">
<h:commandLink id="link">
<f:ajax event="click" listener="#{currentAnalysisEditorBean.initializeGraph()}" />
</h:commandLink>
</h:form>
<h:form id="hiddenNodeProperties" style="display:none">
<p:remoteCommand name="nodeClickCommand" action="#{currentAnalysisEditorBean.nodeClicked()}" update=":propertiesForm"/>
<p:remoteCommand name="nodeRemoveCommand" action="#{currentAnalysisEditorBean.nodeRemoved()}" update=":propertiesForm"/>
</h:form>
<p:layout fullPage="true"> <p:layout fullPage="true">
<p:layoutUnit position="north"> <p:layoutUnit position="north">
...@@ -81,46 +106,10 @@ ...@@ -81,46 +106,10 @@
<!-- This is the center component showing the graph and everything. --> <!-- This is the center component showing the graph and everything. -->
<p:layoutUnit style="font-size: 12px" position="center" id="centerLayout"> <p:layoutUnit style="font-size: 12px" position="center" id="centerLayout">
<h:form id="centerForm" style="height: 100%" rendered="#{not empty currentAnalysisEditorBean.project}"> <div id="center-container" style="width: 100%;height: 100%">
<div class="canvas" id="mainCanvas" style="width : 100%;height: 100%"> <div id="infovis"/>
<ui:repeat value="#{currentAnalysisEditorBean.project.plugins}" var="plugin" varStatus="counter"> </div>
<p:remoteCommand name="setPlugin#{counter.index}" action="#{currentAnalysisEditorBean.setSelectedPlugin(plugin)}" update=":propertiesForm"/> </p:layoutUnit>
<!-- Netbeans reports an error here, but the code does still work though... -->
<div onclick="setPlugin#{counter.index}();" style="left: #{counter.index * 90}px; top: #{counter.index * 70}px; position: absolute" class="ui-panel ui-widget ui-widget-content ui-corner-all block draggable" id="plugin#{currentAnalysisEditorBean.getPluginID(plugin)}" >
<div class="ui-panel-titlebar ui-widget-header ui-corner-all">
<h:outputText style="font-weight: bold" value="#{plugin.getName()}"/>
</div>
<p:commandLink ajax="true" value="Remove" action="#{currentAnalysisEditorBean.removePlugin(plugin)}" update=":propertiesForm :centerForm"/>
</div>
</ui:repeat>
<ui:repeat value="#{currentAnalysisEditorBean.project.repositories}" var="repository" varStatus="counter">
<p:remoteCommand name="setRepository#{counter.index}" action="#{currentAnalysisEditorBean.setSelectedRepository(repository)}" update=":propertiesForm"/>
<!-- Netbeans reports an error here, but the code does still work though... -->
<div onclick="setRepository#{counter.index}();" style="left: #{(currentAnalysisEditorBean.project.plugins.size() + counter.index) * 90}px; top: #{counter.index * 70}px; position: absolute" class="ui-panel ui-widget ui-widget-content ui-corner-all block draggable" id="repository#{currentAnalysisEditorBean.getRepositoryID(repository)}" >
<div class="ui-panel-titlebar ui-widget-header ui-corner-all">
<h:outputText style="font-weight: bold" value="#{repository.getName()}"/>
</div>
<p:commandLink ajax="true" value="Remove" action="#{currentAnalysisEditorBean.removeRepository(repository)}" update=":propertiesForm :centerForm"/>
</div>
</ui:repeat>
<ui:repeat value="#{currentAnalysisEditorBean.filterConnections}" var="connection">
<div class="connector plugin#{currentAnalysisEditorBean.getPluginID(connection.source)} plugin#{currentAnalysisEditorBean.getPluginID(connection.destination)}">
<label class="source-label"><h:outputText value="#{connection.outputPort.getName()}"/></label>
<label class="destination-label"><h:outputText value="#{connection.inputPort.getName()}"/></label>
<img src="../img/arrow.gif" class="connector-end"/>
</div>
</ui:repeat>
<ui:repeat value="#{currentAnalysisEditorBean.validRepoConnections}" var="connection">
<div class="connector plugin#{currentAnalysisEditorBean.getPluginID(connection.source)} repository#{currentAnalysisEditorBean.getRepositoryID(connection.destination)}">
<label class="source-label"><h:outputText value="#{connection.outputPort.getName()}"/></label>
<img src="../img/arrow.gif" class="connector-end"/>
</div>
</ui:repeat>
</div>
</h:form>
</p:layoutUnit>
<!-- This is the component presenting the available properties. --> <!-- This is the component presenting the available properties. -->
<p:layoutUnit style="font-size: 12px" position="south" size="150" header="Properties" resizable="true" collapsible="true"> <p:layoutUnit style="font-size: 12px" position="south" size="150" header="Properties" resizable="true" collapsible="true">
...@@ -138,7 +127,7 @@ ...@@ -138,7 +127,7 @@
<h:outputText value="#{currentAnalysisEditorBean.selectedPlugin.classname}" rendered="#{rowIndex == 0}"/> <h:outputText value="#{currentAnalysisEditorBean.selectedPlugin.classname}" rendered="#{rowIndex == 0}"/>
<p:inplace editor="true" rendered="#{rowIndex == 1}" > <p:inplace editor="true" rendered="#{rowIndex == 1}" >
<p:inputText value="#{currentAnalysisEditorBean.selectedPlugin.name}" /> <p:inputText value="#{currentAnalysisEditorBean.selectedPlugin.name}" />
<p:ajax event="save" update=":centerForm" /> <p:ajax event="save" />
</p:inplace> </p:inplace>
<p:inplace editor="true" rendered="#{rowIndex > 1}"> <p:inplace editor="true" rendered="#{rowIndex > 1}">
<p:inputText value="#{property.value}" /> <p:inputText value="#{property.value}" />
...@@ -154,7 +143,7 @@ ...@@ -154,7 +143,7 @@
<p:accordionPanel multiple="true" activeIndex=""> <p:accordionPanel multiple="true" activeIndex="">
<p:tab title="Reader"> <p:tab title="Reader">
<ui:repeat value="#{currentAnalysisEditorBean.availableReaders}" var="reader"> <ui:repeat value="#{currentAnalysisEditorBean.availableReaders}" var="reader">
<p:commandLink id="readerLink" value="#{reader.simpleName}" action="#{currentAnalysisEditorBean.addPlugin(reader)}" update=":centerForm :messages" /><br/> <p:commandLink id="readerLink" value="#{reader.simpleName}" action="#{currentAnalysisEditorBean.addPlugin(reader)}" update=":messages" /><br/>
<p:tooltip for="readerLink"> <p:tooltip for="readerLink">
<b><h:outputText value="#{reader.simpleName} (#{reader.name})"/></b> <b><h:outputText value="#{reader.simpleName} (#{reader.name})"/></b>
<br/> <br/>
...@@ -173,7 +162,7 @@ ...@@ -173,7 +162,7 @@
</p:tab> </p:tab>
<p:tab title="Filter"> <p:tab title="Filter">
<ui:repeat value="#{currentAnalysisEditorBean.availableFilters}" var="filter"> <ui:repeat value="#{currentAnalysisEditorBean.availableFilters}" var="filter">
<p:commandLink id="filterLink" value="#{filter.simpleName}" action="#{currentAnalysisEditorBean.addPlugin(filter)}" update=":centerForm :messages"/><br/> <p:commandLink id="filterLink" value="#{filter.simpleName}" action="#{currentAnalysisEditorBean.addPlugin(filter)}" update=":messages"/><br/>
<p:tooltip for="filterLink"> <p:tooltip for="filterLink">
<b><h:outputText value="#{filter.simpleName} (#{filter.name})"/></b> <b><h:outputText value="#{filter.simpleName} (#{filter.name})"/></b>
<br/> <br/>
...@@ -196,7 +185,7 @@ ...@@ -196,7 +185,7 @@
</p:tab> </p:tab>
<p:tab title="Repositories"> <p:tab title="Repositories">
<ui:repeat value="#{currentAnalysisEditorBean.availableRepositories}" var="repository"> <ui:repeat value="#{currentAnalysisEditorBean.availableRepositories}" var="repository">
<p:commandLink id="repositoryLink" value="#{repository.simpleName}" action="#{currentAnalysisEditorBean.addRepository(repository)}" update=":centerForm :messages"/><br/> <p:commandLink id="repositoryLink" value="#{repository.simpleName}" action="#{currentAnalysisEditorBean.addRepository(repository)}" update=":messages"/><br/>
<p:tooltip for="repositoryLink"> <p:tooltip for="repositoryLink">
<b><h:outputText value="#{repository.simpleName} (#{repository.name})"/></b> <b><h:outputText value="#{repository.simpleName} (#{repository.name})"/></b>
<br/> <br/>
......
<?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">
<html 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">
<f:metadata>
<f:viewParam name="projectName" value="#{currentAnalysisEditorBeanV2.projectName}"/>
<f:event type="preRenderView" listener="#{currentAnalysisEditorBeanV2.initialize()}" />
</f:metadata>
<h:head>
<title>Kieker.WebGUI</title>
<link rel="stylesheet" type="text/css" href="css/base.css" />
<link rel="stylesheet" type="text/css" href="css/FlowEditor.css" />
<link rel="stylesheet" type="text/css" href="css/Common.css" />
<link rel="stylesheet" type="text/css" href="css/AnalysisEditor.css" />
<script language="javascript" type="text/javascript" src="js/jit.js"></script>
<script language="javascript" type="text/javascript" src="js/flowEditor.js"></script>
<script>
window.onload = function() {
document.getElementById('hidden:link').onclick();
}
nodeClickListener = function(node, info, e) {
document.getElementById('hiddenNodeProperties:clickedNodeID').value = node.id;
document.getElementById('hiddenNodeProperties:clickedNodeType').value = node.data.$nodeType;
document.getElementById('hiddenNodeProperties:cmdBtnSelection').click();
}
</script>
</h:head>
<h:body>
<h:form id="hidden" style="display:none">
<h:commandLink id="link">
<f:ajax event="click" listener="#{currentAnalysisEditorBeanV2.initializeGraph()}" />
</h:commandLink>
</h:form>
<h:form id="hiddenNodeProperties" style="display:none">
<h:inputHidden id="clickedNodeID" value="#{currentAnalysisEditorBeanV2.clickedNodeID}"/>
<h:inputHidden id="clickedNodeType" value="#{currentAnalysisEditorBeanV2.clickedNodeType}"/>
<p:commandButton id="cmdBtnSelection" ajax="true" action="#{currentAnalysisEditorBeanV2.nodeClicked()}" update=":propertiesForm" value="submit"/>
</h:form>
<p:layout id="layout" fullPage="true">
<p:layoutUnit position="north">
<h:form>
<p:toolbar>
<p:toolbarGroup align="left">
<h:outputText styleClass="kieker-title" value="Kieker &raquo; #{stringBean.shortenLongName(currentAnalysisEditorBeanV2.projectName, 30)}"/>
</p:toolbarGroup>
<p:toolbarGroup align="right">
<p:commandButton styleClass="perspective-button" icon="ui-icon-home" action="ProjectOverview.xhtml" />
<p:separator/>
<p:button styleClass="perspective-button" icon="ui-icon-wrench" value="Analysis Editor" style="white-space: none" disabled="true"/>
<p:button styleClass="perspective-button" icon="ui-icon-circle-triangle-e" value="Analysis" style="white-space: none" outcome="Controller.xhtml">
<f:param name="projectName" value="#{currentAnalysisEditorBeanV2.projectName}" />
</p:button>
<p:separator/>
<p:button styleClass="perspective-button" icon="ui-icon-wrench" value="Cockpit Editor" style="white-space: none" outcome="CockpitEditor.xhtml">
<f:param name="projectName" value="#{currentAnalysisEditorBeanV2.projectName}" />
</p:button>
<p:button styleClass="perspective-button" icon="ui-icon-image" value="Cockpit" style="white-space: none" outcome="Cockpit.xhtml">
<f:param name="projectName" value="#{currentAnalysisEditorBeanV2.projectName}" />
</p:button>
</p:toolbarGroup>
</p:toolbar>
<p:menubar>
<p:submenu label="File">
<p:menuitem styleClass="element-with-whitespace" icon="ui-icon-disk" value=" Save Project" update=":messages" ajax="true" action="#{currentAnalysisEditorBeanV2.saveProject(false)}" disabled="#{empty currentAnalysisEditorBeanV2.project}"/>
<p:menuitem styleClass="element-with-whitespace" icon="ui-icon-disk" value=" Save Project As" update=":messages" ajax="true" disabled="#{true or empty currentAnalysisEditorBeanV2.project}"/>
<p:separator />
<p:menuitem styleClass="element-with-whitespace" icon="ui-icon-refresh" value=" Reload Project" ajax="true" disabled="#{empty currentAnalysisEditorBeanV2.project or true}" />
<p:separator/>
<p:menuitem styleClass="element-with-whitespace" icon="ui-icon-bookmark" value=" Manage Libraries" onclick="manageLibrariesDialog.show()" ajax="true" disabled="#{empty currentAnalysisEditorBeanV2.project}"/>
<p:menuitem styleClass="element-with-whitespace" icon="ui-icon-shuffle" ajax="true" value=" Edit Connections" update=":connectionDialogForm" onclick="connectionDialog.show();" disabled="#{empty currentAnalysisEditorBeanV2.project}"/>
<p:separator />
<p:menuitem styleClass="element-with-whitespace" icon="ui-icon-gear" value=" Settings" onclick="settingsDlg.show()" ajax="true"/>
<p:separator />
<p:menuitem styleClass="element-with-whitespace" icon="ui-icon-circle-close" value=" Close Project" action="#{currentAnalysisEditorBeanV2.clearProject()}" ajax="false"/>
</p:submenu>
<p:submenu label="Help">
<p:menuitem styleClass="element-with-whitespace" icon="ui-icon-help" value=" User Guide" ajax="true" disabled="true"/>
<p:separator/>
<p:menuitem styleClass="element-with-whitespace" icon="ui-icon-comment" value=" About..." onclick="aboutDlg.show()" ajax="true"/>
</p:submenu>
<p:menuitem styleClass="logOutButton" icon="ui-icon-power" value="#{userBean.userName}" ajax="true" disabled="true"/>
</p:menubar>
</h:form>
</p:layoutUnit>
<p:layoutUnit style="font-size: 12px" position="center" id="centerLayout">
<div id="center-container" style="width: 100%;height: 100%">
<div id="infovis"/>
</div>
</p:layoutUnit>
<p:layoutUnit style="font-size: 12px" position="south" size="150" header="Properties" resizable="true" collapsible="true">
<h:form id="propertiesForm" >
<p:dataTable editable="true" value="#{currentAnalysisEditorBeanV2.advancedPluginProperties}" var="property" emptyMessage="No properties available" rendered="#{not empty currentAnalysisEditorBeanV2.selectedPlugin}">
<p:column headerText="Key" style="width:125px">
<h:outputText value="#{property.name}" rendered="#{not stringBean.checkString(property)}"/>
<h:outputText value="Name" rendered="#{stringBean.checkString(property)}"/>
</p:column>
<p:column headerText="Value" style="width:125px">
<p:inplace editor="true" rendered="#{not stringBean.checkString(property)}">
<p:inputText value="#{property.value}" />
</p:inplace>
<p:inplace editor="true" rendered="#{stringBean.checkString(property)}" >
<p:inputText value="#{currentAnalysisEditorBeanV2.selectedPlugin.name}" />
<!-- <p:ajax event="save" update=":centerForm" /> -->
</p:inplace>
</p:column>
</p:dataTable>
</h:form>
</p:layoutUnit>
<!-- tree fuer toolpalette, packages -->
<p:layoutUnit style="font-size: 12px" position="east" size="300" header="Available Plugins"
resizable="true" collapsible="true">
<h:form id="toolpalette">
<p:accordionPanel style="font-size: 12px" multiple="true" activeIndex="">
<p:tab title="Reader">
<ui:repeat value="#{currentAnalysisEditorBeanV2.availableReaders}" var="reader">
<p:commandLink id="readerLink" value="#{reader.simpleName}" action="#{currentAnalysisEditorBeanV2.addPlugin(reader)}" update=":messages" /><br/>
<p:tooltip style="font-size: 15px" for="readerLink" value="#{currentAnalysisEditorBeanV2.getDescription(reader)}"/>
</ui:repeat>
</p:tab>
<p:tab title="Filter">
<ui:repeat value="#{currentAnalysisEditorBeanV2.availableFilters}" var="filter">
<p:commandLink id="filterLink" value="#{filter.simpleName}" action="#{currentAnalysisEditorBeanV2.addPlugin(filter)}" update=":messages"/><br/>
<p:tooltip style="font-size: 15px" for="filterLink" value="#{currentAnalysisEditorBeanV2.getDescription(filter)}"/>
</ui:repeat>
</p:tab>
<p:tab title="Repositories">
<ui:repeat value="#{currentAnalysisEditorBeanV2.availableRepositories}" var="repository">
<p:commandLink id="repositoryLink" value="#{repository.simpleName}" action="#{currentAnalysisEditorBeanV2.addRepository(repository)}" update=":messages"/><br/>
<p:tooltip style="font-size: 15px" for="repositoryLink" value="#{currentAnalysisEditorBeanV2.getDescription(repository)}"/>
</ui:repeat>
</p:tab>
</p:accordionPanel>
</h:form>
</p:layoutUnit>
<!-- ******************************************************************************** -->
</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="#{currentAnalysisEditorBeanV2.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"/>
<!-- Include the dialog for the configuration. -->
<ui:include src="dialogs/settingsDialog.xhtml" />
<!-- Include the about-dialog. -->
<ui:include src="dialogs/aboutDialog.xhtml" />
<!-- Include the dialog to handle the connections. -->
<ui:include src="dialogs/connectionDialog.xhtml" />
<ui:include src="dialogs/manageLibrariesDialog.xhtml" />
</h:body>
</html>
\ No newline at end of file
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