|
Server : LiteSpeed System : Linux barito.iixcp.rumahweb.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64 User : elvh3918 ( 1528) PHP Version : 8.2.31 Disable Function : mail Directory : /opt/cloudlinux/venv/lib/python3.11/site-packages/xray/adviser/__pycache__/ |
�
e�"j�� � �v � d Z ddlZddlZddlZddlZddlZddlZddlZddlm Z ddl
mZmZ ddl
mZmZmZmZmZ ddlmZ ddlmZ ddlmZmZmZmZmZmZmZmZmZm Z m!Z! dd l"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z( dd
l)m*Z* ddl+m,Z, ddl-m.Z. dd
l/m0Z1 ddl2m3Z3 ddl4m5Z5 ddl6m7Z7m8Z8 ddl9m:Z:m;Z;m<Z<m=Z= ddl>m?Z?m@Z@ ddlAmBZBmCZC ddlDmEZEmFZFmGZG ddlHmIZImJZJmKZKmLZL ddlMmNZN ddlOmPZP ddlQmRZRmSZS ddlTmUZUmVZV ddlWmXZX ddlYmZZZm[Z[ ddl\m]Z] dZ^d Z_d!e`fd"�Za G d#� d$e� � Zbe G d%� d&� � � � Zc G d'� d(� � ZddS ))zB
This module contains X Ray Smart Advice local utility main class
� N)�contextmanager)�asdict� dataclass)�Any�Tuple�Optional�List�Dict)�Enum)�LicenseApproveStatus)�is_feature_allowed�is_subscription_pending�get_subscription_upgrade_url�get_license_approve_status�approve_license_agreement�get_license_agreement_text�get_subscriptions_info�get_user_auth_key�2is_smart_advice_notifications_disabled_server_wide�.is_smart_advice_reminders_disabled_server_wide�5is_smart_advice_wordpress_plugin_disabled_server_wide)�docroot�is_panel_feature_supported�get_user_emails_list�panel_awp_link� getCPName�userdomains)�
is_wp_path)�drop_privileges)�Feature)�gettext� )�get_advice_instance)�SmartAdviceProgress� )�
get_client�
api_client)�advice_pending_storage�advice_processed_storage�advice_list_cache�advice_reason_max_len)�get_lve_limits�
get_lve_usage)� XRayError�SmartAdvicePluginError)�user_mode_advice_verification�username_verification�get_xray_exec_user)� timestamp� safe_move�get_user_php_version�filelock)�report_usage_action_or_error)�ClWposGetter)�get_mu_directory�"create_mu_plugins_dir_if_not_exist)�plugin_installed�prepare_system_analytics_data)�report_analytics)�ImunifyManager�ADV_TYPE)�validate_system_user�;zE/opt/cloudlinux/flags/enabled-flags.d/xray-smart-advice-disabled.flag�returnc �J � t j � t � � S �N)�os�path�exists�SMART_ADVICE_DISABLED_FLAG� � �K/opt/cloudlinux/venv/lib64/python3.11/site-packages/xray/adviser/cli_api.py�_sa_disabledrL Q s � �
�7�>�>�4�5�5�5rJ c � � e Zd ZdZdZdS )�
AdviceActions�apply�rollbackN)�__name__�
__module__�__qualname__�APPLY�ROLLBACKrI rJ rK rN rN U s � � � � � ��E��H�H�HrJ rN c �V � e Zd ZU eed<