Skip to content
Snippets Groups Projects
Commit 00d57ce5 authored by Bjoern Weissenfels's avatar Bjoern Weissenfels
Browse files

added buttons to response time and cpu sites

parent bfa90743
No related branches found
No related tags found
No related merge requests found
......@@ -73,7 +73,7 @@ public class CPUXYPlotBean implements Observer{
}
public List<String> getAvailableAttributes() {
return availableAttributes;
return this.availableAttributes;
}
public List<String> getSelectedAttributes() {
......@@ -106,7 +106,7 @@ public class CPUXYPlotBean implements Observer{
CartesianChartModel cpuModel = new CartesianChartModel();
for(String key : this.keys){ // key = hostname - cpuId - idle
if(key.substring(0, this.index - 1).equals(id)){
for(String attribute : this.selectedAttributes){
for(String attribute : this.getSelectedAttributes()){
if(key.substring(index + 2).equals(attribute)){
cpuModel.addSeries(this.computeModel(key, attribute));
}
......
......@@ -10,7 +10,6 @@ import javax.faces.bean.ManagedProperty;
import org.primefaces.model.chart.CartesianChartModel;
import org.primefaces.model.chart.ChartSeries;
import org.primefaces.model.chart.PieChartModel;
import kieker.analysis.display.XYPlot;
import livedemo.entities.Model;
......@@ -28,12 +27,10 @@ public class MemSwapBean implements Observer {
private XYPlot xyplot;
private Model<CartesianChartModel> memModel;
private Model<CartesianChartModel> swapModel;
private final PieChartModel memPieChartModel;
public MemSwapBean(){
this.memModel = new Model<CartesianChartModel>(new CartesianChartModel(), "KIEKER-DEMO-SVR - MEM");
this.swapModel = new Model<CartesianChartModel>(new CartesianChartModel(), "KIEKER-DEMO-SVR - SWAP");
this.memPieChartModel = new PieChartModel();
}
@PostConstruct
......@@ -52,10 +49,6 @@ public class MemSwapBean implements Observer {
this.analysisBean = analysisBean;
}
public PieChartModel getMemPieChartModel() {
return memPieChartModel;
}
public Model<CartesianChartModel> getMemModel(){
return this.memModel;
}
......
......@@ -77,9 +77,9 @@ public class MethodResponsetimeBean implements Observer {
}
public void onChange(ValueChangeEvent event){
System.out.println(this.selectButton);
if(this.selectButton){
this.selectedMethods = this.availableMethods;
this.selectedMethods.clear();
this.selectedMethods.addAll(availableMethods);
}else{
this.selectedMethods.clear();
}
......
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -58,9 +58,11 @@
<div id="main">
<h:form>
<h:panelGrid columns="2" style="margin-bottom:10px" cellpadding="5">
<p:commandButton value="Select Methods" onclick="dlg2.show();" type="button"/>
<p:commandButton value="Select Methods" onclick="dlg2.show();" />
<p:selectBooleanButton value="#{methodResponsetimeBean.selectButton}" onLabel="Select All"
offLabel="Select None" valueChangeListener="#{methodResponsetimeBean.onChange}"/>
offLabel="Select One" valueChangeListener="#{methodResponsetimeBean.onChange}">
<p:ajax update="dialog"/>
</p:selectBooleanButton>
</h:panelGrid>
<p:dialog id="dialog" header="Select Methods" widgetVar="dlg2" onShow="poll.stop()" onHide="poll.start()" >
......@@ -78,7 +80,7 @@
title="Average Responsetime" minY="0" style="height:300px;margin-top:20px"
xaxisLabel="Time" yaxisLabel="Responsetime in ms"/>
<p:poll interval="2" widgetVar="poll" update="dialog" autoStart="true"/>
<p:poll interval="1" widgetVar="poll" update="dialog" autoStart="true"/>
<p:poll interval="1" update="count,resp" />
</h:form>
</div>
......
......@@ -73,7 +73,7 @@
<p:tab title="#{model.name}">
<p:lineChart id="responsetime" value="#{model.model}" legendPosition="ne"
style="height:300px;margin-top:20px" minY="0" maxY="100"
xaxisAngle="30" xaxisLabel="Time" yaxisLabel="Percent"/>
xaxisLabel="Time" yaxisLabel="Percent"/>
<p:poll interval="1" update="responsetime"/>
</p:tab>
</p:accordionPanel>
......@@ -81,7 +81,7 @@
<p:accordionPanel dynamic="true" multiple="true" activeIndex="0,1">
<p:tab title="#{memSwapBean.memModel.name}">
<p:barChart id="mem" value="#{memSwapBean.memModel.model}" legendPosition="ne"
xaxisAngle="30" style="height:200px;margin-top:20px" stacked="true"
style="height:200px;margin-top:20px" stacked="true"
xaxisLabel="Time" yaxisLabel="MB"/>
<p:poll interval="1" update="mem"/>
</p:tab>
......@@ -92,19 +92,17 @@
<p:poll interval="1" update="swap"/>
</p:tab>
</p:accordionPanel>
<!--
<h:panelGrid id="grid" columns="2" columnClasses="colStyle" style="width:100%;margin-bottom:10px" cellpadding="5">
<ui:repeat value="#{cpuMeterGaugeBean.meterGaugeModels}" var="model">
<p:panel header="#{model.name} : Total Utilization" toggleable="true" >
<c:forEach items="#{cpuMeterGaugeBean.meterGaugeModels}" var="model">
<p:panel header="#{model.name} : Total Utilization" toggleable="false" >
<p:meterGaugeChart value="#{model.model}"
label="%" seriesColors="#{cpuMeterGaugeBean.colors}"/>
</p:panel>
</ui:repeat>
<p:panel header="KIEKER-DEMO-SRV - MEM" toggleable="true" >
<p:pieChart value="#{memSwapBean.memPieChartModel}" legendPosition="e"/>
</p:panel>
</c:forEach>
</h:panelGrid>
<p:poll interval="1" update="grid"/>
-->
</h:form>
</div>
<div id="footer">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment