Search in sources :

Example 1 with FunctionPolicyUnitPanel

use of org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.panels.FunctionPolicyUnitPanel in project ovirt-engine by oVirt.

the class ClusterPolicyPopupView method updateFunctions.

private void updateFunctions(NewClusterPolicyModel model) {
    FunctionPolicyUnitPanel functionPolicyUnitPanel;
    usedFunctionPanel.clear();
    for (Pair<PolicyUnit, Integer> pair : model.getUsedFunctions()) {
        functionPolicyUnitPanel = new FunctionPolicyUnitPanel(pair.getFirst(), model, true, model.getClusterPolicy().isLocked(), style, pair.getSecond());
        usedFunctionPanel.add(functionPolicyUnitPanel);
        functionPolicyUnitPanel.initWidget();
    }
    unusedFunctionPanel.clear();
    for (PolicyUnit policyUnit : model.getUnusedFunctions()) {
        functionPolicyUnitPanel = new FunctionPolicyUnitPanel(policyUnit, model, false, model.getClusterPolicy().isLocked(), style, null);
        unusedFunctionPanel.add(functionPolicyUnitPanel);
        functionPolicyUnitPanel.initWidget();
    }
}
Also used : FunctionPolicyUnitPanel(org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.panels.FunctionPolicyUnitPanel) PolicyUnit(org.ovirt.engine.core.common.scheduling.PolicyUnit)

Aggregations

PolicyUnit (org.ovirt.engine.core.common.scheduling.PolicyUnit)1 FunctionPolicyUnitPanel (org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.panels.FunctionPolicyUnitPanel)1