Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto save #1028

Closed
julien-duponchelle opened this issue Feb 12, 2016 · 10 comments
Closed

Auto save #1028

julien-duponchelle opened this issue Feb 12, 2016 · 10 comments

Comments

@julien-duponchelle
Copy link
Contributor

A user want to contribute that
https://gns3.com/discussions/gns3-auto-save

@julien-duponchelle
Copy link
Contributor Author

You will need to add this in the main window and call at a regular interval the save project function
https://github.com/GNS3/gns3-gui/blob/master/gns3/main_window.py#L463

You will need to use a QTimer:
http://ralsina.me/weblog/posts/BB974.html

After that you need to add a settings for that.
Add the settings in the UI by editing gns3/ui/general_preferences_page.ui with Qt Designer.

And after run:

python scripts/build_pyqt.py

This will generate the Python from the UI

Next add the settings to the list of the settings:
https://github.com/GNS3/gns3-gui/blob/master/gns3/settings.py#L247

After add the link the settings edit to the setting pages:
https://github.com/GNS3/gns3-gui/blob/master/gns3/pages/general_preferences_page.py#L298

After that in the main windows you can access to the general settings via _self.settings

@grossmj
Copy link
Member

grossmj commented Mar 23, 2016

Not really fond of a periodic "auto save" feature. I would prefer that GNS3 saves after key action like stopping nodes, before closing GNS3 etc.

@julien-duponchelle
Copy link
Contributor Author

Other question should we drop the save and always save after each stop and redump the .gns3 at each topology modification. Like vSphere.

For a desktop app the save is common, but for a web app generally it's auto save (See Google Docs). And if we start to have multiple users connected to the same topology the save as you will could be tricky.

By the way we already know that if you don't save after adding a device you will have orphan files in your project.

@Raizo62
Copy link

Raizo62 commented Apr 19, 2016

Not really fond of a periodic "auto save" feature. I would prefer that GNS3 saves after key action like stopping nodes, before closing GNS3 etc.

i regret the autosave of GNS3-legacy. Often, my students forget to save project before crash. When they reload project, they have an empty topology.

@grossmj
Copy link
Member

grossmj commented May 7, 2016

What should trigger the save, a request on any server? A periodic save (e.g. every minute)?

@Raizo62
Copy link

Raizo62 commented May 8, 2016

As GNS3-legacy ? we choose the periodicity.....?

@julien-duponchelle
Copy link
Contributor Author

I propose that the .gns3 is save at each action that modify the topology.

For the config perhaps we can do that differently. When we detect that the NVRAM of IOU and dynamips has change (It's the only case where we have to extract the config) and when it's change we extract the new config. It's possible on Linux with pyinotify. If we have that we have the same behavior of qemu based appliance.

@Raizo62
Copy link

Raizo62 commented May 9, 2016

"modify the topology" does it include also move object on lab ? or just add/remove ?

Save at each action does it be heavy if there are a lot of object ?

@grossmj grossmj modified the milestones: 2.1, 2.0 May 9, 2016
@julien-duponchelle
Copy link
Contributor Author

I doubt that a .gns3 could be huge since it's contain only meta data about the position of stuff.

@grossmj grossmj modified the milestones: 2.0, 2.1 May 16, 2016
@grossmj grossmj mentioned this issue May 16, 2016
@grossmj
Copy link
Member

grossmj commented May 23, 2016

We don't need an "auto save" feature because the new 2.0 will save as it goes.

@grossmj grossmj closed this as completed May 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants