Commit fdf5853c authored by Gianluca Filippone's avatar Gianluca Filippone
Browse files

fixed bug for choreography ee resources visualization

parent 3d295743
......@@ -76,7 +76,7 @@ public class ChoreographyEEResourcesPanel extends Panel {
try {
content.add(buildResorucesOverviewPanel());
content.add(new ChoreographyVMDirectoryPanel(
"virtualMachinesList", pageRef, enactmentEngine.getKey(), choreography.getKey()));
"virtualMachinesList", pageRef, enactmentEngine.getKey(), choreography.getChoreographyId()));
content.add(buildActionsPanel());
content.setOutputMarkupId(true);
......@@ -218,7 +218,7 @@ public class ChoreographyEEResourcesPanel extends Panel {
private RepeatingView buildResorucesOverviewPanel() {
EnactmentEngineStatusTO ee = monitorRestClient.getChoreographyEEStatus(
enactmentEngine.getKey(), choreography.getKey());
enactmentEngine.getKey(), choreography.getChoreographyId());
double ramPercentage = (ee.getRamUsage() / Float.valueOf(ee.getRamTotal())) * 100;
double storagePercentage = (ee.getStorageUsage() / Float.valueOf(ee.getStorageTotal())) * 100;
......
......@@ -49,10 +49,10 @@ public class ChoreographyVMDirectoryPanel extends DirectoryPanel<
private String enactmentEngineKey;
private String choreographyKey;
private String choreographyId;
public ChoreographyVMDirectoryPanel(final String id, final PageReference pageRef,
final String enactmentEngineKey, final String choreographyKey) {
final String enactmentEngineKey, final String choreographyId) {
super(id, new DirectoryPanel.Builder<VirtualMachineInfoTO, VirtualMachineInfoTO, MonitorRestClient>(
new MonitorRestClient(), pageRef) {
......@@ -66,7 +66,7 @@ public class ChoreographyVMDirectoryPanel extends DirectoryPanel<
}.disableCheckBoxes());
this.enactmentEngineKey = enactmentEngineKey;
this.choreographyKey = choreographyKey;
this.choreographyId = choreographyId;
setFooterVisibility(true);
initResultTable();
......@@ -170,14 +170,14 @@ public class ChoreographyVMDirectoryPanel extends DirectoryPanel<
@Override
public Iterator<VirtualMachineInfoTO> iterator(final long first, final long count) {
List<VirtualMachineInfoTO> list = restClient.getChoreographyVmList(enactmentEngineKey, choreographyKey);
List<VirtualMachineInfoTO> list = restClient.getChoreographyVmList(enactmentEngineKey, choreographyId);
Collections.sort(list, comparator);
return list.subList((int) first, (int) first + (int) count).iterator();
}
@Override
public long size() {
return restClient.getChoreographyVmList(enactmentEngineKey, choreographyKey).size();
return restClient.getChoreographyVmList(enactmentEngineKey, choreographyId).size();
}
@Override
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment