simov / express-admin

MySQL, MariaDB, PostgreSQL, SQLite admin for Node.js
MIT License
1.17k stars 223 forks source link

settings.json is overwrited each time when admin app starts #102

Open i-erokhin opened 8 years ago

i-erokhin commented 8 years ago

node version v4.3.1 OS X version 10.11.3

I just run

$ admin ./conf 

and my settings.json (located in ./conf) rollback to first-run state.

simov commented 8 years ago

That's weird. I've never experienced such thing. The configuration logic only tries to add new tables or columns, it never deletes anyhitng.

i-erokhin commented 8 years ago

My custom settings.json contains only one table, but db contains many tables, maybe it`s the problem? I'm just trying to disable other tables, and each time the application adds these tables in my settings.json.

Is this expected behavior?

simov commented 8 years ago

Yes, disabling them means you have to set mainview:show:false for each table you want to hide.

i-erokhin commented 8 years ago

Ok. What's the minimal configuration for tables what i just want to hide? (It's not covered by the docs)

UPD: i have 5000 lines in settings.json, but i want to see only five tables :) in admin

simov commented 8 years ago

You can't hide the configuration that's been generated for you. You can only use it to configure your admin.

i-erokhin commented 8 years ago

Thank you very much.

simov commented 8 years ago

I understand. Currently your best option is to use the code folding feature of your editor. For example in Sublime Text it is: Ctrl+K+2 to fold all to second indent. So using this feature you can fold to all table keys.

ashnur commented 8 years ago

I have the same issue, settings.json is overwritten on application start.

flyingsky commented 8 years ago

see this pull request https://github.com/simov/express-admin/pull/113