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

Some minor modifications ; Added another example

parent 733a7b84
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?>
<Project xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="platform:/resource/Kieker/model/AnalysisMetaModel.ecore">
<plugins xsi:type="Filter" name="CPUUtilizationDisplayFilter" classname="kieker.analysis.plugin.filter.forward.CPUUtilizationDisplayFilter">
<properties name="numberOfEntries" value="100"/>
<outputPorts name="relayedEvents"/>
<displays name="XYPlot CPU utilization Display"/>
<displays name="Meter Gauge CPU total utilization Display"/>
<inputPorts name="inputEvents"/>
</plugins>
<plugins xsi:type="Reader" name="FSReader" classname="kieker.analysis.plugin.reader.filesystem.FSReader">
<properties name="inputDirs" value="data/CPU-and-Memory-Example/testdata"/>
<properties name="ignoreUnknownRecordTypes" value="false"/>
<outputPorts name="monitoringRecords" subscribers="//@plugins.0/@inputPorts.0"/>
</plugins>
<views name="View" description="No description available.">
<displayConnectors name="XYPlot CPU utilization Display" display="//@plugins.0/@displays.0"/>
<displayConnectors name="Meter Gauge CPU total utilization Display" display="//@plugins.0/@displays.1"/>
</views>
<properties name="recordsTimeUnit" value="NANOSECONDS"/>
<properties name="projectName" value="AnalysisProject"/>
</Project>
#
#Thu Jun 06 09:16:16 CEST 2013
owner=admin
cockpit\ layout=0 0 1 0 0 1
last\ user=admin
analysis\ layout=id0 -1418 -586 336 72;id1 -1140 -428 420 72;id2 -1490 -428 192 72;\#;
source diff could not be displayed: it is too large. Options to address this: view the blob.
$0=kieker.common.record.misc.KiekerMetadataRecord
$1=kieker.common.record.system.CPUUtilizationRecord
$2=kieker.common.record.system.MemSwapUsageRecord
......@@ -47,6 +47,7 @@ import org.primefaces.component.chart.line.LineChart;
import org.primefaces.component.chart.metergauge.MeterGaugeChart;
import org.primefaces.component.dashboard.Dashboard;
import org.primefaces.component.panel.Panel;
import org.primefaces.component.selectcheckboxmenu.SelectCheckboxMenu;
import org.primefaces.model.DashboardColumn;
import org.primefaces.model.DashboardModel;
import org.primefaces.model.DefaultDashboardColumn;
......@@ -505,11 +506,13 @@ public class CurrentCockpitBean {
final boolean isAlreadyCorrectlyInitialized = (component.getChildCount() == 1) && (component.getChildren().get(0) instanceof LineChart);
final LineChartSeries lineChartSeries;
final SelectCheckboxMenu selectCheckboxMenu;
// Avoid unnecessary component creation. Use the existing components if they are already existing and from the correct type.
if (isAlreadyCorrectlyInitialized) {
final LineChart lineChart = (LineChart) component.getChildren().get(0);
lineChartSeries = (LineChartSeries) ((CartesianChartModel) lineChart.getValue()).getSeries().get(0);
selectCheckboxMenu = (SelectCheckboxMenu) component.getChildren().get(1);
} else {
final FacesContext facesContext = FacesContext.getCurrentInstance();
final Application application = facesContext.getApplication();
......@@ -527,8 +530,13 @@ public class CurrentCockpitBean {
linearModel.addSeries(lineChartSeries);
lineChart.setValue(linearModel);
// Create the Primefaces drop box
selectCheckboxMenu = (SelectCheckboxMenu) application.createComponent(facesContext, "org.primefaces.component.SelectCheckboxMenu",
"org.primefaces.component.SelectCheckboxMenuRenderer");
component.getChildren().clear();
component.getChildren().add(lineChart);
component.getChildren().add(selectCheckboxMenu);
}
try {
......
......@@ -39,37 +39,37 @@
</ui:define>
<ui:define name="js">
<script>
<script>
nodeEnterListener = function() {
graph.setMouseCursor('pointer');
}
nodeClickListener = function(node, info, e) {
nodeClickCommand([{name : 'ID', value : node.id}]);
markNode(node, '#FF0000');
nodeClickCommand([{name: 'ID', value: node.id}]);
markNode(node, '#FF0000');
}
nodeRemoveListener = function(node) {
nodeRemoveCommand([{name : 'ID', value : node.id}]);
nodeRemoveCommand([{name: 'ID', value: node.id}]);
}
edgeCreateListener = function(sourceNode, targetNode, sourcePort, targetPort) {
edgeCreateCommand([{name : 'sourcePortID', value : sourcePort.id},{name : 'targetPortID', value : targetPort.id}]);
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}]);
edgeRemoveCommand([{name: 'sourcePortID', value: sourcePort.id}, {name: 'targetPortID', value: targetPort.id}]);
}
autoLayoutListener = function(nodes, edges) {
autoLayoutCommand([{name : 'nodes', value : nodes}, {name : 'edges', value : edges}]);
autoLayoutCommand([{name: 'nodes', value: nodes}, {name: 'edges', value: edges}]);
}
function preSaveProject(overwriteNewerProject) {
var layoutString = graph.savePositions();
saveProjectCommand([{name : 'layoutString', value : layoutString}, {name : 'overwriteNewerProject', value : overwriteNewerProject}]);
saveProjectCommand([{name: 'layoutString', value: layoutString}, {name: 'overwriteNewerProject', value: overwriteNewerProject}]);
}
// "Overwrite" the function in the template
function bodyLoaded() {
// postInit();
......@@ -113,12 +113,15 @@
</p:submenu>
<p:submenu label="Graph">
<p:menuitem styleClass="element-with-whitespace" icon="ui-icon-arrowreturnthick-1-w" value=" Undo" ajax="true" />
<p:menuitem styleClass="element-with-whitespace" icon="ui-icon-arrowreturnthick-1-e" value=" Redo" ajax="true" />
<p:separator/>
<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:menuitem styleClass="element-with-whitespace" icon="ui-icon-autoLayoutSmall" value=" #{localizedAnalysisEditorPageMessages.autoLayout}" ajax="true" action="#{currentAnalysisEditorGraphBean.startAutoLayout()}" />
</p:submenu>
</ui:define>
......
......@@ -39,9 +39,9 @@
<ui:define name="js">
<!-- This javascript code will be executed in the onload-part of the body and shows a localized message via the growl-component. -->
<script>
<script>
bodyLoaded = function() {
msgs.renderMessage({summary : '#{localizedCockpitEditorPageMessages.msgCockpitEditorWelcomeShort}', detail : '#{localizedCockpitEditorPageMessages.msgCockpitEditorWelcome}', severity: 'info'});
msgs.renderMessage({summary: '#{localizedCockpitEditorPageMessages.msgCockpitEditorWelcomeShort}', detail: '#{localizedCockpitEditorPageMessages.msgCockpitEditorWelcome}', severity: 'info'});
}
</script>
</ui:define>
......@@ -61,6 +61,11 @@
<p:menuitem styleClass="element-with-whitespace" icon="ui-icon-close" value=" #{localizedMessages.closeProject}" onclick="closeConfirmation.show()" ajax="true" rendered="#{currentCockpitEditorBean.unsavedModification}"/>
<p:menuitem styleClass="element-with-whitespace" icon="ui-icon-close" value=" #{localizedMessages.closeProject}" action="ProjectOverviewPage.xhtml?faces-redirect=true" ajax="false" rendered="#{not currentCockpitEditorBean.unsavedModification}"/>
</p:submenu>
<p:submenu label="Edit">
<p:menuitem styleClass="element-with-whitespace" icon="ui-icon-arrowreturnthick-1-w" value=" Undo" ajax="true" />
<p:menuitem styleClass="element-with-whitespace" icon="ui-icon-arrowreturnthick-1-e" value=" Redo" ajax="true" />
</p:submenu>
</ui:define>
......@@ -68,10 +73,10 @@
<h:form id="centerForm">
<ui:fragment rendered="#{not empty currentCockpitEditorBean.activeView}">
<!-- The following is a workaround necessary due to a bug in Primefaces. -->
<script type="text/javascript">
$('.ui-panel').click(function(event) {
nodeSelected([{name : 'id', value : event.currentTarget.id}]);
});
<script type="text/javascript">
$('.ui-panel').click(function(event) {
nodeSelected([{name: 'id', value: event.currentTarget.id}]);
});
</script>
<p:dashboard id="dynamicDashboard" binding="#{currentCockpitEditorBean.dashboard}">
<p:ajax event="reorder" listener="#{currentCockpitEditorBean.handleReorder}"/>
......
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