officert / mongotron Goto Github PK
View Code? Open in Web Editor NEWCross platform Mongo DB management
Home Page: http://mongotron.io
License: MIT License
Cross platform Mongo DB management
Home Page: http://mongotron.io
License: MIT License
OSX: 10.10.5.
Mongotron: v1.0.0-alpha.2.
Works fine with localhost
but not 127.0.0.1
.
If you look at
https://github.com/officert/mongotron/blob/master/src/config/appConfig.js
you'll see our package.json is commented out:
// var packageJson = require('../../package.json');
var packageJson = {
version: '1.0.0-alpha.1',
name: 'Mongotron',
repository: {
url: 'https://github.com/mongotron'
}
};
If you require the package.json file when running locally it works fine using a relative path. But if you package and release the app (using gulp-release-osx) you'll find that when you try and run you get a runtime error because electron can't find the file.
Need to get packaging working for Linux. Currently we use the electron-packager module to package the app into executables.
In gulp.js is a gulp task called release. This uses the electron-packager module to package the app into executables for OSX, Windows and Linux. Currently it only supports releasing for OSX.
When you switch the platform : all and arch : all` flags, you get an error when releasing for Windows.
electronPackager({
dir: '.',
name: appConfig.name,
out: appConfig.releasePath,
// platform: 'all',
// arch: 'all',
platform: 'darwin',
arch: 'x64',
version: '0.35.0',
ignore: RELEASE_IGNORE_PKGS.map((ignore) => {
return '/node_modules/' + ignore + '($|/)';
}),
icon: RELEASE_IMAGE_ICON,
appPath: 'build/browser/main.js',
force: true
}, next);
Let us know what features you'd like to see in Mongotron:
When an object's _id property is not an ObjectId (in this case it was a string), and you try and use the inline delete button, you get an error '{"message":"objectId must be an instance of ObjectId"}'.
### Steps to reproduce:This is happening because the inline delete is pretty dumb and assumes all records have an _id property and that the property is a Mongo ObjectId().
Can we assume that records will always have an _id property?
When build release mongotron, it has Error missing package.json like below.
Error: Error: ENOENT: no such file or directory, stat 'C:\mongotron\node_modules\package.json'
Hey there,
First of all, nice job with this. Definitely comes in useful for a newbie like me with Mongo! :D
This isn't a high priority thing, but just a random suggestion from me. How about adding the different stats that you can get for a mongo collection? Things like the size of the full collection in kb/mb. Would be interesting info imo.
Add support for limit right in the query editor.
Ex.
db.Users.find({
name : 'John Doe'
}).limit(4)
Some big changes have happened to the Mongotron query editor. Before we used to manually parse the value you typed in, figure out the server, collection, and method you want to query, and use that info to call the correct node mongodb method. This method was not ideal as you'd have to write parsing logic for any additional features, like method chaining. So.....
we've changed the Mongotron editor into a full Javascript REPL!
You can now evaluate any old javascript. We now are taking your raw javascript expression and evaluating it in a sandbox that has access to some special objects. Namely the db
object.
The db
object exposes all the available collections in the database. You can access collections using dot notation or bracket notation....it's all just regular javascript. Ex.
db['some-collection-name'].find({
})
Similar issue logged on Robomongo: https://github.com/paralect/robomongo/issues/116
Remove from the release version of the application tests and packages for testing
Implement SSH Tunneling via Tunnel SSH or another SSH package available on NPM to allow connecting to a mongodb server not open to the internet.
Add support for exporting a set of query results to CSV.
Ideally this would be some kind of exporting wizard where you could enter key-value pairs for which properties you want to export, and select the file type to export as. Initially we could just support CSV export.
Given a result set that looks like this:
[{
make : 'Ford',
model : 'F150',
year : '2015'
}, {
make : 'Porsche',
model : '911',
year : '2012'
}, {
make : 'Fiat',
model : '500',
year : '2014'
}]
The wizard would allow you to enter key-value pairs like this:
[{
key : 'Name', //header name in the CSV
value : 'name' //property name from result set
}, {
key : 'Model',
value : 'model'
}, {
key : 'Year',
value : 'year'
}]
Which would export a csv like this:
Make,Model,Year
Ford,F150,2015
Porsche,911,2012
Fiat,500,2014
Add support for editing a document in a modal.
Add context-menu so when you right-click on a document in any results view you'll see an 'Edit Document' options which will open the modal.
Add a menu button in the hover menu with a pencil icon to launch the modal.
I've spent a little bit of time looking into how to do this but I'm pretty new to electron to the point that I have no idea where to do this..
Basically, is there anyway to ad a right-click feature when we're in a development environment so that we can inspect element on specific divs?
I found this and it looks like what we need but I'm not sure how to implement it quite yet.
Add support for chainable methods off a query.
Chainable methods to support:
Ex.
db.Users.find({
name : 'John Doe'
}).sort({
name : -1
}).limit(22)
Obviously this is low priority, but Windows users tend to like to interact with programs through installers. This looks like a promising plugin to generate them with gulp.
If you're interested in supporting this I wouldn't mind submitting a PR.
Branch: Master
Steps to reproduce:
New Collection
option. Enter a name and save it.We aren't actually creating the collection here, so unless you use it and insert a document the collection doesn't get created. We need to call _dbConnection.createCollection(name)
.
Installing dependencies with npm install
fails on freshly cloned repo due to JSHint not being required locally. Adding JSHint to be installed locally "jshint": "2.9.1-rc1"
in package.json or npm --save-dev jshint
lets setup complete successfully.
$ git clone https://github.com/officert/mongotron.git; cd mongotron/
Cloning into 'mongotron'...
remote: Counting objects: 6056, done.
remote: Total 6056 (delta 0), reused 0 (delta 0), pack-reused 6056
Receiving objects: 100% (6056/6056), 5.23 MiB | 2.43 MiB/s, done.
Resolving deltas: 100% (3918/3918), done.
Checking connectivity... done.
radiance at satori in ~/_scrap/mongotron on master
$ npm i
> [email protected] install /home/radiance/_scrap/mongotron/node_modules/bufferutil
> node-gyp rebuild
make: Entering directory '/home/radiance/_scrap/mongotron/node_modules/bufferutil/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/obj.target/bufferutil.node
COPY Release/bufferutil.node
make: Leaving directory '/home/radiance/_scrap/mongotron/node_modules/bufferutil/build'
> [email protected] install /home/radiance/_scrap/mongotron/node_modules/utf-8-validate
> node-gyp rebuild
make: Entering directory '/home/radiance/_scrap/mongotron/node_modules/utf-8-validate/build'
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/obj.target/validation.node
COPY Release/validation.node
make: Leaving directory '/home/radiance/_scrap/mongotron/node_modules/utf-8-validate/build'
> [email protected] postinstall /home/radiance/_scrap/mongotron/node_modules/electron-prebuilt
> node install.js
> [email protected] postinstall /home/radiance/_scrap/mongotron
> gulp dev-sym-links
module.js:328
throw err;
^
Error: Cannot find module 'jshint/src/cli'
at Function.Module._resolveFilename (module.js:326:15)
at Function.Module._load (module.js:277:25)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/home/radiance/_scrap/mongotron/node_modules/gulp-jshint/src/extract.js:1:79)
at Module._compile (module.js:398:26)
at Object.Module._extensions..js (module.js:405:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN [email protected] requires a peer of kerberos@~0.0 but none was installed.
npm WARN [email protected] requires a peer of [email protected] but none was installed.
npm WARN [email protected] requires a peer of jasmine-core@* but none was installed.
npm WARN [email protected] requires a peer of phantomjs@>=1.9 but none was installed.
npm ERR! Linux 4.1.15-1-lts
npm ERR! argv "/usr/bin/node" "/usr/sbin/npm" "i"
npm ERR! node v5.3.0
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] postinstall: `gulp dev-sym-links`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'gulp dev-sym-links'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the Mongotron package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! gulp dev-sym-links
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs Mongotron
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls Mongotron
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/radiance/_scrap/mongotron/npm-debug.log
Packing & running the app further on Arch Linux worked without a hitch once this was taken care of.
Currently Google Chrome is detecting the Darwin download as malicious.
C:\Users\abc\WebstormProjects\Html5AndCss3\mongotron\mongotron>npm install
npm WARN install Couldn't install optional dependency: Unsupported
[email protected] postinstall C:\Users\abc\WebstormProjects\Html5AndCss3\mongotron\mongotron
gulp dev-sym-links
fs.js:584
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT: no such file or directory, open
C:\Users\abc\WebstormProjects\Html5AndCss3\mongotron\mongotron\node_modules\electron-prebuilt\path.txt'
at Error (native)
at Object.fs.openSync (fs.js:584:18)
at Object.fs.readFileSync (fs.js:431:33)
at Object. (C:\Users\abc\WebstormProjects\Html5AndCss3\mongotron\mongotron\node_modules\electron-prebuilt\index.js:4:42)
at Module._compile (module.js:398:26)
at Object.Module._extensions..js (module.js:405:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object. (C:\Users\abc\WebstormProjects\Html5AndCss3\mongotron\mongotron\gulpfile.js:16:18)
at Module._compile (module.js:398:26)
at Object.Module._extensions..js (module.js:405:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
npm WARN EPEERINVALID [email protected] requires a peer of kerberos@~0.0 but none was installed.
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! node v5.3.0
npm ERR! npm v3.3.12
npm ERR! code ELIFECYCLE
npm ERR! [email protected] postinstall: gulp dev-sym-links
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'gulp dev-sym-links'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the Mongotron package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! gulp dev-sym-links
npm ERR! You can get their info via:
npm ERR! npm owner ls Mongotron
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\abc\WebstormProjects\Html5AndCss3\mongotron\mongotron\npm-debug.log
System Windows 8.1
Nodejs : 5.3.0
Npm:3.3.12
I am trying to run a query on a collection with the name mongo-test
, and mongotron will automatically generate the following query for me:
db.mongo-test.find({
})
Then, it will complain that "Sorry, mongo is not a valid collection name" and not run any specified query. Changing the syntax to
db["mongo-test"].find({ ... })
doesn't work either, then it will complain this is not a valid query.
https://coveralls.io/github/officert/mongotron?branch=master
Over code coverage is currently at 75%. Would like to get it over 80% (into the green) before the v1.0.0 release.
If you pull the source down and run
make coverage
this will run all the tests and generate a coverage report using Istanbul. In the app's root directory you should now have a coverage
folder. Open the report at coverage/lcov-report/index.html
. This will show you were we are lacking tests and need to fill in.
Add support for changing the current collection in a query tab. Introduce a db
object, with access to all collections in a given database.
Similar to Robomongo's way of querying.
Ex. a database with these collections:
Typing db
would show an auto complete menu containing:
db.Users
db.Images
db.Accounts
All Mongo query types would be available off the collection:
db.Users.find({...})
This would allow you to quickly switch between collections without having to find an open a new query tab for the collection.
I love the mongotron UI, but it fails connecting to Meteor's Mongo Database
host: 127.0.0.1
port: 3001
username and password are empty.
OSX: 10.10.5.
Mongotron: v1.0.0-alpha.2.
Mongotron throws the following error when trying to access only one of my many local collections:
Error opening database
{"message":"field missing/wrong type in received authenticate command"}
The native Mongo CLI allows for this notation in case the collection name contains otherwise 'illegal' characters (for the JS dot notation, for accessing attributes). Would be great if you could adjust mongotron to allow this query.
Why not creating an executable so people can try it out more easily?
When i try to connect database in MongoLab (MongoDB 3.0) occurs this error:
Error opening database
{"message":"data.copy is not a function"}
v1.0.0-alpha.2
Need to get packaging working for Windows. Currently we use the electron-packager
module to package the app into executables.
In gulp.js
is a gulp task called release
. This uses the electron-packager
module to package the app into executables for OSX, Windows and Linux. Currently it only supports releasing for OSX.
When you switch the platform : all
and `arch : all`` flags, you get an error when releasing for Windows.
electronPackager({
dir: '.',
name: appConfig.name,
out: appConfig.releasePath,
// platform: 'all',
// arch: 'all',
platform: 'darwin',
arch: 'x64',
version: '0.35.0',
ignore: RELEASE_IGNORE_PKGS.map((ignore) => {
return '/node_modules/' + ignore + '($|/)';
}),
icon: RELEASE_IMAGE_ICON,
appPath: 'build/browser/main.js',
force: true
}, next);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.