Search in sources :

Example 6 with Column

use of org.gwtbootstrap3.client.ui.Column in project ovirt-engine by oVirt.

the class VmInterfaceListGroupItem method createGeneralItemContainerPanel.

private Container createGeneralItemContainerPanel(VmNetworkInterface networkInterface) {
    Row content = new Row();
    Column column = new Column(ColumnSize.MD_12);
    content.add(column);
    DListElement dl = Document.get().createDLElement();
    dl.addClassName(DL_HORIZONTAL);
    addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.plugged()), renderPlugged(networkInterface.isPlugged()), dl);
    addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.networkNameInterface()), SafeHtmlUtils.fromString(networkInterface.getNetworkName() != null ? networkInterface.getNetworkName() : ""), dl);
    addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.profileNameInterface()), SafeHtmlUtils.fromString(networkInterface.getVnicProfileName() != null ? networkInterface.getVnicProfileName() : ""), dl);
    addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.vmNetworkQosName()), SafeHtmlUtils.fromString(StringHelper.isNullOrEmpty(networkInterface.getQosName()) ? constants.notAvailableLabel() : networkInterface.getQosName()), dl);
    addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.linkStateNetworkInterface()), renderLinkState(networkInterface.isLinked()), dl);
    addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.typeInterface()), SafeHtmlUtils.fromString(VmInterfaceType.forValue(networkInterface.getType()).getDescription()), dl);
    addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.macInterface()), SafeHtmlUtils.fromString(networkInterface.getMacAddress()), dl);
    addDetailItem(templates.sub(constants.speedInterface(), constants.mbps()), SafeHtmlUtils.fromString(String.valueOf(networkInterface.getSpeed())), dl);
    addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.portMirroring()), renderPortMirroring(networkInterface.isPortMirroring()), dl);
    column.getElement().appendChild(dl);
    return createItemContainerPanel(content);
}
Also used : Column(org.gwtbootstrap3.client.ui.Column) Row(org.gwtbootstrap3.client.ui.Row) DListElement(com.google.gwt.dom.client.DListElement)

Example 7 with Column

use of org.gwtbootstrap3.client.ui.Column in project ovirt-engine by oVirt.

the class VmInterfaceListGroupItem method createNetworkFilterParametersContainerPanel.

private Container createNetworkFilterParametersContainerPanel(List<VmNicFilterParameter> networkFilterParameters) {
    Row content = new Row();
    Column column = new Column(ColumnSize.MD_12);
    content.add(column);
    networkFilterParameters.stream().forEach(parameter -> {
        DListElement dl = Document.get().createDLElement();
        dl.addClassName(DL_HORIZONTAL);
        addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.nameNetworkFilterParameter()), SafeHtmlUtils.fromString(parameter.getName()), dl);
        addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.valueNetworkFilterParameter()), SafeHtmlUtils.fromString(parameter.getValue()), dl);
        column.getElement().appendChild(dl);
    });
    return createItemContainerPanel(content);
}
Also used : Column(org.gwtbootstrap3.client.ui.Column) Row(org.gwtbootstrap3.client.ui.Row) DListElement(com.google.gwt.dom.client.DListElement)

Example 8 with Column

use of org.gwtbootstrap3.client.ui.Column in project ovirt-engine by oVirt.

the class VmSnapshotListViewItem method createGeneralItemContainerPanel.

private Container createGeneralItemContainerPanel(Snapshot snapshot, VmSnapshotListModel listModel) {
    Row content = new Row();
    Column column = new Column(ColumnSize.MD_12);
    content.add(column);
    DListElement dl = Document.get().createDLElement();
    dl.addClassName(DL_HORIZONTAL);
    addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.dateSnapshot()), SafeHtmlUtils.fromString(getCreateDateString(snapshot)), dl);
    addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.statusSnapshot()), SafeHtmlUtils.fromString(snapshot.getStatus().name()), dl);
    addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.memorySnapshot()), SafeHtmlUtils.fromString(String.valueOf(snapshot.containsMemory())), dl);
    addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.descriptionSnapshot()), SafeHtmlUtils.fromTrustedString(getDescription(snapshot)), dl);
    VM entity = listModel.getEntity();
    if (entity != null) {
        addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.definedMemoryVm()), SafeHtmlUtils.fromString(entity.getVmMemSizeMb() + constants.mb()), dl);
        addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.physMemGauranteedVm()), SafeHtmlUtils.fromString(entity.getMinAllocatedMem() + constants.mb()), dl);
        addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.numOfCpuCoresVm()), SafeHtmlUtils.fromString(messages.cpuInfoLabel(entity.getNumOfCpus(), entity.getNumOfSockets(), entity.getCpuPerSocket(), entity.getThreadsPerCpu())), dl);
    }
    column.getElement().appendChild(dl);
    return createItemContainerPanel(content);
}
Also used : Column(org.gwtbootstrap3.client.ui.Column) VM(org.ovirt.engine.core.common.businessentities.VM) Row(org.gwtbootstrap3.client.ui.Row) DListElement(com.google.gwt.dom.client.DListElement)

Example 9 with Column

use of org.gwtbootstrap3.client.ui.Column in project ovirt-engine by oVirt.

the class VmSnapshotListViewItem method createDisksItemContainerPanel.

private Container createDisksItemContainerPanel(List<DiskImage> diskImages) {
    Row content = new Row();
    Column column = new Column(ColumnSize.MD_12);
    content.add(column);
    for (DiskImage image : diskImages) {
        DListElement dl = Document.get().createDLElement();
        dl.addClassName(DL_HORIZONTAL);
        addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.statusDisk()), SafeHtmlUtils.fromString(getImageStatus(image.getImageStatus())), dl);
        addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.aliasDisk()), SafeHtmlUtils.fromString(image.getDiskAlias()), dl);
        addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.provisionedSizeDisk()), SafeHtmlUtils.fromString(String.valueOf(sizeRenderer.render(image.getSize()))), dl);
        addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.sizeDisk()), SafeHtmlUtils.fromString(String.valueOf(sizeRenderer.render(image.getActualSizeInBytes()))), dl);
        addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.allocationDisk()), SafeHtmlUtils.fromString(String.valueOf(VolumeType.forValue(image.getVolumeType().getValue()))), dl);
        addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.interfaceDisk()), SafeHtmlUtils.fromString(getInterface(image)), dl);
        addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.creationDateDisk()), SafeHtmlUtils.fromString(dateRenderer.render(image.getCreationDate())), dl);
        addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.diskSnapshotIDDisk()), SafeHtmlUtils.fromString(String.valueOf(image.getImageId())), dl);
        addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.typeDisk()), SafeHtmlUtils.fromString(String.valueOf(image.getDiskStorageType())), dl);
        addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.descriptionDisk()), SafeHtmlUtils.fromString(StringHelper.isNotNullOrEmpty(image.getDiskDescription()) ? image.getDiskDescription() : constants.notAvailableLabel()), dl);
        column.getElement().appendChild(dl);
    }
    if (diskImages.isEmpty()) {
        column.getElement().setInnerHTML(constants.noItemsToDisplay());
    }
    return createItemContainerPanel(content);
}
Also used : Column(org.gwtbootstrap3.client.ui.Column) Row(org.gwtbootstrap3.client.ui.Row) DListElement(com.google.gwt.dom.client.DListElement) DiskImage(org.ovirt.engine.core.common.businessentities.storage.DiskImage)

Example 10 with Column

use of org.gwtbootstrap3.client.ui.Column in project ovirt-engine by oVirt.

the class VmSnapshotListViewItem method createInstalledAppsItemContainerPanel.

private Container createInstalledAppsItemContainerPanel(List<String> appList) {
    Row row = new Row();
    Column column = new Column(ColumnSize.MD_12);
    row.add(column);
    Container container = createItemContainerPanel(row);
    for (String appName : appList) {
        column.getElement().setInnerHTML(appName);
        row = new Row();
        column = new Column(ColumnSize.MD_12);
        row.add(column);
        container.add(row);
    }
    if (appList.isEmpty()) {
        column.getElement().setInnerHTML(constants.noItemsToDisplay());
    }
    return container;
}
Also used : Container(org.gwtbootstrap3.client.ui.Container) Column(org.gwtbootstrap3.client.ui.Column) Row(org.gwtbootstrap3.client.ui.Row)

Aggregations

Column (org.gwtbootstrap3.client.ui.Column)30 Row (org.gwtbootstrap3.client.ui.Row)24 Column (com.google.gwt.user.cellview.client.Column)17 ButtonCell (org.gwtbootstrap3.client.ui.gwt.ButtonCell)12 DListElement (com.google.gwt.dom.client.DListElement)10 Button (org.gwtbootstrap3.client.ui.Button)9 TextColumn (com.google.gwt.user.cellview.client.TextColumn)8 Element (com.google.gwt.dom.client.Element)5 IsWidget (com.google.gwt.user.client.ui.IsWidget)5 AbstractIconTypeColumn (org.ovirt.engine.ui.common.widget.table.column.AbstractIconTypeColumn)5 AbstractCell (com.google.gwt.cell.client.AbstractCell)4 ValueUpdater (com.google.gwt.cell.client.ValueUpdater)4 NativeEvent (com.google.gwt.dom.client.NativeEvent)4 SafeHtmlBuilder (com.google.gwt.safehtml.shared.SafeHtmlBuilder)4 HTMLButtonElement (elemental2.dom.HTMLButtonElement)4 Container (org.gwtbootstrap3.client.ui.Container)4 Icon (org.gwtbootstrap3.client.ui.Icon)4 Label (org.gwtbootstrap3.client.ui.Label)4 CellTable (com.google.gwt.user.cellview.client.CellTable)3 ListDataProvider (com.google.gwt.view.client.ListDataProvider)3