Newer
Older
<?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"
Nils Christian Ehmke
committed
xmlns:p="http://primefaces.org/ui"
xmlns:f="http://java.sun.com/jsf/core">
Nils Christian Ehmke
committed
<h:head/>
Nils Christian Ehmke
committed
<h:body>
Nils Christian Ehmke
committed
<ui:composition template="/templates/PagesTemplate.xhtml">
Nils Christian Ehmke
committed
<ui:param name="projectName" value="#{currentAnalysisEditorBean.projectName}"/>
<ui:param name="pagename" value="analysisEditor"/>
<ui:param name="showProjectName" value="true"/>
Nils Christian Ehmke
committed
<ui:define name="metaData">
<f:metadata>
<f:viewParam id="projectNameParam" name="projectName" value="#{currentAnalysisEditorBean.projectName}"/>
<f:event type="preRenderView" listener="#{currentAnalysisEditorBean.initialize()}" />
</f:metadata>
</ui:define>
Nils Christian Ehmke
committed
<ui:define name="bundleIncludes">
<f:loadBundle var="localizedAnalysisEditorPageMessages" basename="lang.AnalysisEditorPage"/>
</ui:define>
Nils Christian Ehmke
committed
<ui:define name="cssIncludes">
Nils Christian Ehmke
committed
<link rel="stylesheet" type="text/css" href="#{root}/css/FlowEditor.css" />
<link rel="stylesheet" type="text/css" href="#{root}/css/AnalysisEditorPage.css" />
Nils Christian Ehmke
committed
</ui:define>
Nils Christian Ehmke
committed
<ui:define name="jsIncludes">
Nils Christian Ehmke
committed
<script language="javascript" type="text/javascript" src="#{root}/js/jit.js"></script>
<script language="javascript" type="text/javascript" src="#{root}/js/flowEditor.js"></script>
Nils Christian Ehmke
committed
</ui:define>
Nils Christian Ehmke
committed
<ui:define name="js">
<script>
nodeClickListener = function(node, info, e) {
nodeClickCommand([{name : 'ID', value : node.id}]);
markNode(node, '#FF0000');
graph.refresh();
Nils Christian Ehmke
committed
}
nodeRemoveListener = function(node) {
nodeRemoveCommand([{name : 'ID', value : node.id}]);
}
edgeCreateListener = function(sourceNode, targetNode, sourcePort, targetPort) {
edgeCreateCommand([{name : 'sourcePortID', value : sourcePort.id},{name : 'targetPortID', value : targetPort.id}]);
}
edgeRemoveListener = function(sourceNode, targetNode, sourcePort, targetPort) {
edgeRemoveCommand([{name : 'sourcePortID', value : sourcePort.id},{name : 'targetPortID', value : targetPort.id}]);
}
</script>
</ui:define>
Nils Christian Ehmke
committed
<ui:define name="furtherForms">
<h:form id="hidden" style="display:none">
<p:remoteCommand autoRun="true" name="init" action="#{currentAnalysisEditorBean.initializeGraph()}" />
</h:form>
<h:form id="hiddenNodeProperties" style="display:none">
<p:remoteCommand name="nodeClickCommand" action="#{currentAnalysisEditorGraphBean.nodeClicked()}" update=":propertiesForm"/>
<p:remoteCommand name="nodeRemoveCommand" action="#{currentAnalysisEditorGraphBean.nodeRemoved()}" update=":propertiesForm"/>
<p:remoteCommand name="edgeCreateCommand" action="#{currentAnalysisEditorGraphBean.edgeCreated()}"/>
<p:remoteCommand name="edgeRemoveCommand" action="#{currentAnalysisEditorGraphBean.edgeRemoved()}"/>
</h:form>
</ui:define>
Nils Christian Ehmke
committed
<!-- Those are the menu bar entries left from the help-submenu. -->
<ui:define name="furtherMenuBarEntries">
<p:submenu label="#{localizedMessages.file}">
<p:menuitem styleClass="element-with-whitespace" icon="ui-icon-save" value=" #{localizedMessages.saveProject}" update=":messages" ajax="true" action="#{currentAnalysisEditorBean.saveProject(false)}" disabled="#{empty currentAnalysisEditorBean.project}"/>
<p:menuitem styleClass="element-with-whitespace" icon="ui-icon-saveAs" value=" #{localizedMessages.saveProjectAs}" update=":messages" ajax="true" disabled="#{true or empty currentAnalysisEditorBean.project}"/>
<p:separator />
<p:menuitem styleClass="element-with-whitespace" icon="ui-icon-reload" value=" #{localizedMessages.reloadProject}" ajax="false" url="analysisEditor?projectName=#{currentAnalysisEditorBean.projectName}" disabled="#{empty currentAnalysisEditorBean.project}" />
<p:separator/>
<p:menuitem styleClass="element-with-whitespace" icon="ui-icon-manageLibraries" value=" #{localizedAnalysisEditorPageMessages.manageLibraries}" onclick="manageLibrariesDialog.show()" ajax="true" disabled="#{empty currentAnalysisEditorBean.project}"/>
<p:separator />
<p:menuitem styleClass="element-with-whitespace" icon="ui-icon-settings" value=" #{localizedMessages.settings}" onclick="settingsDlg.show()" ajax="true"/>
<p:separator />
<p:menuitem styleClass="element-with-whitespace" icon="ui-icon-close" value=" #{localizedMessages.closeProject}" action="ProjectOverviewPage.xhtml?faces-redirect=true" ajax="false"/>
</p:submenu>
Nils Christian Ehmke
committed
<p:submenu label="Graph">
<p:menuitem styleClass="element-with-whitespace" icon="ui-icon-scaleToFitSmall" value=" #{localizedAnalysisEditorPageMessages.analysisEditorScaleToFit}" ajax="true" action="#{currentAnalysisEditorGraphBean.scaleToFit()}" />
<p:separator/>
<p:menuitem styleClass="element-with-whitespace" icon="#{currentAnalysisEditorGraphBean.gridEnabled ? 'ui-icon-gridEnabledSmall' : 'ui-icon-gridDisabledSmall'}" value=" #{localizedAnalysisEditorPageMessages.grid} #{currentAnalysisEditorGraphBean.gridEnabled ? localizedAnalysisEditorPageMessages.disable : localizedAnalysisEditorPageMessages.enable}" ajax="true" action="#{currentAnalysisEditorGraphBean.switchGrid()}" update=":menuForm"/>
<p:menuitem styleClass="element-with-whitespace" icon="#{currentAnalysisEditorGraphBean.snapEnabled ? 'ui-icon-snapEnabledSmall' : 'ui-icon-snapDisabledSmall'}" value=" #{localizedAnalysisEditorPageMessages.snap} #{currentAnalysisEditorGraphBean.snapEnabled ? localizedAnalysisEditorPageMessages.disable: localizedAnalysisEditorPageMessages.enable}" ajax="true" action="#{currentAnalysisEditorGraphBean.switchSnap()}" update=":menuForm"/>
<p:separator/>
<p:menuitem styleClass="element-with-whitespace" icon="ui-icon-autoLayoutSmall" value=" #{localizedAnalysisEditorPageMessages.autoLayout}" ajax="true" />
</p:submenu>
</ui:define>
Nils Christian Ehmke
committed
<ui:define name="furtherMenuBar">
<p:spacer height="5"/>
<p:menubar>
<p:menuitem id="btnScaleToFit" styleClass="element-with-whitespace" icon="ui-icon-scaleToFit" ajax="true" action="#{currentAnalysisEditorGraphBean.scaleToFit()}"/>
<p:menuitem id="btnGrid" styleClass="element-with-whitespace" icon="#{currentAnalysisEditorGraphBean.gridEnabled ? 'ui-icon-gridEnabled' : 'ui-icon-gridDisabled'}" ajax="true" action="#{currentAnalysisEditorGraphBean.switchGrid()}" update=":menuForm"/>
<p:menuitem id="btnSnap" styleClass="element-with-whitespace" icon="#{currentAnalysisEditorGraphBean.snapEnabled ? 'ui-icon-snapEnabled' : 'ui-icon-snapDisabled'}" ajax="true" action="#{currentAnalysisEditorGraphBean.switchSnap()}" update=":menuForm"/>
<p:menuitem id="btnAutoLayout" styleClass="element-with-whitespace" icon="ui-icon-autoLayout" ajax="true" />
</p:menubar>
<p:tooltip for="btnScaleToFit" value="#{localizedAnalysisEditorPageMessages.analysisEditorScaleToFit}"/>
<p:tooltip for="btnGrid" value="#{localizedAnalysisEditorPageMessages.grid}"/>
<p:tooltip for="btnSnap" value="#{localizedAnalysisEditorPageMessages.snap}"/>
<p:tooltip for="btnAutoLayout" value="#{localizedAnalysisEditorPageMessages.autoLayout}"/>
</ui:define>
<ui:define name="centerContent">
<div id="center-container" style="width: 100%;height: 100%">
<div id="infovis"/>
</div>
Nils Christian Ehmke
committed
</ui:define>
Nils Christian Ehmke
committed
<ui:define name="furtherLayoutUnits">
<!-- This is the component presenting the available properties. -->
<p:layoutUnit style="font-size: 12px" position="south" size="150" header="#{localizedMessages.properties}" resizable="true" collapsible="true">
<h:form id="propertiesForm" >
<p:dataTable editable="true" value="#{currentAnalysisEditorBean.advancedPluginProperties}" var="property" rowIndexVar="rowIndex" emptyMessage="#{localizedMessages.noPropertiesAvailable}" rendered="#{not empty currentAnalysisEditorBean.selectedPlugin}">
<p:column headerText="#{localizedMessages.property}" style="width:125px">
<!-- The first property is always the classname, the second one always the normal name. After that, other properties can follow. -->
<h:outputText id="classNameProperty" value="#{localizedAnalysisEditorPageMessages.className}" rendered="#{rowIndex == 0}"/>
<h:outputText id="nameProperty" value="#{localizedAnalysisEditorPageMessages.name}" rendered="#{rowIndex == 1}"/>
<h:outputText id="normalProperty" value="#{property.name}" rendered="#{rowIndex > 1}"/>
<p:tooltip for="classNameProperty" value="#{localizedAnalysisEditorPageMessages.tooltipClassName}" rendered="#{rowIndex == 0}"/>
<p:tooltip for="nameProperty" value="#{localizedAnalysisEditorPageMessages.tooltipName}" rendered="#{rowIndex == 1}"/>
<p:tooltip for="normalProperty" value="#{currentAnalysisEditorBean.getDescription(currentAnalysisEditorBean.selectedPlugin, property.name)}" rendered="#{rowIndex > 1}"/>
</p:column>
Nils Christian Ehmke
committed
<!-- The classname is not editable, the name is editable with a specific target, other properies are editable normally. -->
<p:column headerText="#{localizedMessages.value}" style="width:125px">
<h:outputText id="className" value="#{currentAnalysisEditorBean.selectedPlugin.classname}" rendered="#{rowIndex == 0}"/>
<p:inplace id="nameEditor" editor="true" rendered="#{rowIndex == 1}" >
<p:inputText value="#{currentAnalysisEditorBean.selectedPlugin.name}" />
<p:ajax event="save" listener="#{currentAnalysisEditorGraphBean.renameNode(currentAnalysisEditorBean.selectedPlugin, currentAnalysisEditorBean.selectedPlugin.name)}" />
</p:inplace>
<p:inplace id="normalEditor" editor="true" rendered="#{rowIndex > 1}">
<p:inputText value="#{property.value}" />
</p:inplace>
<p:tooltip for="className" value="#{localizedAnalysisEditorPageMessages.tooltipClassName}" rendered="#{rowIndex == 0}"/>
<p:tooltip for="nameEditor" value="#{localizedAnalysisEditorPageMessages.tooltipName}" rendered="#{rowIndex == 1}"/>
<p:tooltip for="normalEditor" value="#{currentAnalysisEditorBean.getDescription(currentAnalysisEditorBean.selectedPlugin, property.name)}" rendered="#{rowIndex > 1}"/>
</p:column>
</p:dataTable>
</h:form>
</p:layoutUnit>
Nils Christian Ehmke
committed
<!-- The following is the toolpalette, presenting the available plugins etc. -->
<p:layoutUnit position="east" size="300" header="#{localizedAnalysisEditorPageMessages.availablePlugins}" resizable="true" collapsible="true">
<h:form id="toolpalette">
<p:accordionPanel multiple="true" activeIndex="0,1,2">
<p:tab title="#{localizedAnalysisEditorPageMessages.reader}">
<ui:repeat value="#{currentAnalysisEditorBean.availableReaders}" var="reader">
<p:commandLink id="readerLink" value="#{reader.simpleName}" action="#{currentAnalysisEditorBean.addPlugin(reader)}" update=":messages" /><br/>
<p:tooltip for="readerLink">
<b><h:outputText value="#{reader.simpleName} (#{reader.name})"/></b>
Nils Christian Ehmke
committed
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<h:outputText value="#{currentAnalysisEditorBean.getDescription(reader)}"/>
<br/><br/>
<ui:fragment rendered="#{not empty currentAnalysisEditorBean.getOutputPorts(reader)}">
<b><h:outputText value="#{localizedAnalysisEditorPageMessages.outputPorts}:"/></b>
<p:dataList value="#{currentAnalysisEditorBean.getOutputPorts(reader)}" var="port">
#{port.name()}
</p:dataList>
</ui:fragment>
<ui:fragment rendered="#{not empty currentAnalysisEditorBean.getRepositoryPorts(reader)}">
<b><h:outputText value="#{localizedAnalysisEditorPageMessages.repositoryPorts}:" /></b>
<p:dataList value="#{currentAnalysisEditorBean.getRepositoryPorts(reader)}" var="port">
#{port.name()}
</p:dataList>
</ui:fragment>
<ui:fragment rendered="#{not empty currentAnalysisEditorBean.getProperties(reader)}">
<b><h:outputText value="#{localizedAnalysisEditorPageMessages.configuration}:"/></b>
<p:dataList value="#{currentAnalysisEditorBean.getProperties(reader)}" var="property">
#{property.name()}
</p:dataList>
</ui:fragment>
<ui:fragment rendered="#{not empty currentAnalysisEditorBean.getDependencies(reader)}">
<b><h:outputText value="#{localizedAnalysisEditorPageMessages.dependencies}:"/></b>
<br/>
<h:outputText value="#{currentAnalysisEditorBean.getDependencies(reader)}"/>
</ui:fragment>
</p:tooltip>
</ui:repeat>
</p:tab>
<p:tab title="#{localizedAnalysisEditorPageMessages.filter}">
<ui:repeat value="#{currentAnalysisEditorBean.availableFilters}" var="filter">
<p:commandLink id="filterLink" value="#{filter.simpleName}" action="#{currentAnalysisEditorBean.addPlugin(filter)}" update=":messages"/><br/>
<p:tooltip for="filterLink">
<b><h:outputText value="#{filter.simpleName} (#{filter.name})"/></b>
Nils Christian Ehmke
committed
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
<h:outputText value="#{currentAnalysisEditorBean.getDescription(filter)}"/>
<br/><br/>
<ui:fragment rendered="#{not empty currentAnalysisEditorBean.getInputPorts(filter)}">
<b><h:outputText value="#{localizedAnalysisEditorPageMessages.inputPorts}:"/></b>
<p:dataList value="#{currentAnalysisEditorBean.getInputPorts(filter)}" var="port">
#{port.name()}
</p:dataList>
</ui:fragment>
<ui:fragment rendered="#{not empty currentAnalysisEditorBean.getOutputPorts(filter)}">
<b><h:outputText value="#{localizedAnalysisEditorPageMessages.outputPorts}:"/></b>
<p:dataList value="#{currentAnalysisEditorBean.getOutputPorts(filter)}" var="port">
#{port.name()}
</p:dataList>
</ui:fragment>
<ui:fragment rendered="#{not empty currentAnalysisEditorBean.getRepositoryPorts(filter)}">
<b><h:outputText value="#{localizedAnalysisEditorPageMessages.repositoryPorts}:"/></b>
<p:dataList value="#{currentAnalysisEditorBean.getRepositoryPorts(filter)}" var="port">
#{port.name()}
</p:dataList>
</ui:fragment>
<ui:fragment rendered="#{not empty currentAnalysisEditorBean.getProperties(filter)}">
<b><h:outputText value="#{localizedAnalysisEditorPageMessages.configuration}:"/></b>
<p:dataList value="#{currentAnalysisEditorBean.getProperties(filter)}" var="property">
#{property.name()}
</p:dataList>
</ui:fragment>
<ui:fragment rendered="#{not empty currentAnalysisEditorBean.getDependencies(filter)}">
<b><h:outputText value="#{localizedAnalysisEditorPageMessages.dependencies}:"/></b>
<br/>
<h:outputText value="#{currentAnalysisEditorBean.getDependencies(filter)}"/>
</ui:fragment>
</p:tooltip>
</ui:repeat>
</p:tab>
<p:tab title="#{localizedAnalysisEditorPageMessages.repositories}">
<ui:repeat value="#{currentAnalysisEditorBean.availableRepositories}" var="repository">
<p:commandLink id="repositoryLink" value="#{repository.simpleName}" action="#{currentAnalysisEditorBean.addRepository(repository)}" update=":messages"/><br/>
<p:tooltip for="repositoryLink">
<b><h:outputText value="#{repository.simpleName} (#{repository.name})"/></b>
Nils Christian Ehmke
committed
<h:outputText value="#{currentAnalysisEditorBean.getDescription(repository)}"/>
<br/><br/>
<ui:fragment rendered="#{not empty currentAnalysisEditorBean.getProperties(repository)}">
<b><h:outputText value="#{localizedAnalysisEditorPageMessages.configuration}:"/></b>
<p:dataList value="#{currentAnalysisEditorBean.getProperties(repository)}" var="property">
#{property.name()}
</p:dataList>
</ui:fragment>
<ui:fragment rendered="#{not empty currentAnalysisEditorBean.getDependencies(repository)}">
<b><h:outputText value="#{localizedAnalysisEditorPageMessages.dependencies}:"/></b>
<br/>
<h:outputText value="#{currentAnalysisEditorBean.getDependencies(repository)}"/>
</ui:fragment>
</p:tooltip>
</ui:repeat>
</p:tab>
</p:accordionPanel>
</h:form>
</p:layoutUnit>
</ui:define>
Nils Christian Ehmke
committed
<ui:define name="furtherDialogIncludes">
<ui:include src="../dialogs/AnalysisEditorPageDialogs.xhtml" />
</ui:define>
Nils Christian Ehmke
committed
</ui:composition>
</h:body>
</html>