예제 #1
0
        public IActionResult OnGetFields(string mongo, string db, string col)
        {
            var mongoclient = new Mongo2Es.Mongo.MongoClient(mongo);
            var cols        = mongoclient.ListFields(db, col);

            return(new JsonResult(new { m = 0, d = cols, e = "" }));
        }
예제 #2
0
        public IActionResult OnGetCols(string mongo, string db)
        {
            var mongoclient = new Mongo2Es.Mongo.MongoClient(mongo);
            var cols        = mongoclient.ListCollections(db);

            return(new JsonResult(new { m = 0, d = cols, e = "" }));
        }
예제 #3
0
        public IActionResult OnGetDBs(string mongo)
        {
            var mongoclient = new Mongo2Es.Mongo.MongoClient(mongo);
            var dbs         = mongoclient.ListDataBases();
            var dbNames     = dbs.Select(x => x["name"].AsString).Where(x => !x.Equals("admin", StringComparison.CurrentCultureIgnoreCase) && !x.Equals("local", StringComparison.CurrentCultureIgnoreCase));

            return(new JsonResult(new { m = 0, d = dbNames, e = "" }));
        }
예제 #4
0
 public LogsModel(Mongo2Es.Mongo.MongoClient db)
 {
     _db = db;
 }
 public IndexModel(Mongo2Es.Mongo.MongoClient db)
 {
     _db = db;
 }
예제 #6
0
 public EditModel(Mongo2Es.Mongo.MongoClient db)
 {
     _db = db;
 }
 public DetailModel(Mongo2Es.Mongo.MongoClient db)
 {
     _db = db;
 }