Search in sources :

Example 11 with Erratum

use of org.ovirt.engine.core.common.businessentities.Erratum in project ovirt-engine by oVirt.

the class BackendEngineKatelloErratumResourceTest method getEntity.

@Override
protected Erratum getEntity(int index) {
    Erratum erratum = mock(Erratum.class);
    when(erratum.getId()).thenReturn(GUIDS[index].toString());
    when(erratum.getDescription()).thenReturn(DESCRIPTIONS[index]);
    return erratum;
}
Also used : KatelloErratum(org.ovirt.engine.api.model.KatelloErratum) Erratum(org.ovirt.engine.core.common.businessentities.Erratum)

Example 12 with Erratum

use of org.ovirt.engine.core.common.businessentities.Erratum in project ovirt-engine by oVirt.

the class ErrataListWithDetailsPopupPresenterWidget method onBind.

@Override
protected void onBind() {
    super.onBind();
    // 
    // Handle the query returning a new list of errata -> simple view update.
    // 
    changeListener = (ev, sender, args) -> getView().showErrataList();
    modelProvider.getModel().addItemsChangeListener(changeListener);
    // Handle the errata selection changing -> simple view update.
    // 
    getView().getErrataTable().addSelectionChangeHandler(event -> {
        Erratum erratum = getView().getSelectedErratum();
        if (erratum == null) {
            getView().setErrataDetailPanelVisibilty(false);
        } else {
            getView().updateErrataDetailFormPanel(erratum);
            getView().setErrataDetailPanelVisibilty(true);
        }
    });
}
Also used : Erratum(org.ovirt.engine.core.common.businessentities.Erratum)

Example 13 with Erratum

use of org.ovirt.engine.core.common.businessentities.Erratum in project ovirt-engine by oVirt.

the class GetErrataCountsForHostQueryTest method createErratum.

private Erratum createErratum(ErrataType type, ErrataSeverity severity) {
    Erratum erratum = new Erratum();
    erratum.setType(type);
    erratum.setSeverity(severity);
    return erratum;
}
Also used : Erratum(org.ovirt.engine.core.common.businessentities.Erratum)

Example 14 with Erratum

use of org.ovirt.engine.core.common.businessentities.Erratum in project ovirt-engine by oVirt.

the class ErrataListWithDetailsPopupView method updateErrataDetailFormPanel.

public void updateErrataDetailFormPanel(Erratum erratum) {
    errataTitle.clear();
    errataTitle.add(new HTML(erratum.getTitle()));
    EntityModel<Erratum> entityModel = new EntityModel<>();
    entityModel.setEntity(erratum);
    errataDetailModelForm.setModel(entityModel);
    errataDetailModelForm.update();
}
Also used : EntityModel(org.ovirt.engine.ui.uicommonweb.models.EntityModel) HTML(com.google.gwt.user.client.ui.HTML) Erratum(org.ovirt.engine.core.common.businessentities.Erratum)

Aggregations

Erratum (org.ovirt.engine.core.common.businessentities.Erratum)14 KatelloErratum (org.ovirt.engine.api.model.KatelloErratum)6 FieldUpdater (com.google.gwt.cell.client.FieldUpdater)1 ValueChangeHandler (com.google.gwt.event.logical.shared.ValueChangeHandler)1 HTML (com.google.gwt.user.client.ui.HTML)1 SelectionChangeEvent (com.google.gwt.view.client.SelectionChangeEvent)1 Handler (com.google.gwt.view.client.SelectionChangeEvent.Handler)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 ErrataCount (org.ovirt.engine.core.common.businessentities.ErrataCount)1 PlaceTransitionHandler (org.ovirt.engine.ui.common.presenter.PlaceTransitionHandler)1 AbstractFullDateTimeColumn (org.ovirt.engine.ui.common.widget.table.column.AbstractFullDateTimeColumn)1 AbstractIconTypeColumn (org.ovirt.engine.ui.common.widget.table.column.AbstractIconTypeColumn)1 AbstractTextColumn (org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn)1 AbstractErrataListModel (org.ovirt.engine.ui.uicommonweb.models.AbstractErrataListModel)1 EntityModel (org.ovirt.engine.ui.uicommonweb.models.EntityModel)1