public static List <ElasticAlias> ToList(ICatResponse <CatAliasesRecord> aliasesRecords)
        {
            var lst = new List <ElasticAlias>();

            foreach (var item in aliasesRecords.Records)
            {
                ElasticAlias ea = AutoMapper.Mapper.Map <ElasticAlias>(item);
                lst.Add(ea);
            }

            return(lst);
        }
示例#2
0
        private void PopulateConnectionEntities()
        {
            using (var access = GetElasticAccess()) {
                ClearTree();

                List <ElasticIndex> indexList = ElasticIndex.ToList(access.IndexList());
                RenderIndexes(indexList);

                List <ElasticAlias> aliasList = ElasticAlias.ToList(access.AliasList());
                RenderAliases(aliasList);

                // apply aliases to indexes
                ApplyAliasesToIndexes(indexList, aliasList);
            }
        }
示例#3
0
        private void PopulateConnectionEntities()
        {
            using (var access = GetElasticAccess()) {
                ClearTree();

                List <ElasticIndex> indexList = ElasticIndex.ToList(access.IndexListExtended());
                //List<ElasticIndex> indexList = ElasticIndex.ToList(access.IndexList());
                RenderIndexes(indexList);

                List <ElasticAlias> aliasList = ElasticAlias.ToList(access.AliasList());
                RenderAliases(aliasList);

                // apply aliases to indexes
                ApplyAliasesToIndexes(indexList, aliasList);

                // add a Tasks node
                var parentNode = treeEntities.Nodes.Add("Tasks");
            }
        }