Closed macedot closed 7 years ago
Have you actually tested your changes?
Yes, i've test it and it's running fine since yesterday at our serve: http://i.imgur.com/JHzek0b.png not using docker image due port forwarding issue i've posted.
Other pull request from veny may conflict with some changes here.
Yeah I have seen that, but your pull request fixes some issues with the current version, so I'll merge it tomorrow.
I've adapted venyii pull #25.
I've also changed cfg config and ini path generation to exported methods inside instance package.
@venyii Maybe you want to add an error message to the UI if an error occures while creating the zip file on download.
Umm.... why was #25 cherry-picked (and changed) in this PR?
I don't know, maybe @macedot should just remove that one commit from this branch, if still possible.
Because @venyii changed write ini into a create ini buffer. Even though the same logic was applied to both download and save process, it would not be consistent: downloading ini files would result in "downloading reconstructed ini", not current ini in use.
Say you've started a server with config (A0) Then you change something at config A so now it differs (A1) Using @venyii commit, download process would reconstruct A1, but current instance is running with A0.
From my perspective, user would like to Download currently in-use ini, not Export most up-to-date instance config.
My plan was to download the latest saved version of a configuration which is 'rebuilt' fresh from the DB on every download.
We could add a download button on the configuration and on the instances page. The one on the instances page downloads the configuration in use and the one on the configuration page downloads the lastest configuration.
I've finished coding merge from @venyii commit. I've reverted back into its code and extended the interface as requested. I've also created the button into instance page to download current instance files using @venyii code. I'm finishing tests on it. should be done soon.
Finally, it is done :)
i hereby declare to whom it may concern that i'll stop making changes in master without branching first.
Both zip files from ini files from instance and current configuration state will be generated with same name, coz it inherit from config.name. Maybe it shall add instance name to it in the future.
:o)
Job's done. :)
Thanks for the work @macedot and continuing the download PR 👍
Last code didn't pass custom ini files for acServer at the command line.
This commit also moves ini creation for /config/ instead of cfg (const).
json can be ignored. (sry :)