Closed slemonide closed 3 years ago
Thank you so much for doing this work - it's a great idea! There are slight problems if switching between branches though, probably to be addressed in jhsingle-native-proxy.
With the official release, you can't switch branches without deleting the folder in the file storage and starting again (a git command fails otherwise).
I have checked in a new commit that at least works if you switch the dashboard from one branch to another... although (to avoid deleting files) it renames a lot of files with _yyyymmdd style suffixes. So you end up with a lot of rubbish after a while. Maybe it just needs to start again, or git stash in case someone has been editing files.
Ideally in this situation, the developer knows that the file area where the repo is checked out should be 'read only', but it's easy to want to try quick fixes to see what happens without pushing via the remote repo. So maybe it needs more thought.
If you get to try out the commit I made, that would be fantastic.
I haven't thought about switching between branches. I am not sure I understand how you want branch switching to be done. I tried your new commit, but I don't think it affects the branches. Can't even switch them using git branch
from a jupyter notebook terminal.
Either way, branch switching should probably done in a different pull request.
The main problem this pull request addresses is that before you couldn't even use the git form if your code was on non-master branch.
Definitely - your pull request addresses an important point, and I would like to merge it in.
By 'switching branches' I mean that to start with the user might create a dashboard specifying the 'master' branch, and then come back at a later time and change it to 'otherbranch' in the edit dashboard page, and rebuild the dashboard. At the moment that causes a dashboard failure, and I think it is something that is likely to happen a lot if your functionality is available in the UI.
To save this, I need to release my jhsingle-native-proxy changed first, and then merge in your changes to cdsdashboards.
I should be able to do this over the next week or so. Thanks for your patience!
If branch is not specified, I suppose the default from
jhsingle-native-proxy
kicks in.