express-admin icon indicating copy to clipboard operation
express-admin copied to clipboard

settings.json is overwrited each time when admin app starts

Open i-erokhin opened this issue 9 years ago • 9 comments
trafficstars

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.

i-erokhin avatar Mar 10 '16 13:03 i-erokhin

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

simov avatar Mar 10 '16 13:03 simov

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?

i-erokhin avatar Mar 10 '16 13:03 i-erokhin

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

simov avatar Mar 10 '16 14:03 simov

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

i-erokhin avatar Mar 10 '16 14:03 i-erokhin

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

simov avatar Mar 10 '16 14:03 simov

Thank you very much.

i-erokhin avatar Mar 10 '16 14:03 i-erokhin

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.

simov avatar Mar 10 '16 19:03 simov

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

ashnur avatar Apr 07 '16 10:04 ashnur

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

flyingsky avatar Aug 03 '16 14:08 flyingsky