Giter VIP home page Giter VIP logo

chateau's People

Contributors

baopham avatar brandondrew avatar dsernst avatar eiriksm avatar flienteen avatar neumino avatar techplexengineer avatar

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

chateau's Issues

Listen to enter

So people won't have to always click on a button.

We should listen to keypress.

Error: /usr/local/lib/node_modules/chateau/views/partials/field_add.jade:25

When running chateau with Mac OS X 10.9 mavericks, the above error was occurred with clicking "add a field".

The log generated by NODE is here.

23|             input.value(ng-model="form.value", ng-switch-when="date", type="text", value="{{dateDefault}}" )
24|             input.value(ng-model="form.value", ng-switch-when="null", disabled, type="text", value="null" )

25| textarea.value(ng-model="form.value", ng-switch-when="arbitrary value", ng-auto-expand)
26| textarea.value(ng-model="form.value", ng-switch-when="function", ng-auto-expand)
27| | function(doc) {
28| | return {

unexpected text

at Object.Lexer.fail (/usr/local/lib/node_modules/chateau/node_modules/jade/lib/lexer.js:783:11)
at Object.Lexer.next (/usr/local/lib/node_modules/chateau/node_modules/jade/lib/lexer.js:841:15)
at Object.Lexer.lookahead (/usr/local/lib/node_modules/chateau/node_modules/jade/lib/lexer.js:111:46)
at Parser.lookahead (/usr/local/lib/node_modules/chateau/node_modules/jade/lib/parser.js:109:23)
at Parser.peek (/usr/local/lib/node_modules/chateau/node_modules/jade/lib/parser.js:86:17)
at Parser.tag (/usr/local/lib/node_modules/chateau/node_modules/jade/lib/parser.js:692:22)
at Parser.parseTag (/usr/local/lib/node_modules/chateau/node_modules/jade/lib/parser.js:678:17)
at Parser.parseExpr (/usr/local/lib/node_modules/chateau/node_modules/jade/lib/parser.js:197:21)
at Parser.block (/usr/local/lib/node_modules/chateau/node_modules/jade/lib/parser.js:644:25)
at Parser.tag (/usr/local/lib/node_modules/chateau/node_modules/jade/lib/parser.js:763:26)

Could you please investigate and help me to overcome this situation ?

For previous/next

We could provide a little more links.

We may run a .count() query?

Incorrect example output for getJoin({_array: false})

On the thinky documentation page describing the _array option (http://thinky.io/documentation/api/query/#getjoin), I think the example output is wrong. The code is pasted below:

Example: Retrieve a user and the number of accounts

var User = thinky.createModel("User", {
    id: String,
    name: String
});

var Account = thinky.createModel("Account", {
    id: String,
    userId: String,
    sold: Number
});

User.hasOne(Account, "account", "id", "userId")

User.get("0e4a6f6f-cc0c-4aa5-951a-fcfc480dd05a").getJoin({
  _apply: function(seq) { return seq.count() },
  _array: false
}).run().then(function(user) {

    /*
     * user = {
     *     id: "0e4a6f6f-cc0c-4aa5-951a-fcfc480dd05a",
     *     name: "Michel",
     *     account: {
     *         id: "3851d8b4-5358-43f2-ba23-f4d481358901",
     *         userId: "0e4a6f6f-cc0c-4aa5-951a-fcfc480dd05a",
     *         sold: 2420
     *     }
     * }
     */
});

My understanding is that account should be set to the number of accounts, which should be 1, since this is a hasOne() relationship.

The output should be as below:

    /*
     * user = {
     *     id: "0e4a6f6f-cc0c-4aa5-951a-fcfc480dd05a",
     *     name: "Michel",
     *     account: 1
     * }
     */

Add a first page/last page link

While first page is easy to do, the last page is a little more tricky.

I would have to reverse the order. I'll do it after #5 to avoid having hacking things around.

Improve navigation

We are missing some links to navigate (especially back to the table view).

Cannot find the config.js file

'0.3.12'

fresh install
any command to chateau fails

--- Sites/crucialjs ‹master. M?› » chateau
# even giving it a path to the config fails
--- Sites/crucialjs ‹master. M?› » chateau -f config.js

module.js:340
    throw err;
          ^
Error: Cannot find module '../config.js'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at module.exports (/usr/local/lib/node_modules/chateau/routes/api.js:7:18)
    at module.exports (/usr/local/lib/node_modules/chateau/app.js:7:38)
    at Object.<anonymous> (/usr/local/lib/node_modules/chateau/bin/chateau:18:31)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)

the config does exist.

I even tried moving it up a directory since that is where it is looking:

--- Sites/crucialjs ‹master. M?› » mv config.js ../config.js
--- Sites/crucialjs ‹master. M?› » chateau --version

module.js:340
    throw err;
          ^
Error: Cannot find module '../config.js'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at module.exports (/usr/local/lib/node_modules/chateau/routes/api.js:7:18)
    at module.exports (/usr/local/lib/node_modules/chateau/app.js:7:38)
    at Object.<anonymous> (/usr/local/lib/node_modules/chateau/bin/chateau:18:31)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)

Date Field not Working

I just tried working with the 'Date' field in RethinkDb and wanted to add some with Chateau but this is what happened:

Error:Invalid time object constructed (invalid timezone string `"+0-2:0"`): { "$reql_type$":    "TIME", "epoch_time":   1378065967, "timezone": "+0-2:0" } in: r.db("PhindaProtoExample").table("Positions").insert(r.json("{"idUser":"6b74eb16-32e0-4a20-8304-9ac237016a37","toDateTime":{"$reql_type$":"TIME","epoch_time":1378065967,"timezone":"+0-2:0"},"fromDateTime":{"$reql_type$":"TIME","epoch_time":1378065964,"timezone":"+0-2:0"},"latitude":-2.109375,"longitude":37.840157}")) 

The text in the Textfield in Chateau is the following:

Sun Sep 01 2013 18:06:07 GMT+0-2:00

Hope this helps in resolving the issue.

Reopen a connection if closed

If the server somehow get disconnected from the database, the user will have to restart Chateau.

We should try to automatically reconnect

Write some docs about how to use

Do a screencast, or at least screenshots and write about how to use Chateau -- not that it's super complicated, but it would give a better idea to people on what Chateau is.

Fails to start when the listen port is already taken

I tried to install as instructed and get the following upon startup:

connect.multipart() will be removed in connect 3.0
visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives
connect.limit() will be removed in connect 3.0

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: listen EADDRINUSE
    at errnoException (net.js:901:11)
    at Server._listen2 (net.js:1039:14)
    at listen (net.js:1061:10)
    at net.js:1135:9
    at dns.js:72:18
    at process._tickCallback (node.js:415:13)
    at Function.Module.runMain (module.js:499:11)
    at startup (node.js:119:16)
    at node.js:902:3

Feature -- Show all fields

Some fields are not displayed (like when they are all objects).

We should have an option to display them so people can rename such fields.

RethinkDB warning and not loading

I'm getting this error:
RethinkDB warning: This syntax is deprecated. Please use run(connection[, options], callback).RethinkDB warning: This syntax is deprecated. Please use run(connection[, options], callback).undefined

Then on the page the loading indicator keeps spinning and I can't view any documents
screen shot 2014-03-28 at 10 05 24 pm

Packaging

We should do some packaging

  • Add a binary

Missing partial file?

Hey. Been meaning to test this cool tool since I saw it last week. So just had to try it when you added import/export.

But I suspect you have forgot to add the partials for table_import and table_export? :)

"add a document" does not work with fields

While adding a new table I wanted to insert some documents. But the insert seems to be broken. But it only shows a cancel and insert button (no fields to set any attributes) and if I click the insert button it inserts a new element with just the id.

The same goes for the 'edit' a object.

Is this just me?

Enhancement request, Add/ Edit should have using free textarea instead of input fields

Hi,
Thank you for creating this,
I just tried chateau, and i think this kind of admin is useful when develop new app using rethinkdb.
(I wonder why it's not built in inside the admin ui).

My feature request for chateau is
When i add, or edit document in chateau, i think it's better to use free text area to enter json string instead of html input, since we are working with developers here.

If you ever use rockmongo (kind of phpmyadmin for mongodb), i believe that's how it should implemented for no sql database.
Here is a screenshot from rockmongo
http://i.imgur.com/lOI6XxO.png

But i think this enhancement require pretty much changes in your code :)

Thank you

Error on exporting tables

Hi, Neumino

When exporting any table, the below error was happened.

/usr/local/lib/node_modules/chateau/app.js:18
throw err;
^
RqlDriverError: The hasNext command has been removed since 1.13. Use next instead.

I use rethinkdb 1.14, and chateau 0.3.11.
I just assume that this issue might be caused by the rethinkdb version changes from 1.13 to 1.14.
Could you please look at this ?

Thank you for your cooperation.

Change feedback to users

We do a poor job at giving back some feedback.

We shouldn' t use alert, and just toasts, especially in case of success.

Write docs about dates

Dates are parsed as string.

The day of the week is ignored to make things easier to set. Some docs would be nice.

SSH Support

To connect to a db with ssl, I've had to add the ssl option to api.js

r.connect({
    host: config.host,
    port: config.port,
    authKey: config.authKey,
    ssl: {
        rejectUnauthorized: false
    }
}

issue install

npm http GET https://registry.npmjs.org/chateau
npm http 304 https://registry.npmjs.org/chateau
npm http GET https://registry.npmjs.org/chateau/-/chateau-0.3.9.tgz
npm http 200 https://registry.npmjs.org/chateau/-/chateau-0.3.9.tgz
npm ERR! Error: shasum check failed for /root/tmp/npm-9528-pfp1fcJj/1395130840723-0.8476635806728154/tmp.tgz
npm ERR! Expected: ec57e011c8f49eae4948a4d4078988446ea82e4e
npm ERR! Actual: a5a22fcbe2962954b88bcdb837b1451a81675830
npm ERR! From: https://registry.npmjs.org/chateau/-/chateau-0.3.9.tgz
npm ERR! at /usr/local/lib/node_modules/npm/node_modules/sha/index.js:38:8
npm ERR! at ReadStream. (/usr/local/lib/node_modules/npm/node_modules/sha/index.js:85:7)
npm ERR! at ReadStream.EventEmitter.emit (events.js:117:20)
npm ERR! at _stream_readable.js:920:16
npm ERR! at process._tickCallback (node.js:415:13)
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/isaacs/npm/issues

npm ERR! System Linux 2.6.32-042stab084.12
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "chateau"
npm ERR! cwd /home/explorer
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.24
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/explorer/npm-debug.log
npm ERR! not ok code 0

Remove jade

Jade 3.5 and AngularJS seems to be not compatible.

I'll remove Jade and just write plain html.

error on start

This is what I'm seeing when I first load the page after starting chateau:

Error:MALFORMED PROTOBUF (Illegal Term type 170) in:
r.dbList().forEach(function(var_2) { return {x: [{db: var_2, tables: r.db(var_2).tableList().orderBy(function(var_3) { return var_3; })}]}; })("x").default([]).orderBy("database")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I'm on rethinkdb 1.13, maybe that's the cause?

.gitignore config.js?

Just a suggestion, but I personally prefer to have this kind of file in .gitignore

Instead we could have a config-template, and add an extra step in the installation guide.

This way I don't have to see my config changes as diff in git, and - more important - I don't accidentally commit some kind of sensitive data (or override with some crazy new defaults).

Let me know what you think, and I'll submit a pull request for it if you want!

And again: Awesome work!

Handle errors

I currently don't handle errors.
They are passed to the interface, but the interface doesn't do anything with it.

I'll probably implement a toast for that.

Order by field

Should we let people order by any fields? Or just the primary key ? Or just the ones with a secondary index?

Use Karma

AKA Testacular and write some tests.

Update for 1.8

Chateau doesn't work and the server crashes if there is a date object.

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.