Package lcmc.cluster.ui

Examples of lcmc.cluster.ui.ClusterBrowser$DRBDMenuItemCallback


        return hostMenu.getPulldownMenu(this);
    }

    @Override
    public JPanel getGraphicalView() {
        final ClusterBrowser b = getBrowser().getClusterBrowser();
        if (b == null) {
            return null;
        }
        return b.getServicesInfo().getGraphicalView();
    }
View Full Code Here


        }
        return null;
    }

    public boolean isStandby(final Application.RunMode runMode) {
        final ClusterBrowser b = getBrowser().getClusterBrowser();
        return b != null && b.isStandby(host, runMode);
    }
View Full Code Here

        final ClusterBrowser b = getBrowser().getClusterBrowser();
        return b != null && b.isStandby(host, runMode);
    }

    ClusterStatus getClusterStatus() {
        final ClusterBrowser b = getBrowser().getClusterBrowser();
        if (b == null) {
            return null;
        }
        return b.getClusterStatus();
    }
View Full Code Here

            return getBlockDevice().isDiskless();
        }
    }

    DRBDtestData getDRBDtestData() {
        final ClusterBrowser b = getBrowser().getClusterBrowser();
        if (b == null) {
            return null;
        }
        return b.getDRBDtestData();
    }
View Full Code Here

        }
        return b.getDRBDtestData();
    }

    void setDRBDtestData(final DRBDtestData drbdtestData) {
        final ClusterBrowser b = getBrowser().getClusterBrowser();
        if (b == null) {
            return;
        }
        b.setDRBDtestData(drbdtestData);
    }
View Full Code Here

    public void setParameters(final String resName) {
        application.isSwingThread();
        getBlockDevice().setNew(false);

        final ClusterBrowser clusterBrowser = getBrowser().getClusterBrowser();
        if (clusterBrowser == null) {
            return;
        }
        final VolumeInfo dvi = volumeInfo;
        if (dvi == null) {
            return;
        }
        final DrbdXml dxml = clusterBrowser.getDrbdXml();
        final String hostName = getHost().getName();
        final DrbdGraph drbdGraph = getBrowser().getDrbdGraph();
        Value value = null;
        final String volumeNr = dvi.getName();
        for (final String param : getParametersFromXML()) {
View Full Code Here

        if (oldInfos.isEmpty()) {
            return;
        }
        final String cn = getBrowser().getCluster().getName();
        guiData.startProgressIndicator(cn, "paste");
        final ClusterBrowser otherBrowser = (ClusterBrowser) oldInfos.get(0).getBrowser();
        getBrowser().getClusterViewPanel().setDisabledDuringLoad(true);
        otherBrowser.getClusterViewPanel().setDisabledDuringLoad(true);
        for (Info oldI : oldInfos) {
            CloneInfo oci = null;
            if (oldI instanceof CloneInfo) {
                oci = (CloneInfo) oldI;
                oldI = oci.getContainedService();
            }
            final CloneInfo oldCi = oci;
            if (oldI instanceof ServiceInfo) {
                final ServiceInfo oldSi = (ServiceInfo) oldI;
                final ServiceInfo newSi =
                    addServicePanel(oldSi.getResourceAgent(),
                                    null, /* pos */
                                    true,
                                    null, /* clone id */
                                    null,
                                    Application.RunMode.LIVE);
                application.invokeLater(new Runnable() {
                    @Override
                    public void run() {
                        if (!(newSi instanceof CloneInfo)) {
                            oldSi.getInfoPanel();
                            newSi.getInfoPanel();
                            oldSi.waitForInfoPanel();
                            newSi.waitForInfoPanel();
                        }
                        if (oldCi != null) {
                            final Value v = newSi.getTypeRadioGroup().getValue();
                            if (oldCi.getService().isMaster()) {
                                if (!ServiceInfo.MASTER_SLAVE_TYPE_STRING.equals(v)) {
                                    newSi.getTypeRadioGroup().setValue(ServiceInfo.MASTER_SLAVE_TYPE_STRING);
                                }
                            } else {
                                if (!ServiceInfo.CLONE_TYPE_STRING.equals(v)) {
                                    newSi.getTypeRadioGroup().setValue(ServiceInfo.CLONE_TYPE_STRING);
                                }
                            }
                        }
                        copyPasteFields(oldSi, newSi);
                    }
                });

                /* clone parameters */
                final CloneInfo newCi = newSi.getCloneInfo();
                if (newCi != null) {
                    for (final String param : oldCi.getParametersFromXML()) {
                        if (ServiceInfo.GUI_ID.equals(param) || ServiceInfo.PCMK_ID.equals(param)) {
                            if (getBrowser().isCrmId(oldCi.getService().getCrmId())) {
                                continue;
                            }
                        }
                        application.invokeLater(new Runnable() {
                            @Override
                            public void run() {
                                copyPasteField(oldCi.getWidget(param, null), newCi.getWidget(param, null));
                            }
                        });
                    }
                }
                if (oldI instanceof GroupInfo) {
                    final GroupInfo oldGi = (GroupInfo) oldI;
                    final GroupInfo newGi = (GroupInfo) newSi;

                    application.invokeInEdt(new Runnable() {
                        @Override
                        public void run() {
                            for (final Info info : treeMenuController.nodesToInfos(oldGi.getNode().children())) {
                                final ServiceInfo oldChild = (ServiceInfo) info;
                                oldChild.getInfoPanel();
                                final ServiceInfo newChild =
                                        newGi.addGroupServicePanel(oldChild.getResourceAgent(), false);
                                newChild.getInfoPanel();
                                copyPasteFields(oldChild, newChild);
                            }
                            treeMenuController.reloadNode(newGi.getNode(), false);
                        }
                    });
                }
            }
        }
        guiData.stopProgressIndicator(cn, "paste");
        otherBrowser.getClusterViewPanel().setDisabledDuringLoad(false);
        getBrowser().getClusterViewPanel().setDisabledDuringLoad(false);
    }
View Full Code Here

                          })
                          .sshCommandTimeout(Ssh.DEFAULT_COMMAND_TIMEOUT_LONG));
    }

    final void installationDone() {
        final ClusterBrowser clusterBrowser = getHost().getBrowser().getClusterBrowser();
        if (clusterBrowser != null) {
            clusterBrowser.getHostDrbdParameters().clear();
            final GlobalInfo globalInfo = clusterBrowser.getGlobalInfo();
            globalInfo.clearPanelLists();
            globalInfo.updateDrbdInfo();
            globalInfo.resetInfoPanel();
            globalInfo.getInfoPanel();
        }
View Full Code Here

    private void appendCibText(StringBuffer text, Cluster cluster) {
        text.append("= ").append(CONFIG_CIB).append(" =\n");
        if (configCheckBoxMap.get(CONFIG_CIB).isSelected()) {
            String cib = null;
            final ClusterBrowser cb = cluster.getBrowser();
            if (cb != null) {
                final ClusterStatus cs = cb.getClusterStatus();
                if (cs != null) {
                    cib = cs.getCibXml();
                }
            }
            if (cib == null) {
View Full Code Here

    }

    private void appendDrbdText(StringBuffer text, Cluster cluster) {
        text.append("\n\n= ").append(CONFIG_DRBD).append(" =\n");
        if (configCheckBoxMap.get(CONFIG_DRBD).isSelected()) {
            final ClusterBrowser cb = cluster.getBrowser();
            String cib = null;
            if (cb != null) {
                final DrbdXml drbdXml = cb.getDrbdXml();
                if (drbdXml != null) {
                    cib = drbdXml.getOldConfig();
                }
            }
            if (cib == null) {
View Full Code Here

TOP

Related Classes of lcmc.cluster.ui.ClusterBrowser$DRBDMenuItemCallback

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.