vital2 / Vital-development

MIT License
18 stars 11 forks source link

Source Code Cleaning/ Revamping #64

Open sahiilll opened 4 years ago

sahiilll commented 4 years ago

Following are my findings while working on the database revamping issue:

Points can be further added to remove any of such trash from the code

sahiilll commented 4 years ago

This is regarding the terminal_port. Following are the references to the attribute:

cd /home/vital/vital2.0/source/virtual_lab/vital_site/ grep -r "terminal_port" ./

IN TEMPLATES static html files

  1. /templates/vital/terminal.html : There are no working references to this file. I believe this is an old file which should be removed. Please Verify and confirm.

  2. /templates/vital/virtual_machines.html: The reference to "terminal_port" is under the if loop condition where it checks if the display server is SPICE or not. We have not been using SPICE server for long. Removing this reference from code would mean backtracking to SPICE server calls to make sure it does not get to this loop to avoid errors. Kindly confirm and proceed.

  3. /templates/vital/console-spice.html: this should be removed as well if not in use.

  4. /templates/vital/console-vnc.html:

OLD METHOD ( NON tokenized vnc window ) This one is even trickier. The console-vnc.html is being called by "console" view function. The console view function is supposed to fetch the terminal_port from database and pass it to the console-vnc.html. And then vnc-console.html opens up a new window with