Пример #1
0
 void ServersManager::closeCluster(IClusterSPtr cluster)
 {
     ICluster::nodes_type nodes = cluster->nodes();
     for(int i = 0; i < nodes.size(); ++i){
         closeServer(nodes[i]);
     }
 }
Пример #2
0
 ExplorerClusterItem::ExplorerClusterItem(IClusterSPtr cluster, TreeItem* parent)
     : IExplorerTreeItem(parent), cluster_(cluster)
 {
     ICluster::nodes_type nodes = cluster_->nodes();
     for(int i = 0; i < nodes.size(); ++i){
         ExplorerServerItem* ser = new ExplorerServerItem(nodes[i], this);
         addChildren(ser);
     }
 }
Пример #3
0
    void ExplorerTreeView::addCluster(IClusterSPtr cluster)
    {
        ExplorerTreeModel *mod = static_cast<ExplorerTreeModel*>(model());
        DCHECK(mod);
        if(!mod){
            return;
        }

        ICluster::nodes_type nodes = cluster->nodes();
        for(int i = 0; i < nodes.size(); ++i){
            syncWithServer(nodes[i].get());
        }

        mod->addCluster(cluster);
    }