Package lcmc.drbd.ui.resource

Examples of lcmc.drbd.ui.resource.HostDrbdInfo


                return icons;
            } else {
                return icons;
            }
        } else {
            final HostDrbdInfo hi = vertexToHostMap.get(v);
            if (hi == null) {
                return null;
            }
            if (hi.getHost().isDrbdStatusOk() && hi.getHost().isDrbdLoaded()) {
                icons.add(HostBrowser.HOST_ON_ICON_LARGE);
            } else {
                icons.add(HostBrowser.HOST_ICON_LARGE);
            }
            return icons;
View Full Code Here


            final BlockDevInfo bdi = (BlockDevInfo) getInfo(v);
            if (bdi != null) {
                return bdi.getIconTextForGraph(runMode);
            }
        } else {
            final HostDrbdInfo hi = vertexToHostMap.get(v);
            if (hi != null) {
                return hi.getIconTextForDrbdGraph(runMode);
            }
        }
        return null;
    }
View Full Code Here

            if (bdi != null) {
                return bdi.getRightCornerTextForDrbdGraph(runMode);

            }
        } else {
            final HostDrbdInfo hi = vertexToHostMap.get(v);
            if (hi != null) {
                return hi.getRightCornerTextForDrbdGraph(runMode);
            }
        }
        return null;
    }
View Full Code Here

                    new ColorText(Tools.join(" / ", new String[]{connState, diskState, diskStateOther, proxyState}),
                                color,
                                textColor)};
            }
        } else {
            final HostDrbdInfo hi = vertexToHostMap.get(v);
            if (hi != null) {
                return hi.getSubtextsForDrbdGraph(runMode);
            }
        }
        return null;
    }
View Full Code Here

    }

    /** Is called of a host is picked. Its terminal panel is set to view. */
    private void pickHost(final Vertex v) {
        pickVertex(v);
        final HostDrbdInfo hi = vertexToHostMap.get(v);
        if (hi == null) {
            return;
        }
        guiData.setTerminalPanel(hi.getHost().getTerminalPanel());
    }
View Full Code Here

            getClusterBrowser().getGlobalInfo().setSelectedNode(bdi);
            getClusterBrowser().getGlobalInfo().selectMyself();
            getClusterBrowser().setRightComponentInView(bdi);
        } else {
            pickHost(v);
            final HostDrbdInfo hi = vertexToHostMap.get(v);
            if (hi == null) {
                return;
            }
            getClusterBrowser().setRightComponentInView(hi);
        }
View Full Code Here

     * Returns fill color as paint object for for specified block device
     * vertex.
     */
    @Override
    protected Color getVertexFillColor(final Vertex v) {
        final HostDrbdInfo hi = vertexToHostMap.get(v);
        final Vertex hostVertex = getVertex(hi);
        if (v.equals(hostVertex)) {
            return hi.getHost().getDrbdColors()[0];
        } else if (hi != null &&
                   (hi.getHost() == null || (!hi.getHost().isDrbdStatusOk() && hi.getHost().isDrbdLoaded()))) {
            return Tools.getDefaultColor("DrbdGraph.FillPaintUnknown");
        } else {
            if (!isVertexDrbd(v)) {
                if (isVertexAvailable(v)) {
                    return super.getVertexFillColor(v);
View Full Code Here

     * represented as a string and returns it.
     * TODO: move it to BlockDevInfo
     */
    public BlockDevInfo findBlockDevInfo(final String hostName,
                                         final String disk) {
        HostDrbdInfo hi = null;
        for (final HostDrbdInfo h : hostBDVerticesMap.keySet()) {
            hi = h;
            if (hi.toString().equals(hostName)) {
                break;
            }
        }
        if (hi == null) {
            return null;
View Full Code Here

    @Override
    protected String getId(final Info i) {
        final Vertex v = getVertex(i);
        String hiId = "";
        if (v != null) {
            final HostDrbdInfo hi = vertexToHostMap.get(v);
            if (hi != null) {
                hiId = hi.getId();
            }
        }
        return "dr=" + hiId + i.getId();
    }
View Full Code Here

            if (bdi == null) {
                return 0;
            }
            return bdi.getUsed();
        }
        final HostDrbdInfo hi = vertexToHostMap.get(v);
        if (hi == null) {
            return 0;
        } else {
            return hi.getUsed();
        }
    }
View Full Code Here

TOP

Related Classes of lcmc.drbd.ui.resource.HostDrbdInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.