Exemple #1
0
        /// <summary>
        /// </summary>
        /// <param name="DBTag"></param>
        /// <returns></returns>
        public static string GetConnection(String DBTag)
        {
            RuntimeMongoDBContext.SelectObjectTag = DBTag;
            var cr = CommandHelper.ExecuteMongoSvrCommand(CommandHelper.serverStatus_Command,
                                                          RuntimeMongoDBContext.GetCurrentServer()).Response;

            return(WEBUIHelper.ConvertBsonTozTreeJson("Connection Status", cr, true));
        }
Exemple #2
0
 /// <summary>
 /// </summary>
 /// <param name="DBTag"></param>
 /// <returns></returns>
 public static string GetCollection(String DBTag)
 {
     WEBUIHelper.WebDataViewInfo = new DataViewInfo {
         strDBTag = DBTag
     };
     RuntimeMongoDBContext.SelectObjectTag = DBTag;
     return(WEBUIHelper.GetCollectionzTreeJSON(RuntimeMongoDBContext.GetCurrentServer()));
 }
Exemple #3
0
        /// <summary>
        /// </summary>
        /// <param name="DBTag"></param>
        /// <returns></returns>
        public static string GetDatabase(String DBTag)
        {
            RuntimeMongoDBContext.SelectObjectTag = DBTag;
            var cr = new BsonDocument();

            cr = RuntimeMongoDBContext.GetCurrentDataBase().GetStats().Response.ToBsonDocument();
            return(WEBUIHelper.ConvertBsonTozTreeJson("DataBase Status", cr, true));
        }
Exemple #4
0
        /// <summary>
        /// </summary>
        /// <param name="ConnectionName"></param>
        /// <returns></returns>
        internal static string Connection(String ConnectionName)
        {
            var FileName = FilePath + "\\Connection.htm";
            var content  = String.Empty;
            var stream   = new StreamReader(FileName);

            content = stream.ReadToEnd();

            var connLst = new List <MongoConnectionConfig>
            {
                RuntimeMongoDBContext._mongoConnectionConfigList[ConnectionName]
            };

            RuntimeMongoDBContext.ResetConnectionList(connLst);
            content = content.Replace("<%=NodeJSon%>", WEBUIHelper.GetConnectionzTreeJson());
            content = content.Replace("<%=ConnectionName%>", ConnectionName);
            content = content.Replace("<%=ConnectionTag%>", ConstMgr.CONNECTION_TAG);
            content = content.Replace("<%=DataBaseTag%>", ConstMgr.DATABASE_TAG);
            content = content.Replace("<%=CollectionTag%>", ConstMgr.COLLECTION_TAG);
            return(content);
        }