NETRAVE/lib/utils/gui_launcher.rb

41 lines
966 B
Ruby
Raw Permalink Normal View History

Major Refactoring and Feature Addition for Improved User Experience and Code Quality This commit includes several significant changes aimed at improving the functionality, user experience, and code quality of our Ruby project. 1. Decryption Fix: We identified and resolved an issue where the database password was being decrypted multiple times, leading to connection problems. The code was refactored to ensure that decryption only occurs once, thereby enhancing the efficiency and reliability of our database connections. 2. Infinite Loop Resolution: We addressed a critical issue where the program would enter an infinite loop if the .env file was missing or contained incorrect information. The code was updated to handle these situations appropriately, providing meaningful feedback to the user and preventing unnecessary resource consumption. 3. .env File Handling Improvement: We improved the handling of the .env file, ensuring that the program can function correctly even in the absence of this file or if it contains incorrect data. This change enhances the robustness of our application. 4. Curses Alerts Integration: We integrated a new feature to display alerts in the terminal using the Curses library. These alerts can have different severity levels (info, warning, error), which are displayed in different colors (blue, yellow, red). This feature improves the user experience by providing clear and immediate feedback on the program's status. 5. Automatic Alert Dismissal: We implemented a feature where alerts automatically disappear after 5 seconds. This was achieved using Ruby threads, ensuring that the rest of the program is not blocked while the alert is displayed. This change enhances the user experience by preventing the screen from being cluttered with old alerts. 6. Debugging Libraries Exploration: We explored the possibility of using the Tracer and Debug libraries to trace the execution of the program and assist with debugging. While these libraries were not integrated in this commit, they remain a potential resource for future debugging efforts. This commit represents a significant step forward in the development of our Ruby project, improving both the user experience and the quality of our codebase.
2023-06-12 15:31:34 -06:00
# frozen_string_literal: true
Enhancing User Experience by Streamlining Database Connection Setup In this commit, we have made significant improvements to the user experience of the NETRAVE project by streamlining the process of setting up the database connection. This was achieved by modifying the first_run_setup method in the FirstRunInit class to intelligently handle the presence or absence of a configuration file (config.yml). The key changes include: Checking for the existence of config.yml: Before prompting the user for database details, the program now checks if a config.yml file already exists. This file holds the necessary details for connecting to the database. Reading and using existing configuration: If a config.yml file is found, the program attempts to connect to the database using the details from the file. This eliminates the need for the user to re-enter database details every time the program runs, thereby improving the user experience. Handling unsuccessful connections: If the connection attempt using the details from config.yml is unsuccessful, the program prompts the user for new database details. These new details are then used to overwrite the existing config.yml file. This ensures that the program can recover from changes in the database setup, such as a change in password. Creating config.yml if it does not exist: If no config.yml file is found, the program creates one and then prompts the user for the database details. This makes the initial setup process smoother for new users. These changes have several benefits: Improved User Experience: By avoiding unnecessary prompts for database details, the program becomes more user-friendly. Efficient Onboarding: The streamlined process makes onboarding new users more efficient. Cost Savings: By reducing the number of requests for help with database details, we can potentially save on support staff time. Employee Satisfaction: Improving user experience can lead to greater employee satisfaction and advocacy for the product. Ethical Considerations: These changes respect the rights of the users by giving them control over their personal data and ensuring transparency in how their data is handled. This commit represents a significant step forward in making the NETRAVE project more user-friendly and efficient. We believe these changes will improve the usage and adoption of the product while also respecting the rights of the users.
2023-06-07 13:16:49 -06:00
require 'gtk3'
Detailed Refactoring of Database Interaction 1. **Refactoring of Database Interaction Methods** - Refactored the `store_services` method in the `DatabaseManager` class to handle an array of services instead of a hash. This change was made to simplify the interaction with the database and to avoid unnecessary complexity in the data structure. - The `store_services` method now iterates over an array of services and inserts each service into the database with a default status of true. This design choice was made to ensure that all services are active by default. 2. **Modification of Database Schema** - Modified the `create_services_table` method in the `DatabaseManager` class to create a table with only two columns: `id` and `services`. This change was made to align the database schema with the new data structure used in the `store_services` method. - The `status` column was removed from the `services` table because the status of all services is now assumed to be true by default. 3. **Error Handling and Debugging** - Encountered a `Sequel::DatabaseError` with the message "Operand should contain 1 column(s)" during the execution of the `store_services` method. This error was caused by an attempt to insert a hash into a single database column. - The error was resolved by refactoring the `store_services` method to handle an array of services instead of a hash. 4. **Unorthodox Design Choices** - The decision to use an array of services instead of a hash and to assume that the status of all services is true by default may seem unorthodox. However, these design choices were made to simplify the interaction with the database and to avoid unnecessary complexity in the data structure. - These design choices also helped to resolve the `Sequel::DatabaseError` that was encountered during the execution of the `store_services` method. This commit represents a significant refactoring of the database interaction methods in the NETRAVE project. The changes made in this commit have simplified the interaction with the database and have resolved a `Sequel::DatabaseError` that was encountered during the execution of the `store_services` method.
2023-06-09 19:39:54 -06:00
# GUI launcher
class GUILauncher
def initialize # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
@app = Gtk::Application.new('com.netrave.gui', :flags_none)
Enhancing User Experience by Streamlining Database Connection Setup In this commit, we have made significant improvements to the user experience of the NETRAVE project by streamlining the process of setting up the database connection. This was achieved by modifying the first_run_setup method in the FirstRunInit class to intelligently handle the presence or absence of a configuration file (config.yml). The key changes include: Checking for the existence of config.yml: Before prompting the user for database details, the program now checks if a config.yml file already exists. This file holds the necessary details for connecting to the database. Reading and using existing configuration: If a config.yml file is found, the program attempts to connect to the database using the details from the file. This eliminates the need for the user to re-enter database details every time the program runs, thereby improving the user experience. Handling unsuccessful connections: If the connection attempt using the details from config.yml is unsuccessful, the program prompts the user for new database details. These new details are then used to overwrite the existing config.yml file. This ensures that the program can recover from changes in the database setup, such as a change in password. Creating config.yml if it does not exist: If no config.yml file is found, the program creates one and then prompts the user for the database details. This makes the initial setup process smoother for new users. These changes have several benefits: Improved User Experience: By avoiding unnecessary prompts for database details, the program becomes more user-friendly. Efficient Onboarding: The streamlined process makes onboarding new users more efficient. Cost Savings: By reducing the number of requests for help with database details, we can potentially save on support staff time. Employee Satisfaction: Improving user experience can lead to greater employee satisfaction and advocacy for the product. Ethical Considerations: These changes respect the rights of the users by giving them control over their personal data and ensuring transparency in how their data is handled. This commit represents a significant step forward in making the NETRAVE project more user-friendly and efficient. We believe these changes will improve the usage and adoption of the product while also respecting the rights of the users.
2023-06-07 13:16:49 -06:00
Detailed Refactoring of Database Interaction 1. **Refactoring of Database Interaction Methods** - Refactored the `store_services` method in the `DatabaseManager` class to handle an array of services instead of a hash. This change was made to simplify the interaction with the database and to avoid unnecessary complexity in the data structure. - The `store_services` method now iterates over an array of services and inserts each service into the database with a default status of true. This design choice was made to ensure that all services are active by default. 2. **Modification of Database Schema** - Modified the `create_services_table` method in the `DatabaseManager` class to create a table with only two columns: `id` and `services`. This change was made to align the database schema with the new data structure used in the `store_services` method. - The `status` column was removed from the `services` table because the status of all services is now assumed to be true by default. 3. **Error Handling and Debugging** - Encountered a `Sequel::DatabaseError` with the message "Operand should contain 1 column(s)" during the execution of the `store_services` method. This error was caused by an attempt to insert a hash into a single database column. - The error was resolved by refactoring the `store_services` method to handle an array of services instead of a hash. 4. **Unorthodox Design Choices** - The decision to use an array of services instead of a hash and to assume that the status of all services is true by default may seem unorthodox. However, these design choices were made to simplify the interaction with the database and to avoid unnecessary complexity in the data structure. - These design choices also helped to resolve the `Sequel::DatabaseError` that was encountered during the execution of the `store_services` method. This commit represents a significant refactoring of the database interaction methods in the NETRAVE project. The changes made in this commit have simplified the interaction with the database and have resolved a `Sequel::DatabaseError` that was encountered during the execution of the `store_services` method.
2023-06-09 19:39:54 -06:00
@app.signal_connect 'activate' do |application|
Enhancing User Experience by Streamlining Database Connection Setup In this commit, we have made significant improvements to the user experience of the NETRAVE project by streamlining the process of setting up the database connection. This was achieved by modifying the first_run_setup method in the FirstRunInit class to intelligently handle the presence or absence of a configuration file (config.yml). The key changes include: Checking for the existence of config.yml: Before prompting the user for database details, the program now checks if a config.yml file already exists. This file holds the necessary details for connecting to the database. Reading and using existing configuration: If a config.yml file is found, the program attempts to connect to the database using the details from the file. This eliminates the need for the user to re-enter database details every time the program runs, thereby improving the user experience. Handling unsuccessful connections: If the connection attempt using the details from config.yml is unsuccessful, the program prompts the user for new database details. These new details are then used to overwrite the existing config.yml file. This ensures that the program can recover from changes in the database setup, such as a change in password. Creating config.yml if it does not exist: If no config.yml file is found, the program creates one and then prompts the user for the database details. This makes the initial setup process smoother for new users. These changes have several benefits: Improved User Experience: By avoiding unnecessary prompts for database details, the program becomes more user-friendly. Efficient Onboarding: The streamlined process makes onboarding new users more efficient. Cost Savings: By reducing the number of requests for help with database details, we can potentially save on support staff time. Employee Satisfaction: Improving user experience can lead to greater employee satisfaction and advocacy for the product. Ethical Considerations: These changes respect the rights of the users by giving them control over their personal data and ensuring transparency in how their data is handled. This commit represents a significant step forward in making the NETRAVE project more user-friendly and efficient. We believe these changes will improve the usage and adoption of the product while also respecting the rights of the users.
2023-06-07 13:16:49 -06:00
builder = Gtk::Builder.new
Detailed Refactoring of Database Interaction 1. **Refactoring of Database Interaction Methods** - Refactored the `store_services` method in the `DatabaseManager` class to handle an array of services instead of a hash. This change was made to simplify the interaction with the database and to avoid unnecessary complexity in the data structure. - The `store_services` method now iterates over an array of services and inserts each service into the database with a default status of true. This design choice was made to ensure that all services are active by default. 2. **Modification of Database Schema** - Modified the `create_services_table` method in the `DatabaseManager` class to create a table with only two columns: `id` and `services`. This change was made to align the database schema with the new data structure used in the `store_services` method. - The `status` column was removed from the `services` table because the status of all services is now assumed to be true by default. 3. **Error Handling and Debugging** - Encountered a `Sequel::DatabaseError` with the message "Operand should contain 1 column(s)" during the execution of the `store_services` method. This error was caused by an attempt to insert a hash into a single database column. - The error was resolved by refactoring the `store_services` method to handle an array of services instead of a hash. 4. **Unorthodox Design Choices** - The decision to use an array of services instead of a hash and to assume that the status of all services is true by default may seem unorthodox. However, these design choices were made to simplify the interaction with the database and to avoid unnecessary complexity in the data structure. - These design choices also helped to resolve the `Sequel::DatabaseError` that was encountered during the execution of the `store_services` method. This commit represents a significant refactoring of the database interaction methods in the NETRAVE project. The changes made in this commit have simplified the interaction with the database and have resolved a `Sequel::DatabaseError` that was encountered during the execution of the `store_services` method.
2023-06-09 19:39:54 -06:00
builder.add_from_file('./Glade/NETRAVE.glade')
Enhancing User Experience by Streamlining Database Connection Setup In this commit, we have made significant improvements to the user experience of the NETRAVE project by streamlining the process of setting up the database connection. This was achieved by modifying the first_run_setup method in the FirstRunInit class to intelligently handle the presence or absence of a configuration file (config.yml). The key changes include: Checking for the existence of config.yml: Before prompting the user for database details, the program now checks if a config.yml file already exists. This file holds the necessary details for connecting to the database. Reading and using existing configuration: If a config.yml file is found, the program attempts to connect to the database using the details from the file. This eliminates the need for the user to re-enter database details every time the program runs, thereby improving the user experience. Handling unsuccessful connections: If the connection attempt using the details from config.yml is unsuccessful, the program prompts the user for new database details. These new details are then used to overwrite the existing config.yml file. This ensures that the program can recover from changes in the database setup, such as a change in password. Creating config.yml if it does not exist: If no config.yml file is found, the program creates one and then prompts the user for the database details. This makes the initial setup process smoother for new users. These changes have several benefits: Improved User Experience: By avoiding unnecessary prompts for database details, the program becomes more user-friendly. Efficient Onboarding: The streamlined process makes onboarding new users more efficient. Cost Savings: By reducing the number of requests for help with database details, we can potentially save on support staff time. Employee Satisfaction: Improving user experience can lead to greater employee satisfaction and advocacy for the product. Ethical Considerations: These changes respect the rights of the users by giving them control over their personal data and ensuring transparency in how their data is handled. This commit represents a significant step forward in making the NETRAVE project more user-friendly and efficient. We believe these changes will improve the usage and adoption of the product while also respecting the rights of the users.
2023-06-07 13:16:49 -06:00
Detailed Refactoring of Database Interaction 1. **Refactoring of Database Interaction Methods** - Refactored the `store_services` method in the `DatabaseManager` class to handle an array of services instead of a hash. This change was made to simplify the interaction with the database and to avoid unnecessary complexity in the data structure. - The `store_services` method now iterates over an array of services and inserts each service into the database with a default status of true. This design choice was made to ensure that all services are active by default. 2. **Modification of Database Schema** - Modified the `create_services_table` method in the `DatabaseManager` class to create a table with only two columns: `id` and `services`. This change was made to align the database schema with the new data structure used in the `store_services` method. - The `status` column was removed from the `services` table because the status of all services is now assumed to be true by default. 3. **Error Handling and Debugging** - Encountered a `Sequel::DatabaseError` with the message "Operand should contain 1 column(s)" during the execution of the `store_services` method. This error was caused by an attempt to insert a hash into a single database column. - The error was resolved by refactoring the `store_services` method to handle an array of services instead of a hash. 4. **Unorthodox Design Choices** - The decision to use an array of services instead of a hash and to assume that the status of all services is true by default may seem unorthodox. However, these design choices were made to simplify the interaction with the database and to avoid unnecessary complexity in the data structure. - These design choices also helped to resolve the `Sequel::DatabaseError` that was encountered during the execution of the `store_services` method. This commit represents a significant refactoring of the database interaction methods in the NETRAVE project. The changes made in this commit have simplified the interaction with the database and have resolved a `Sequel::DatabaseError` that was encountered during the execution of the `store_services` method.
2023-06-09 19:39:54 -06:00
window = builder.get_object('main_window')
Enhancing User Experience by Streamlining Database Connection Setup In this commit, we have made significant improvements to the user experience of the NETRAVE project by streamlining the process of setting up the database connection. This was achieved by modifying the first_run_setup method in the FirstRunInit class to intelligently handle the presence or absence of a configuration file (config.yml). The key changes include: Checking for the existence of config.yml: Before prompting the user for database details, the program now checks if a config.yml file already exists. This file holds the necessary details for connecting to the database. Reading and using existing configuration: If a config.yml file is found, the program attempts to connect to the database using the details from the file. This eliminates the need for the user to re-enter database details every time the program runs, thereby improving the user experience. Handling unsuccessful connections: If the connection attempt using the details from config.yml is unsuccessful, the program prompts the user for new database details. These new details are then used to overwrite the existing config.yml file. This ensures that the program can recover from changes in the database setup, such as a change in password. Creating config.yml if it does not exist: If no config.yml file is found, the program creates one and then prompts the user for the database details. This makes the initial setup process smoother for new users. These changes have several benefits: Improved User Experience: By avoiding unnecessary prompts for database details, the program becomes more user-friendly. Efficient Onboarding: The streamlined process makes onboarding new users more efficient. Cost Savings: By reducing the number of requests for help with database details, we can potentially save on support staff time. Employee Satisfaction: Improving user experience can lead to greater employee satisfaction and advocacy for the product. Ethical Considerations: These changes respect the rights of the users by giving them control over their personal data and ensuring transparency in how their data is handled. This commit represents a significant step forward in making the NETRAVE project more user-friendly and efficient. We believe these changes will improve the usage and adoption of the product while also respecting the rights of the users.
2023-06-07 13:16:49 -06:00
window.application = application
screen = Gdk::Screen.default
width = screen.width
height = screen.height
Major Refactoring and Feature Addition for Improved User Experience and Code Quality This commit includes several significant changes aimed at improving the functionality, user experience, and code quality of our Ruby project. 1. Decryption Fix: We identified and resolved an issue where the database password was being decrypted multiple times, leading to connection problems. The code was refactored to ensure that decryption only occurs once, thereby enhancing the efficiency and reliability of our database connections. 2. Infinite Loop Resolution: We addressed a critical issue where the program would enter an infinite loop if the .env file was missing or contained incorrect information. The code was updated to handle these situations appropriately, providing meaningful feedback to the user and preventing unnecessary resource consumption. 3. .env File Handling Improvement: We improved the handling of the .env file, ensuring that the program can function correctly even in the absence of this file or if it contains incorrect data. This change enhances the robustness of our application. 4. Curses Alerts Integration: We integrated a new feature to display alerts in the terminal using the Curses library. These alerts can have different severity levels (info, warning, error), which are displayed in different colors (blue, yellow, red). This feature improves the user experience by providing clear and immediate feedback on the program's status. 5. Automatic Alert Dismissal: We implemented a feature where alerts automatically disappear after 5 seconds. This was achieved using Ruby threads, ensuring that the rest of the program is not blocked while the alert is displayed. This change enhances the user experience by preventing the screen from being cluttered with old alerts. 6. Debugging Libraries Exploration: We explored the possibility of using the Tracer and Debug libraries to trace the execution of the program and assist with debugging. While these libraries were not integrated in this commit, they remain a potential resource for future debugging efforts. This commit represents a significant step forward in the development of our Ruby project, improving both the user experience and the quality of our codebase.
2023-06-12 15:31:34 -06:00
if (width >= 3840) && (height >= 2160)
Enhancing User Experience by Streamlining Database Connection Setup In this commit, we have made significant improvements to the user experience of the NETRAVE project by streamlining the process of setting up the database connection. This was achieved by modifying the first_run_setup method in the FirstRunInit class to intelligently handle the presence or absence of a configuration file (config.yml). The key changes include: Checking for the existence of config.yml: Before prompting the user for database details, the program now checks if a config.yml file already exists. This file holds the necessary details for connecting to the database. Reading and using existing configuration: If a config.yml file is found, the program attempts to connect to the database using the details from the file. This eliminates the need for the user to re-enter database details every time the program runs, thereby improving the user experience. Handling unsuccessful connections: If the connection attempt using the details from config.yml is unsuccessful, the program prompts the user for new database details. These new details are then used to overwrite the existing config.yml file. This ensures that the program can recover from changes in the database setup, such as a change in password. Creating config.yml if it does not exist: If no config.yml file is found, the program creates one and then prompts the user for the database details. This makes the initial setup process smoother for new users. These changes have several benefits: Improved User Experience: By avoiding unnecessary prompts for database details, the program becomes more user-friendly. Efficient Onboarding: The streamlined process makes onboarding new users more efficient. Cost Savings: By reducing the number of requests for help with database details, we can potentially save on support staff time. Employee Satisfaction: Improving user experience can lead to greater employee satisfaction and advocacy for the product. Ethical Considerations: These changes respect the rights of the users by giving them control over their personal data and ensuring transparency in how their data is handled. This commit represents a significant step forward in making the NETRAVE project more user-friendly and efficient. We believe these changes will improve the usage and adoption of the product while also respecting the rights of the users.
2023-06-07 13:16:49 -06:00
# 4K resolution
window.set_default_size(1200, 1000)
Major Refactoring and Feature Addition for Improved User Experience and Code Quality This commit includes several significant changes aimed at improving the functionality, user experience, and code quality of our Ruby project. 1. Decryption Fix: We identified and resolved an issue where the database password was being decrypted multiple times, leading to connection problems. The code was refactored to ensure that decryption only occurs once, thereby enhancing the efficiency and reliability of our database connections. 2. Infinite Loop Resolution: We addressed a critical issue where the program would enter an infinite loop if the .env file was missing or contained incorrect information. The code was updated to handle these situations appropriately, providing meaningful feedback to the user and preventing unnecessary resource consumption. 3. .env File Handling Improvement: We improved the handling of the .env file, ensuring that the program can function correctly even in the absence of this file or if it contains incorrect data. This change enhances the robustness of our application. 4. Curses Alerts Integration: We integrated a new feature to display alerts in the terminal using the Curses library. These alerts can have different severity levels (info, warning, error), which are displayed in different colors (blue, yellow, red). This feature improves the user experience by providing clear and immediate feedback on the program's status. 5. Automatic Alert Dismissal: We implemented a feature where alerts automatically disappear after 5 seconds. This was achieved using Ruby threads, ensuring that the rest of the program is not blocked while the alert is displayed. This change enhances the user experience by preventing the screen from being cluttered with old alerts. 6. Debugging Libraries Exploration: We explored the possibility of using the Tracer and Debug libraries to trace the execution of the program and assist with debugging. While these libraries were not integrated in this commit, they remain a potential resource for future debugging efforts. This commit represents a significant step forward in the development of our Ruby project, improving both the user experience and the quality of our codebase.
2023-06-12 15:31:34 -06:00
elsif (width >= 1920) && (height >= 1080)
Enhancing User Experience by Streamlining Database Connection Setup In this commit, we have made significant improvements to the user experience of the NETRAVE project by streamlining the process of setting up the database connection. This was achieved by modifying the first_run_setup method in the FirstRunInit class to intelligently handle the presence or absence of a configuration file (config.yml). The key changes include: Checking for the existence of config.yml: Before prompting the user for database details, the program now checks if a config.yml file already exists. This file holds the necessary details for connecting to the database. Reading and using existing configuration: If a config.yml file is found, the program attempts to connect to the database using the details from the file. This eliminates the need for the user to re-enter database details every time the program runs, thereby improving the user experience. Handling unsuccessful connections: If the connection attempt using the details from config.yml is unsuccessful, the program prompts the user for new database details. These new details are then used to overwrite the existing config.yml file. This ensures that the program can recover from changes in the database setup, such as a change in password. Creating config.yml if it does not exist: If no config.yml file is found, the program creates one and then prompts the user for the database details. This makes the initial setup process smoother for new users. These changes have several benefits: Improved User Experience: By avoiding unnecessary prompts for database details, the program becomes more user-friendly. Efficient Onboarding: The streamlined process makes onboarding new users more efficient. Cost Savings: By reducing the number of requests for help with database details, we can potentially save on support staff time. Employee Satisfaction: Improving user experience can lead to greater employee satisfaction and advocacy for the product. Ethical Considerations: These changes respect the rights of the users by giving them control over their personal data and ensuring transparency in how their data is handled. This commit represents a significant step forward in making the NETRAVE project more user-friendly and efficient. We believe these changes will improve the usage and adoption of the product while also respecting the rights of the users.
2023-06-07 13:16:49 -06:00
# 1080p resolution
window.set_default_size(1080, 800)
else
# 720p or lower resolution
window.set_default_size(800, 600)
end
window.show_all
end
end
def run
Detailed Refactoring of Database Interaction 1. **Refactoring of Database Interaction Methods** - Refactored the `store_services` method in the `DatabaseManager` class to handle an array of services instead of a hash. This change was made to simplify the interaction with the database and to avoid unnecessary complexity in the data structure. - The `store_services` method now iterates over an array of services and inserts each service into the database with a default status of true. This design choice was made to ensure that all services are active by default. 2. **Modification of Database Schema** - Modified the `create_services_table` method in the `DatabaseManager` class to create a table with only two columns: `id` and `services`. This change was made to align the database schema with the new data structure used in the `store_services` method. - The `status` column was removed from the `services` table because the status of all services is now assumed to be true by default. 3. **Error Handling and Debugging** - Encountered a `Sequel::DatabaseError` with the message "Operand should contain 1 column(s)" during the execution of the `store_services` method. This error was caused by an attempt to insert a hash into a single database column. - The error was resolved by refactoring the `store_services` method to handle an array of services instead of a hash. 4. **Unorthodox Design Choices** - The decision to use an array of services instead of a hash and to assume that the status of all services is true by default may seem unorthodox. However, these design choices were made to simplify the interaction with the database and to avoid unnecessary complexity in the data structure. - These design choices also helped to resolve the `Sequel::DatabaseError` that was encountered during the execution of the `store_services` method. This commit represents a significant refactoring of the database interaction methods in the NETRAVE project. The changes made in this commit have simplified the interaction with the database and have resolved a `Sequel::DatabaseError` that was encountered during the execution of the `store_services` method.
2023-06-09 19:39:54 -06:00
puts 'Launching GUI...'
Enhancing User Experience by Streamlining Database Connection Setup In this commit, we have made significant improvements to the user experience of the NETRAVE project by streamlining the process of setting up the database connection. This was achieved by modifying the first_run_setup method in the FirstRunInit class to intelligently handle the presence or absence of a configuration file (config.yml). The key changes include: Checking for the existence of config.yml: Before prompting the user for database details, the program now checks if a config.yml file already exists. This file holds the necessary details for connecting to the database. Reading and using existing configuration: If a config.yml file is found, the program attempts to connect to the database using the details from the file. This eliminates the need for the user to re-enter database details every time the program runs, thereby improving the user experience. Handling unsuccessful connections: If the connection attempt using the details from config.yml is unsuccessful, the program prompts the user for new database details. These new details are then used to overwrite the existing config.yml file. This ensures that the program can recover from changes in the database setup, such as a change in password. Creating config.yml if it does not exist: If no config.yml file is found, the program creates one and then prompts the user for the database details. This makes the initial setup process smoother for new users. These changes have several benefits: Improved User Experience: By avoiding unnecessary prompts for database details, the program becomes more user-friendly. Efficient Onboarding: The streamlined process makes onboarding new users more efficient. Cost Savings: By reducing the number of requests for help with database details, we can potentially save on support staff time. Employee Satisfaction: Improving user experience can lead to greater employee satisfaction and advocacy for the product. Ethical Considerations: These changes respect the rights of the users by giving them control over their personal data and ensuring transparency in how their data is handled. This commit represents a significant step forward in making the NETRAVE project more user-friendly and efficient. We believe these changes will improve the usage and adoption of the product while also respecting the rights of the users.
2023-06-07 13:16:49 -06:00
@app.run
end
end