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 = "" })); }
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 = "" })); }
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 = "" })); }
public LogsModel(Mongo2Es.Mongo.MongoClient db) { _db = db; }
public IndexModel(Mongo2Es.Mongo.MongoClient db) { _db = db; }
public EditModel(Mongo2Es.Mongo.MongoClient db) { _db = db; }
public DetailModel(Mongo2Es.Mongo.MongoClient db) { _db = db; }