use of org.gwtbootstrap3.client.ui.Container in project ovirt-engine by oVirt.
the class NetworkOutOfSyncPanel method addOutOfSyncRow.
private void addOutOfSyncRow(List<Label> values, TextAlign textAlign, boolean bottomBorderSolid) {
Row row = new Row();
Column mainColumn = new Column(MAIN_COLUMN_SIZE);
boolean firstTime = true;
for (Label label : values) {
Column subColumn;
if (firstTime) {
subColumn = new Column(PROPERTY_COLUMN_SIZE);
firstTime = false;
} else {
subColumn = new Column(COLUMN_SIZE);
subColumn.getElement().getStyle().setTextAlign(textAlign);
}
subColumn.add(label);
mainColumn.add(subColumn);
}
row.add(mainColumn);
if (bottomBorderSolid) {
Row container = new Row();
container.setPaddingBottom(4);
container.add(row);
// $NON-NLS-1$ //$NON-NLS-2$
container.getElement().getStyle().setProperty("margin", "0 0 4px");
// $NON-NLS-1$ //$NON-NLS-2$
container.getElement().getStyle().setProperty("borderBottomStyle", "solid");
// $NON-NLS-1$ //$NON-NLS-2$
container.getElement().getStyle().setProperty("borderWidth", "1px");
flowPanel.add(container);
} else {
flowPanel.add(row);
}
}
use of org.gwtbootstrap3.client.ui.Container in project ovirt-engine by oVirt.
the class VmInterfaceListGroupItem method createGuestAgentContainerPanel.
private Container createGuestAgentContainerPanel(VmNetworkInterface networkInterface, List<VmGuestAgentInterface> allGuestAgentData) {
Row content = new Row();
Column column = new Column(ColumnSize.MD_12);
content.add(column);
for (VmGuestAgentInterface guestAgentInterface : allGuestAgentData) {
if (guestAgentInterface.getMacAddress() != null && guestAgentInterface.getMacAddress().equals(networkInterface.getMacAddress())) {
DListElement dl = Document.get().createDLElement();
dl.addClassName(DL_HORIZONTAL);
addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.nameVmGuestAgent()), SafeHtmlUtils.fromString(guestAgentInterface.getInterfaceName()), dl);
addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.ipv4VmGuestAgent()), SafeHtmlUtils.fromString(guestAgentInterface.getIpv4Addresses() != null ? String.join(COMMA_DELIMITER, guestAgentInterface.getIpv4Addresses()) : constants.notAvailableLabel()), dl);
addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.ipv6VmGuestAgent()), SafeHtmlUtils.fromString(guestAgentInterface.getIpv6Addresses() != null ? String.join(COMMA_DELIMITER, guestAgentInterface.getIpv6Addresses()) : constants.notAvailableLabel()), dl);
addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.macVmGuestAgent()), SafeHtmlUtils.fromString(guestAgentInterface.getMacAddress()), dl);
column.getElement().appendChild(dl);
}
}
if (allGuestAgentData.isEmpty()) {
Span noDataSpan = new Span();
noDataSpan.setText(constants.notAvailableLabel());
column.add(noDataSpan);
}
return createItemContainerPanel(content);
}
use of org.gwtbootstrap3.client.ui.Container in project ovirt-engine by oVirt.
the class VmInterfaceListGroupItem method createStatisticsItemContainerPanel.
private Container createStatisticsItemContainerPanel(VmNetworkInterface networkInterface) {
Row content = new Row();
Column column = new Column(ColumnSize.MD_12);
content.add(column);
RxTxRateRenderer rateRenderer = new RxTxRateRenderer();
RxTxTotalRenderer totalRenderer = new RxTxTotalRenderer();
DListElement dl = Document.get().createDLElement();
dl.addClassName(DL_HORIZONTAL);
addDetailItem(templates.sub(constants.rxRate(), constants.mbps()), SafeHtmlUtils.fromString(rateRenderer.render(new Double[] { networkInterface.getStatistics().getReceiveRate(), networkInterface.hasSpeed() ? networkInterface.getSpeed().doubleValue() : 0 })), dl);
addDetailItem(templates.sub(constants.txRate(), constants.mbps()), SafeHtmlUtils.fromString(rateRenderer.render(new Double[] { networkInterface.getStatistics().getTransmitRate(), networkInterface.hasSpeed() ? networkInterface.getSpeed().doubleValue() : 0 })), dl);
addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.rxTotal()), SafeHtmlUtils.fromString(totalRenderer.render(networkInterface.getStatistics().getReceivedBytes())), dl);
addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.txTotal()), SafeHtmlUtils.fromString(totalRenderer.render(networkInterface.getStatistics().getTransmittedBytes())), dl);
addDetailItem(templates.sub(constants.dropsInterface(), constants.pkts()), SafeHtmlUtils.fromString(String.valueOf(networkInterface.getStatistics().getReceiveDropRate() + networkInterface.getStatistics().getTransmitDropRate())), dl);
column.getElement().appendChild(dl);
return createItemContainerPanel(content);
}
use of org.gwtbootstrap3.client.ui.Container in project ovirt-engine by oVirt.
the class VmSnapshotListViewItem method updateValues.
public void updateValues(SnapshotModel snapshotModel) {
Container currentDetails = disksExpand.getDetails();
if (currentDetails != null) {
listGroupItem.remove(currentDetails);
}
Container disksInfoContainer = createDisksItemContainerPanel(snapshotModel.getDisks());
disksExpand.setDetails(disksInfoContainer);
disksExpand.toggleExpanded(disksExpand.isActive());
listGroupItem.add(disksInfoContainer);
currentDetails = nicsExpand.getDetails();
if (currentDetails != null) {
listGroupItem.remove(currentDetails);
}
Container nicsInfoContainer = createNicsItemContainerPanel(snapshotModel.getNics());
nicsExpand.setDetails(nicsInfoContainer);
nicsExpand.toggleExpanded(nicsExpand.isActive());
listGroupItem.add(nicsInfoContainer);
currentDetails = installedAppsExpand.getDetails();
if (currentDetails != null) {
listGroupItem.remove(currentDetails);
}
Container installedAppsInfoContainer = createInstalledAppsItemContainerPanel(snapshotModel.getApps());
installedAppsExpand.setDetails(installedAppsInfoContainer);
installedAppsExpand.toggleExpanded(installedAppsExpand.isActive());
listGroupItem.add(installedAppsInfoContainer);
}
use of org.gwtbootstrap3.client.ui.Container in project ovirt-engine by oVirt.
the class SubTabDataCenterQosView method setInSlot.
@Override
public void setInSlot(Object slot, IsWidget content) {
super.setInSlot(slot, content);
if (slot == AbstractSubTabPresenter.TYPE_SetActionPanel) {
if (getTableContainer() instanceof FlowPanel) {
FlowPanel container = (FlowPanel) getTableContainer();
PageHeader storageHeader = new PageHeader();
storageHeader.setText(constants.dataCenterStorageQosSubTabLabel());
container.insert(storageHeader, 0);
}
}
}
Aggregations