neumino / chateau Goto Github PK
View Code? Open in Web Editor NEWAnother (awesome) data explorer for RethinkDB
Another (awesome) data explorer for RethinkDB
Let people delete/rename fields on the table view.
Deleting a field meaning removing the field in all documents.
So people won't have to always click on a button.
We should listen to keypress.
Let users add a field for all documents -- since they can delete/update it.
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 ?
We could provide a little more links.
We may run a .count() query?
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
* }
*/
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.
We are missing some links to navigate (especially back to the table view).
'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)
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.
Like in phpmyadmin.
If you have another array or object in an array, this is shown as a string in gui, and not as another array/object..
If the server somehow get disconnected from the database, the user will have to restart Chateau.
We should try to automatically reconnect
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.
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
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.
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
They are critical operations and should not be directly available.
Drop down maybe?
!!!
is deprecated, you must now use doctype
The css file somehow becomes a little messy.
Let's clean it
The title says it all
It lacks colors.
Let's give it some love.
We should use directives in some cases instead of tweaking stuff in the controllers.
To make things a little nicer
We should do some packaging
Let users import data
Instead of a plain text when doing http requests.
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? :)
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?
getAttr doesn't get enough arguments.
Investigating...
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
To be consistent.
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.
When updating/adding a document, users shouldn't be able to have duplicate fields.
We do a poor job at giving back some feedback.
We shouldn' t use alert, and just toasts, especially in case of success.
Dates are parsed as string.
The day of the week is ignored to make things easier to set. Some docs would be nice.
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
}
}
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
Jade 3.5 and AngularJS seems to be not compatible.
I'll remove Jade and just write plain html.
If the user comes from a database view.
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?
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!
It used to work :/
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.
Should we let people order by any fields? Or just the primary key ? Or just the ones with a secondary index?
AKA Testacular and write some tests.
awesome work man, could we have a way to search or filter data ?
Chateau doesn't work and the server crashes if there is a date object.
Let users export a table
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.