Search in sources :

Example 1 with OnlyToBeUsedInGeneratedCodeStringBlessedAsSafeHtml

use of com.google.gwt.safehtml.shared.OnlyToBeUsedInGeneratedCodeStringBlessedAsSafeHtml in project ovirt-engine by oVirt.

the class AssignedVNumaNodesPanel method setNodes.

public void setNodes(Collection<VNodeModel> virtualNodes, int numaNodeIndex, List<VdsNumaNode> numaNodeList) {
    String myImageHtml = AbstractImagePrototype.create(resources.vNumaTitleIcon()).getHTML();
    SafeHtml mySafeImageHtml = new OnlyToBeUsedInGeneratedCodeStringBlessedAsSafeHtml(myImageHtml);
    if (virtualNodes == null) {
        virtualNodes = new ArrayList<>();
    }
    SafeHtml title = titleTemplate.title(virtualNodes.size(), mySafeImageHtml, style.numaTitle());
    collapsiblePanel.setTitleWidget(new HTML(title));
    scrollPanel.setIndex(numaNodeIndex);
    scrollPanel.clear();
    for (VNodeModel nodeModel : virtualNodes) {
        DraggableVirtualNumaPanel numaNodePanel = virtualNumaPanelProvider.get();
        numaNodePanel.setModel(nodeModel, numaNodeList);
        scrollPanel.add(numaNodePanel);
    }
}
Also used : VNodeModel(org.ovirt.engine.ui.uicommonweb.models.hosts.numa.VNodeModel) OnlyToBeUsedInGeneratedCodeStringBlessedAsSafeHtml(com.google.gwt.safehtml.shared.OnlyToBeUsedInGeneratedCodeStringBlessedAsSafeHtml) SafeHtml(com.google.gwt.safehtml.shared.SafeHtml) OnlyToBeUsedInGeneratedCodeStringBlessedAsSafeHtml(com.google.gwt.safehtml.shared.OnlyToBeUsedInGeneratedCodeStringBlessedAsSafeHtml) HTML(com.google.gwt.user.client.ui.HTML)

Example 2 with OnlyToBeUsedInGeneratedCodeStringBlessedAsSafeHtml

use of com.google.gwt.safehtml.shared.OnlyToBeUsedInGeneratedCodeStringBlessedAsSafeHtml in project ovirt-engine by oVirt.

the class NumaSupportPopupView method getHostSummaryTitle.

@Override
public IsWidget getHostSummaryTitle(int totalCpus, int usedCpuPercentage, int totalMemory, int usedMemory, int totalNumaNodes, int totalVNumaNodes) {
    FlowPanel summaryPanel = new FlowPanel();
    CpuSummaryPanel cpuSummaryPanel = this.cpuSummaryPanelProvider.get();
    cpuSummaryPanel.setName(constants.numaSummaryTotals());
    cpuSummaryPanel.setCpus(totalCpus, usedCpuPercentage);
    summaryPanel.add(cpuSummaryPanel);
    MemorySummaryPanel memorySummaryPanel = this.memorySummaryPanelProvider.get();
    memorySummaryPanel.setMemoryStats(totalMemory, usedMemory);
    summaryPanel.add(memorySummaryPanel);
    summaryPanel.add(new HTML(numaTitleTemplate.title(totalNumaNodes, style.hostSummaryNumaTitle())));
    String myImageHtml = AbstractImagePrototype.create(resources.vNumaTitleIcon()).getHTML();
    SafeHtml mySafeImageHtml = new OnlyToBeUsedInGeneratedCodeStringBlessedAsSafeHtml(myImageHtml);
    summaryPanel.add(new HTML(vNumaTitleTemplate.title(totalVNumaNodes, mySafeImageHtml, style.hostSummaryNumaTitle())));
    return summaryPanel;
}
Also used : OnlyToBeUsedInGeneratedCodeStringBlessedAsSafeHtml(com.google.gwt.safehtml.shared.OnlyToBeUsedInGeneratedCodeStringBlessedAsSafeHtml) SafeHtml(com.google.gwt.safehtml.shared.SafeHtml) FlowPanel(com.google.gwt.user.client.ui.FlowPanel) OnlyToBeUsedInGeneratedCodeStringBlessedAsSafeHtml(com.google.gwt.safehtml.shared.OnlyToBeUsedInGeneratedCodeStringBlessedAsSafeHtml) HTML(com.google.gwt.user.client.ui.HTML)

Aggregations

OnlyToBeUsedInGeneratedCodeStringBlessedAsSafeHtml (com.google.gwt.safehtml.shared.OnlyToBeUsedInGeneratedCodeStringBlessedAsSafeHtml)2 SafeHtml (com.google.gwt.safehtml.shared.SafeHtml)2 HTML (com.google.gwt.user.client.ui.HTML)2 FlowPanel (com.google.gwt.user.client.ui.FlowPanel)1 VNodeModel (org.ovirt.engine.ui.uicommonweb.models.hosts.numa.VNodeModel)1