Giter Site home page Giter Site logo

mongotron's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mongotron's Issues

Executable

Why not creating an executable so people can try it out more easily?

Query result row cells overflow

screen shot 2016-01-18 at 9 28 50 am

This could be a problem for any cell that contains a single word (no breaks) that is longer that the width of the cell. Should add CSS similar to how the tab overflow works.

Opening to Meteor FS collection fail

Hi ! This looks awesome.
Unfortunately the interface throw error while trying to open :

db.cfs.images.filerecord.find

See error attached.

Thanks for this great project !

capture d ecran 2016-01-31 a 22 38 50

Error opening database

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

gulp release issue

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'

Cannot query collection with "-" in the name

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.

SSH Tunnel Support

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.

Failed at the [email protected] postinstall script 'gulp dev-sym-links'.

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

Note :

System Windows 8.1
Nodejs : 5.3.0
Npm:3.3.12

Click remove button but not reload

I thought it still not remove the connection
so I clicked again, and it showed the error.

and the reason why is
when I click the remove button, it removed the connection.
But the screen still not reload (or return to connections list)

2015-12-29 4 04 34

Support chainable methods of a query

Add support for chainable methods off a query.

Chainable methods to support:

  • limit
  • skip

Ex.

db.Users.find({
    name : 'John Doe'
}).sort({
    name : -1
}).limit(22)

Deleted database showing in UI

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"}

Tabs title text overflows

Release: v1.0.0-alpha.2
OS: OS X v10.10.5

With multiple tabs opened the title text overflows, same thing happens when you resize the application window (no constraints). The Settings tab is a special case since it has an icon before the text.

captura de pantalla 2015-12-23 a las 3 22 56 p m

Feature request: Stats for collections

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.

Right Click -> Inspect Element

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.

Releasing for Linux

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);

Refresh collections in sidebar

In the sidebar, in the collection's context menu (right-click to open) we should add a refresh option. This should re-fetch the collections for the database.

screen-shot-2016-02-03-at-7 25 49-pm

Windows Installer

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.

Error when updating using modal document editor

Branch: Master

Steps:

  1. Open a tab and query a collection
  2. Hover over a document and click the โœ๏ธ icon in the left hand corner
  3. Click the Save button in the modal that comes up
  4. You should see an error like this:

screen shot 2016-02-03 at 7 13 49 pm

JSHint not listed in npm dependencies breaks `npm install`

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.

MongoDB REPL API

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!

screen shot 2016-02-03 at 7 43 34 pm

screen shot 2016-02-03 at 7 39 05 pm

screen shot 2016-02-03 at 7 39 26 pm

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({
})

Meteor Mongo Connection

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.

New collection content-menu option should actually create the collection

Branch: Master

Steps to reproduce:

  1. Connect to a server
  2. In the sidebar open the server, and right-click on a database
  3. Click the 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).

Releasing for Windows

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);

Figure out how to load package.json without blowing up when releasing on OSX

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.

Get test coverage to at least 80%

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.

Refresh databases in the sidebar

In the sidebar, in the database's context menu (right-click to open) we should add a refresh option. This should re-fetch the databases for the server.

screen-shot-2016-02-03-at-7 25 49-pm

Using db['collection-name'].find({}) doesn't work.

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.

Change current collection in tabs via new 'db' object

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:

  1. Users
  2. Images
  3. Accounts

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.

Cannot use inline delete button to delete when the records _id property is not an ObjectId

Description:

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"}'.

screen shot 2015-11-30 at 1 31 14 pm

### Steps to reproduce:
  1. Insert a new object into a collection. Instead of a Mongo ObjectId() for the _id property, use a regular string.
  2. Do a find() query on the collection, find the object and hover over it to show the hover menu.
  3. Click on the 'X' button to try and delete the record.
  4. You should get an error with the message : '{"message":"objectId must be an instance of ObjectId"}'

Notes:

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?

Editing documents

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.

Exporting a set of query results to CSV

Add support for exporting a set of query results to CSV.

screen shot 2015-12-02 at 9 24 17 am

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.