Install missing tools for a feature
()
| 16807 | """Handle status update request""" |
| 16808 | try: |
| 16809 | status_data = get_current_status() |
| 16810 | emit('status_update', status_data) |
| 16811 | except Exception as e: |
| 16812 | logger.error(f"Error handling status request: {e}") |
| 16813 | |
| 16814 | |
| 16815 | @socketio.on('request_logs') |
| 16816 | def handle_log_request(): |
| 16817 | """Handle request for recent logs""" |
| 16818 | try: |
| 16819 | logs = get_recent_logs() |
| 16820 | emit('log_update', logs) |
| 16821 | except Exception as e: |
| 16822 | logger.error(f"Error sending logs: {e}") |
| 16823 | |
| 16824 | |
| 16825 | @socketio.on('request_network') |
| 16826 | def handle_network_request(): |
| 16827 | """Handle request for network data""" |
| 16828 | try: |
| 16829 | db = get_db(currentdir=shared_data.currentdir) |
| 16830 | data = db.get_all_hosts() |
| 16831 | emit('network_update', data) |
| 16832 | except Exception as e: |
| 16833 | logger.error(f"Error sending network data: {e}") |
| 16834 | traceback.print_exc() |
| 16835 | |
| 16836 | |
| 16837 | @socketio.on('request_credentials') |
| 16838 | def handle_credentials_request(): |
| 16839 | """Handle request for credentials data""" |
| 16840 | try: |
| 16841 | credentials = web_utils.get_all_credentials() |
| 16842 | emit('credentials_update', credentials) |
| 16843 | except Exception as e: |
| 16844 | logger.error(f"Error sending credentials: {e}") |
nothing calls this directly
no test coverage detected