Search in sources :

Example 1 with NetworkModel

use of org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkModel in project ovirt-engine by oVirt.

the class NetworkListModel method newNetwork.

public void newNetwork() {
    if (getWindow() != null) {
        return;
    }
    final NetworkModel networkModel = new NewNetworkModel(this);
    setWindow(networkModel);
    initDcList(networkModel);
}
Also used : NetworkModel(org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkModel) EditNetworkModel(org.ovirt.engine.ui.uicommonweb.models.datacenters.EditNetworkModel) NewNetworkModel(org.ovirt.engine.ui.uicommonweb.models.datacenters.NewNetworkModel) NewNetworkModel(org.ovirt.engine.ui.uicommonweb.models.datacenters.NewNetworkModel)

Example 2 with NetworkModel

use of org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkModel in project ovirt-engine by oVirt.

the class NetworkListModel method edit.

public void edit() {
    final Network network = getSelectedItem();
    if (getWindow() != null) {
        return;
    }
    final NetworkModel networkModel = new EditNetworkModel(network, this);
    setWindow(networkModel);
    initDcList(networkModel);
}
Also used : Network(org.ovirt.engine.core.common.businessentities.network.Network) NetworkModel(org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkModel) EditNetworkModel(org.ovirt.engine.ui.uicommonweb.models.datacenters.EditNetworkModel) NewNetworkModel(org.ovirt.engine.ui.uicommonweb.models.datacenters.NewNetworkModel) EditNetworkModel(org.ovirt.engine.ui.uicommonweb.models.datacenters.EditNetworkModel)

Example 3 with NetworkModel

use of org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkModel in project ovirt-engine by oVirt.

the class AbstractNetworkPopupPresenterWidget method init.

@Override
public void init(final T model) {
    // Let the parent do its work
    super.init(model);
    // Listen to Properties
    model.getPropertyChangedEvent().addListener((ev, sender, args) -> {
        NetworkModel senderModel = (NetworkModel) sender;
        String propertyName = args.propertyName;
        if ("Message".equals(propertyName)) {
            // $NON-NLS-1$
            getView().setMessageLabel(senderModel.getMessage());
        }
    });
    getView().toggleSubnetVisibility(model.getExternal().getEntity());
    model.getExternal().getEntityChangedEvent().addListener((ev, sender, args) -> getView().toggleSubnetVisibility(isSubnetVisible(model)));
    model.getExternalProviders().getSelectedItemChangedEvent().addListener((ev, sender, args) -> getView().toggleSubnetVisibility(isSubnetVisible(model)));
    model.getProfiles().getPropertyChangedEvent().addListener((ev, sender, args) -> {
        if ("IsAvailable".equals(args.propertyName)) {
            // $NON-NLS-1$
            getView().toggleProfilesVisibility(model.getProfiles().getIsAvailable());
        }
    });
    getView().getQosButton().setCommand(model.getAddQosCommand());
    getView().getQosButton().addClickHandler(event -> getView().getQosButton().getCommand().execute());
    getView().addMtuEditor();
}
Also used : NetworkModel(org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkModel)

Aggregations

NetworkModel (org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkModel)3 EditNetworkModel (org.ovirt.engine.ui.uicommonweb.models.datacenters.EditNetworkModel)2 NewNetworkModel (org.ovirt.engine.ui.uicommonweb.models.datacenters.NewNetworkModel)2 Network (org.ovirt.engine.core.common.businessentities.network.Network)1